aja::Document Class Reference

Class representing basic AJA-Document. More...

#include <Document.h>

List of all members.

Public Member Functions

 Document ()
 construct document class
virtual ~Document ()
 Destruct document, document's header and all document's elements.
DocumentHeadergetHeader ()
 Function return pointer to DocumentHeader class.
void setHeader (DocumentHeader *header)
 Function set header for document.Old header is deleted.
ElementItemgetRootElement ()
 Function return pointer to root ElementItem class.
void setRootElement (ElementItem *root)
 Function set root element for document.Old root element with his child elements can be deleted.
unsigned int parseAja (const buffer_t buffer, unsigned int size, unsigned int pos)
 Function try parse a data in buffer and when parsing is OK, then ol root and header can be deleted and replaced by new parsed root and header.
bool buildAjaDoc (OutputBuffer *out)
 Function complete build AJA Document with header and elements and result write into OutputBuffer.
bool buildXmlDoc (OutputBuffer *out)
 Function build XML from document structure.


Detailed Description

Class representing basic AJA-Document.

Class contain functions for building and parsing AJA data.Converting it into XML or conver XML to AJA etc.


Constructor & Destructor Documentation

aja::Document::Document  ) 
 

construct document class

aja::Document::~Document  )  [virtual]
 

Destruct document, document's header and all document's elements.


Member Function Documentation

bool aja::Document::buildAjaDoc OutputBuffer out  ) 
 

Function complete build AJA Document with header and elements and result write into OutputBuffer.

Before writting into buffer, output buffer is erased and old content of buffer lost.

Parameters:
out into this OutputBuffer is written binary form of document.
Returns:
when everything is OK then return TRUE, otherwise return false(error situation).

bool aja::Document::buildXmlDoc OutputBuffer out  ) 
 

Function build XML from document structure.

Before writting into buffer, output buffer is erased and old content of buffer lost.When is builded XML, then is exploring translation table for every Element and Attribute ID.

Parameters:
out into this OutputBuffer is written XML form of document.
Returns:
when everything is OK then return TRUE, otherwise return false(error situation).

DocumentHeader * aja::Document::getHeader  ) 
 

Function return pointer to DocumentHeader class.

Returns:
pointer to header, when error occured or h header don't exist, then is returned NULL

ElementItem * aja::Document::getRootElement  ) 
 

Function return pointer to root ElementItem class.

Returns:
pointer to root element, when error occured or root elm. don't exist, then is returned NULL.

unsigned int aja::Document::parseAja const buffer_t  buffer,
unsigned int  size,
unsigned int  pos
 

Function try parse a data in buffer and when parsing is OK, then ol root and header can be deleted and replaced by new parsed root and header.

Parameters:
buffer pointer to buffer contained data in AJA form.
size size of buffer
pos position in buffer where is started parsing process.Default is 0.
Returns:
when everything is OK and data was parsed, then is returned size of parsed data from pos When is error occured or data cannot be parsed, then is returned 0.

void aja::Document::setHeader DocumentHeader header  ) 
 

Function set header for document.Old header is deleted.

Parameters:
header Pointer to new DocumentHeader class. When parameter is NULL, then is set ignored.

void aja::Document::setRootElement ElementItem root  ) 
 

Function set root element for document.Old root element with his child elements can be deleted.

Parameters:
root Pointer to ElementItem representing root. When paramter is NULL, then is set ignored


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