aja::Item Class Reference

This is basic class for all items classes. More...

#include <Item.h>

Inheritance diagram for aja::Item:

aja::AttributeItem aja::DocumentHeader aja::ElementItem aja::AttributeData aja::AttributeNumber aja::ElementData aja::ElementNumber aja::ElementParent aja::ElementString List of all members.

Public Member Functions

 Item ()
 construct a item
 Item (itemType_t type)
 construct a item with current type
virtual ~Item ()
 destructor of item
itemType_t getItemType ()
 Function return a type of item.
ItemgetParent ()
 Function return parent of item.
void setParent (Item *parent)
 Function set parent for this item.
virtual number_t getItemSize ()=0
 This function return complete size of item in bytes.
virtual bool buildAja (OutputBuffer &out)=0
 This function build binary AJA form of item.

Protected Attributes

itemType_t mItemType
 member contain information about item type
ItemmParent
 pointer to parent item in hierarchy tree

Detailed Description

This is basic class for all items classes.

Class contain pointer to parent item and method for checking about element type.This class do nothing but from this class are ingerited other classes like ElementItem, AttributeItem or CommentItem.

See also:
aja::itemType_t


Constructor & Destructor Documentation

aja::Item::Item  ) 
 

construct a item

aja::Item::Item itemType_t  type  ) 
 

construct a item with current type

Parameters:
type one of item types can be ITM_ELEMENT etc..

aja::Item::~Item  )  [virtual]
 

destructor of item


Member Function Documentation

virtual bool aja::Item::buildAja OutputBuffer out  )  [pure virtual]
 

This function build binary AJA form of item.

Every AJA item have in this function implemented his own binary-build code.Building is realized into OutputBuffer.In the end is in OutputBuffer complete builded binary form of item.

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

Implemented in aja::AttributeData, aja::AttributeItem, aja::AttributeNumber, aja::DocumentHeader, aja::ElementData, aja::ElementItem, aja::ElementNumber, aja::ElementParent, and aja::ElementString.

virtual number_t aja::Item::getItemSize  )  [pure virtual]
 

This function return complete size of item in bytes.

It is calculation of header size + data size. This function is abstract and every item type compute size by yourself. Computing code is situated in classes inherited from this Item class(like ElemenItem etc.)

Returns:
size of item in bytes

Implemented in aja::AttributeData, aja::AttributeItem, aja::AttributeNumber, aja::DocumentHeader, aja::ElementData, aja::ElementItem, aja::ElementNumber, aja::ElementParent, and aja::ElementString.

itemType_t aja::Item::getItemType  ) 
 

Function return a type of item.

Returns:
type of item, one of itemType_t enumeration

Item * aja::Item::getParent  ) 
 

Function return parent of item.

Returns:
pointer to item.Item is parent of this item

Reimplemented in aja::ElementItem.

void aja::Item::setParent Item parent  ) 
 

Function set parent for this item.

Parameters:
parent pointer to item who have been set like parent


Member Data Documentation

itemType_t aja::Item::mItemType [protected]
 

member contain information about item type

Item* aja::Item::mParent [protected]
 

pointer to parent item in hierarchy tree

Reimplemented in aja::ElementItem.


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