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

PHObjectVectorTCA< BASE, DERIVED > Class Template Reference

Implementation of PHObjectVector. More...

#include <PHObjectVectorTCA.h>

Inheritance diagram for PHObjectVectorTCA< BASE, DERIVED >:

Inheritance graph
[legend]
Collaboration diagram for PHObjectVectorTCA< BASE, DERIVED >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef PHObjectVectorTCA<
BASE, DERIVED > 
self
typedef BASEvalue_type
typedef const value_typeconst_reference
typedef value_typereference
typedef unsigned int size_type

Public Member Functions

 PHObjectVectorTCA (const size_type defaultcapacity=10, const size_type maxcapacity=100)
 PHObjectVectorTCA (const self &other)
selfoperator= (const self &other)
virtual ~PHObjectVectorTCA ()
virtual value_type add (const size_type &index)
 Add a new object at position index, and returns it.

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

virtual size_type capacity () const
 Maximum size.

virtual PHObjectVectorTCA<
BASE, DERIVED > * 
clone () const
 Virtual copy constructor.

virtual PHObjectVectorTCA<
BASE, DERIVED > * 
create () const
 Virtual default constructor.

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

virtual void erase (const size_type &index)
 Erase one element.

virtual value_type get (const size_type &index) const
 Get the index-th element.

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

virtual int isValid () const
 isValid from PHObject.

virtual void Reset ()
 Reset from PHObject.

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

virtual bool resize (const size_type &newsize, value_type v=value_type())
 Change the size.

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


Detailed Description

template<typename BASE, typename DERIVED>
class PHObjectVectorTCA< BASE, DERIVED >

Implementation of PHObjectVector.

Using TClonesArray as underlying technology.

Definition at line 12 of file PHObjectVectorTCA.h.


Member Typedef Documentation

template<typename BASE, typename DERIVED>
typedef const value_type& PHObjectVectorTCA< BASE, DERIVED >::const_reference
 

Reimplemented from PHObjectVector< BASE >.

Definition at line 17 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
typedef value_type& PHObjectVectorTCA< BASE, DERIVED >::reference
 

Reimplemented from PHObjectVector< BASE >.

Definition at line 18 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
typedef PHObjectVectorTCA<BASE,DERIVED> PHObjectVectorTCA< BASE, DERIVED >::self
 

Definition at line 15 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
typedef unsigned int PHObjectVectorTCA< BASE, DERIVED >::size_type
 

Reimplemented from PHObjectVector< BASE >.

Definition at line 19 of file PHObjectVectorTCA.h.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::add(), PHObjectVectorTCA< BASE, DERIVED >::erase(), PHObjectVectorTCA< BASE, DERIVED >::get(), PHObjectVectorTCA< BASE, DERIVED >::PHObjectVectorTCA(), PHObjectVectorTCA< BASE, DERIVED >::reserve(), and PHObjectVectorTCA< BASE, DERIVED >::resize().

template<typename BASE, typename DERIVED>
typedef BASE* PHObjectVectorTCA< BASE, DERIVED >::value_type
 

Reimplemented from PHObjectVector< BASE >.

Definition at line 16 of file PHObjectVectorTCA.h.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::add(), and PHObjectVectorTCA< BASE, DERIVED >::resize().


Constructor & Destructor Documentation

template<typename BASE, typename DERIVED>
DERIVED PHObjectVectorTCA< BASE, DERIVED >::PHObjectVectorTCA const size_type  defaultcapacity = 10,
const size_type  maxcapacity = 100
 

Definition at line 99 of file PHObjectVectorTCA.h.

References BASE, and PHObjectVectorTCA< BASE, DERIVED >::size_type.

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::PHObjectVectorTCA const self other  ) 
 

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::~PHObjectVectorTCA  )  [virtual]
 

Definition at line 147 of file PHObjectVectorTCA.h.


Member Function Documentation

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::value_type PHObjectVectorTCA< BASE, DERIVED >::add const size_type index,
const value_type value
[virtual]
 

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

Implements PHObjectVector< BASE >.

Definition at line 176 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::capacity(), PHObjectVectorTCA< BASE, DERIVED >::get(), PHObjectVectorTCA< BASE, DERIVED >::size_type, and PHObjectVectorTCA< BASE, DERIVED >::value_type.

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::value_type PHObjectVectorTCA< BASE, DERIVED >::add const size_type index  )  [virtual]
 

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

Implements PHObjectVector< BASE >.

Definition at line 155 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::capacity(), PHObjectVectorTCA< BASE, DERIVED >::get(), PHObjectVectorTCA< BASE, DERIVED >::size_type, and PHObjectVectorTCA< BASE, DERIVED >::value_type.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::resize().

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::size_type PHObjectVectorTCA< BASE, DERIVED >::capacity  )  const [virtual]
 

Maximum size.

Implements PHObjectVector< BASE >.

Definition at line 214 of file PHObjectVectorTCA.h.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::add(), and PHObjectVectorTCA< BASE, DERIVED >::identify().

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED > * PHObjectVectorTCA< BASE, DERIVED >::clone  )  const [virtual]
 

Virtual copy constructor.

Implements PHObjectVector< BASE >.

Definition at line 249 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED > * PHObjectVectorTCA< BASE, DERIVED >::create  )  const [virtual]
 

Virtual default constructor.

Implements PHObjectVector< BASE >.

Definition at line 257 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
virtual bool PHObjectVectorTCA< BASE, DERIVED >::empty  )  const [inline, virtual]
 

Whether this vector is empty.

Reimplemented from PHObjectVector< BASE >.

Definition at line 44 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::size().

template<typename BASE, typename DERIVED>
void PHObjectVectorTCA< BASE, DERIVED >::erase const size_type index  )  [virtual]
 

Erase one element.

Implements PHObjectVector< BASE >.

Definition at line 421 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::size(), and PHObjectVectorTCA< BASE, DERIVED >::size_type.

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::value_type PHObjectVectorTCA< BASE, DERIVED >::get const size_type index  )  const [virtual]
 

Get the index-th element.

Implements PHObjectVector< BASE >.

Definition at line 297 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::size_type.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::add(), and PHObjectVectorTCA< BASE, DERIVED >::identify().

template<typename BASE, typename DERIVED>
void PHObjectVectorTCA< BASE, DERIVED >::identify std::ostream &  os = std::cout  )  const [virtual]
 

Identify from PHObject.

Implements PHObjectVector< BASE >.

Definition at line 305 of file PHObjectVectorTCA.h.

References BASE, PHObjectVectorTCA< BASE, DERIVED >::capacity(), PHObjectVectorTCA< BASE, DERIVED >::get(), and PHObjectVectorTCA< BASE, DERIVED >::size().

template<typename BASE, typename DERIVED>
virtual int PHObjectVectorTCA< BASE, DERIVED >::isValid  )  const [inline, virtual]
 

isValid from PHObject.

Implements PHObjectVector< BASE >.

Definition at line 56 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
self& PHObjectVectorTCA< BASE, DERIVED >::operator= const self other  ) 
 

template<typename BASE, typename DERIVED>
bool PHObjectVectorTCA< BASE, DERIVED >::reserve const size_type n  )  [virtual]
 

Request allocation for at least n elements.

Implements PHObjectVector< BASE >.

Definition at line 338 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::size_type.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::resize().

template<typename BASE, typename DERIVED>
void PHObjectVectorTCA< BASE, DERIVED >::Reset  )  [virtual]
 

Reset from PHObject.

Implements PHObjectVector< BASE >.

Definition at line 364 of file PHObjectVectorTCA.h.

template<typename BASE, typename DERIVED>
bool PHObjectVectorTCA< BASE, DERIVED >::resize const size_type newsize,
value_type  v = value_type()
[virtual]
 

Change the size.

Implements PHObjectVector< BASE >.

Definition at line 373 of file PHObjectVectorTCA.h.

References PHObjectVectorTCA< BASE, DERIVED >::add(), PHObjectVectorTCA< BASE, DERIVED >::reserve(), PHObjectVectorTCA< BASE, DERIVED >::size(), PHObjectVectorTCA< BASE, DERIVED >::size_type, and PHObjectVectorTCA< BASE, DERIVED >::value_type.

template<typename BASE, typename DERIVED>
PHObjectVectorTCA< BASE, DERIVED >::size_type PHObjectVectorTCA< BASE, DERIVED >::size  )  const [virtual]
 

Get the size of this vector.

Implements PHObjectVector< BASE >.

Definition at line 454 of file PHObjectVectorTCA.h.

Referenced by PHObjectVectorTCA< BASE, DERIVED >::empty(), PHObjectVectorTCA< BASE, DERIVED >::erase(), PHObjectVectorTCA< BASE, DERIVED >::identify(), and PHObjectVectorTCA< BASE, DERIVED >::resize().


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