Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Open_Segment Class Reference

Handles the TKE_Open_Segment opcode. More...

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Open_Segment:

BBaseOpcodeHandler BControlledMemoryObject HTK_Open_Segment

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
char alter * GetSegment () alter
char const * GetSegment () const
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status ReadAscii (BStreamFileToolkit &tk) alter
 Deprecated.
void Reset () alter
void SetSegment (int length) alter
void SetSegment (char const *segment) alter
 TK_Open_Segment ()
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status WriteAscii (BStreamFileToolkit &tk) alter
 Deprecated.

Protected Member Functions

void set_segment (int length) alter
 internal use
void set_segment (char const *segment) alter
 internal use

Protected Attributes

int m_allocated
int m_length
char * m_string


Detailed Description

Handles the TKE_Open_Segment opcode.

TK_Open_Segment provides support for writing/reading the TKE_Open_Segment opcode object to/from an HSF file.

The nodes in the HOOPS/3dGS scene-graph are called 'segments' which store, geometry, attributes, and subsegments. After a HOOPS segment is open, geometry which should reside in that segment should be exported. Similarly, any attributes which need to affect the geometry in that segment should be exported.

This should be matched with a TKE_Close_Segment opcode object.


Constructor & Destructor Documentation

TK_Open_Segment::TK_Open_Segment (  )  [inline]

constructor


Member Function Documentation

TK_Status TK_Open_Segment::Clone ( BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler 
) const [virtual]

Copies the opcode handler

Parameters:
tk A reference to the BStreamFileToolkit object.
handler A pointer to the opcode handler object. Passed by reference.
Returns:
The result of the function call.

Reimplemented from BBaseOpcodeHandler.

Reimplemented in HTK_Open_Segment.

char alter* TK_Open_Segment::GetSegment (  )  [inline]

Get the segment name buffer. Returns a pointer to the current segment name buffer which may then be modified directly

char const* TK_Open_Segment::GetSegment (  )  const [inline]

Get the segment name. Returns a pointer to the current segment name

TK_Status TK_Open_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.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.

void TK_Open_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_Open_Segment::SetSegment ( int  length  )  [inline]

Set the segment name. Makes sure the buffer is big enough to hold a string of 'length' characters

void TK_Open_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

TK_Status TK_Open_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.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.


Member Data Documentation

Size of currently available string buffer

int TK_Open_Segment::m_length [protected]

Length of segment string name

char* TK_Open_Segment::m_string [protected]

Segment name


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