aja::ElementString Class Reference

class representing STRING-ELEMENT items. More...

#include <ElementString.h>

Inheritance diagram for aja::ElementString:

aja::ElementItem aja::Item List of all members.

Public Member Functions

 ElementString (number_t id, const char *text)
 Construct string element with ID.
 ElementString (number_t id, const std::string &text)
 ElementString (number_t id)
 Construct string element with ID.
virtual ~ElementString ()
bool setString (const std::string &str)
bool setString (const char *str, unsigned int size)
 Function set string for element.
bool buildAja (OutputBuffer &out)
 Function build AJA binary form of STRING ELEMENT.
bool parseElmData (buffer_t buffer, unsigned int size, unsigned int &pos)
 Function parse string into element.
std::string getElementContent ()
 Function return string content in element.
number_t getItemSize ()
 Function return complete size of string element.

Protected Attributes

std::string mString
 inner string store

Detailed Description

class representing STRING-ELEMENT items.

This class doing parsing, building and manipulating operations with string elements.

Strings in string element can be long like 16bit unsigned number (about 63kb).For longer strings can be used DATA-ELEMENTS.


Constructor & Destructor Documentation

aja::ElementString::ElementString number_t  id,
const char *  text
 

Construct string element with ID.

Parameters:
id ID of string element
text this text be set like element's content

aja::ElementString::ElementString number_t  id,
const std::string &  text
 

aja::ElementString::ElementString number_t  id  ) 
 

Construct string element with ID.

Parameters:
id ID of string element

aja::ElementString::~ElementString  )  [virtual]
 


Member Function Documentation

bool aja::ElementString::buildAja OutputBuffer out  )  [virtual]
 

Function build AJA binary form of STRING ELEMENT.

Parameters:
out Into this class is written AJA binary result of building process.
Returns:
true id ok, false when error was occurred

Reimplemented from aja::ElementItem.

string aja::ElementString::getElementContent  )  [virtual]
 

Function return string content in element.

Returns:
string of element

Implements aja::ElementItem.

number_t aja::ElementString::getItemSize  )  [virtual]
 

Function return complete size of string element.

Returns:
size of string element in bytes

Reimplemented from aja::ElementItem.

bool aja::ElementString::parseElmData buffer_t  buffer,
unsigned int  size,
unsigned int &  pos
[virtual]
 

Function parse string into element.

Parameters:
buffer buffer contain AJA-ML data
size size of buffer
pos this is input and output parameter. It is actual position in buffer.
Returns:
true=ok, false=data are not parsed

Implements aja::ElementItem.

bool aja::ElementString::setString const char *  str,
unsigned int  size
 

Function set string for element.

Parameters:
str pointer to char[] array
size size of char[] array
Returns:
true=ok, false=error probably size of string is bigger like 16bit unsigned number.

bool aja::ElementString::setString const std::string &  str  ) 
 


Member Data Documentation

std::string aja::ElementString::mString [protected]
 

inner string store


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 00:30:37 2007 for LIBAJA by  doxygen 1.4.6