Class Index Cross Index Namespace Index

Class FrameCPP::Version_3_4_5::Table

Table
Contained in: FrameCPP::Version_3_4_5
Derived from: FrameCPP::Version_3_4_5::Base
Derived by: none

#include "../../../../../lib/framecpp/src/Version3_4_5/table.hh"


public function member index:

Table(); Default Constructor.
Table(const Table& table); Copy Constructor.
Table(const std::string& name, INT_4U nrows); Constructor.
inline void appendComment(const std::string& comment); Appends a comment.
virtual INT_2U getClassId() const;
inline const std::string& getComment() const; Comment
inline INT_2U getNColumns() const; Number of columns table has.
inline INT_4U getNRows() const; Number of rows allowed per vector (column).
const std::string& getName() const;
static SH getSH(); Structure Header
static SH getSH4(); Frame format version 4 Structure Header
inline bool operator !=(const Table& table) const; Not-equal comparison.
const Table& operator +=(const Table& table); += Assignment Operator.
const Table& operator =(const Table& table); Assignment Operator.
bool operator ==(const Table& table) const; Equal comparison.
inline Table::ColumnsContainer& refColumns(); Columns Container
inline const Table::ColumnsContainer& refColumns() const; Columns Container
 

private function member index:

static Table* read(FrameReaderBase& in); Reads Table object from an FrameReaderBase object.
static Table* read4(FrameReaderBase& in);
virtual void write(Output& out) const; Write Table object
 

Description:

Table class encapsulates the following attributes:
AttributeDescription
name Table name
comment Comment
mNRows Number of rows allowed in a column

Table object is also a container for two types of data:
DataDescription
columnsA container of Frame Vect table columns


Function Member Descriptions:


FrameCPP::Version_3_4_5::Table::Table - Default Constructor.


Table();
This creates Table object with the following properties:

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::Table::Table - Copy Constructor.


Table(const Table& table);
A deep copy is performed for owned objects.

Parameters:
ParameterDescription
const Table& tableThe object to be copied.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::Table::Table - Constructor.


Table(const std::string& name, INT_4U nrows);
This creates Table object with the specified properties. Additionally, the comment is set to "" (no comment).

Parameters:
ParameterDescription
const std::string& nameChanel name.
INT_4U nRowsNumber rows allowed in a column.

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::Table::appendComment - Appends a comment.


inline void appendComment(const std::string& comment);
This method adds a comment followed by a newline to the end of the current list of comments.

Parameters:
ParameterDescription
const std::string& commentThe comment to append.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::Table::getClassId


virtual INT_2U getClassId() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::Table::getComment - Comment


inline const std::string& getComment() const;
Gets the comment.

Return value:
const std::string&- Table comment.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::Table::getNColumns - Number of columns table has.


inline INT_2U getNColumns() const;

Return value:
INT_2U- The number of columns.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::Table::getNRows - Number of rows allowed per vector (column).


inline INT_4U getNRows() const;

Return value:
INT_4U

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::Table::getName


const std::string& getName() const;
Return by value: to be consistent with Version6




FrameCPP::Version_3_4_5::Table::getSH - Structure Header


static SH getSH();
Constructs the Structure Header for this class.

Return value:
SH- Table structure header.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::Table::getSH4 - Frame format version 4 Structure Header


static SH getSH4();

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::Table::operator != - Not-equal comparison.


inline bool operator !=(const Table& table) const;
Determines whether two table objects are not equal. All contained data is compared.

Parameters:
ParameterDescription
const Table& tableThe object to compare with.

Return value:
bool- True if the objects are not equal.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::Table::operator += - += Assignment Operator.


const Table& operator +=(const Table& table);

Parameters:
ParameterDescription
const Table& table

Return value:
const Table&

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
frame_mismatchTable mismatch



FrameCPP::Version_3_4_5::Table::operator = - Assignment Operator.


const Table& operator =(const Table& table);
A deep copy is performed for owned objects.

Parameters:
ParameterDescription
const Table& tableThe object to be assigned.

Return value:
const Table&- This object.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::Table::operator == - Equal comparison.


bool operator ==(const Table& table) const;
Determines whether Table objects are equal. For this comparison, all of the data is compared.

Parameters:
ParameterDescription
const Table& tableThe object to compare with.

Return value:
bool- true if the objects are equal.

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::Table::read - Reads Table object from an FrameReaderBase object.


static Table* read(FrameReaderBase& in);

Parameters:
ParameterDescription
FrameReaderBase& inInput data stream object.

Return value:
Table*- Newly allocated Table.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
read_failureRed failure occured.



FrameCPP::Version_3_4_5::Table::read4


static Table* read4(FrameReaderBase& in);

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
read_failureRed failure occured.



FrameCPP::Version_3_4_5::Table::refColumns - Columns Container


inline Table::ColumnsContainer& refColumns();
Get table columns vector container

Return value:
Container< Vect >&- Columns vector.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::Table::refColumns - Columns Container


inline const Table::ColumnsContainer& refColumns() const;
Get table columns vector container

Return value:
Container< Vect >&- Columns vector.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::Table::write - Write Table object


virtual void write(Output& out) const;
Writes Table object to an Output object.

Parameters:
ParameterDescription
Output& out outOutput data object.

Exceptions:
ExceptionDescription
write_failureWrite failure occured.



Variable Member Descriptions:


FrameCPP::Version_3_4_5::Table::mColumns - Table columns

ColumnsContainer mColumns;

FrameCPP::Version_3_4_5::Table::mComment - Comment.

std::string mComment;

FrameCPP::Version_3_4_5::Table::mNRows - Number of rows.

INT_4U mNRows;
All vectors forced to be of this length :TODO:


FrameCPP::Version_3_4_5::Table::mName - Name of this table.

std::string mName;