SdfPathTable< MappedType >::NodeHandle Struct Reference

A handle owning a path table node that may be used to "reserve" a stable memory location for key & mapped object. More...

Public Member Functions

key_type const & GetKey () const
 Return a const reference to this NodeHandle's key. More...
 
key_typeGetMutableKey ()
 Return a mutable reference to this NodeHandle's key. More...
 
mapped_type const & GetMapped () const
 Return a const reference to this NodeHandle's mapped object. More...
 
mapped_type & GetMutableMapped ()
 Return a mutable reference to this NodeHandle's mapped object. More...
 
bool IsValid () const
 Return true if this NodeHandle owns a path table entry, false otherwise. More...
 
 operator bool () const
 Return true if this NodeHandle owns a path table entry, false otherwise. More...
 
void reset ()
 Delete any owned path table entry. More...
 

Static Public Member Functions

static NodeHandle New (value_type const &value)
 Create a new NodeHandle for a table entry. More...
 
static NodeHandle New (value_type &&value)
 
static NodeHandle New (key_type const &key, mapped_type const &mapped)
 

Friends

class SdfPathTable
 

Detailed Description

template<class MappedType>
struct SdfPathTable< MappedType >::NodeHandle

A handle owning a path table node that may be used to "reserve" a stable memory location for key & mapped object.

A node handle may be inserted into a table later, and if that insertion is successful, the underlying key & mapped object remain at the same memory location.

Definition at line 294 of file pathTable.h.

Member Function Documentation

◆ GetKey()

key_type const& GetKey ( ) const
inline

Return a const reference to this NodeHandle's key.

This NodeHandle must be valid to call this member function (see NodeHandle::IsValid).

Definition at line 326 of file pathTable.h.

◆ GetMapped()

mapped_type const& GetMapped ( ) const
inline

Return a const reference to this NodeHandle's mapped object.

This NodeHandle must be valid to call this member function (see NodeHandle::IsValid).

Definition at line 340 of file pathTable.h.

◆ GetMutableKey()

key_type& GetMutableKey ( )
inline

Return a mutable reference to this NodeHandle's key.

This NodeHandle must be valid to call this member function (see NodeHandle::IsValid).

Definition at line 333 of file pathTable.h.

◆ GetMutableMapped()

mapped_type& GetMutableMapped ( )
inline

Return a mutable reference to this NodeHandle's mapped object.

This NodeHandle must be valid to call this member function (see NodeHandle::IsValid).

Definition at line 347 of file pathTable.h.

◆ IsValid()

bool IsValid ( ) const
inline

Return true if this NodeHandle owns a path table entry, false otherwise.

Definition at line 353 of file pathTable.h.

◆ New() [1/3]

static NodeHandle New ( value_type const &  value)
inlinestatic

Create a new NodeHandle for a table entry.

This NodeHandle can later be inserted into an SdfPathTable. If inserted successfully, the key and value addresses remain valid. NodeHandles may be created concurrently without additional synchronization.

Definition at line 303 of file pathTable.h.

◆ New() [2/3]

static NodeHandle New ( value_type &&  value)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 311 of file pathTable.h.

◆ New() [3/3]

static NodeHandle New ( key_type const &  key,
mapped_type const &  mapped 
)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 319 of file pathTable.h.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Return true if this NodeHandle owns a path table entry, false otherwise.

Definition at line 359 of file pathTable.h.

◆ reset()

void reset ( )
inline

Delete any owned path table entry.

After calling this function, IsValid() returns false.

Definition at line 365 of file pathTable.h.


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