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

A cache for user component selections. More...

#include <OP3D_SelectionCache.h>

+ Inheritance diagram for OP3D_SelectionCache:

Public Member Functions

 OP3D_SelectionCache ()
 Construct a new, empty, component selection. More...
 
 ~OP3D_SelectionCache ()
 
void clear (bool clear_local, bool clear_external)
 
OP3D_GUSelectionSetHandle getSelectionSet (int node_id, int detail_index=0, bool external=false)
 
void setSelectionSet (int node_id, int detail_index, OP3D_GUSelectionSetHandle selection_set, bool external)
 
void remove (int node_id, int detail_index)
 
int64 getSelectionMemoryUsage () const
 
int64 reduceSelectionMemoryUsage (int64 amount)
 
 Key (int node_id, int detail_index)
 
bool operator== (const OP3D_SelectionCache::Key &key) const
 

Public Attributes

int myNodeId
 
int myDetailIndex
 

Additional Inherited Members

- Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable
 UT_NonCopyable ()=default
 
 ~UT_NonCopyable ()=default
 
 UT_NonCopyable (const UT_NonCopyable &)=delete
 
UT_NonCopyableoperator= (const UT_NonCopyable &)=delete
 

Detailed Description

A cache for user component selections.

Definition at line 35 of file OP3D_SelectionCache.h.

Constructor & Destructor Documentation

OP3D_SelectionCache::OP3D_SelectionCache ( )

Construct a new, empty, component selection.

OP3D_SelectionCache::~OP3D_SelectionCache ( )

Member Function Documentation

void OP3D_SelectionCache::clear ( bool  clear_local,
bool  clear_external 
)
int64 OP3D_SelectionCache::getSelectionMemoryUsage ( ) const

Return the total memory used by the selections stored in this cache in bytes.

OP3D_GUSelectionSetHandle OP3D_SelectionCache::getSelectionSet ( int  node_id,
int  detail_index = 0,
bool  external = false 
)

Returns the selection set handle for the given node. If there is no selection set for the given node, an empty handle is returned.

OP3D_SelectionCache::Key ( int  node_id,
int  detail_index 
)
inline

Definition at line 86 of file OP3D_SelectionCache.h.

bool OP3D_SelectionCache::operator== ( const OP3D_SelectionCache::Key key) const
inline

Definition at line 91 of file OP3D_SelectionCache.h.

int64 OP3D_SelectionCache::reduceSelectionMemoryUsage ( int64  amount)

Attempt to reduce the memory used by a specified amount, returning the actual number of bytes freed.

void OP3D_SelectionCache::remove ( int  node_id,
int  detail_index 
)
void OP3D_SelectionCache::setSelectionSet ( int  node_id,
int  detail_index,
OP3D_GUSelectionSetHandle  selection_set,
bool  external 
)

Set the selection set for the given node. This class only stores one selection set per node, so do not set both an external and a local (non-external) set on the same node.

Member Data Documentation

int OP3D_SelectionCache::myDetailIndex

Definition at line 97 of file OP3D_SelectionCache.h.

int OP3D_SelectionCache::myNodeId

Definition at line 96 of file OP3D_SelectionCache.h.


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