Loading...
Searching...
No Matches
UsdStageCache::Id Class Reference

A lightweight identifier that may be used to identify a particular cached stage within a UsdStageCache. More...

#include <stageCache.h>

Public Member Functions

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

Static Public Member Functions

static Id FromLongInt (long int val)
 Create an Id from an integral value.
 
static Id FromString (const std::string &s)
 Create an Id from a string value.
 

Friends

bool operator== (const Id &lhs, const Id &rhs)
 Equality comparison.
 
bool operator!= (const Id &lhs, const Id &rhs)
 Inequality comparison.
 
bool operator< (const Id &lhs, const Id &rhs)
 Less-than comparison.
 
bool operator<= (const Id &lhs, const Id &rhs)
 Less-than or equal comparison.
 
bool operator> (const Id &lhs, const Id &rhs)
 Greater-than comparison.
 
bool operator>= (const Id &lhs, const Id &rhs)
 Greater-than or equal comparison.
 
size_t hash_value (Id id)
 Hash.
 

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 81 of file stageCache.h.

Constructor & Destructor Documentation

◆ Id()

Id ( )
inline

Default construct an invalid id.

Definition at line 83 of file stageCache.h.

Member Function Documentation

◆ FromLongInt()

static 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 87 of file stageCache.h.

◆ FromString()

static 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 91 of file stageCache.h.

◆ IsValid()

bool IsValid ( ) const
inline

Return true if this Id is valid.

Definition at line 112 of file stageCache.h.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Return true if this Id is valid.

Definition at line 115 of file stageCache.h.

◆ ToLongInt()

long int ToLongInt ( ) const
inline

Convert this Id to an integral representation.

Definition at line 104 of file stageCache.h.

◆ ToString()

std::string ToString ( ) const
inline

Convert this Id to a string representation.

Definition at line 107 of file stageCache.h.

Friends And Related Symbol Documentation

◆ hash_value

size_t hash_value ( Id id)
friend

Hash.

Definition at line 143 of file stageCache.h.

◆ operator!=

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

Inequality comparison.

Definition at line 123 of file stageCache.h.

◆ operator<

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

Less-than comparison.

Definition at line 127 of file stageCache.h.

◆ operator<=

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

Less-than or equal comparison.

Definition at line 131 of file stageCache.h.

◆ operator==

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

Equality comparison.

Definition at line 119 of file stageCache.h.

◆ operator>

bool operator> ( const Id & lhs,
const Id & rhs )
friend

Greater-than comparison.

Definition at line 135 of file stageCache.h.

◆ operator>=

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

Greater-than or equal comparison.

Definition at line 139 of file stageCache.h.


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