HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UN_DataIndex Class Reference

#include <UN_Include.h>

+ Inheritance diagram for UN_DataIndex:

Public Member Functions

 UN_DataIndex (ValueType value=INVALID_NUMBER)
 Constructs the index object given the numerical value. More...
 
 UN_DataIndex (UN_DataSize size)
 For past-end array index. More...
 
 UN_DataIndex (exint value)
 
void clear ()
 Resets the index to an invalid value. More...
 
 operator exint () const
 Implicit cast to exint for indexing into arrays (eg, UT_Array). More...
 
UN_DataIndex operator+ (UN_DataSize offset)
 Some arithmetic operators that make sense on indices. More...
 
UN_DataIndex operator- (UN_DataSize offset)
 Some arithmetic operators that make sense on indices. More...
 
UN_DataIndex operator+= (UN_DataSize offset)
 Some arithmetic operators that make sense on indices. More...
 
UN_DataIndex operator-= (UN_DataSize offset)
 Some arithmetic operators that make sense on indices. More...
 
- Public Member Functions inherited from UN_DataNumber
constexpr UN_DataNumber (ValueType value=INVALID_NUMBER)
 
void setValue (ValueType value)
 Sets the numerical value of this number. More...
 
constexpr ValueType value () const
 Returns the numerical value of this number. More...
 
 operator ValueType () const
 
constexpr exint exintValue () const
 Returns an exint value of this number. More...
 
constexpr bool isValid () const
 Returns true if this data number is valid; false otherwise. More...
 
constexpr operator bool () const
 Returns true if this data number is valid; false otherwise. More...
 
constexpr bool operator== (const UN_DataNumber &other) const
 Comparison operators. More...
 
constexpr bool operator!= (const UN_DataNumber &other) const
 Comparison operators. More...
 
constexpr bool operator< (const UN_DataNumber &other) const
 Comparison operators. More...
 
constexpr bool operator<= (const UN_DataNumber &other) const
 Comparison operators. More...
 
constexpr bool operator> (const UN_DataNumber &other) const
 Comparison operators. More...
 
constexpr bool operator>= (const UN_DataNumber &other) const
 Comparison operators. More...
 
UN_DataNumberoperator++ ()
 Basic arithmetic operators. More...
 
UN_DataNumber operator++ (int)
 Basic arithmetic operators. More...
 

Additional Inherited Members

- Public Types inherited from UN_DataNumber
enum  ValueType : ValueIntType
 
using ValueIntType = exint
 
- Static Public Attributes inherited from UN_DataNumber
static constexpr ValueType INVALID_NUMBER = ValueType(-1)
 

Detailed Description

An index into a data container, referring to a particular data object. Indices may be reused for new data objects, if old objects were deleted.

Definition at line 149 of file UN_Include.h.

Constructor & Destructor Documentation

UN_DataIndex::UN_DataIndex ( ValueType  value = INVALID_NUMBER)
inlineexplicit

Constructs the index object given the numerical value.

Definition at line 153 of file UN_Include.h.

UN_DataIndex::UN_DataIndex ( UN_DataSize  size)
inlineexplicit

For past-end array index.

Definition at line 157 of file UN_Include.h.

UN_DataIndex::UN_DataIndex ( exint  value)
inlineexplicit

An exint is used for indexing into UT_Array, and UN_DataIndex represents such index, so these types should be interchangeable. Thus providing a constructor from exint.

Definition at line 163 of file UN_Include.h.

Member Function Documentation

void UN_DataIndex::clear ( )
inline

Resets the index to an invalid value.

Definition at line 168 of file UN_Include.h.

UN_DataIndex::operator exint ( ) const
inline

Implicit cast to exint for indexing into arrays (eg, UT_Array).

Definition at line 172 of file UN_Include.h.

UN_DataIndex UN_DataIndex::operator+ ( UN_DataSize  offset)
inline

Some arithmetic operators that make sense on indices.

Definition at line 176 of file UN_Include.h.

UN_DataIndex UN_DataIndex::operator+= ( UN_DataSize  offset)
inline

Some arithmetic operators that make sense on indices.

Definition at line 188 of file UN_Include.h.

UN_DataIndex UN_DataIndex::operator- ( UN_DataSize  offset)
inline

Some arithmetic operators that make sense on indices.

Definition at line 182 of file UN_Include.h.

UN_DataIndex UN_DataIndex::operator-= ( UN_DataSize  offset)
inline

Some arithmetic operators that make sense on indices.

Definition at line 194 of file UN_Include.h.


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