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

CdbBdbNTupleP< E > Class Template Reference

An abstract base class for persistent n-tuples. More...

Inheritance diagram for CdbBdbNTupleP< E >:

CdbBdbNTupleBaseP CdbBdbNTupleSimpleImplP< E > List of all members.

Public Types

typedef E ElementType

Public Member Functions

virtual d_ULong rows () const=0
 Get the number of rows in the tuple.

virtual CdbStatus get_row (std::vector< ElementType > &theRow, const d_ULong theNumber) const=0
 Get a row at a specified position.

virtual CdbStatus append_row (const std::vector< ElementType > &theRow)=0
 Append a row by the end of an existing list.

virtual CdbStatus repack ()=0
 Repack the internal storage of the tuple.


Protected Member Functions

 CdbBdbNTupleP (d_ULong theNumberOfColumns, const std::string &theName, const std::string &theDescription, const std::vector< std::string > &theColumnNames)
 Constructor.


Detailed Description

template<class E>
class CdbBdbNTupleP< E >

An abstract base class for persistent n-tuples.

This class adds a type safe interface of the n-tuple model by prividing a set of virtual methods to access or modify the contents of a tuple.

RESTRICTIONS:

(1) Rows are numbered beginning from 0.

(2) In all operations with rows, a row is defined through a STD vector of element type. The number of elements in the vector must be exactly the number of columns passed to the constructor.

Definition at line 23 of file CdbBdbNTupleP.ddl.


Member Typedef Documentation

template<class E>
typedef E CdbBdbNTupleP< E >::ElementType
 

Definition at line 27 of file CdbBdbNTupleP.ddl.


Constructor & Destructor Documentation

template<class E>
CdbBdbNTupleP< E >::CdbBdbNTupleP d_ULong    theNumberOfColumns,
const std::string &    theName,
const std::string &    theDescription,
const std::vector< std::string > &    theColumnNames
[inline, protected]
 

Constructor.

See also:
CdbBdbNTupleBaseP::CdbBdbNTupleBaseP()

Definition at line 49 of file CdbBdbNTupleP.ddl.


Member Function Documentation

template<class E>
virtual CdbStatus CdbBdbNTupleP< E >::append_row const std::vector< ElementType > &    theRow [pure virtual]
 

Append a row by the end of an existing list.

This method has to be implemented by a subclass.

Returns:
the completion status of the operation
Returned status values:

CdbStatus::Success - successfull completion. The vector passed as a parameter will be filled exactly the same number of elements as the number of columns in the tuple.

CdbStatus::IllegalParameters - an incomplete row with wrong number of elements passed to the method. The number of elements must match the number of columns.

CdbStatus::* - any other problem occured preventing the successfull completion of the operation. The vector passed as a parameter won't be modified.

Also see the RESTRICTIONS section at the defintion of the class for more detailed information on values of parameters.

template<class E>
virtual CdbStatus CdbBdbNTupleP< E >::get_row std::vector< ElementType > &    theRow,
const d_ULong    theNumber
const [pure virtual]
 

Get a row at a specified position.

This method has to be implemented by a subclass.

Returns:
the completion status of the operation
Returned status values:

CdbStatus::Success - successfull completion. The vector passed as a parameter will be filled exactly the same number of elements as the number of columns in the tuple.

CdbStatus::NotFound - a row with specified number is not found. The vector passed as a parameter won't be modified.

CdbStatus::* - any other problem occured preventing the successfull completion of the operation. The vector passed as a parameter won't be modified.

Also see the RESTRICTIONS section at the defintion of the class for more detailed information on values of parameters.

template<class E>
virtual CdbStatus CdbBdbNTupleP< E >::repack   [pure virtual]
 

Repack the internal storage of the tuple.

This operation is meant to optimize the use of the internal storage of the tuple by making the storage size equal to the actual number of elements stored in the tuple.

Returns:
the completion status of the operation

Implemented in CdbBdbNTupleSimpleImplP< E >, and CdbBdbNTupleSimpleImplP_ooVString.

template<class E>
virtual d_ULong CdbBdbNTupleP< E >::rows   const [pure virtual]
 

Get the number of rows in the tuple.

Implemented in CdbBdbNTupleSimpleImplP< E >, and CdbBdbNTupleSimpleImplP_ooVString.


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