Class Index Cross Index Namespace Index

Class FrameCPP::ContainerBase

The base class for all containers.
Contained in: FrameCPP
Derived from: none
Derived by: FrameCPP::ContainerBasic

#include "framecpp/ContainerBase.hh"


public function member index:

virtual ~ContainerBase(); Destructor
inline unsigned int getSize() const; Get container size.
virtual FrBase* operator [](unsigned int index); Container indexing.
virtual const FrBase* operator [](unsigned int index) const; Container indexing.
virtual unsigned int size() const; Get container size.
 

Description:

Most of the LIGO Frame components are containers which contain other frame components. For example, the RawData object is a container for AdcData, SerData, log messages, and other information. In a frame file, these containers are implemented as linked-lists. However, in the FrameCPP library these are implemented by a container class, "Container". This class standardizes the interface and maximizes code re-use.

ContainerBase is the base class for these container objects. The container classes themselves are templates, so this class allows the user to perform queries on the containers which do not require knowledge of the template type (the template type specifies what Frame class is stored in the container).

The methods defined are (they are all pure virtual):

The destructor is also declared virtual so that the container can be destructed with only a pointer to the ContainerBase parent.


Function Member Descriptions:


FrameCPP::ContainerBase::~ContainerBase - Destructor


virtual ~ContainerBase();



FrameCPP::ContainerBase::getSize - Get container size.


inline unsigned int getSize() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::ContainerBase::operator [] - Container indexing.


virtual FrBase* operator [](unsigned int index);

Exceptions:
ExceptionDescription
range_error



FrameCPP::ContainerBase::operator [] - Container indexing.


virtual const FrBase* operator [](unsigned int index) const;

Exceptions:
ExceptionDescription
range_error



FrameCPP::ContainerBase::size - Get container size.


virtual unsigned int size() const;

Exceptions:
ExceptionDescription
None.