The BBaseOpcodeHandler abstract class is used as a base for derived classes which manage logical pieces of HOOPS Stream File information. More...

#include <BOpcodeHandler.h>

Public Member Functions

 BBaseOpcodeHandler (int op)
 
virtual TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
 
virtual TK_Status Execute (BStreamFileToolkit &tk)
 
unsigned char General_Flags () const
 
char const * GetLoggingString () const
 
char * GetLoggingString ()
 
virtual TK_Status Interpret (BStreamFileToolkit &tk, ID_Key key, int variant=0)
 
virtual TK_Status Interpret (BStreamFileToolkit &tk, ID_Key key, char const *special)
 
bool IsCollectionPart () const
 
void LogDebug (BStreamFileToolkit &tk, char const *string=0)
 
virtual bool Match_Instance (BStreamFileToolkit const &tk, Recorded_Instance *instance)
 
virtual bool NeedsContext (BStreamFileToolkit &tk) const
 
bool NeedsTag () const
 
unsigned char Opcode () const
 
int Pass (BStreamFileToolkit &tk) const
 
virtual TK_Status Read (BStreamFileToolkit &tk)=0
 
virtual void Reset ()
 
void Set_General_Flags (int f)
 
void SetCollectionPart (bool n)
 
void SetLoggingString (char const *segment)
 
void SetLoggingString (int length)
 
void SetNeedsTag (bool n)
 
TK_Status Tag (BStreamFileToolkit &tk, int variant=-1) const
 
bool Tagging (BStreamFileToolkit &tk) const
 
virtual TK_Status Write (BStreamFileToolkit &tk)=0
 
- Public Member Functions inherited from BControlledMemoryObject
void operator delete (void *p)
 force deallocation to happen in the stream toolkit's scope
 
void * operator new (size_t size)
 force allocation to happen in the stream toolkit's scope
 

Protected Member Functions

void add_segment (BStreamFileToolkit &tk, ID_Key key)
 for internal use only
 
void adjust_written (BStreamFileToolkit &tk, int count)
 for internal use only
 
void bytes_to_floats (unsigned char const *in, float *out, int count) const
 for internal use only
 
void decrease_nesting (BStreamFileToolkit &tk, int amount=1)
 for internal use only
 
bool Find_Instance (BStreamFileToolkit &tk, int val1, int val2, int val3)
 
bool Find_Item (BStreamFileToolkit &tk, ID_Key key) const
 
void floats_to_bytes (float const *in, unsigned char *out, int count) const
 for internal use only
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, int *rInts, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned char &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, char &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned short &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, short &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, int &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, float &value)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, float *rFloats, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, char *m_string, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned char *m_string, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, int *rInts, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, short *rShorts, unsigned int n)
 
TK_Status GetAsciiData (BStreamFileToolkit &tk, const char *tag, unsigned short *rShorts, unsigned int n)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, unsigned char &value)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, int &value)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, char &value)
 
TK_Status GetAsciiHex (BStreamFileToolkit &tk, const char *tag, unsigned short &value)
 
TK_Status GetAsciiImageData (BStreamFileToolkit &tk, const char *tag, unsigned char *rValues, unsigned int n)
 
TK_Status GetGeneral (BStreamFileToolkit &tk)
 
void increase_nesting (BStreamFileToolkit &tk, int amount=1)
 for internal use only
 
ID_Key last_key (BStreamFileToolkit &tk) const
 obsolete
 
void log_opcode (BStreamFileToolkit &tk, unsigned int sequence, unsigned char opcode)
 for internal use only
 
BBaseOpcodeHandlerOpcode_Handler (BStreamFileToolkit &tk, unsigned char op) const
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, char const *b, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, short const *s, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, int const *i, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, float const *f, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned char const *b, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned short const *s, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned int const *i, int n)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, char const &c)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, short const &s)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned char const &b)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned short const &s)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, unsigned int const &i)
 
TK_Status PutAsciiData (BStreamFileToolkit &tk, char const *tag, float const &f)
 
TK_Status PutAsciiFlag (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiHex (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiMask (BStreamFileToolkit &tk, char const *tag, int const &i)
 
TK_Status PutAsciiOpcode (BStreamFileToolkit &tk, int adjust=1, bool is_end=false, bool want_newline=true)
 
TK_Status PutEndXMLTag (BStreamFileToolkit &tk, char const *tag)
 
TK_Status PutGeneral (BStreamFileToolkit &tk)
 
TK_Status PutOpcode (BStreamFileToolkit &tk, int adjust=1)
 
TK_Status PutStartXMLTag (BStreamFileToolkit &tk, char const *tag)
 
TK_Status Read_Referenced_Segment (BStreamFileToolkit &tk, int &i_progress)
 
TK_Status ReadAsciiLine (BStreamFileToolkit &tk, unsigned int *readSize=0)
 
TK_Status ReadAsciiWord (BStreamFileToolkit &tk, unsigned int *readSize=0)
 
TK_Status ReadEndOpcode (BStreamFileToolkit &tk)
 
void Record_Instance (BStreamFileToolkit &tk, ID_Key key, int variant, int val1, int val2, int val3) const
 
void Remember_Item (BStreamFileToolkit &tk, ID_Key key) const
 
ID_Key remove_segment (BStreamFileToolkit &tk)
 for internal use only
 
bool RemoveAngularBrackets (char *string)
 
bool RemoveQuotes (char *string)
 
void Revisit (BStreamFileToolkit &tk, float priority=0.0f, int variant=0) const
 
void set_last_key (BStreamFileToolkit &tk, ID_Key key)
 sets the given key as "most recent" on the toolkit for the purposes of associating keys with indices
 
TK_Status SkipNewlineAndTabs (BStreamFileToolkit &tk, unsigned int *readSize=0)
 
bool validate_count (int count, int limit=1<< 24) const
 

Static Protected Member Functions

static void fix (int *i, int n)
 for internal use only
 
static void fix (short *s, int n)
 for internal use only
 
static void fix_in (float *f, int n)
 for internal use only
 
static void fix_in (double *d, int n)
 for internal use only
 
static void fix_out (float *f, int n)
 for internal use only
 
static void fix_out (double *d, int n)
 for internal use only
 
static short flip (short s)
 for internal use only
 
static int flip (int i)
 for internal use only
 
static TK_Status GetData (BStreamFileToolkit &tk, char *b, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, short *s, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, int *i, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, float *f, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, double *d, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned char *b, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned short *s, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned int *i, int n)
 
static TK_Status GetData (BStreamFileToolkit &tk, char &c)
 
static TK_Status GetData (BStreamFileToolkit &tk, short &s)
 
static TK_Status GetData (BStreamFileToolkit &tk, int &i)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned char &b)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned short &s)
 
static TK_Status GetData (BStreamFileToolkit &tk, unsigned int &i)
 
static TK_Status GetData (BStreamFileToolkit &tk, float &f)
 
static TK_Status GetData (BStreamFileToolkit &tk, double &d)
 
static TK_Status LookatData (BStreamFileToolkit &tk, unsigned char &b)
 
static TK_Status PutData (BStreamFileToolkit &tk, char const *b, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, short const *s, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, int const *i, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, float const *f, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, double const *d, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned char const *b, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned short const *s, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned int const *i, int n)
 
static TK_Status PutData (BStreamFileToolkit &tk, char const &c)
 
static TK_Status PutData (BStreamFileToolkit &tk, short const &s)
 
static TK_Status PutData (BStreamFileToolkit &tk, int const &i)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned char const &b)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned short const &s)
 
static TK_Status PutData (BStreamFileToolkit &tk, unsigned int const &i)
 
static TK_Status PutData (BStreamFileToolkit &tk, float const &f)
 
static TK_Status PutData (BStreamFileToolkit &tk, double const &d)
 
static float read_float (char const *cp, char const **newcpp=0)
 
static float read_float (char const *cp, char **newcpp)
 for internal use only
 
static char * write_float (char *buffer, double f)
 for internal use only
 

Protected Attributes

char * m_ascii_buffer
 
int m_ascii_length
 
int m_ascii_progress
 Tracks the amount of data that has been read/written so far by GetAscii functions.
 
int m_ascii_size
 
int m_ascii_stage
 
unsigned char m_byte
 temporary
 
char m_char
 temporary
 
bool m_collection_part
 Indicates if this object is part of a LOD collection.
 
int m_debug_allocated
 
char * m_debug_string
 
unsigned char m_general_flags
 Basic flags common to many handlers.
 
int m_int
 temporary
 
bool m_needs_tag
 Indicate if this object explicitly needs tagging.
 
unsigned char m_opcode
 The opcode being handled by this particular object.
 
int m_progress
 Tracks the amount of data that has been read/written so far.
 
int m_stage
 The writing stage.
 
unsigned short m_unsigned_short
 temporary
 

Detailed Description

The BBaseOpcodeHandler abstract class is used as a base for derived classes which manage logical pieces of HOOPS Stream File information.

BBaseOpcodeHandler provides virtual functions which are implemented by derived classes to handle reading, writing, execution and interpretation of HOOPS Stream File information. Execution refers to the process of populating application-specific data structures with the information that has been read. Interpretation refers to the process of extracting application-specific data to prepare it for subsequent writing.

Each opcode handler manages opcodes which represent the various HOOPS/3dGS scene-graph objects which include segments, attributes, and geometric primitives.

The HSF file reading process involves reading the opcode at the start of each piece of binary information, and calling the Read method of the associated opcode handler. After the opcode handler reports that reading is complete, the Execute method should be called. (When using HoopsStream or BaseStream, the ParseBuffer method of the BStreamFileToolkit object encapsulates this process.)

The HSF file writing process involves determining the proper opcode for each piece of binary information, and calling the Interpret method of the associated opcode handler. After interpretation is complete, the Write method of the opcode handler should be called until writing is complete. (When using HoopsStream, the GenerateBuffer method of the HStreamFileToolkit encapsulates this process. However, if BaseStream is used, the Interpret/Write process must be performed manually.)

Constructor & Destructor Documentation

◆ BBaseOpcodeHandler()

BBaseOpcodeHandler::BBaseOpcodeHandler ( int  op)
inline

Default constructor for an BBaseOpcodeHandler object

Parameters
opvalue denoting the opcode that the object supports. This is necessary for opcode handlers that support more than one opcode, such as TK_Polypoint, which supports both TKE_Polygon and TKE_Polyline opcodes.

Member Function Documentation

◆ Clone()

virtual TK_Status BBaseOpcodeHandler::Clone ( BStreamFileToolkit tk,
BBaseOpcodeHandler **  handler 
) const
inlinevirtual

Copies the opcode handler

Parameters
tkA reference to the BStreamFileToolkit object.
handlerA pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.

Reimplemented in TK_Image_XRef, TK_External_Reference_Unicode, TK_External_Reference, TK_URL, TK_XML, TK_Material, TK_User_Data, TK_Complex_Clip_Region, TK_Clip_Region, TK_Clip_Rectangle, TK_Line_Style, TK_Named_Style_Def, TK_Shape_Definition, TK_Glyph_Definition, TK_Thumbnail, TK_Texture, TK_Image, TK_Font, TK_Text, TK_Grid, TK_PolyCylinder, TK_Cylinder, TK_Sphere, TK_Ellipse, TK_Circle, TK_Cutting_Plane, TK_Spot_Light, TK_Area_Light, TK_NURBS_Surface, TK_NURBS_Curve, TK_Polypoint, TK_Line, TK_Point, TK_Bounding, TK_Text_Font, TK_Window, TK_Camera, TK_User_Value, TK_User_Index_Data, TK_User_Index, TK_Unicode_Options, TK_User_Options, TK_Conditional_Action, TK_Conditions, TK_Streaming, TK_Named, TK_Linear_Pattern, TK_Size, TK_Enumerated, TK_Matrix, TK_Selectability, TK_Visibility, TK_Geometry_Options, TK_Heuristics, TK_Rendering_Options, TK_Callback, TK_PBR, TK_Color_Map, TK_Color_By_FIndex, TK_Color_By_Index, TK_Color_By_Value, TK_Color_RGB, TK_Color, HTK_Line_Styles, TK_Renumber, HTK_Line_Style, HTK_Named_Style_Defs, HTK_Named_Style_Def, TK_LOD, HTK_Shape_Definitions, TK_Delete_Object, HTK_Shape_Definition, TK_Instance, HTK_Glyph_Definitions, HTK_Glyph_Definition, HTK_Texture_Definitions, HTK_Texture, TK_Reference, HTK_Image, HTK_Font, HTK_Text, TK_Referenced_Segment, HTK_Grid, HTK_PolyCylinder, TK_Reopen_Segment, HTK_Cylinder, TK_Close_Segment, HTK_Sphere, HTK_Ellipse, HTK_Circle, TK_Open_Segment, HTK_Cutting_Plane, HTK_Spot_Light, HTK_Area_Light, HTK_NURBS_Surface, HTK_NURBS_Curve, HTK_Polypoint, HTK_Line, HTK_Point, HTK_Bounding, HTK_Text_Font, HTK_Clip_Rectangle, HTK_Complex_Clip_Region, HTK_Clip_Region, HTK_Window, HTK_Camera, HTK_User_Value, HTK_User_Index_Data, HTK_User_Index, HTK_Unicode_Options, HTK_User_Options, HTK_Conditional_Actions, HTK_Conditional_Action, HTK_Conditions, HTK_Streaming, HTK_Named, HTK_Linear_Pattern, HTK_Size, HTK_Enumerated, HTK_Matrix, HTK_Selectability, HTK_Visibility, HTK_Geometry_Options, HTK_Heuristics, HTK_Rendering_Options, HTK_Callback, HTK_Color_Map, HTK_PBR, HTK_Color_Composite, HTK_Color_By_FIndex, HTK_Color_By_Index, HTK_Color_By_Value, HTK_Color_RGB, HTK_Color, HTK_Renumber, HTK_LOD, HTK_Delete_Object, HTK_Instance, HTK_Reference, HTK_Referenced_Segment, TK_PolyPolypoint, HTK_Reopen_Segment, HTK_Close_Segment, HTK_Mesh, HTK_Open_Segment, HTK_Shell, and HTK_PolyPolypoint.

References BStreamFileToolkit::Error().

◆ Execute()

virtual TK_Status BBaseOpcodeHandler::Execute ( BStreamFileToolkit tk)
virtual

Processes the binary data that has been read for the current object, which involves passing the data to application-specific data structures.

Parameters
tkA reference to the BStreamFileToolkit object.
Returns
The result of the function call.

Reimplemented in TK_Image_XRef, TK_External_Reference_Unicode, TK_External_Reference, TK_XML, TK_User_Data, TK_Thumbnail, TK_Dictionary_Locater, TK_Dictionary, TK_Tag, HTK_Line_Styles, HTK_Line_Style, TK_Geometry_Attributes, HTK_Named_Style_Defs, HTK_Named_Style_Def, HTK_Shape_Definitions, HTK_Shape_Definition, HTK_Glyph_Definitions, HTK_Glyph_Definition, HTK_Texture_Definitions, HTK_Texture, HTK_Image, HTK_Font, HTK_Text, HTK_Grid, HTK_PolyCylinder, HTK_Cylinder, HTK_Sphere, HTK_Ellipse, HTK_Circle, HTK_Cutting_Plane, HTK_Spot_Light, HTK_Area_Light, HTK_NURBS_Surface, HTK_NURBS_Curve, HTK_Polypoint, TK_Compression, HTK_Line, TK_Terminator, HTK_Point, HTK_Bounding, TK_Comment, HTK_Text_Font, HTK_Clip_Rectangle, TK_File_Info, HTK_Complex_Clip_Region, HTK_Clip_Region, HTK_Window, HTK_Camera, HTK_User_Value, HTK_User_Index_Data, HTK_User_Index, HTK_Unicode_Options, HTK_User_Options, HTK_Conditional_Actions, HTK_Conditional_Action, HTK_Conditions, HTK_Streaming, HTK_Named, HTK_Linear_Pattern, HTK_Size, HTK_Enumerated, HTK_Matrix, HTK_Selectability, HTK_Visibility, HTK_Geometry_Options, HTK_Heuristics, HTK_Rendering_Options, HTK_Callback, HTK_Color_Map, HTK_PBR, HTK_Color_Composite, HTK_Color_By_FIndex, HTK_Color_By_Index, HTK_Color_By_Value, HTK_Color_RGB, HTK_Color, HTK_Renumber, HTK_LOD, HTK_Delete_Object, HTK_Instance, HTK_Reference, TK_PolyPolypoint, HTK_Referenced_Segment, HTK_Reopen_Segment, HTK_Close_Segment, HTK_Mesh, HTK_Open_Segment, HTK_Shell, and HTK_PolyPolypoint.

◆ Find_Instance()

bool BBaseOpcodeHandler::Find_Instance ( BStreamFileToolkit tk,
int  val1,
int  val2,
int  val3 
)
inlineprotected

Searches for objects which are a [transformed] copy of previous objects

◆ Find_Item()

bool BBaseOpcodeHandler::Find_Item ( BStreamFileToolkit tk,
ID_Key  key 
) const
inlineprotected

Determines if a segment has already been processed (avoid multiple writes of inclusions)

◆ General_Flags()

unsigned char BBaseOpcodeHandler::General_Flags ( ) const
inline

Returns the current general flags

◆ GetAsciiData() [1/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
int *  rInts,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiData() [2/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
unsigned char &  value 
)
protected

This is a deprecated method.

◆ GetAsciiData() [3/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
char &  value 
)
protected

This is a deprecated method.

◆ GetAsciiData() [4/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
unsigned short &  value 
)
protected

This is a deprecated method.

◆ GetAsciiData() [5/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
short &  value 
)
protected

This is a deprecated method.

◆ GetAsciiData() [6/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
int &  value 
)
protected

This is a deprecated method.

◆ GetAsciiData() [7/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
float &  value 
)
protected

This is a deprecated method.

◆ GetAsciiData() [8/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
float *  rFloats,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiData() [9/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
char *  m_string,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiData() [10/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
unsigned char *  m_string,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiData() [11/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
int *  rInts,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiData() [12/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
short *  rShorts,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiData() [13/13]

TK_Status BBaseOpcodeHandler::GetAsciiData ( BStreamFileToolkit tk,
const char *  tag,
unsigned short *  rShorts,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetAsciiHex() [1/4]

TK_Status BBaseOpcodeHandler::GetAsciiHex ( BStreamFileToolkit tk,
const char *  tag,
unsigned char &  value 
)
protected

This is a deprecated method.

◆ GetAsciiHex() [2/4]

TK_Status BBaseOpcodeHandler::GetAsciiHex ( BStreamFileToolkit tk,
const char *  tag,
int &  value 
)
protected

This is a deprecated method.

◆ GetAsciiHex() [3/4]

TK_Status BBaseOpcodeHandler::GetAsciiHex ( BStreamFileToolkit tk,
const char *  tag,
char &  value 
)
protected

This is a deprecated method.

◆ GetAsciiHex() [4/4]

TK_Status BBaseOpcodeHandler::GetAsciiHex ( BStreamFileToolkit tk,
const char *  tag,
unsigned short &  value 
)
protected

This is a deprecated method.

◆ GetAsciiImageData()

TK_Status BBaseOpcodeHandler::GetAsciiImageData ( BStreamFileToolkit tk,
const char *  tag,
unsigned char *  rValues,
unsigned int  n 
)
protected

This is a deprecated method.

◆ GetData() [1/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
char *  b,
int  n 
)
inlinestaticprotected

Gets n characters from the toolkit buffer and writes them into buffer b; returns result of function call.

◆ GetData() [2/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
short *  s,
int  n 
)
inlinestaticprotected

Gets n short integers from the toolkit buffer and writes them into buffer s; returns result of function call.

References TK_Normal.

◆ GetData() [3/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
int *  i,
int  n 
)
inlinestaticprotected

Gets n integers from the toolkit buffer and writes them into buffer i; returns result of function call.

References TK_Normal.

◆ GetData() [4/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
float *  f,
int  n 
)
inlinestaticprotected

Gets n floats from the toolkit buffer and writes them into buffer f; returns result of function call.

References TK_Normal.

◆ GetData() [5/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
double *  d,
int  n 
)
inlinestaticprotected

Gets n doubles from the toolkit buffer and writes them into buffer d; returns result of function call.

References TK_Normal.

◆ GetData() [6/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
unsigned char *  b,
int  n 
)
inlinestaticprotected

Gets n unsigned characters from the toolkit buffer and writes them into buffer b; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [7/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
unsigned short *  s,
int  n 
)
inlinestaticprotected

Gets n unsigned shorts from the toolkit buffer and writes them into buffer s; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [8/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
unsigned int *  i,
int  n 
)
inlinestaticprotected

Gets n unsigned integers from the toolkit buffer and writes them into buffer i; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [9/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
char &  c 
)
inlinestaticprotected

Gets a single characters from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [10/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
short &  s 
)
inlinestaticprotected

Gets a single short integer from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [11/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
int &  i 
)
inlinestaticprotected

Gets a single integer from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [12/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
unsigned char &  b 
)
inlinestaticprotected

Gets a single unsigned character from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [13/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
unsigned short &  s 
)
inlinestaticprotected

Gets a single unsigned short integer from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [14/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
unsigned int &  i 
)
inlinestaticprotected

Gets a single unsigned integer from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [15/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
float &  f 
)
inlinestaticprotected

Gets a single float from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetData() [16/16]

static TK_Status BBaseOpcodeHandler::GetData ( BStreamFileToolkit tk,
double &  d 
)
inlinestaticprotected

Gets a single double from the toolkit buffer; returns result of function call.

References GetData().

Referenced by GetData().

◆ GetGeneral()

TK_Status BBaseOpcodeHandler::GetGeneral ( BStreamFileToolkit tk)
inlineprotected

Puts a the object's general flags into the toolkit buffer if appropriate; returns result of function call.

References BStreamFileToolkit::GetVersion(), and TK_Normal.

◆ GetLoggingString() [1/2]

char const* BBaseOpcodeHandler::GetLoggingString ( ) const
inline

Get the debug string. Returns a pointer to the current debug string

◆ GetLoggingString() [2/2]

char* BBaseOpcodeHandler::GetLoggingString ( )
inline

Get the debug string buffer. Returns a pointer to the current debug string buffer which may then be modified directly

◆ Interpret() [1/2]

virtual TK_Status BBaseOpcodeHandler::Interpret ( BStreamFileToolkit tk,
ID_Key  key,
int  variant = 0 
)
virtual

Extracts graphics data (typically from the application's scene-graph) and maps it to the opcode handler's data members in preparation for writing out an object to the file.

Parameters
tkA reference to the BStreamFileToolkit object.
keyAn identifier to the object (for example, the HOOPS key of a geometry item)
variantoptional specification of an alternate form, such as a Level-of-Detail representation
Returns
The result of the function call.

Reimplemented in TK_Thumbnail, TK_Dictionary_Locater, TK_Dictionary, TK_Tag, HTK_Line_Styles, HTK_Line_Style, HTK_Named_Style_Defs, HTK_Named_Style_Def, HTK_Shape_Definitions, HTK_Shape_Definition, HTK_Glyph_Definitions, HTK_Glyph_Definition, HTK_Texture_Definitions, HTK_Texture, HTK_Image, HTK_Font, HTK_Text, HTK_Grid, HTK_PolyCylinder, HTK_Cylinder, HTK_Sphere, HTK_Ellipse, HTK_Circle, HTK_Cutting_Plane, HTK_Spot_Light, HTK_Area_Light, HTK_NURBS_Surface, HTK_NURBS_Curve, HTK_Polypoint, TK_Compression, HTK_Line, HTK_Point, HTK_Bounding, TK_Comment, HTK_Text_Font, TK_File_Info, HTK_Complex_Clip_Region, HTK_Clip_Region, HTK_Window, HTK_Camera, HTK_User_Value, HTK_User_Index_Data, HTK_User_Index, HTK_Unicode_Options, HTK_User_Options, HTK_Conditional_Actions, HTK_Conditional_Action, HTK_Conditions, HTK_Streaming, HTK_Named, HTK_Linear_Pattern, HTK_Size, HTK_Enumerated, HTK_Matrix, HTK_Selectability, HTK_Visibility, HTK_Geometry_Options, HTK_Heuristics, HTK_Rendering_Options, HTK_Callback, HTK_Color_Map, HTK_PBR, HTK_Color_Composite, HTK_Color_By_FIndex, HTK_Color_By_Index, HTK_Color_By_Value, HTK_Color_RGB, HTK_Color, HTK_Renumber, HTK_LOD, HTK_Delete_Object, HTK_Instance, HTK_Reference, HTK_Referenced_Segment, HTK_Reopen_Segment, HTK_Close_Segment, HTK_Mesh, HTK_Open_Segment, HTK_Shell, and HTK_PolyPolypoint.

Referenced by HTK_PolyPolypoint::Interpret(), HTK_Shell::Interpret(), HTK_Open_Segment::Interpret(), HTK_Mesh::Interpret(), HTK_Close_Segment::Interpret(), HTK_Reopen_Segment::Interpret(), HTK_Referenced_Segment::Interpret(), HTK_Reference::Interpret(), HTK_Instance::Interpret(), HTK_Delete_Object::Interpret(), HTK_LOD::Interpret(), HTK_Renumber::Interpret(), HTK_Color::Interpret(), HTK_Color_RGB::Interpret(), HTK_Color_By_Value::Interpret(), HTK_Color_By_Index::Interpret(), HTK_Color_By_FIndex::Interpret(), HTK_Color_Composite::Interpret(), HTK_PBR::Interpret(), HTK_Color_Map::Interpret(), HTK_Callback::Interpret(), HTK_Rendering_Options::Interpret(), HTK_Heuristics::Interpret(), HTK_Geometry_Options::Interpret(), HTK_Visibility::Interpret(), HTK_Selectability::Interpret(), HTK_Matrix::Interpret(), HTK_Enumerated::Interpret(), HTK_Size::Interpret(), HTK_Linear_Pattern::Interpret(), HTK_Named::Interpret(), HTK_Streaming::Interpret(), HTK_Conditions::Interpret(), HTK_Conditional_Action::Interpret(), HTK_Conditional_Actions::Interpret(), HTK_User_Options::Interpret(), HTK_Unicode_Options::Interpret(), HTK_User_Index::Interpret(), HTK_User_Index_Data::Interpret(), HTK_User_Value::Interpret(), HTK_Camera::Interpret(), HTK_Window::Interpret(), HTK_Clip_Region::Interpret(), HTK_Complex_Clip_Region::Interpret(), TK_File_Info::Interpret(), HTK_Text_Font::Interpret(), TK_Comment::Interpret(), HTK_Bounding::Interpret(), HTK_Point::Interpret(), HTK_Line::Interpret(), TK_Compression::Interpret(), HTK_Polypoint::Interpret(), HTK_NURBS_Curve::Interpret(), HTK_NURBS_Surface::Interpret(), HTK_Area_Light::Interpret(), HTK_Spot_Light::Interpret(), HTK_Cutting_Plane::Interpret(), HTK_Circle::Interpret(), HTK_Ellipse::Interpret(), HTK_Sphere::Interpret(), HTK_Cylinder::Interpret(), HTK_PolyCylinder::Interpret(), HTK_Grid::Interpret(), HTK_Text::Interpret(), HTK_Font::Interpret(), HTK_Image::Interpret(), HTK_Texture::Interpret(), HTK_Texture_Definitions::Interpret(), HTK_Glyph_Definition::Interpret(), HTK_Glyph_Definitions::Interpret(), HTK_Shape_Definition::Interpret(), HTK_Shape_Definitions::Interpret(), HTK_Named_Style_Def::Interpret(), HTK_Named_Style_Defs::Interpret(), HTK_Line_Style::Interpret(), HTK_Line_Styles::Interpret(), TK_Tag::Interpret(), TK_Dictionary::Interpret(), TK_Dictionary_Locater::Interpret(), and TK_Thumbnail::Interpret().

◆ Interpret() [2/2]

virtual TK_Status BBaseOpcodeHandler::Interpret ( BStreamFileToolkit tk,
ID_Key  key,
char const *  special 
)
virtual

Extracts graphics data (typically from the application's scene-graph) and maps it to the opcode handler's data members in preparation for writing out an object to the file.

Parameters
tkA reference to the BStreamFileToolkit object.
keyAn identifier to the object (for example, the HOOPS key of a geometry item)
specialA string value of particular data
Returns
The result of the function call.

Reimplemented in TK_Thumbnail, TK_Dictionary_Locater, TK_Dictionary, TK_Tag, HTK_Line_Styles, HTK_Line_Style, HTK_Named_Style_Defs, HTK_Named_Style_Def, HTK_Shape_Definitions, HTK_Shape_Definition, HTK_Glyph_Definitions, HTK_Glyph_Definition, HTK_Texture_Definitions, HTK_Texture, HTK_Image, HTK_Font, HTK_Text, HTK_Grid, HTK_PolyCylinder, HTK_Cylinder, HTK_Sphere, HTK_Ellipse, HTK_Circle, HTK_Cutting_Plane, HTK_Spot_Light, HTK_Area_Light, HTK_NURBS_Surface, HTK_NURBS_Curve, HTK_Polypoint, TK_Compression, HTK_Line, HTK_Point, HTK_Bounding, TK_Comment, HTK_Text_Font, TK_File_Info, HTK_Complex_Clip_Region, HTK_Clip_Region, HTK_Window, HTK_Camera, HTK_User_Value, HTK_User_Index_Data, HTK_User_Index, HTK_Unicode_Options, HTK_User_Options, HTK_Conditional_Actions, HTK_Conditional_Action, HTK_Conditions, HTK_Streaming, HTK_Named, HTK_Linear_Pattern, HTK_Size, HTK_Enumerated, HTK_Matrix, HTK_Selectability, HTK_Visibility, HTK_Geometry_Options, HTK_Heuristics, HTK_Rendering_Options, HTK_Callback, HTK_Color_Map, HTK_PBR, HTK_Color_Composite, HTK_Color_By_FIndex, HTK_Color_By_Index, HTK_Color_By_Value, HTK_Color_RGB, HTK_Color, HTK_Renumber, HTK_LOD, HTK_Delete_Object, HTK_Instance, HTK_Reference, HTK_Referenced_Segment, HTK_Reopen_Segment, HTK_Close_Segment, HTK_Mesh, HTK_Open_Segment, HTK_Shell, and HTK_PolyPolypoint.

◆ IsCollectionPart()

bool BBaseOpcodeHandler::IsCollectionPart ( ) const
inline

Determine if the object is part of a collection

◆ LogDebug()

void BBaseOpcodeHandler::LogDebug ( BStreamFileToolkit tk,
char const *  string = 0 
)

write out any logging string (provided or previously recorded) and reset

◆ LookatData()

static TK_Status BBaseOpcodeHandler::LookatData ( BStreamFileToolkit tk,
unsigned char &  b 
)
inlinestaticprotected

Examines a single unsigned character from the toolkit buffer (does not Get); returns result of function call.

◆ Match_Instance()

virtual bool BBaseOpcodeHandler::Match_Instance ( BStreamFileToolkit const &  tk,
Recorded_Instance *  instance 
)
virtual

Determines whether a stored instance of an object is compatible with the current object, and if it is, prepares the object to write the instance instead.

Reimplemented in HTK_Mesh, and HTK_Shell.

◆ NeedsContext()

virtual bool BBaseOpcodeHandler::NeedsContext ( BStreamFileToolkit tk) const
inlinevirtual

Allows the handler to specify if it needs the containing context to be reopened (currently only used for revisits on geometry references)

Returns
The answer.

Reimplemented in HTK_Reference.

◆ NeedsTag()

bool BBaseOpcodeHandler::NeedsTag ( ) const
inline

Determine if the object is set to request tagging

◆ Opcode()

unsigned char BBaseOpcodeHandler::Opcode ( ) const
inline

Returns the current opcode

◆ Opcode_Handler()

BBaseOpcodeHandler* BBaseOpcodeHandler::Opcode_Handler ( BStreamFileToolkit tk,
unsigned char  op 
) const
inlineprotected

Allows an object to access handlers defined for other objects

◆ Pass()

int BBaseOpcodeHandler::Pass ( BStreamFileToolkit tk) const
inline

The toolkit makes multiple passes of objects which have LOD representations in the HOOPS database. This function returns the number of the pass which the toolkit is currently on.

◆ PutAsciiData() [1/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
char const *  b,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [2/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
short const *  s,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [3/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
int const *  i,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [4/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
float const *  f,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [5/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
unsigned char const *  b,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [6/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
unsigned short const *  s,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [7/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
unsigned int const *  i,
int  n 
)
protected

This is a deprecated method.

◆ PutAsciiData() [8/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
char const &  c 
)
protected

This is a deprecated method.

◆ PutAsciiData() [9/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
short const &  s 
)
protected

This is a deprecated method.

◆ PutAsciiData() [10/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
int const &  i 
)
protected

This is a deprecated method.

◆ PutAsciiData() [11/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
unsigned char const &  b 
)
protected

This is a deprecated method.

◆ PutAsciiData() [12/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
unsigned short const &  s 
)
protected

This is a deprecated method.

◆ PutAsciiData() [13/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
unsigned int const &  i 
)
protected

This is a deprecated method.

◆ PutAsciiData() [14/14]

TK_Status BBaseOpcodeHandler::PutAsciiData ( BStreamFileToolkit tk,
char const *  tag,
float const &  f 
)
protected

This is a deprecated method.

◆ PutAsciiFlag()

TK_Status BBaseOpcodeHandler::PutAsciiFlag ( BStreamFileToolkit tk,
char const *  tag,
int const &  i 
)
protected

This is a deprecated method.

◆ PutAsciiHex()

TK_Status BBaseOpcodeHandler::PutAsciiHex ( BStreamFileToolkit tk,
char const *  tag,
int const &  i 
)
protected

This is a deprecated method.

◆ PutAsciiMask()

TK_Status BBaseOpcodeHandler::PutAsciiMask ( BStreamFileToolkit tk,
char const *  tag,
int const &  i 
)
protected

This is a deprecated method.

◆ PutAsciiOpcode()

TK_Status BBaseOpcodeHandler::PutAsciiOpcode ( BStreamFileToolkit tk,
int  adjust = 1,
bool  is_end = false,
bool  want_newline = true 
)
protected

This is a deprecated method.

◆ PutData() [1/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
char const *  b,
int  n 
)
inlinestaticprotected

Puts n characters from buffer b into the toolkit buffer; returns result of function call.

◆ PutData() [2/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
short const *  s,
int  n 
)
inlinestaticprotected

Puts n short integers from buffer s into the toolkit buffer; returns result of function call.

References TK_Normal.

◆ PutData() [3/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
int const *  i,
int  n 
)
inlinestaticprotected

Puts n integers from buffer i into the toolkit buffer; returns result of function call.

References TK_Normal.

◆ PutData() [4/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
float const *  f,
int  n 
)
inlinestaticprotected

Puts n floats from buffer f into the toolkit buffer; returns result of function call.

References TK_Normal.

◆ PutData() [5/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
double const *  d,
int  n 
)
inlinestaticprotected

Puts n doubles from buffer d into the toolkit buffer; returns result of function call.

References TK_Normal.

◆ PutData() [6/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
unsigned char const *  b,
int  n 
)
inlinestaticprotected

Puts n unsigned characters from buffer b into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [7/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
unsigned short const *  s,
int  n 
)
inlinestaticprotected

Puts n unsigned short integers from buffer s into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [8/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
unsigned int const *  i,
int  n 
)
inlinestaticprotected

Puts n unsigned integers from buffer i into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [9/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
char const &  c 
)
inlinestaticprotected

Puts a single character c into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [10/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
short const &  s 
)
inlinestaticprotected

Puts a single short integer s into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [11/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
int const &  i 
)
inlinestaticprotected

Puts a single integer i into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [12/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
unsigned char const &  b 
)
inlinestaticprotected

Puts a single unsigned character b into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [13/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
unsigned short const &  s 
)
inlinestaticprotected

Puts a single unsigned short s into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [14/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
unsigned int const &  i 
)
inlinestaticprotected

Puts a single unsigned integer i into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [15/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
float const &  f 
)
inlinestaticprotected

Puts a single float f into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutData() [16/16]

static TK_Status BBaseOpcodeHandler::PutData ( BStreamFileToolkit tk,
double const &  d 
)
inlinestaticprotected

Puts a single double d into the toolkit buffer; returns result of function call.

References PutData().

Referenced by PutData().

◆ PutEndXMLTag()

TK_Status BBaseOpcodeHandler::PutEndXMLTag ( BStreamFileToolkit tk,
char const *  tag 
)
protected

This is a deprecated method.

◆ PutGeneral()

TK_Status BBaseOpcodeHandler::PutGeneral ( BStreamFileToolkit tk)
inlineprotected

Puts a the object's general flags into the toolkit buffer if appropriate; returns result of function call.

References BStreamFileToolkit::GetTargetVersion(), and TK_Normal.

◆ PutOpcode()

TK_Status BBaseOpcodeHandler::PutOpcode ( BStreamFileToolkit tk,
int  adjust = 1 
)
inlineprotected

Puts a the object's opcode into the toolkit buffer; returns result of function call.

References BStreamFileToolkit::GetLogging(), BStreamFileToolkit::NextOpcodeSequence(), and TK_Normal.

◆ PutStartXMLTag()

TK_Status BBaseOpcodeHandler::PutStartXMLTag ( BStreamFileToolkit tk,
char const *  tag 
)
protected

This is a deprecated method.

◆ Read()

virtual TK_Status BBaseOpcodeHandler::Read ( BStreamFileToolkit tk)
pure 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
tkA reference to the BStreamFileToolkit object.
Returns
The result of the function call.

Implemented in TK_Image_XRef, TK_External_Reference_Unicode, TK_External_Reference, TK_URL, TK_XML, TK_Material, TK_User_Data, TK_Complex_Clip_Region, TK_Clip_Region, TK_Clip_Rectangle, TK_Line_Style, TK_Named_Style_Def, TK_Shape_Definition, TK_Glyph_Definition, TK_Thumbnail, TK_Texture, TK_Image, TK_Font, TK_Text, TK_Grid, TK_PolyCylinder, TK_Cylinder, TK_Sphere, TK_Ellipse, TK_Circle, TK_Cutting_Plane, TK_Spot_Light, TK_Area_Light, TK_NURBS_Surface, HT_NURBS_Trim, TK_NURBS_Curve, TK_Polypoint, TK_Line, TK_Point, TK_Bounding, TK_Text_Font, TK_Window, TK_Camera, TK_User_Value, TK_User_Index_Data, TK_User_Index, TK_Unicode_Options, TK_User_Options, TK_Conditional_Action, TK_Conditions, TK_Streaming, TK_Named, TK_Linear_Pattern, TK_Size, TK_Enumerated, TK_Matrix, TK_Selectability, TK_Visibility, TK_Geometry_Options, TK_Heuristics, TK_Rendering_Options, TK_Callback, TK_PBR, TK_Color_Map, TK_Color_By_FIndex, TK_Color_By_Index, TK_Color_By_Value, TK_Color_RGB, TK_Color, TK_Dictionary_Locater, TK_Dictionary, TK_Tag, HTK_Line_Styles, TK_Renumber, TK_Geometry_Attributes, HTK_Named_Style_Defs, TK_LOD, HTK_Shape_Definitions, TK_Delete_Object, TK_Instance, HTK_Glyph_Definitions, HTK_Texture_Definitions, TK_Reference, TK_Referenced_Segment, TK_Reopen_Segment, TK_Close_Segment, TK_Open_Segment, Lock_Masks, TK_Mesh, TK_Compression, TK_Terminator, TK_Comment, TK_File_Info, TK_Header, TK_Unavailable, TK_Default, HTK_Conditional_Actions, HTK_Color_Composite, TK_Shell, and TK_PolyPolypoint.

◆ read_float()

static float BBaseOpcodeHandler::read_float ( char const *  cp,
char const **  newcpp = 0 
)
staticprotected

Internal use: utility functions for conversion between float & string without dealing with locale issues

◆ Read_Referenced_Segment()

TK_Status BBaseOpcodeHandler::Read_Referenced_Segment ( BStreamFileToolkit tk,
int &  i_progress 
)
protected

This is a deprecated method.

◆ ReadAsciiLine()

TK_Status BBaseOpcodeHandler::ReadAsciiLine ( BStreamFileToolkit tk,
unsigned int *  readSize = 0 
)
protected

This is a deprecated method.

◆ ReadAsciiWord()

TK_Status BBaseOpcodeHandler::ReadAsciiWord ( BStreamFileToolkit tk,
unsigned int *  readSize = 0 
)
protected

This is a deprecated method.

◆ ReadEndOpcode()

TK_Status BBaseOpcodeHandler::ReadEndOpcode ( BStreamFileToolkit tk)
protected

This is a deprecated method.

◆ Record_Instance()

void BBaseOpcodeHandler::Record_Instance ( BStreamFileToolkit tk,
ID_Key  key,
int  variant,
int  val1,
int  val2,
int  val3 
) const
inlineprotected

Allows us to later find objects which are a [transformed] copy of previous objects

◆ Remember_Item()

void BBaseOpcodeHandler::Remember_Item ( BStreamFileToolkit tk,
ID_Key  key 
) const
inlineprotected

Allows us to remember which segments have been processed (avoid multiple writes of inclusions)

◆ RemoveAngularBrackets()

bool BBaseOpcodeHandler::RemoveAngularBrackets ( char *  string)
protected

This is a deprecated method.

◆ RemoveQuotes()

bool BBaseOpcodeHandler::RemoveQuotes ( char *  string)
protected

This is a deprecated method.

◆ Reset()

◆ Revisit()

void BBaseOpcodeHandler::Revisit ( BStreamFileToolkit tk,
float  priority = 0.0f,
int  variant = 0 
) const
inlineprotected

Indicates that an object requires further processing during a subsequent pass

◆ Set_General_Flags()

void BBaseOpcodeHandler::Set_General_Flags ( int  f)
inline

Sets the current general flags

Referenced by TK_Bounding::TK_Bounding().

◆ SetCollectionPart()

void BBaseOpcodeHandler::SetCollectionPart ( bool  n)
inline

Sets whether the object is part of a collection

◆ SetLoggingString() [1/2]

void BBaseOpcodeHandler::SetLoggingString ( char const *  segment)

Set the debug string. Makes sure the buffer is big enough to hold the debug string, and copies it in

◆ SetLoggingString() [2/2]

void BBaseOpcodeHandler::SetLoggingString ( int  length)

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

◆ SetNeedsTag()

void BBaseOpcodeHandler::SetNeedsTag ( bool  n)
inline

Sets whether the object requests tagging

◆ SkipNewlineAndTabs()

TK_Status BBaseOpcodeHandler::SkipNewlineAndTabs ( BStreamFileToolkit tk,
unsigned int *  readSize = 0 
)
protected

This is a deprecated method.

◆ Tag()

TK_Status BBaseOpcodeHandler::Tag ( BStreamFileToolkit tk,
int  variant = -1 
) const
inline

Adds a Tag to the file for the current object, and also adds an entry to the toolkit's tag table which stores an association between the tag (also called an 'index') and the current object's HOOPS key

◆ Tagging()

bool BBaseOpcodeHandler::Tagging ( BStreamFileToolkit tk) const
inline

Provides a simple interface to check if this object requires tagging or the toolkit is set for Force_Tags.

References BStreamFileToolkit::GetWriteFlags(), and TK_Force_Tags.

◆ validate_count()

bool BBaseOpcodeHandler::validate_count ( int  count,
int  limit = 1<<24 
) const
inlineprotected

sanity checking. for internal use only

◆ Write()

virtual TK_Status BBaseOpcodeHandler::Write ( BStreamFileToolkit tk)
pure 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
tkA reference to the BStreamFileToolkit object.
Returns
The result of the function call.

Implemented in TK_Image_XRef, TK_External_Reference_Unicode, TK_External_Reference, TK_URL, TK_XML, TK_Material, TK_User_Data, TK_Complex_Clip_Region, TK_Clip_Region, TK_Clip_Rectangle, TK_Line_Style, TK_Named_Style_Def, TK_Shape_Definition, TK_Glyph_Definition, TK_Thumbnail, TK_Texture, TK_Image, TK_Font, TK_Text, TK_Grid, TK_PolyCylinder, TK_Cylinder, TK_Sphere, TK_Ellipse, TK_Circle, TK_Cutting_Plane, TK_Spot_Light, TK_Area_Light, TK_NURBS_Surface, HT_NURBS_Trim, TK_NURBS_Curve, TK_Polypoint, TK_Line, TK_Point, TK_Bounding, TK_Text_Font, TK_Window, TK_Camera, TK_User_Value, TK_User_Index_Data, TK_User_Index, TK_Unicode_Options, TK_User_Options, TK_Conditional_Action, TK_Conditions, TK_Streaming, TK_Named, TK_Linear_Pattern, TK_Size, TK_Enumerated, TK_Matrix, TK_Selectability, TK_Visibility, TK_Geometry_Options, TK_Heuristics, TK_Rendering_Options, TK_Callback, TK_PBR, TK_Color_Map, TK_Color_By_FIndex, TK_Color_By_Index, TK_Color_By_Value, TK_Color_RGB, TK_Color, TK_Dictionary_Locater, TK_Dictionary, TK_Tag, HTK_Line_Styles, TK_Renumber, TK_Geometry_Attributes, HTK_Named_Style_Defs, TK_LOD, HTK_Named_Style_Def, HTK_Shape_Definitions, TK_Delete_Object, TK_Instance, HTK_Glyph_Definitions, HTK_Texture_Definitions, TK_Reference, HTK_Texture, TK_Referenced_Segment, TK_Reopen_Segment, TK_Close_Segment, TK_Open_Segment, Lock_Masks, TK_Mesh, TK_Compression, TK_Terminator, TK_Comment, TK_File_Info, TK_Header, TK_Unavailable, TK_Default, HTK_Conditional_Actions, HTK_Color_Composite, HTK_Reference, TK_Shell, HTK_Referenced_Segment, and TK_PolyPolypoint.

Member Data Documentation

◆ m_debug_allocated

int BBaseOpcodeHandler::m_debug_allocated
protected

Size of currently available debug string buffer

◆ m_debug_string

char* BBaseOpcodeHandler::m_debug_string
protected

Debug String


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