ItemTreeNodeIndex Class Reference

#include <customgui_itemtree_utils.h>

Detailed Description

Identifies a node in an item tree's flattened index table.

Stores the node's traversal index, stable GUID, opaque node pointer, and associated payload pointer. The records can be sorted by GUID for stable lookup.

Note
The use of the predefined ITEMTREE_NODEDATA_FLAG flags is optional. You can also define and use your own flags.

Public Member Functions

 ItemTreeNodeIndex ()
 
 ItemTreeNodeIndex (UInt64 guid)
 
Bool operator< (const ItemTreeNodeIndex &dst) const
 
Bool operator> (const ItemTreeNodeIndex &dst) const
 
Bool operator<= (const ItemTreeNodeIndex &dst) const
 
Bool operator>= (const ItemTreeNodeIndex &dst) const
 
Bool operator== (const ItemTreeNodeIndex &dst) const
 

Public Attributes

Int32 m_Index
 
UInt64 m_GUID
 
ItemTreeNode * node
 
ItemTreeNodeData * data
 

Constructor & Destructor Documentation

◆ ItemTreeNodeIndex() [1/2]

Initializes an empty index record.

◆ ItemTreeNodeIndex() [2/2]

ItemTreeNodeIndex ( UInt64  guid)
explicit

Initializes an index record with a node GUID.

Parameters
[in]guidNode GUID.

Member Function Documentation

◆ operator<()

Bool operator< ( const ItemTreeNodeIndex &  dst) const

Compares two records by GUID.

Parameters
[in]dstRecord to compare with this record.
Returns
true if this record's GUID is less than dst's GUID.

◆ operator>()

Bool operator> ( const ItemTreeNodeIndex &  dst) const

Compares two records by GUID.

Parameters
[in]dstRecord to compare with this record.
Returns
true if this record's GUID is greater than dst's GUID.

◆ operator<=()

Bool operator<= ( const ItemTreeNodeIndex &  dst) const

Compares two records by GUID.

Parameters
[in]dstRecord to compare with this record.
Returns
true if this record's GUID is less than or equal to dst's GUID.

◆ operator>=()

Bool operator>= ( const ItemTreeNodeIndex &  dst) const

Compares two records by GUID.

Parameters
[in]dstRecord to compare with this record.
Returns
true if this record's GUID is greater than or equal to dst's GUID.

◆ operator==()

Bool operator== ( const ItemTreeNodeIndex &  dst) const

Compares two records by GUID.

Parameters
[in]dstRecord to compare with this record.
Returns
true if both records have the same GUID.

Member Data Documentation

◆ m_Index

Int32 m_Index

Zero-based traversal index of the node.

◆ m_GUID

UInt64 m_GUID

Stable identifier of the node.

◆ node

ItemTreeNode* node

Opaque pointer to the represented node.

◆ data

Pointer to the node payload.