TK_Size

class TK_Size

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

Inherits from: BBaseOpcodeHandler

Methods

TK_Size::TK_Size(unsigned char opcode)

constructor

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.

Parameters

tk: A reference to the BStreamFileToolkit object.

Returns

The result of the function call.
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.

Parameters

tk: A reference to the BStreamFileToolkit object.

Returns

The result of the function call.
TK_Status TK_Size::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

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.
TK_Status TK_Size::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_Size::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Size::SetSize(float value, int units = TKO_Generic_Size_Unspecified)

Sets the size value & units (value may not be negative, units only meaningful if positive)

float TK_Size::GetSize() const

const

Returns the size value

int TK_Size::GetUnits() const

const

Returns the size value

Variables

float TK_Size::m_value

protected

float

for internal use only.

unsigned char TK_Size::m_units

protected

unsigned char

for internal use only.