Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbNTupleSimpleImpl< T, NCOL > Class Template Reference

The simple implementation for an abstract n-tuple class. More...

#include <CdbNTupleSimpleImpl.hh>

Inheritance diagram for CdbNTupleSimpleImpl< T, NCOL >:

CdbNTuple< T, NCOL > CdbNTupleBase List of all members.

Public Member Functions

virtual CdbNTuple< T, NCOL > * clone () const
 Make a ("deep") clone of a tuple.

virtual unsigned int rows () const
 Get the current size (the number of rows) of n-tuple.

virtual CdbStatus set_rows (unsigned int theNewSize)
 Resize the current size (the number of rows) of n-tuple.

virtual CdbStatus set_rows (unsigned int theNewSize, const T &thePrototype)
 Resize the current size (the number of rows) of n-tuple using a prototype.

virtual CdbStatus append_row (const std::vector< T > &theRow)
 Append a new row.

virtual CdbStatus insert_row (const std::vector< T > &theRow, unsigned int theRowNumber)
 Insert a whole row of elements after the specified one.

virtual CdbStatus replace_row (const std::vector< T > &theRow, unsigned int theRowNumber)
 Replace a whole row of elements at specified position.

virtual CdbStatus get_row (std::vector< T > &theRow, unsigned int theRowNumber) const
 Get a whole row of elements.

virtual CdbStatus get_column (std::vector< T > &theColumn, unsigned int theColumnNumber) const
 Get a whole column by its number.

virtual CdbStatus get_column (std::vector< T > &theColumn, const std::string &theColumnName) const
 Get a whole column by its name.

virtual CdbStatus get_element (T &theValue, unsigned int theRowNumber, unsigned int theColumnNumber) const
 Read an element (specify column by its number).

virtual CdbStatus get_element (T &theValue, unsigned int theRowNumber, const std::string &theColumnName) const
 Read an element (specify column by its name).

virtual CdbStatus set_element (const T &theValue, unsigned int theRowNumber, unsigned int theColumnNumber)
 Update a single an element (specify column by its number).

virtual CdbStatus set_element (const T &theValue, unsigned int theRowNumber, const std::string &theColumnName)
 Update a single an element (specify column by its name).

virtual CdbStatus find_row (CdbItr< unsigned int > &theIterator, unsigned int theColumnNumber, const T &theValue) const
 Find all rows whose elements at specified (by its number) column have this value.

virtual CdbStatus find_row (CdbItr< unsigned int > &theIterator, const std::string &theColumnName, const T &theValue) const
 Find all rows whose elements at specified (by its name) column have this value.

virtual CdbStatus sort (const CdbNTupleIsLessComparator< T, NCOL > *theComparatorPtr)
 Sort rows using specified comparator.


Protected Member Functions

 CdbNTupleSimpleImpl ()
 The default constructor.

 CdbNTupleSimpleImpl (const std::string &theName, const std::string &theDescription)
 The constructor.

 CdbNTupleSimpleImpl (const std::vector< std::string > &theCollumnNames, const std::string &theName, const std::string &theDescription)
 The constructor.

 CdbNTupleSimpleImpl (const CdbNTupleSimpleImpl< T, NCOL > &theOther)
 The copy constructor.

CdbNTupleSimpleImpl< T, NCOL > & operator= (const CdbNTupleSimpleImpl< T, NCOL > &theOther)
 The assignment operator.

virtual ~CdbNTupleSimpleImpl ()
 The destructor.


Friends

class CdbNTupleFactory< T, NCOL >

Detailed Description

template<class T, unsigned int NCOL>
class CdbNTupleSimpleImpl< T, NCOL >

The simple implementation for an abstract n-tuple class.

This implementation stores n-tuple as an STL vector of rows.

See also:
class CdbNTuple

Definition at line 21 of file CdbNTupleSimpleImpl.hh.


Constructor & Destructor Documentation

template<class T, unsigned int NCOL>
CdbNTupleSimpleImpl< T, NCOL >::CdbNTupleSimpleImpl   [protected]
 

The default constructor.

See also:
CdbNTuple::CdbNTuple()

Definition at line 239 of file CdbNTupleSimpleImpl.cc.

template<class T, unsigned int NCOL>
CdbNTupleSimpleImpl< T, NCOL >::CdbNTupleSimpleImpl const std::string &    theName,
const std::string &    theDescription
[protected]
 

The constructor.

See also:
CdbNTuple::CdbNTuple()

Definition at line 244 of file CdbNTupleSimpleImpl.cc.

template<class T, unsigned int NCOL>
CdbNTupleSimpleImpl< T, NCOL >::CdbNTupleSimpleImpl const std::vector< std::string > &    theCollumnNames,
const std::string &    theName,
const std::string &    theDescription
[protected]
 

The constructor.

See also:
CdbNTuple::CdbNTuple()

Definition at line 251 of file CdbNTupleSimpleImpl.cc.

template<class T, unsigned int NCOL>
CdbNTupleSimpleImpl< T, NCOL >::CdbNTupleSimpleImpl const CdbNTupleSimpleImpl< T, NCOL > &    theOther [protected]
 

The copy constructor.

Copy the local context.

Definition at line 260 of file CdbNTupleSimpleImpl.cc.

template<class T, unsigned int NCOL>
CdbNTupleSimpleImpl< T, NCOL >::~CdbNTupleSimpleImpl   [protected, virtual]
 

The destructor.

Definition at line 266 of file CdbNTupleSimpleImpl.cc.


Member Function Documentation

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::append_row const std::vector< T > &    theRow [virtual]
 

Append a new row.

See also:
CdbNTuple::append_row()

Implements CdbNTuple< T, NCOL >.

Definition at line 316 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbNTuple< T, NCOL > * CdbNTupleSimpleImpl< T, NCOL >::clone   const [virtual]
 

Make a ("deep") clone of a tuple.

See also:
CdbNTuple::rows()

Implements CdbNTuple< T, NCOL >.

Definition at line 282 of file CdbNTupleSimpleImpl.cc.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::find_row CdbItr< unsigned int > &    theIterator,
const std::string &    theColumnName,
const T &    theValue
const [virtual]
 

Find all rows whose elements at specified (by its name) column have this value.

See also:
CdbNTuple::find_row()

Definition at line 458 of file CdbNTupleSimpleImpl.cc.

References CdbNTupleBase::column_number(), CdbNTupleSimpleImpl< T, NCOL >::find_row(), CdbStatus::IllegalParameters, and CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::find_row CdbItr< unsigned int > &    theIterator,
unsigned int    theColumnNumber,
const T &    theValue
const [virtual]
 

Find all rows whose elements at specified (by its number) column have this value.

See also:
CdbNTuple::find_row()

Definition at line 444 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

Referenced by CdbNTupleSimpleImpl< T, NCOL >::find_row().

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::get_column std::vector< T > &    theColumn,
const std::string &    theColumnName
const [virtual]
 

Get a whole column by its name.

See also:
CdbNTuple::get_column()

Implements CdbNTuple< T, NCOL >.

Definition at line 376 of file CdbNTupleSimpleImpl.cc.

References CdbNTupleBase::column_number(), CdbNTupleSimpleImpl< T, NCOL >::get_column(), CdbStatus::IllegalParameters, and CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::get_column std::vector< T > &    theColumn,
unsigned int    theColumnNumber
const [virtual]
 

Get a whole column by its number.

See also:
CdbNTuple::get_column()

Implements CdbNTuple< T, NCOL >.

Definition at line 362 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

Referenced by CdbNTupleSimpleImpl< T, NCOL >::get_column().

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::get_element T &    theValue,
unsigned int    theRowNumber,
const std::string &    theColumnName
const [virtual]
 

Read an element (specify column by its name).

See also:
CdbNTuple::get_element()

Implements CdbNTuple< T, NCOL >.

Definition at line 402 of file CdbNTupleSimpleImpl.cc.

References CdbNTupleBase::column_number(), CdbNTupleSimpleImpl< T, NCOL >::get_element(), CdbStatus::IllegalParameters, and CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::get_element T &    theValue,
unsigned int    theRowNumber,
unsigned int    theColumnNumber
const [virtual]
 

Read an element (specify column by its number).

See also:
CdbNTuple::get_element()

Implements CdbNTuple< T, NCOL >.

Definition at line 388 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

Referenced by CdbNTupleSimpleImpl< T, NCOL >::get_element().

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::get_row std::vector< T > &    theRow,
unsigned int    theRowNumber
const [virtual]
 

Get a whole row of elements.

See also:
CdbNTuple::get_row()

Implements CdbNTuple< T, NCOL >.

Definition at line 350 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::insert_row const std::vector< T > &    theRow,
unsigned int    theRowNumber
[virtual]
 

Insert a whole row of elements after the specified one.

See also:
CdbNTuple::insert_row()

Implements CdbNTuple< T, NCOL >.

Definition at line 325 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbNTupleSimpleImpl< T, NCOL > & CdbNTupleSimpleImpl< T, NCOL >::operator= const CdbNTupleSimpleImpl< T, NCOL > &    theOther [protected]
 

The assignment operator.

Copy the local context.

Definition at line 271 of file CdbNTupleSimpleImpl.cc.

References CdbNTupleSimpleImpl< T, NCOL >::_data, and CdbNTuple< T, NCOL >::operator=().

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::replace_row const std::vector< T > &    theRow,
unsigned int    theRowNumber
[virtual]
 

Replace a whole row of elements at specified position.

See also:
CdbNTuple::replace_row()

Implements CdbNTuple< T, NCOL >.

Definition at line 338 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

template<class T, unsigned int NCOL>
unsigned int CdbNTupleSimpleImpl< T, NCOL >::rows   const [virtual]
 

Get the current size (the number of rows) of n-tuple.

See also:
CdbNTuple::rows()

Implements CdbNTuple< T, NCOL >.

Definition at line 289 of file CdbNTupleSimpleImpl.cc.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::set_element const T &    theValue,
unsigned int    theRowNumber,
const std::string &    theColumnName
[virtual]
 

Update a single an element (specify column by its name).

See also:
CdbNTuple::set_element()

Implements CdbNTuple< T, NCOL >.

Definition at line 430 of file CdbNTupleSimpleImpl.cc.

References CdbNTupleBase::column_number(), CdbStatus::IllegalParameters, CdbNTupleSimpleImpl< T, NCOL >::set_element(), and CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::set_element const T &    theValue,
unsigned int    theRowNumber,
unsigned int    theColumnNumber
[virtual]
 

Update a single an element (specify column by its number).

See also:
CdbNTuple::set_element()

Implements CdbNTuple< T, NCOL >.

Definition at line 416 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.

Referenced by CdbNTupleSimpleImpl< T, NCOL >::set_element().

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::set_rows unsigned int    theNewSize,
const T &    thePrototype
[virtual]
 

Resize the current size (the number of rows) of n-tuple using a prototype.

See also:
CdbNTuple::set_rows()

Implements CdbNTuple< T, NCOL >.

Definition at line 305 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::set_rows unsigned int    theNewSize [virtual]
 

Resize the current size (the number of rows) of n-tuple.

See also:
CdbNTuple::set_rows()

Implements CdbNTuple< T, NCOL >.

Definition at line 296 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::Success.

template<class T, unsigned int NCOL>
CdbStatus CdbNTupleSimpleImpl< T, NCOL >::sort const CdbNTupleIsLessComparator< T, NCOL > *    theComparatorPtr [virtual]
 

Sort rows using specified comparator.

See also:
CdbNTuple::sort()

Implements CdbNTuple< T, NCOL >.

Definition at line 520 of file CdbNTupleSimpleImpl.cc.

References CdbStatus::IllegalParameters, and CdbStatus::Success.


Friends And Related Function Documentation

template<class T, unsigned int NCOL>
friend class CdbNTupleFactory< T, NCOL > [friend]
 

Definition at line 23 of file CdbNTupleSimpleImpl.hh.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:22 2005 for CDB by doxygen1.3-rc3