Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Font Class Reference

Handles the TKE_Font opcode. More...

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Font:

BBaseOpcodeHandler BControlledMemoryObject HTK_Font

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
char alter * GetBytes () alter
char const * GetBytes () const
int GetBytesCount () const
int GetEncoding () const
char alter * GetLookup () alter
char const * GetLookup () const
char alter * GetName () alter
char const * GetName () const
int GetType () const
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status ReadAscii (BStreamFileToolkit &tk) alter
 Deprecated.
void Reset () alter
void SetBytes (int size, char const *bytes=0) alter
void SetEncoding (int e) alter
void SetLookup (int length) alter
void SetLookup (char const *string) alter
void SetName (int length) alter
void SetName (char const *string) alter
void SetType (int t) alter
 TK_Font ()
TK_Status Write (BStreamFileToolkit &tk) alter
TK_Status WriteAscii (BStreamFileToolkit &tk) alter
 Deprecated.

Protected Member Functions

void set_bytes (int size, char const *bytes=0) alter
 internal use
void set_lookup (int length) alter
 internal use
void set_lookup (char const *string) alter
 internal use
void set_name (int length) alter
 internal use
void set_name (char const *string) alter
 internal use

Protected Attributes

char * m_bytes
unsigned char m_encoding
int m_length
char * m_lookup
int m_lookup_length
char * m_name
int m_name_length
unsigned char m_type


Detailed Description

Handles the TKE_Font opcode.

TK_Font provides support for writing/reading the TKE_Font opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph supports user-defined fonts. Refer to the function HC_Define_Font in the HOOPS/3dGS Reference Manual


Constructor & Destructor Documentation

TK_Font::TK_Font (  )  [inline]

constructor


Member Function Documentation

TK_Status TK_Font::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_Font.

char alter* TK_Font::GetBytes (  )  [inline]

Returns the address of the data buffer, which may be modified directly

char const* TK_Font::GetBytes (  )  const [inline]

Returns the address of the data buffer

int TK_Font::GetBytesCount (  )  const [inline]

Returns the size of the data buffer

int TK_Font::GetEncoding (  )  const [inline]

Returns the type of encoding for this font

char alter* TK_Font::GetLookup (  )  [inline]

Returns the lookup name string buffer, which may be modified directly

char const* TK_Font::GetLookup (  )  const [inline]

Returns the lookup function name string

char alter* TK_Font::GetName (  )  [inline]

Returns the font name string buffer, which may be modified directly

char const* TK_Font::GetName (  )  const [inline]

Returns the font name string

int TK_Font::GetType (  )  const [inline]

Returns the type of the font

TK_Status TK_Font::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_Font::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_Font::SetBytes ( int  size,
char const *  bytes = 0 
) [inline]

Sets the font data. Allocates a buffer which can hold 'size' bytes, and if specified, copies the data from 'bytes' to the buffer

void TK_Font::SetEncoding ( int  e  )  [inline]

Set the type of encoding for this font

void TK_Font::SetLookup ( int  length  )  [inline]

Sets the lookup name buffer. Allocates a buffer large enough to hold a string of 'length' characters

void TK_Font::SetLookup ( char const *  string  )  [inline]

Sets the name of the lookup function. Allocates the buffer and copies the string

void TK_Font::SetName ( int  length  )  [inline]

Sets the name buffer. Allocates a buffer large enough to hold a string of 'length' characters

void TK_Font::SetName ( char const *  string  )  [inline]

Sets the name of the font. Allocates the buffer and copies the string

void TK_Font::SetType ( int  t  )  [inline]

Set the type of the font (HOOPS stroked font definition is the only one supported so far)

TK_Status TK_Font::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

char* TK_Font::m_bytes [protected]

internal use; Font description data

unsigned char TK_Font::m_encoding [protected]

internal use; Encoding associated with the font

int TK_Font::m_length [protected]

internal use; Length font description

char* TK_Font::m_lookup [protected]

internal use; Name of font character lookup function

int TK_Font::m_lookup_length [protected]

internal use; Length of lookup name

char* TK_Font::m_name [protected]

internal use; Name of the font

int TK_Font::m_name_length [protected]

internal use; Length of name

unsigned char TK_Font::m_type [protected]

internal use; Type of font


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