HDK
|
A cache for user component selections. More...
#include <OP3D_SelectionCache.h>
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_NonCopyable & | operator= (const UT_NonCopyable &)=delete |
A cache for user component selections.
Definition at line 35 of file OP3D_SelectionCache.h.
OP3D_SelectionCache::OP3D_SelectionCache | ( | ) |
Construct a new, empty, component selection.
OP3D_SelectionCache::~OP3D_SelectionCache | ( | ) |
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.
Definition at line 86 of file OP3D_SelectionCache.h.
|
inline |
Definition at line 91 of file OP3D_SelectionCache.h.
Attempt to reduce the memory used by a specified amount, returning the actual number of bytes freed.
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.
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.