#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
float | GetSize () const |
int | GetUnits () const |
TK_Status | Read (BStreamFileToolkit &tk) alter |
TK_Status | ReadAscii (BStreamFileToolkit &tk) alter |
Deprecated. | |
void | SetSize (float value, int units=TKO_Generic_Size_Unspecified) alter |
TK_Size (unsigned char opcode) | |
TK_Status | Write (BStreamFileToolkit &tk) alter |
TK_Status | WriteAscii (BStreamFileToolkit &tk) alter |
Deprecated. | |
Protected Attributes | |
unsigned char | m_units |
for internal use only. | |
float | m_value |
for internal use only. |
TK_Size provides support for writing/reading opcode objects which represent a single value representing a scale or size, possibly including a specification of the reference system. This includes opcodes such as TKE_Line_Weight, TKE_Edge_Weight, TKE_Marker_Size and TKE_Text_Spacing
TK_Size::TK_Size | ( | unsigned char | opcode | ) | [inline] |
constructor
TK_Status TK_Size::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.
float TK_Size::GetSize | ( | ) | const [inline] |
Returns the size value
int TK_Size::GetUnits | ( | ) | const [inline] |
Returns the size value
TK_Status TK_Size::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_Size::SetSize | ( | float | value, |
int | units = TKO_Generic_Size_Unspecified |
||
) | [inline] |
Sets the size value & units (value may not be negative, units only meaningful if positive)
References TKO_Generic_Size_Unspecified.
TK_Status TK_Size::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.