#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
char * | GetCondition () |
char const * | GetCondition () const |
bool | GetFollow () |
ID_Key | GetIndex () |
TK_Status | Read (BStreamFileToolkit &tk) |
TK_Status | ReadAscii (BStreamFileToolkit &tk) |
Deprecated. | |
void | Reset () |
void | SetCondition (int length) |
void | SetCondition (char const *condition) |
void | SetFollow (bool f) |
void | SetIndex (int index) |
TK_Reference () | |
TK_Status | Write (BStreamFileToolkit &tk) |
TK_Status | WriteAscii (BStreamFileToolkit &tk) |
Deprecated. | |
Protected Attributes | |
int | m_cond_allocated |
int | m_cond_length |
char * | m_condition |
bool | m_follow |
for internal use only | |
int | m_index |
ID_Key | m_key |
for internal use only | |
BBaseOpcodeHandler * | m_referee |
for internal use only | |
ID_Key | m_this_key |
for internal use only |
TK_Reference provides support for writing/reading the TKE_Reference opcode object to/from an HSF file.
The HOOPS/3dGS scene-graph nodes are called 'segments' which store, geometry, attributes, and subsegments. The scene-graph provides support for referencing an individual geometry item, or all geometry items, from another segment as if they were within the current segment, without the attributes or additional subsegments that would be brought along with an 'include'.
TK_Reference::TK_Reference | ( | ) |
constructor
TK_Status TK_Reference::Clone | ( | BStreamFileToolkit & | tk, | |
BBaseOpcodeHandler ** | handler | |||
) | const [virtual] |
Copies the opcode handler
tk | A reference to the BStreamFileToolkit object. | |
handler | A pointer to the opcode handler object. Passed by reference. |
Reimplemented from BBaseOpcodeHandler.
char* TK_Reference::GetCondition | ( | ) | [inline] |
Get the condition string buffer. Returns a pointer to the current condition buffer which may then be modified directly
char const* TK_Reference::GetCondition | ( | ) | const [inline] |
Get the condition string. Returns a pointer to the current condition
bool TK_Reference::GetFollow | ( | ) | [inline] |
Returns the flag indicating whether the referenced item should be processed itself
ID_Key TK_Reference::GetIndex | ( | ) | [inline] |
Returns the id of the referenced item
TK_Status TK_Reference::Read | ( | BStreamFileToolkit & | tk | ) | [virtual] |
Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
void TK_Reference::Reset | ( | ) | [virtual] |
Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.
Reimplemented from BBaseOpcodeHandler.
void TK_Reference::SetCondition | ( | int | length | ) |
Set the condition string. Makes sure the buffer is big enough to hold a string of 'length' characters
void TK_Reference::SetCondition | ( | char const * | condition | ) |
Set the condition string. Makes sure the buffer is big enough to hold the condition, and copies it in
void TK_Reference::SetFollow | ( | bool | f | ) | [inline] |
Sets the flag indicating whether the referenced item should be processed itself
void TK_Reference::SetIndex | ( | int | index | ) | [inline] |
Sets the id of the referenced item
TK_Status TK_Reference::Write | ( | BStreamFileToolkit & | tk | ) | [virtual] |
Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
int TK_Reference::m_cond_allocated [protected] |
Size of currently available condition buffer. for internal use only
int TK_Reference::m_cond_length [protected] |
Length of condition. for internal use only
char* TK_Reference::m_condition [protected] |
Condition. for internal use only
int TK_Reference::m_index [protected] |
tag index of referenced item. for internal use only