TK_Animation

class TK_Animation

TK_Animation provides support for writing/reading opcode objects which represent HPS Animations. Animations are written out as strings which represent JSON serialized data. The HPS ModelSpork is responsible for turning its animation data into strings at the beginning of an export and for deserializing the data at the end of an import.

Inherits from: BBaseOpcodeHandler

Methods

TK_Animation::TK_Animation()

constructor

TK_Animation::~TK_Animation()
TK_Status TK_Animation::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_Animation::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_Animation::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_Animation::ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status TK_Animation::WriteAscii(BStreamFileToolkit &tk)

Deprecated.

void TK_Animation::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.

void TK_Animation::SetName(char const *name)

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

void TK_Animation::SetName(int length)

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

char const *TK_Animation::GetName() const

const

Returns the name

char *TK_Animation::GetName()

Returns the name buffer, which can be modified directly

Variables

int TK_Animation::m_name_length

protected

int

internal use: length of name

char *TK_Animation::m_name

protected

char

internal use: name