TK_Font Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Font:

Inheritance graph
[legend]
Collaboration diagram for TK_Font:

Collaboration graph
[legend]
List of all members.

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

Definition at line 6781 of file BOpcodeHandler.h.

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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


Constructor & Destructor Documentation

TK_Font::TK_Font  )  [inline]
 

constructor

Definition at line 6809 of file BOpcodeHandler.h.


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.

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

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

Definition at line 6839 of file BOpcodeHandler.h.

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

Returns the address of the data buffer

Definition at line 6837 of file BOpcodeHandler.h.

int TK_Font::GetBytesCount void   )  const [inline]
 

Returns the size of the data buffer

Definition at line 6835 of file BOpcodeHandler.h.

int TK_Font::GetEncoding void   )  const [inline]
 

Returns the type of encoding for this font

Definition at line 6862 of file BOpcodeHandler.h.

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

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

Definition at line 6857 of file BOpcodeHandler.h.

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

Returns the lookup function name string

Definition at line 6855 of file BOpcodeHandler.h.

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

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

Definition at line 6848 of file BOpcodeHandler.h.

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

Returns the font name string

Definition at line 6846 of file BOpcodeHandler.h.

int TK_Font::GetType void   )  const [inline]
 

Returns the type of the font

Definition at line 6827 of file BOpcodeHandler.h.

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 void   )  [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

Definition at line 6833 of file BOpcodeHandler.h.

void TK_Font::SetEncoding int  e  )  [inline]
 

Set the type of encoding for this font

Definition at line 6860 of file BOpcodeHandler.h.

void TK_Font::SetLookup int  length  )  [inline]
 

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

Definition at line 6853 of file BOpcodeHandler.h.

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

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

Definition at line 6851 of file BOpcodeHandler.h.

void TK_Font::SetName int  length  )  [inline]
 

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

Definition at line 6844 of file BOpcodeHandler.h.

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

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

Definition at line 6842 of file BOpcodeHandler.h.

void TK_Font::SetType int  t  )  [inline]
 

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

Definition at line 6825 of file BOpcodeHandler.h.

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

Definition at line 6789 of file BOpcodeHandler.h.

unsigned char TK_Font::m_encoding [protected]
 

internal use; Encoding associated with the font

Definition at line 6794 of file BOpcodeHandler.h.

int TK_Font::m_length [protected]
 

internal use; Length font description

Definition at line 6792 of file BOpcodeHandler.h.

char* TK_Font::m_lookup [protected]
 

internal use; Name of font character lookup function

Definition at line 6788 of file BOpcodeHandler.h.

int TK_Font::m_lookup_length [protected]
 

internal use; Length of lookup name

Definition at line 6791 of file BOpcodeHandler.h.

char* TK_Font::m_name [protected]
 

internal use; Name of the font

Definition at line 6787 of file BOpcodeHandler.h.

int TK_Font::m_name_length [protected]
 

internal use; Length of name

Definition at line 6790 of file BOpcodeHandler.h.

unsigned char TK_Font::m_type [protected]
 

internal use; Type of font

Definition at line 6793 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:43 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5