Alphabetical Class Index   Class Hierarchy   Compound Members   File Members   File List  

TK_Size Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Size:

BBaseOpcodeHandler BControlledMemoryObject

List of all members.

Public Member Functions

TK_Status Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const
float GetSize () const
int GetUnits () const
TK_Status Read (BStreamFileToolkit &tk)
TK_Status ReadAscii (BStreamFileToolkit &tk)
 Deprecated.
void SetSize (float value, int units=TKO_Generic_Size_Unspecified)
 TK_Size (unsigned char opcode)
TK_Status Write (BStreamFileToolkit &tk)
TK_Status WriteAscii (BStreamFileToolkit &tk)
 Deprecated.

Protected Attributes

unsigned char m_units
 for internal use only.
float m_value
 for internal use only.


Detailed Description

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

Constructor & Destructor Documentation

TK_Size::TK_Size ( unsigned char  opcode  )  [inline]

constructor


Member Function Documentation

TK_Status TK_Size::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.

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.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

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.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.


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