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

#include <UNI_SessionID.h>

+ Inheritance diagram for UNI_SessionIDCoder:

Protected Member Functions

 UNI_SessionIDCoder (UNI_ID::NumericType session_id_number)
 Creates a unique global ID from a raw numerical value. More...
 
 UNI_SessionIDCoder (UNI_GraphID graph_id, UNI_ID::NumericType local_id)
 
UNI_GraphID decodeGraphID () const
 Returns the graph ID encoded in this session ID. More...
 
UNI_ID::NumericType decodeItemID () const
 Returns the numeric value of the item ID encoded in this session ID. More...
 

Additional Inherited Members

- Public Types inherited from UNI_ID
using NumericType = exint
 Numerical representation of the ID. More...
 
- Public Member Functions inherited from UNI_ID
constexpr UNI_ID (NumericType id_number=INVALID_ID)
 Explicit constructor. More...
 
constexpr void clear ()
 Resets the ID to an invalid value. More...
 
constexpr NumericType numericValue () const
 Returns the numeric value of this ID. More...
 
constexpr exint exintValue () const
 Returns an exint value of this ID. More...
 
 operator exint () const
 
constexpr bool isValid () const
 Returns true if this ID is valid; false otherwise. More...
 
constexpr operator bool () const
 Returns true if this ID is valid; false otherwise. More...
 
constexpr bool operator== (const UNI_ID &other) const
 Comparison operators. More...
 
constexpr bool operator!= (const UNI_ID &other) const
 Comparison operators. More...
 
constexpr bool operator< (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
constexpr bool operator<= (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
constexpr bool operator> (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
constexpr bool operator>= (const UNI_ID &other) const
 Remaining comparison operators, used for sorting, etc. More...
 
- Static Public Attributes inherited from UNI_ID
static constexpr NumericType INVALID_ID = -1
 

Detailed Description

A class representing a global unique ID in Houdini session for items that can be found inside UNI graphs. This class can encode two separate IDs: a graph ID and item's local ID into a single numeric value (UNI_ID::NumericType) stored in the base class. It can also take the raw numerical value of the global unique ID too, and thus can convert between the two representations.

Definition at line 26 of file UNI_SessionID.h.

Constructor & Destructor Documentation

UNI_SessionIDCoder::UNI_SessionIDCoder ( UNI_ID::NumericType  session_id_number)
inlineexplicitprotected

Creates a unique global ID from a raw numerical value.

Definition at line 30 of file UNI_SessionID.h.

UNI_SessionIDCoder::UNI_SessionIDCoder ( UNI_GraphID  graph_id,
UNI_ID::NumericType  local_id 
)
protected

Creates a unique ID that gobally identifies the item in Houdini session. The global ID is constructed based on the given graph ID and the item's local ID within that graph.

Member Function Documentation

UNI_GraphID UNI_SessionIDCoder::decodeGraphID ( ) const
protected

Returns the graph ID encoded in this session ID.

UNI_ID::NumericType UNI_SessionIDCoder::decodeItemID ( ) const
protected

Returns the numeric value of the item ID encoded in this session ID.


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