NDEVR
API Documentation
CADHandleManager

Handles converting NDEVR API UUID objects into CAD HANDLE IDs. More...

Collaboration diagram for CADHandleManager:
[legend]

Public Member Functions

 CADHandleManager ()
 Default constructor.
String generateHandle (const uint04 &handle_index)
 Generates a hex string representation of a handle index.
uint04 generateTempHandleIndex ()
 Generates a new temporary handle index.
uint04 getHandleIndex (const StringView &handle_name)
 Gets or creates a handle index for the given name.
uint04 getHandleIndex (UUID id)
 Gets or creates a handle index for the given UUID.
UUID getHandleUUID (const StringView &handle_name)
 Returns the UUID associated with a named handle.
UUID getHandleUUID (uint04 handle)
 Returns the UUID associated with a handle index.
bool hasHandleIndex (const StringView &handle_name) const
 Checks whether a handle exists for the given name.
bool hasHandleIndex (const UUID &id) const
 Checks whether a handle exists for the given UUID.
void resetAll ()
 Resets all handles and generators.
void resetTempHandles ()
 Resets all temporary handles.
void setHandleIndex (const StringView &handle_name, uint04 handle)
 Associates a name with a handle index.
void setHandleIndex (const UUID &handle_id, uint04 handle)
 Associates a UUID with a handle index.
void setHandleToUUID (const UUID &handle_id, uint04 handle)
 Associates a handle index with a UUID in the reverse lookup.
void setTransfromCoords (uint04 handle, const Matrix< fltp08 > &transform)
 Sets the transformation matrix for the given handle.
Matrix< fltp08transfromCoords (uint04 handle) const
 Returns the transformation matrix for the given handle.

Protected Attributes

Dictionary< uint04, UUIDm_handle_ids
 Maps handle indices to UUIDs.
Dictionary< uint04, Stringm_handle_names
 Reverse map from handle indices to names.
Dictionary< UUID, uint04m_id_handles
 Maps UUIDs to handle indices.
Dictionary< String, uint04m_named_handles
 Maps handle names to indices.
uint04 m_object_handle_generator = 64
 Counter for generating object handles.
uint04 m_temp_handle_generator = Constant<uint04>::Max / 8
 Counter for generating temporary handles.
Dictionary< uint04, Matrix< fltp08 > > m_transform_coords
 Transformation matrices keyed by handle.

Detailed Description

Handles converting NDEVR API UUID objects into CAD HANDLE IDs.


Definition at line 10 of file CADHandleManager.h.

Member Function Documentation

◆ generateHandle()

String CADHandleManager::generateHandle ( const uint04 & handle_index)

Generates a hex string representation of a handle index.

Parameters
[in]handle_indexThe handle index.
Returns
The hex string.

◆ generateTempHandleIndex()

uint04 CADHandleManager::generateTempHandleIndex ( )

Generates a new temporary handle index.

Returns
The generated handle index.

◆ getHandleIndex() [1/2]

uint04 CADHandleManager::getHandleIndex ( const StringView & handle_name)

Gets or creates a handle index for the given name.

Parameters
[in]handle_nameThe handle name string.
Returns
The handle index.

◆ getHandleIndex() [2/2]

uint04 CADHandleManager::getHandleIndex ( UUID id)

Gets or creates a handle index for the given UUID.

Parameters
[in]idThe UUID.
Returns
The handle index.

◆ getHandleUUID() [1/2]

UUID CADHandleManager::getHandleUUID ( const StringView & handle_name)

Returns the UUID associated with a named handle.

Parameters
[in]handle_nameThe handle name.
Returns
The UUID.

◆ getHandleUUID() [2/2]

UUID CADHandleManager::getHandleUUID ( uint04 handle)

Returns the UUID associated with a handle index.

Parameters
[in]handleThe handle index.
Returns
The UUID.

◆ hasHandleIndex() [1/2]

bool CADHandleManager::hasHandleIndex ( const StringView & handle_name) const

Checks whether a handle exists for the given name.

Parameters
[in]handle_nameThe handle name string.
Returns
True if a handle exists.

◆ hasHandleIndex() [2/2]

bool CADHandleManager::hasHandleIndex ( const UUID & id) const

Checks whether a handle exists for the given UUID.

Parameters
[in]idThe UUID to look up.
Returns
True if a handle exists.

◆ setHandleIndex() [1/2]

void CADHandleManager::setHandleIndex ( const StringView & handle_name,
uint04 handle )

Associates a name with a handle index.

Parameters
[in]handle_nameThe name.
[in]handleThe handle index.

◆ setHandleIndex() [2/2]

void CADHandleManager::setHandleIndex ( const UUID & handle_id,
uint04 handle )

Associates a UUID with a handle index.

Parameters
[in]handle_idThe UUID.
[in]handleThe handle index.

◆ setHandleToUUID()

void CADHandleManager::setHandleToUUID ( const UUID & handle_id,
uint04 handle )

Associates a handle index with a UUID in the reverse lookup.

Parameters
[in]handle_idThe UUID.
[in]handleThe handle index.

◆ setTransfromCoords()

void CADHandleManager::setTransfromCoords ( uint04 handle,
const Matrix< fltp08 > & transform )

Sets the transformation matrix for the given handle.

Parameters
[in]handleThe handle index.
[in]transformThe transformation matrix.

◆ transfromCoords()

Matrix< fltp08 > CADHandleManager::transfromCoords ( uint04 handle) const

Returns the transformation matrix for the given handle.

Parameters
[in]handleThe handle index.
Returns
The transformation matrix.

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