Handles the TKE_Font opcode. More...
#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
char const * | GetBytes () const |
char * | GetBytes () |
int | GetBytesCount () const |
int | GetEncoding () const |
char const * | GetLookup () const |
char * | GetLookup () |
char const * | GetName () const |
char * | GetName () |
int | GetType () const |
TK_Status | Read (BStreamFileToolkit &tk) |
TK_Status | ReadAscii (BStreamFileToolkit &tk) |
Deprecated. | |
void | Reset () |
void | SetBytes (int size, char const *bytes=0) |
void | SetEncoding (int e) |
void | SetLookup (char const *string) |
void | SetLookup (int length) |
void | SetName (char const *string) |
void | SetName (int length) |
void | SetType (int t) |
TK_Font () | |
TK_Status | Write (BStreamFileToolkit &tk) |
TK_Status | WriteAscii (BStreamFileToolkit &tk) |
Deprecated. | |
Protected Member Functions | |
void | set_bytes (int size, char const *bytes=0) |
internal use | |
void | set_lookup (char const *string) |
internal use | |
void | set_lookup (int length) |
internal use | |
void | set_name (char const *string) |
internal use | |
void | set_name (int length) |
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 |
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
TK_Font::TK_Font | ( | ) | [inline] |
constructor
TK_Status TK_Font::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.
Reimplemented in HTK_Font.
char const* TK_Font::GetBytes | ( | ) | const [inline] |
Returns the address of the data buffer
char* TK_Font::GetBytes | ( | ) | [inline] |
Returns the address of the data buffer, which may be modified directly
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 const* TK_Font::GetLookup | ( | ) | const [inline] |
Returns the lookup function name string
char* TK_Font::GetLookup | ( | ) | [inline] |
Returns the lookup name string buffer, which may be modified directly
char const* TK_Font::GetName | ( | ) | const [inline] |
Returns the font name string
char* TK_Font::GetName | ( | ) | [inline] |
Returns the font name string buffer, which may be modified directly
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.
tk | A reference to the BStreamFileToolkit object. |
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 | ( | char const * | string | ) | [inline] |
Sets the name of the lookup function. Allocates the buffer and copies the string
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::SetName | ( | char const * | string | ) | [inline] |
Sets the name of the font. 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::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.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
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