Loading...
Searching...
No Matches
VdfNodeSet Class Reference

Class that efficiently stores a set of VdfNodes. More...

#include <nodeSet.h>

Public Types

typedef TfBits::View< TfBits::AllSet >::const_iterator iterator
 Iterator types.
 
typedef TfBits::View< TfBits::AllSet >::const_iterator const_iterator
 

Public Member Functions

 VdfNodeSet ()=default
 Default constructor.
 
bool IsEmpty () const
 Is this set empty?
 
size_t GetSize () const
 Get the number of elements contained in this set.
 
VDF_API void Clear ()
 Clears the node set.
 
bool Contains (const VdfNode &node) const
 Returns true if node is in the set.
 
bool Contains (const VdfIndex index) const
 Returns true if the node with the given index is in the set.
 
void Insert (const VdfNode &node)
 Inserts node into the set.
 
VDF_API void Insert (const VdfNodeSet &rhs)
 Inserts another nodeSet into this set.
 
VDF_API bool Remove (const VdfNode &node)
 Removes node from the set.
 
const_iterator begin () const
 Returns an iterator at the beginning of the iterable range.
 
const_iterator end () const
 Returns an iterator at the end of the iterable range.
 

Friends

void swap (VdfNodeSet &lhs, VdfNodeSet &rhs)
 Swaps two VdfNodeSet instances.
 

Detailed Description

Class that efficiently stores a set of VdfNodes.

Uses node indices to identify nodes, for efficient storage.

Definition at line 25 of file nodeSet.h.

Member Typedef Documentation

◆ const_iterator

typedef TfBits::View<TfBits::AllSet>::const_iterator const_iterator

Definition at line 82 of file nodeSet.h.

◆ iterator

typedef TfBits::View<TfBits::AllSet>::const_iterator iterator

Iterator types.

Definition at line 81 of file nodeSet.h.

Constructor & Destructor Documentation

◆ VdfNodeSet()

VdfNodeSet ( )
default

Default constructor.

Member Function Documentation

◆ begin()

const_iterator begin ( ) const
inline

Returns an iterator at the beginning of the iterable range.

Definition at line 86 of file nodeSet.h.

◆ Clear()

VDF_API void Clear ( )

Clears the node set.

Note that unlike on STL containers, this method also reclaims memory.

◆ Contains() [1/2]

bool Contains ( const VdfIndex  index) const
inline

Returns true if the node with the given index is in the set.

Definition at line 59 of file nodeSet.h.

◆ Contains() [2/2]

bool Contains ( const VdfNode node) const
inline

Returns true if node is in the set.

Definition at line 53 of file nodeSet.h.

◆ end()

const_iterator end ( ) const
inline

Returns an iterator at the end of the iterable range.

Definition at line 92 of file nodeSet.h.

◆ GetSize()

size_t GetSize ( ) const
inline

Get the number of elements contained in this set.

Definition at line 40 of file nodeSet.h.

◆ Insert() [1/2]

void Insert ( const VdfNode node)
inline

Inserts node into the set.

Definition at line 116 of file nodeSet.h.

◆ Insert() [2/2]

VDF_API void Insert ( const VdfNodeSet rhs)

Inserts another nodeSet into this set.

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Is this set empty?

Definition at line 34 of file nodeSet.h.

◆ Remove()

VDF_API bool Remove ( const VdfNode node)

Removes node from the set.

Returns true if node was contained in the set.

Friends And Related Function Documentation

◆ swap

void swap ( VdfNodeSet lhs,
VdfNodeSet rhs 
)
friend

Swaps two VdfNodeSet instances.

Definition at line 98 of file nodeSet.h.


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