#include <HSharedKey.h>
Public Member Functions | |
long | AssociateKey (HC_KEY key) |
void | AssociateKeysInSegment (const char *seg=0) |
bool | DisAssociateKey (HC_KEY key) |
void | DisAssociateKeysInSegment (const char *seg=0) |
long | GetIdentFromKey (HC_KEY ident) |
HC_KEY | GetKeyFromIdent (long ident) |
HSharedKey () | |
void | Reset () |
void | SetupStreamToolkit (HStreamFileToolkit *tk) |
Detailed Description
SharedKey manages the mapping of HOOPS/3dGS objects to unique and persistent identifiers using a hash table. It has essentially the same functionality as HC_Renumber_Key but it does this externally to HOOPS/3dGS.
Constructor & Destructor Documentation
◆ HSharedKey()
HSharedKey::HSharedKey | ( | ) |
Constructs an HSharedKeyObject.
Member Function Documentation
◆ AssociateKey()
long HSharedKey::AssociateKey | ( | HC_KEY | key | ) |
This method assigns a given key a new persistent identifier.
- Parameters
-
key The key of the entity to be given a persistent identifier.
- Returns
- A the new persistent identifier or 0 if the key is already associated with an identifier.
◆ AssociateKeysInSegment()
void HSharedKey::AssociateKeysInSegment | ( | const char * | seg = 0 | ) |
This method assigns a persistent identifier to the keys of all the entities in a given segment.
- Parameters
-
seg Pass the name of the segment you want to begin the assignment with. Pass 0 to associate the currently open key.
◆ DisAssociateKey()
bool HSharedKey::DisAssociateKey | ( | HC_KEY | key | ) |
This method removes a key from the persistent identifier list.
- Parameters
-
key The key of the entity to be removed.
- Returns
- True if the key was successful removed from the list.
◆ DisAssociateKeysInSegment()
void HSharedKey::DisAssociateKeysInSegment | ( | const char * | seg = 0 | ) |
This metho removes the keys in a given segment from the persistent identifier list.
- Parameters
-
seg Pass the name of the segment you want to begin the assignment with. Pass 0 to associate the currently open key.
◆ GetIdentFromKey()
long HSharedKey::GetIdentFromKey | ( | HC_KEY | ident | ) |
Given a key, this method returns the persistent identifier associated with it.
- Parameters
-
ident The key to look up.
- Returns
- The indentifier associated with the given key.
◆ GetKeyFromIdent()
HC_KEY HSharedKey::GetKeyFromIdent | ( | long | ident | ) |
Given a persistent identifier, this method returns the HOOPS key associated with it.
- Parameters
-
ident The persistent identifier to look up.
- Returns
- The key associated with the given identifier.
◆ Reset()
void HSharedKey::Reset | ( | ) |
This method reinitializes the HSharedKey object by resetting the counter and deleting all the elements in both hash tables.
◆ SetupStreamToolkit()
void HSharedKey::SetupStreamToolkit | ( | HStreamFileToolkit * | tk | ) |
This method initializes custom stream toolkit opcode handlers to utilize shared keys.
- Parameters
-
tk A pointer to the HStreamFileToolkit.
The documentation for this class was generated from the following file: