Public Types | Public Member Functions
Tonido::Data::VariantTable Class Reference

VariantTable is a map of VariantRows. More...

List of all members.

Public Types

typedef boost::shared_ptr
< VariantTable
SharedPtr
typedef std::map< std::string,
VariantRow
VariantRowMap

Public Member Functions

 VariantTable ()
 Ctor.
 ~VariantTable ()
 Dtor.
VariantRowoperator[] (const std::string &a_index)
 Subscript operator.
VariantRowgetVariantRow (const std::string &a_index)
 Returns the VariantRow associated with this index.
void setVariantRow (const std::string &a_index, const VariantRow &a_variantRow)
 Sets the VariantRow for an index.
VariantTableoperator= (const VariantTable &rhs)
 Assignment operator.
uint64_bt getSize ()
 Returns the actual variant Row Table size.
bool write (RawData::SharedPtr &a_pRaw)
 Writes this variantrow into serializable stream.
bool write (const std::string &a_fileName)
 Writes this variantTable into an XML file.
std::string toXML ()
 Writes this variantTable into an XML string.
std::string toXMLbyName (const std::string &a_Name)
 Writes this variantTable into an XML string.
bool read (RawData::SharedPtr &a_pRaw)
 Reads this variantrow from serializable stream.
bool read (const std::string &a_fileName)
 Loads VariantTable from XML file.
bool hasRow (const std::string a_row) const
 Returns true if the given VariantTable has the row specified by the string.
void addRow (const std::string &a_section)
 Adds a new named row to the variant table.
void deleteRow (const std::string &a_section)
 Deletes the given row with a given section name.
void toString (std::ostream &out) const
 Writes the VariantTable to a string.
void toHTML (std::ostream &out) const
VariantRowgetFirstRow (void)
 Gets the first row in this VariantTable.
VariantRowgetNextRow (void)
 Gets the next row in this VariantTable.
const std::string * getFirstRowName (void)
 Gets the first row name in this VariantTable.
const std::string * getNextRowName (void)
 Gets the next row name in this VariantTable.
void clearAll (void)
 Clear all Rows.

Detailed Description

VariantTable is a map of VariantRows.


Constructor & Destructor Documentation

Tonido::Data::VariantTable::VariantTable ( )

Ctor.

Details if Needed...

Tonido::Data::VariantTable::~VariantTable ( )

Dtor.

Details if Needed...


Member Function Documentation

void Tonido::Data::VariantTable::clearAll ( void  )

Clear all Rows.

Parameters:
[in]none
Returns:
none
VariantRow * Tonido::Data::VariantTable::getFirstRow ( void  )

Gets the first row in this VariantTable.

Parameters:
[in]none
Returns:
the first variantrow
const std::string * Tonido::Data::VariantTable::getFirstRowName ( void  )

Gets the first row name in this VariantTable.

Parameters:
[in]none
Returns:
the first variantrow name
VariantRow * Tonido::Data::VariantTable::getNextRow ( void  )

Gets the next row in this VariantTable.

Parameters:
[in]none
Returns:
the next variantrow
const std::string * Tonido::Data::VariantTable::getNextRowName ( void  )

Gets the next row name in this VariantTable.

Parameters:
[in]none
Returns:
the next variantrow name
uint64_bt Tonido::Data::VariantTable::getSize ( )

Returns the actual variant Row Table size.

Returns:
size of the variant table
VariantRow& Tonido::Data::VariantTable::getVariantRow ( const std::string &  a_index)

Returns the VariantRow associated with this index.

Parameters:
[in]a_indexsubscript
Returns:
VariantRow associated with that index
bool Tonido::Data::VariantTable::hasRow ( const std::string  a_row) const

Returns true if the given VariantTable has the row specified by the string.

Parameters:
[in]a_rownameis the row to check for
Returns:
true if row is available, false otherwise
Message & Tonido::Message::operator= ( const VariantTable rhs)

Assignment operator.

Parameters:
[in]none
Returns:
none
VariantRow & Tonido::Message::operator[] ( const std::string &  a_index)

Subscript operator.

Parameters:
[in]a_indexsubscript
Returns:
VariantRow associated with that index
bool Tonido::Data::VariantTable::read ( RawData::SharedPtr &  a_pRaw)

Reads this variantrow from serializable stream.

Parameters:
[in]RawDatato read from
Returns:
true on sucess, false otherwise
bool Tonido::Data::VariantTable::read ( const std::string &  a_fileName)

Loads VariantTable from XML file.

Parameters:
[in]a_fileNamename of the XML file to read from
Returns:
true on sucess, false otherwise
void Tonido::Data::VariantTable::setVariantRow ( const std::string &  a_index,
const VariantRow a_variantRow 
)

Sets the VariantRow for an index.

Parameters:
[in]a_indexsubscript
Returns:
VariantRow associated with that index
std::string Tonido::Data::VariantTable::toXML ( )

Writes this variantTable into an XML string.

Parameters:
[in]a_outputstring to write into
Returns:
true on success, false otherwise
std::string Tonido::Data::VariantTable::toXMLbyName ( const std::string &  a_Name)

Writes this variantTable into an XML string.

Parameters:
[in]a_outputstring to write into
Returns:
true on success, false otherwise
bool Tonido::Data::VariantTable::write ( RawData::SharedPtr &  a_pRaw)

Writes this variantrow into serializable stream.

Parameters:
[in]RawDatato write into
Returns:
true on sucess, false otherwise
bool Tonido::Data::VariantTable::write ( const std::string &  a_fileName)

Writes this variantTable into an XML file.

Parameters:
[in]a_fileNamefile to write into
Returns:
true on success, false otherwise

Generated on Wed Oct 12 2011 21:46:53. © CodeLathe LLC 2007-2011. All Rights Reserved.