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

#include <stageCache.h>

+ Inheritance diagram for UsdStageCache::Id:

Public Member Functions

 Id ()
 Default construct an invalid id. More...
 
long int ToLongInt () const
 Convert this Id to an integral representation. More...
 
std::string ToString () const
 Convert this Id to a string representation. More...
 
bool IsValid () const
 Return true if this Id is valid. More...
 
 operator bool () const
 Return true if this Id is valid. More...
 

Static Public Member Functions

static Id FromLongInt (long int val)
 
static Id FromString (const std::string &s)
 

Friends

bool operator== (const Id &lhs, const Id &rhs)
 Equality comparison. More...
 
bool operator< (const Id &lhs, const Id &rhs)
 Less-than comparison. More...
 
size_t hash_value (Id id)
 Hash. More...
 

Detailed Description

A lightweight identifier that may be used to identify a particular cached stage within a UsdStageCache. An identifier may be converted to and from long int and string, to facilitate use within restricted contexts.

Id objects are only valid with the stage from which they were obtained. It never makes sense to use an Id with a stage other than the one it was obtained from.

Definition at line 100 of file stageCache.h.

Constructor & Destructor Documentation

UsdStageCache::Id::Id ( )
inline

Default construct an invalid id.

Definition at line 102 of file stageCache.h.

Member Function Documentation

static Id UsdStageCache::Id::FromLongInt ( long int  val)
inlinestatic

Create an Id from an integral value. The supplied val must have been obtained by calling ToLongInt() previously.

Definition at line 106 of file stageCache.h.

static Id UsdStageCache::Id::FromString ( const std::string s)
inlinestatic

Create an Id from a string value. The supplied val must have been obtained by calling ToString() previously.

Definition at line 110 of file stageCache.h.

bool UsdStageCache::Id::IsValid ( ) const
inline

Return true if this Id is valid.

Definition at line 123 of file stageCache.h.

UsdStageCache::Id::operator bool ( ) const
inlineexplicit

Return true if this Id is valid.

Definition at line 126 of file stageCache.h.

long int UsdStageCache::Id::ToLongInt ( ) const
inline

Convert this Id to an integral representation.

Definition at line 115 of file stageCache.h.

std::string UsdStageCache::Id::ToString ( ) const
inline

Convert this Id to a string representation.

Definition at line 118 of file stageCache.h.

Friends And Related Function Documentation

size_t hash_value ( Id  id)
friend

Hash.

Definition at line 138 of file stageCache.h.

bool operator< ( const Id lhs,
const Id rhs 
)
friend

Less-than comparison.

Definition at line 134 of file stageCache.h.

bool operator== ( const Id lhs,
const Id rhs 
)
friend

Equality comparison.

Definition at line 130 of file stageCache.h.


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