Handles the TKE_Inlude_Segment TKE_Named_Style and TKE_Style_Segment opcodes. More...
#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
char const * | GetCondition () const |
char alter * | GetCondition () alter |
bool | GetFollow () alter |
char const * | GetSegment () const |
char alter * | GetSegment () alter |
TK_Status | Read (BStreamFileToolkit &tk) alter |
TK_Status | ReadAscii (BStreamFileToolkit &tk) alter |
Deprecated. | |
void | Reset () alter |
void | SetCondition (char const *condition) alter |
void | SetCondition (int length) alter |
void | SetFollow (bool f) alter |
void | SetSegment (char const *segment) alter |
void | SetSegment (int length) alter |
TK_Referenced_Segment (unsigned char opcode) | |
TK_Status | Write (BStreamFileToolkit &tk) alter |
TK_Status | WriteAscii (BStreamFileToolkit &tk) alter |
Deprecated. | |
Protected Member Functions | |
void | set_segment (char const *segment) alter |
for internal use only | |
void | set_segment (int length) alter |
for internal use only | |
Protected Attributes | |
int | m_allocated |
int | m_cond_allocated |
int | m_cond_length |
char * | m_condition |
bool | m_follow |
for internal use only | |
ID_Key | m_key |
for internal use only | |
int | m_length |
BBaseOpcodeHandler * | m_referee |
for internal use only | |
ID_Key | m_renumbered_key |
for internal use only | |
unsigned char | m_renumbered_scope |
for internal use only | |
char * | m_string |
Handles the TKE_Inlude_Segment TKE_Named_Style and TKE_Style_Segment opcodes.
TK_Referenced_Segment provides support for writing/reading the TKE_Inlude_Segment TKE_Named_Style and TKE_Style_Segment opcode objects 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 segments where they can either be 'included' as virtual subsegments, or they can be 'styled' so that only the attributes are referenced.
TK_Referenced_Segment::TK_Referenced_Segment | ( | unsigned char | opcode | ) |
constructor
TK_Status TK_Referenced_Segment::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 const* TK_Referenced_Segment::GetCondition | ( | ) | const [inline] |
Get the condition string. Returns a pointer to the current condition
char alter* TK_Referenced_Segment::GetCondition | ( | ) | [inline] |
Get the condition string buffer. Returns a pointer to the current condition buffer which may then be modified directly
bool TK_Referenced_Segment::GetFollow | ( | ) | [inline] |
Returns the flag indicating whether the reference segment should be processed itself
char const* TK_Referenced_Segment::GetSegment | ( | ) | const [inline] |
Get the segment name. Returns a pointer to the current segment name
char alter* TK_Referenced_Segment::GetSegment | ( | ) | [inline] |
Get the segment name buffer. Returns a pointer to the current segment name buffer which may then be modified directly
TK_Status TK_Referenced_Segment::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_Referenced_Segment::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_Referenced_Segment::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_Referenced_Segment::SetCondition | ( | int | length | ) |
Set the condition string. Makes sure the buffer is big enough to hold a string of 'length' characters
void TK_Referenced_Segment::SetFollow | ( | bool | f | ) | [inline] |
Sets the flag indicating whether the reference segment should be processed itself
void TK_Referenced_Segment::SetSegment | ( | char const * | segment | ) | [inline] |
Set the segment name. Makes sure the buffer is big enough to hold the segment name, and copies it in
void TK_Referenced_Segment::SetSegment | ( | int | length | ) | [inline] |
Set the segment name. Makes sure the buffer is big enough to hold a string of 'length' characters
TK_Status TK_Referenced_Segment::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_Referenced_Segment::m_allocated [protected] |
Size of currently available string buffer. for internal use only
int TK_Referenced_Segment::m_cond_allocated [protected] |
Size of currently available condition buffer. for internal use only
int TK_Referenced_Segment::m_cond_length [protected] |
Length of condition. for internal use only
char* TK_Referenced_Segment::m_condition [protected] |
Condition. for internal use only
int TK_Referenced_Segment::m_length [protected] |
Length of segment string name. for internal use only
char* TK_Referenced_Segment::m_string [protected] |
Segment name. for internal use only