seal::Collection< T > Class Template Reference

#include <collection.h>

Inheritance diagram for seal::Collection< T >:

seal::Array1D< T > seal::CompleteBinaryTree< T > seal::List< T > seal::CellArray< DataType > seal::HexByte seal::LinkedList< T > seal::Vector< T > seal::Vector< seal::Vector > seal::TextFile

List of all members.

Public Member Functions

 Collection (void)
virtual bool isEmpty (void) const =0
virtual unsigned int size (void) const =0
virtual AbstractIterator< T > * iteratorPtr (void) const =0
virtual void purge (void)=0
virtual T & first (void)=0 throw (EmptyCollectionException)
virtual const T & first (void) const =0 throw (EmptyCollectionException)
virtual T & last (void)=0 throw (EmptyCollectionException)
virtual const T & last (void) const =0 throw (EmptyCollectionException)


Detailed Description

template<typename T>
class seal::Collection< T >

This is an abstract base class which defines the interface for collection classes. A collection class is any class which serves as an abstract data type for a group (or a collection) of objects. An example of a collection is a linked list. Most collection classes in SEAL are derived from this abstract template base class called Collection.

Constructor & Destructor Documentation

template<typename T>
seal::Collection< T >::Collection ( void   )  [inline]

Default constructor. Does nothing.


Member Function Documentation

template<typename T>
virtual bool seal::Collection< T >::isEmpty ( void   )  const [pure virtual]

In a derived collection class, this function will return true if the collection is empty. That is, it returns true when if there are no elements in the collection. It returns flase if there exists atleast one element in the collection.

Implemented in seal::Array1D< T >, seal::CompleteBinaryTree< T >, seal::LinkedList< T >, seal::Map< IndexType, DataType >, seal::PriorityQueue< PrtType, DataType >, seal::Vector< T >, seal::Array1D< seal::Cell< DataType > >, seal::Array1D< seal::QuadByte >, seal::LinkedList< seal::BinTreeNode< T > * >, seal::Vector< seal::Vector >, and seal::Vector< seal::Array1D< T > >.

template<typename T>
virtual unsigned int seal::Collection< T >::size ( void   )  const [pure virtual]

template<typename T>
virtual AbstractIterator<T>* seal::Collection< T >::iteratorPtr ( void   )  const [pure virtual]

In a derived collection class, this function will return a pointer to the iterator of that collection class. The users of the collection should delete the iterator returned by this function. The implementers of concrete collection classes should keep in mind that the class should not be responsible for deleting the iterator object returned by this function. The clients of this function should be responsible to delete the returned iterator object.

Implemented in seal::Array1D< T >, seal::CompleteBinaryTree< T >, seal::LinkedList< T >, seal::Map< IndexType, DataType >, seal::PriorityQueue< PrtType, DataType >, seal::Vector< T >, seal::Array1D< seal::Cell< DataType > >, seal::Array1D< seal::QuadByte >, seal::LinkedList< seal::BinTreeNode< T > * >, seal::Vector< seal::Vector >, and seal::Vector< seal::Array1D< T > >.

template<typename T>
virtual void seal::Collection< T >::purge ( void   )  [pure virtual]

In a derived collection class, a call to this function will remove all the elements from the collection. Typically, size of the collection will become zero after a call to this function.

Implemented in seal::Array1D< T >, seal::CompleteBinaryTree< T >, seal::LinkedList< T >, seal::Map< IndexType, DataType >, seal::PriorityQueue< PrtType, DataType >, seal::Vector< T >, seal::Array1D< seal::Cell< DataType > >, seal::Array1D< seal::QuadByte >, seal::LinkedList< seal::BinTreeNode< T > * >, seal::Vector< seal::Vector >, and seal::Vector< seal::Array1D< T > >.

template<typename T>
virtual T& seal::Collection< T >::first ( void   )  throw (EmptyCollectionException) [pure virtual]

template<typename T>
virtual const T& seal::Collection< T >::first ( void   )  const throw (EmptyCollectionException) [pure virtual]

template<typename T>
virtual T& seal::Collection< T >::last ( void   )  throw (EmptyCollectionException) [pure virtual]

template<typename T>
virtual const T& seal::Collection< T >::last ( void   )  const throw (EmptyCollectionException) [pure virtual]


The documentation for this class was generated from the following file:

Generated on Sat May 16 21:35:20 2009 for SEAL by  doxygen 1.5.5