Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

PHObjectVector< BASE > Class Template Reference

Base class for vectors of PHObject pointers. More...

#include <PHObjectVector.h>

Inheritance diagram for PHObjectVector< BASE >:

Inheritance graph
[legend]
Collaboration diagram for PHObjectVector< BASE >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef BASEvalue_type
typedef const value_typeconst_reference
typedef value_typereference
typedef unsigned int size_type

Public Member Functions

virtual ~PHObjectVector ()
virtual value_type add (const size_type &index)=0
 Inserts a new object at position index, and returns it.

virtual value_type add (const size_type &index, const value_type &value)=0
 Inserts an existing object at position index, and returns it.

virtual value_type back () const
 Returns last element.

virtual size_type capacity () const =0
 Maximum size.

virtual PHObjectVector< BASE > * clone () const =0
 Virtual copy constructor.

virtual PHObjectVector< BASE > * create () const =0
 Virtual default constructor.

virtual bool empty () const
 Whether this vector is empty.

virtual void erase (const size_type &i)=0
 Removes i-th element.

virtual value_type front () const
 Returns first element.

virtual value_type get (const size_type &index) const =0
 Gets the index-th element.

virtual void identify (std::ostream &os=std::cout) const =0
 Identify from PHObject.

virtual int isValid () const =0
 isValid from PHObject.

virtual void pop_back ()
 Removes last element.

virtual void push_back (const value_type &val)
 Inserts a new element at the end.

virtual void Reset ()=0
 Reset from PHObject.

virtual bool reserve (const size_type &n)=0
 Request allocation for at least n elements.

virtual bool resize (const size_type &newsize, value_type v=value_type())=0
 Change the size (either add or remove elements so that size() after this call is equal to newsize.

virtual size_type size () const =0
 Get the size of this vector.


Detailed Description

template<class BASE>
class PHObjectVector< BASE >

Base class for vectors of PHObject pointers.

Definition at line 10 of file PHObjectVector.h.


Member Typedef Documentation

template<class BASE>
typedef const value_type& PHObjectVector< BASE >::const_reference
 

Reimplemented in PHObjectVectorTCA< BASE, DERIVED >.

Definition at line 15 of file PHObjectVector.h.

template<class BASE>
typedef value_type& PHObjectVector< BASE >::reference
 

Reimplemented in PHObjectVectorTCA< BASE, DERIVED >.

Definition at line 16 of file PHObjectVector.h.

template<class BASE>
typedef unsigned int PHObjectVector< BASE >::size_type
 

Reimplemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Definition at line 17 of file PHObjectVector.h.

template<class BASE>
typedef BASE* PHObjectVector< BASE >::value_type
 

Reimplemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Definition at line 14 of file PHObjectVector.h.

Referenced by PHObjectVector< PisaBBCHit >::back().


Constructor & Destructor Documentation

template<class BASE>
virtual PHObjectVector< BASE >::~PHObjectVector  )  [inline, virtual]
 

Definition at line 19 of file PHObjectVector.h.


Member Function Documentation

template<class BASE>
virtual value_type PHObjectVector< BASE >::add const size_type index,
const value_type value
[pure virtual]
 

Inserts an existing object at position index, and returns it.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual value_type PHObjectVector< BASE >::add const size_type index  )  [pure virtual]
 

Inserts a new object at position index, and returns it.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Referenced by PHObjectVector< PisaBBCHit >::push_back(), and PisaBBC::stepManager().

template<class BASE>
virtual value_type PHObjectVector< BASE >::back  )  const [inline, virtual]
 

Returns last element.

Definition at line 28 of file PHObjectVector.h.

Referenced by PisaBBC::stepManager().

template<class BASE>
virtual size_type PHObjectVector< BASE >::capacity  )  const [pure virtual]
 

Maximum size.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual PHObjectVector<BASE>* PHObjectVector< BASE >::clone  )  const [pure virtual]
 

Virtual copy constructor.

Reimplemented from PHObject.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual PHObjectVector<BASE>* PHObjectVector< BASE >::create  )  const [pure virtual]
 

Virtual default constructor.

Reimplemented from PHObject.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual bool PHObjectVector< BASE >::empty  )  const [inline, virtual]
 

Whether this vector is empty.

Reimplemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Definition at line 50 of file PHObjectVector.h.

Referenced by PHObjectVector< PisaBBCHit >::back(), and PHObjectVector< PisaBBCHit >::pop_back().

template<class BASE>
virtual void PHObjectVector< BASE >::erase const size_type i  )  [pure virtual]
 

Removes i-th element.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Referenced by PHObjectVector< PisaBBCHit >::pop_back().

template<class BASE>
virtual value_type PHObjectVector< BASE >::front  )  const [inline, virtual]
 

Returns first element.

Definition at line 56 of file PHObjectVector.h.

template<class BASE>
virtual value_type PHObjectVector< BASE >::get const size_type index  )  const [pure virtual]
 

Gets the index-th element.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Referenced by PHObjectVector< PisaBBCHit >::back(), and PHObjectVector< PisaBBCHit >::front().

template<class BASE>
virtual void PHObjectVector< BASE >::identify std::ostream &  os = std::cout  )  const [pure virtual]
 

Identify from PHObject.

Reimplemented from PHObject.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual int PHObjectVector< BASE >::isValid  )  const [pure virtual]
 

isValid from PHObject.

Reimplemented from PHObject.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual void PHObjectVector< BASE >::pop_back  )  [inline, virtual]
 

Removes last element.

Definition at line 68 of file PHObjectVector.h.

template<class BASE>
virtual void PHObjectVector< BASE >::push_back const value_type val  )  [inline, virtual]
 

Inserts a new element at the end.

Definition at line 77 of file PHObjectVector.h.

template<class BASE>
virtual bool PHObjectVector< BASE >::reserve const size_type n  )  [pure virtual]
 

Request allocation for at least n elements.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual void PHObjectVector< BASE >::Reset  )  [pure virtual]
 

Reset from PHObject.

Reimplemented from PHObject.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual bool PHObjectVector< BASE >::resize const size_type newsize,
value_type  v = value_type()
[pure virtual]
 

Change the size (either add or remove elements so that size() after this call is equal to newsize.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

template<class BASE>
virtual size_type PHObjectVector< BASE >::size  )  const [pure virtual]
 

Get the size of this vector.

Implemented in PHObjectVectorSTL< BASE, DERIVED >, and PHObjectVectorTCA< BASE, DERIVED >.

Referenced by PHObjectVector< PisaBBCHit >::back(), PHObjectVector< PisaBBCHit >::empty(), PisaBBC::finishEvent(), PHObjectVector< PisaBBCHit >::pop_back(), PHObjectVector< PisaBBCHit >::push_back(), and PisaBBC::stepManager().


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