QUAOAR STUDIO // Mobius API
mobius::poly_BaseHandle Class Reference

#include <poly_Handles.h>

Inheritance diagram for mobius::poly_BaseHandle:

Public Member Functions

 poly_BaseHandle (const int _idx=Mobius_InvalidHandleIndex)
 
int GetIdx () const
 
bool IsValid () const
 The handle is valid iff the index is not negative.
 
void Invalidate ()
 Invalidates this handle.
 
bool operator== (const poly_BaseHandle &_rhs) const
 
bool operator!= (const poly_BaseHandle &_rhs) const
 
bool operator< (const poly_BaseHandle &_rhs) const
 

Public Attributes

int iIdx
 0-based index of the handle.
 

Protected Member Functions

void increment (const int amount)
 
void decrement (const int amount)
 

Detailed Description

Base class for all handles used to address mesh elements. This class is intended to substitute raw indices which are less descriptive and more error-prone to operate with.

Constructor & Destructor Documentation

◆ poly_BaseHandle()

mobius::poly_BaseHandle::poly_BaseHandle ( const int  _idx = Mobius_InvalidHandleIndex)
inlineexplicit

Ctor accepting the optional index.

Parameters
[in]_idx0-based index to set for the handle. Use "-1" to invalidate the handle.

Member Function Documentation

◆ decrement()

void mobius::poly_BaseHandle::decrement ( const int  amount)
inlineprotected

Decrements the underlying index by the passed value.

Parameters
[in]amountdecrement value to use.

◆ GetIdx()

int mobius::poly_BaseHandle::GetIdx ( ) const
inline
Returns
underlying index of this handle.

◆ increment()

void mobius::poly_BaseHandle::increment ( const int  amount)
inlineprotected

Increments the underlying index by the passed value.

Parameters
[in]amountincrement value to use.

◆ operator!=()

bool mobius::poly_BaseHandle::operator!= ( const poly_BaseHandle _rhs) const
inline

Checks for inequality.

Parameters
[in]_rhsanother handle to compare this handle with.
Returns
true in case of inequality, false – otherwise.

◆ operator<()

bool mobius::poly_BaseHandle::operator< ( const poly_BaseHandle _rhs) const
inline

Checks if this handle is less than the passed one.

Parameters
[in]_rhsanother handle to compare this handle with.
Returns
true if this handle is less than the passed one, false – otherwise.

◆ operator==()

bool mobius::poly_BaseHandle::operator== ( const poly_BaseHandle _rhs) const
inline

Compares this handle with the passed one.

Parameters
[in]_rhsanother handle to compare this handle with.
Returns
true in case of equality, false – otherwise.

The documentation for this class was generated from the following file: