BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DataVector< T > Class Template Reference

an STL vector of pointers that by default owns its pointed elements. More...

#include <DataVector.h>

Classes

class  ElementProxy

Public Types

vector typedefs: it behaves like a vector<T*>
typedef T *& reference
typedef const T *& const_reference
typedef PtrVector::iterator iterator
typedef PtrVector::const_iterator const_iterator
typedef PtrVector::size_type size_type
typedef PtrVector::difference_type difference_type
typedef T * value_type
typedef PtrVector::allocator_type allocator_type
typedef T ** pointer
typedef const T ** const_pointer
typedef PtrVector::reverse_iterator reverse_iterator
typedef PtrVector::const_reverse_iterator const_reverse_iterator
typedef T *& reference
typedef const T *& const_reference
typedef PtrVector::iterator iterator
typedef PtrVector::const_iterator const_iterator
typedef PtrVector::size_type size_type
typedef PtrVector::difference_type difference_type
typedef T * value_type
typedef PtrVector::allocator_type allocator_type
typedef T ** pointer
typedef const T ** const_pointer
typedef PtrVector::reverse_iterator reverse_iterator
typedef PtrVector::const_reverse_iterator const_reverse_iterator
typedef T *& reference
typedef const T *& const_reference
typedef PtrVector::iterator iterator
typedef PtrVector::const_iterator const_iterator
typedef PtrVector::size_type size_type
typedef PtrVector::difference_type difference_type
typedef T * value_type
typedef PtrVector::allocator_type allocator_type
typedef T ** pointer
typedef const T ** const_pointer
typedef PtrVector::reverse_iterator reverse_iterator
typedef PtrVector::const_reverse_iterator const_reverse_iterator

Public Member Functions

const PtrVector & stdcont () const
 access the underlying std vector;
const PtrVector & stdcont () const
 access the underlying std vector;
const PtrVector & stdcont () const
 access the underlying std vector;
vector structors (no Allocators). Own elements by default
 DataVector (SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
 DataVector (size_type n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
 Non standard: always set elements to 0.
 DataVector (const DataVector< T > &rhs)
template<class InputIterator>
 DataVector (InputIterator first, InputIterator last, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
DataVector< T > & operator= (const DataVector< T > &rhs)
template<class InputIterator>
void assign (InputIterator first, InputIterator last)
 the ownership policy will determine who owns the assigned elements
virtual ~DataVector ()
 DataVector (SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
 DataVector (size_type n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
 Non standard: always set elements to 0.
 DataVector (const DataVector< T > &rhs)
template<class InputIterator>
 DataVector (InputIterator first, InputIterator last, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
DataVector< T > & operator= (const DataVector< T > &rhs)
template<class InputIterator>
void assign (InputIterator first, InputIterator last)
 the ownership policy will determine who owns the assigned elements
virtual ~DataVector ()
 DataVector (SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
 DataVector (size_type n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
 Non standard: always set elements to 0.
 DataVector (const DataVector< T > &rhs)
template<class InputIterator>
 DataVector (InputIterator first, InputIterator last, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
DataVector< T > & operator= (const DataVector< T > &rhs)
template<class InputIterator>
void assign (InputIterator first, InputIterator last)
 the ownership policy will determine who owns the assigned elements
virtual ~DataVector ()
vector iterators
iterator FUNFWD (begin)
const_iterator CONSTFUNFWD (begin)
iterator FUNFWD (end)
const_iterator CONSTFUNFWD (end)
iterator FUNFWD (rbegin)
const_iterator CONSTFUNFWD (rbegin)
iterator FUNFWD (rend)
const_iterator CONSTFUNFWD (rend)
iterator FUNFWD (begin)
const_iterator CONSTFUNFWD (begin)
iterator FUNFWD (end)
const_iterator CONSTFUNFWD (end)
iterator FUNFWD (rbegin)
const_iterator CONSTFUNFWD (rbegin)
iterator FUNFWD (rend)
const_iterator CONSTFUNFWD (rend)
iterator FUNFWD (begin)
const_iterator CONSTFUNFWD (begin)
iterator FUNFWD (end)
const_iterator CONSTFUNFWD (end)
iterator FUNFWD (rbegin)
const_iterator CONSTFUNFWD (rbegin)
iterator FUNFWD (rend)
const_iterator CONSTFUNFWD (rend)
vector capacity
size_type CONSTFUNFWD (size)
size_type CONSTFUNFWD (max_size)
void resize (size_type sz)
 Non standard. When increasing size always set the new elements to 0.
size_type CONSTFUNFWD (capacity)
bool CONSTFUNFWD (empty)
void FUNFWDN (reserve)
size_type CONSTFUNFWD (size)
size_type CONSTFUNFWD (max_size)
void resize (size_type sz)
 Non standard. When increasing size always set the new elements to 0.
size_type CONSTFUNFWD (capacity)
bool CONSTFUNFWD (empty)
void FUNFWDN (reserve)
size_type CONSTFUNFWD (size)
size_type CONSTFUNFWD (max_size)
void resize (size_type sz)
 Non standard. When increasing size always set the new elements to 0.
size_type CONSTFUNFWD (capacity)
bool CONSTFUNFWD (empty)
void FUNFWDN (reserve)
vector accessors. Non standard return values!
ElementProxy operator[] (size_type n)
 standard return value is reference!
ElementProxy at (size_type n)
ElementProxy front ()
ElementProxy back ()
const T * CONSTFUNFWDN (operator[])
 standard return value is const_reference i.e. const T*&!
const T * CONSTFUNFWDN (at)
const T * CONSTFUNFWD (front)
const T * CONSTFUNFWD (back)
ElementProxy operator[] (size_type n)
 standard return value is reference!
ElementProxy at (size_type n)
ElementProxy front ()
ElementProxy back ()
const T * CONSTFUNFWDN (operator[])
 standard return value is const_reference i.e. const T*&!
const T * CONSTFUNFWDN (at)
const T * CONSTFUNFWD (front)
const T * CONSTFUNFWD (back)
ElementProxy operator[] (size_type n)
 standard return value is reference!
ElementProxy at (size_type n)
ElementProxy front ()
ElementProxy back ()
const T * CONSTFUNFWDN (operator[])
 standard return value is const_reference i.e. const T*&!
const T * CONSTFUNFWDN (at)
const T * CONSTFUNFWD (front)
const T * CONSTFUNFWD (back)
vector modifiers
void push_back (value_type pElem)
void FUNFWD (pop_back)
iterator insert (iterator position, value_type pElem)
 the ownership policy will determine who owns the inserted elements
template<class InputIterator>
void insert (iterator position, InputIterator first, InputIterator last)
 the ownership policy will determine who owns the inserted elements
iterator erase (iterator position)
 the ownership policy will determine whether to erase the pointee
iterator erase (iterator first, iterator last)
 the ownership policy will determine whether to erase the pointee
void swap (DataVector< T > &rhs)
void clear ()
void push_back (value_type pElem)
void FUNFWD (pop_back)
iterator insert (iterator position, value_type pElem)
 the ownership policy will determine who owns the inserted elements
template<class InputIterator>
void insert (iterator position, InputIterator first, InputIterator last)
 the ownership policy will determine who owns the inserted elements
iterator erase (iterator position)
 the ownership policy will determine whether to erase the pointee
iterator erase (iterator first, iterator last)
 the ownership policy will determine whether to erase the pointee
void swap (DataVector< T > &rhs)
void clear ()
void push_back (value_type pElem)
void FUNFWD (pop_back)
iterator insert (iterator position, value_type pElem)
 the ownership policy will determine who owns the inserted elements
template<class InputIterator>
void insert (iterator position, InputIterator first, InputIterator last)
 the ownership policy will determine who owns the inserted elements
iterator erase (iterator position)
 the ownership policy will determine whether to erase the pointee
iterator erase (iterator first, iterator last)
 the ownership policy will determine whether to erase the pointee
void swap (DataVector< T > &rhs)
void clear ()

Detailed Description

template<typename T>
class DataVector< T >

an STL vector of pointers that by default owns its pointed elements.

Beware of ownership issues when you modify a DataVector. Obviously you should not delete explicitly a DataVector element. A DataVector should never have two elements pointing to the same object. This may seem obvious but certain std algorithms (e.g. remove_if) may leave a DataVector with two copies of the same element in the "left-over" range. To avoid a crash when clearing the vector (e.g. in the destructor we have introduced a n-log(n) helper function that searches and removes duplicates in the DataVector. This is used by the destructor by clear() and by erase(first, last). As this may change in the future to improve performance, do not rely on this functionality and do avoid introducing duplicated elements in a DataVector.

All these cautions do not apply when a DataVector it is created with the flag SG::VIEW_ELEMENTS (see enum OwnershipPolicy) and hence does not own its elements. This is typically used to have DataVector elements allocated by DataPool. Othewise consider the cleaner alternative of using a vector<T*>

Notice the use of value_type instead of const_reference: this is justified by the fact that the elem are always ptrs.

Author
ATLAS Collaboration
Id
DataVector.h,v 1.17 2003/10/14 18:56:42 calaf Exp

Definition at line 91 of file Event/GeneratorObject/include/DataModel/DataVector.h.

Member Typedef Documentation

◆ allocator_type [1/3]

template<typename T>
typedef PtrVector::allocator_type DataVector< T >::allocator_type

◆ allocator_type [2/3]

template<typename T>
typedef PtrVector::allocator_type DataVector< T >::allocator_type

◆ allocator_type [3/3]

template<typename T>
typedef PtrVector::allocator_type DataVector< T >::allocator_type

◆ const_iterator [1/3]

template<typename T>
typedef PtrVector::const_iterator DataVector< T >::const_iterator

◆ const_iterator [2/3]

template<typename T>
typedef PtrVector::const_iterator DataVector< T >::const_iterator

◆ const_iterator [3/3]

template<typename T>
typedef PtrVector::const_iterator DataVector< T >::const_iterator

◆ const_pointer [1/3]

template<typename T>
typedef const T** DataVector< T >::const_pointer

◆ const_pointer [2/3]

template<typename T>
typedef const T** DataVector< T >::const_pointer

◆ const_pointer [3/3]

template<typename T>
typedef const T** DataVector< T >::const_pointer

◆ const_reference [1/3]

template<typename T>
typedef const T*& DataVector< T >::const_reference

◆ const_reference [2/3]

template<typename T>
typedef const T*& DataVector< T >::const_reference

◆ const_reference [3/3]

template<typename T>
typedef const T*& DataVector< T >::const_reference

◆ const_reverse_iterator [1/3]

template<typename T>
typedef PtrVector::const_reverse_iterator DataVector< T >::const_reverse_iterator

◆ const_reverse_iterator [2/3]

template<typename T>
typedef PtrVector::const_reverse_iterator DataVector< T >::const_reverse_iterator

◆ const_reverse_iterator [3/3]

template<typename T>
typedef PtrVector::const_reverse_iterator DataVector< T >::const_reverse_iterator

◆ difference_type [1/3]

template<typename T>
typedef PtrVector::difference_type DataVector< T >::difference_type

◆ difference_type [2/3]

template<typename T>
typedef PtrVector::difference_type DataVector< T >::difference_type

◆ difference_type [3/3]

template<typename T>
typedef PtrVector::difference_type DataVector< T >::difference_type

◆ iterator [1/3]

template<typename T>
typedef PtrVector::iterator DataVector< T >::iterator

◆ iterator [2/3]

template<typename T>
typedef PtrVector::iterator DataVector< T >::iterator

◆ iterator [3/3]

template<typename T>
typedef PtrVector::iterator DataVector< T >::iterator

◆ pointer [1/3]

template<typename T>
typedef T** DataVector< T >::pointer

◆ pointer [2/3]

template<typename T>
typedef T** DataVector< T >::pointer

◆ pointer [3/3]

template<typename T>
typedef T** DataVector< T >::pointer

◆ reference [1/3]

template<typename T>
typedef T*& DataVector< T >::reference

◆ reference [2/3]

template<typename T>
typedef T*& DataVector< T >::reference

◆ reference [3/3]

template<typename T>
typedef T*& DataVector< T >::reference

◆ reverse_iterator [1/3]

template<typename T>
typedef PtrVector::reverse_iterator DataVector< T >::reverse_iterator

◆ reverse_iterator [2/3]

template<typename T>
typedef PtrVector::reverse_iterator DataVector< T >::reverse_iterator

◆ reverse_iterator [3/3]

template<typename T>
typedef PtrVector::reverse_iterator DataVector< T >::reverse_iterator

◆ size_type [1/3]

template<typename T>
typedef PtrVector::size_type DataVector< T >::size_type

◆ size_type [2/3]

template<typename T>
typedef PtrVector::size_type DataVector< T >::size_type

◆ size_type [3/3]

template<typename T>
typedef PtrVector::size_type DataVector< T >::size_type

◆ value_type [1/3]

template<typename T>
typedef T* DataVector< T >::value_type

◆ value_type [2/3]

template<typename T>
typedef T* DataVector< T >::value_type

◆ value_type [3/3]

template<typename T>
typedef T* DataVector< T >::value_type

Constructor & Destructor Documentation

◆ DataVector() [1/12]

template<typename T>
DataVector< T >::DataVector ( SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS)
inlineexplicit

Definition at line 125 of file Event/GeneratorObject/include/DataModel/DataVector.h.

126 : m_ownPolicy( ownPolicy ), m_pCont() {}
an STL vector of pointers that by default owns its pointed elements.

Referenced by DataVector(), operator=(), and swap().

◆ DataVector() [2/12]

template<typename T>
DataVector< T >::DataVector ( size_type n,
SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS )
inlineexplicit

Non standard: always set elements to 0.

Definition at line 129 of file Event/GeneratorObject/include/DataModel/DataVector.h.

131 : m_ownPolicy( ownPolicy ) {
132 // FIXME what is the right thing to do?
133 // boost::function_requires< boost::DefaultConstructibleConcept<T> >();
134 // if (m_ownPolicy == SG::OWN_ELEMENTS && 0 == pElem) pElem = new T();
135 insert( begin(), n, 0 );
136 }
iterator insert(iterator position, value_type pElem)
the ownership policy will determine who owns the inserted elements

◆ DataVector() [3/12]

template<typename T>
DataVector< T >::DataVector ( const DataVector< T > & rhs)
inlineexplicit

copy constructor: since it is a shallow copy the copy DataVector does not own the elements

Definition at line 140 of file Event/GeneratorObject/include/DataModel/DataVector.h.

141 : m_ownPolicy( SG::VIEW_ELEMENTS ), m_pCont( rhs.stdcont() ) {
142 // cout << "copy const called" << this << " <- " << &rhs << endl;
143 }
const PtrVector & stdcont() const
access the underlying std vector;

◆ DataVector() [4/12]

template<typename T>
template<class InputIterator>
DataVector< T >::DataVector ( InputIterator first,
InputIterator last,
SG::OwnershipPolicy ownPolicy = SG::VIEW_ELEMENTS )
inline

copy via iterators: since it is a shallow copy the copy DataVector does not own the elements

Definition at line 148 of file Event/GeneratorObject/include/DataModel/DataVector.h.

150 : m_ownPolicy( ownPolicy ), m_pCont( first, last ) {}

◆ ~DataVector() [1/3]

template<typename T>
virtual DataVector< T >::~DataVector ( )
inlinevirtual

Deletes the pointed-at elements when m_ownPolicy == SG::OWN_ELEMENTS (i.e. by default).

Definition at line 162 of file Event/GeneratorObject/include/DataModel/DataVector.h.

169 {
170 if ( m_ownPolicy == SG::OWN_ELEMENTS )
171 {
173 iterator iter( begin() );
174 while ( iter != new_end ) delete *( iter++ );
175 }
176 }
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ DataVector() [5/12]

template<typename T>
DataVector< T >::DataVector ( SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS)
inlineexplicit

Definition at line 125 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

126 : m_ownPolicy( ownPolicy ), m_pCont() {}

◆ DataVector() [6/12]

template<typename T>
DataVector< T >::DataVector ( size_type n,
SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS )
inlineexplicit

Non standard: always set elements to 0.

Definition at line 129 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

131 : m_ownPolicy( ownPolicy ) {
132 // FIXME what is the right thing to do?
133 // boost::function_requires< boost::DefaultConstructibleConcept<T> >();
134 // if (m_ownPolicy == SG::OWN_ELEMENTS && 0 == pElem) pElem = new T();
135 insert( begin(), n, 0 );
136 }

◆ DataVector() [7/12]

template<typename T>
DataVector< T >::DataVector ( const DataVector< T > & rhs)
inlineexplicit

copy constructor: since it is a shallow copy the copy DataVector does not own the elements

Definition at line 140 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

141 : m_ownPolicy( SG::VIEW_ELEMENTS ), m_pCont( rhs.stdcont() ) {
142 // cout << "copy const called" << this << " <- " << &rhs << endl;
143 }

◆ DataVector() [8/12]

template<typename T>
template<class InputIterator>
DataVector< T >::DataVector ( InputIterator first,
InputIterator last,
SG::OwnershipPolicy ownPolicy = SG::VIEW_ELEMENTS )
inline

copy via iterators: since it is a shallow copy the copy DataVector does not own the elements

Definition at line 148 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

150 : m_ownPolicy( ownPolicy ), m_pCont( first, last ) {}

◆ ~DataVector() [2/3]

template<typename T>
virtual DataVector< T >::~DataVector ( )
inlinevirtual

Deletes the pointed-at elements when m_ownPolicy == SG::OWN_ELEMENTS (i.e. by default).

Definition at line 162 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

169 {
170 if ( m_ownPolicy == SG::OWN_ELEMENTS )
171 {
173 iterator iter( begin() );
174 while ( iter != new_end ) delete *( iter++ );
175 }
176 }

◆ DataVector() [9/12]

template<typename T>
DataVector< T >::DataVector ( SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS)
inlineexplicit

Definition at line 125 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

126 : m_ownPolicy( ownPolicy ), m_pCont() {}

◆ DataVector() [10/12]

template<typename T>
DataVector< T >::DataVector ( size_type n,
SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS )
inlineexplicit

Non standard: always set elements to 0.

Definition at line 129 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

131 : m_ownPolicy( ownPolicy ) {
132 // FIXME what is the right thing to do?
133 // boost::function_requires< boost::DefaultConstructibleConcept<T> >();
134 // if (m_ownPolicy == SG::OWN_ELEMENTS && 0 == pElem) pElem = new T();
135 insert( begin(), n, 0 );
136 }

◆ DataVector() [11/12]

template<typename T>
DataVector< T >::DataVector ( const DataVector< T > & rhs)
inlineexplicit

copy constructor: since it is a shallow copy the copy DataVector does not own the elements

Definition at line 140 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

141 : m_ownPolicy( SG::VIEW_ELEMENTS ), m_pCont( rhs.stdcont() ) {
142 // cout << "copy const called" << this << " <- " << &rhs << endl;
143 }

◆ DataVector() [12/12]

template<typename T>
template<class InputIterator>
DataVector< T >::DataVector ( InputIterator first,
InputIterator last,
SG::OwnershipPolicy ownPolicy = SG::VIEW_ELEMENTS )
inline

copy via iterators: since it is a shallow copy the copy DataVector does not own the elements

Definition at line 148 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

150 : m_ownPolicy( ownPolicy ), m_pCont( first, last ) {}

◆ ~DataVector() [3/3]

template<typename T>
virtual DataVector< T >::~DataVector ( )
inlinevirtual

Deletes the pointed-at elements when m_ownPolicy == SG::OWN_ELEMENTS (i.e. by default).

Definition at line 162 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

169 {
170 if ( m_ownPolicy == SG::OWN_ELEMENTS )
171 {
173 iterator iter( begin() );
174 while ( iter != new_end ) delete *( iter++ );
175 }
176 }

Member Function Documentation

◆ assign() [1/3]

template<typename T>
template<class InputIterator>
void DataVector< T >::assign ( InputIterator first,
InputIterator last )
inline

the ownership policy will determine who owns the assigned elements

Definition at line 162 of file Event/GeneratorObject/include/DataModel/DataVector.h.

◆ assign() [2/3]

template<typename T>
template<class InputIterator>
void DataVector< T >::assign ( InputIterator first,
InputIterator last )
inline

the ownership policy will determine who owns the assigned elements

Definition at line 162 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

162 {
163 clear();
164 insert( begin(), first, last );
165 }

◆ assign() [3/3]

template<typename T>
template<class InputIterator>
void DataVector< T >::assign ( InputIterator first,
InputIterator last )
inline

the ownership policy will determine who owns the assigned elements

Definition at line 162 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

162 {
163 clear();
164 insert( begin(), first, last );
165 }

◆ at() [1/3]

template<typename T>
ElementProxy DataVector< T >::at ( size_type n)
inline

◆ at() [2/3]

template<typename T>
ElementProxy DataVector< T >::at ( size_type n)
inline

Definition at line 253 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

253{ return ElementProxy( m_pCont, n ); }

◆ at() [3/3]

template<typename T>
ElementProxy DataVector< T >::at ( size_type n)
inline

Definition at line 253 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

253{ return ElementProxy( m_pCont, n ); }

◆ back() [1/3]

template<typename T>
ElementProxy DataVector< T >::back ( )
inline

Definition at line 255 of file Event/GeneratorObject/include/DataModel/DataVector.h.

255{ return ElementProxy( m_pCont.end() - 1 ); }

Referenced by CONSTFUNFWD().

◆ back() [2/3]

template<typename T>
ElementProxy DataVector< T >::back ( )
inline

Definition at line 255 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

255{ return ElementProxy( m_pCont.end() - 1 ); }

◆ back() [3/3]

template<typename T>
ElementProxy DataVector< T >::back ( )
inline

Definition at line 255 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

255{ return ElementProxy( m_pCont.end() - 1 ); }

◆ clear() [1/3]

template<typename T>
void DataVector< T >::clear ( )
inline

Definition at line 300 of file Event/GeneratorObject/include/DataModel/DataVector.h.

300{ erase( begin(), end() ); }
iterator erase(iterator position)
the ownership policy will determine whether to erase the pointee

Referenced by assign().

◆ clear() [2/3]

template<typename T>
void DataVector< T >::clear ( )
inline

◆ clear() [3/3]

template<typename T>
void DataVector< T >::clear ( )
inline

◆ CONSTFUNFWD() [1/30]

template<typename T>
const T * DataVector< T >::CONSTFUNFWD ( back )

◆ CONSTFUNFWD() [2/30]

template<typename T>
const T * DataVector< T >::CONSTFUNFWD ( back )

◆ CONSTFUNFWD() [3/30]

template<typename T>
const T * DataVector< T >::CONSTFUNFWD ( back )

◆ CONSTFUNFWD() [4/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( begin )

◆ CONSTFUNFWD() [5/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( begin )

◆ CONSTFUNFWD() [6/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( begin )

◆ CONSTFUNFWD() [7/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( capacity )

◆ CONSTFUNFWD() [8/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( capacity )

◆ CONSTFUNFWD() [9/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( capacity )

◆ CONSTFUNFWD() [10/30]

template<typename T>
bool DataVector< T >::CONSTFUNFWD ( empty )

◆ CONSTFUNFWD() [11/30]

template<typename T>
bool DataVector< T >::CONSTFUNFWD ( empty )

◆ CONSTFUNFWD() [12/30]

template<typename T>
bool DataVector< T >::CONSTFUNFWD ( empty )

◆ CONSTFUNFWD() [13/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( end )

◆ CONSTFUNFWD() [14/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( end )

◆ CONSTFUNFWD() [15/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( end )

◆ CONSTFUNFWD() [16/30]

template<typename T>
const T * DataVector< T >::CONSTFUNFWD ( front )

◆ CONSTFUNFWD() [17/30]

template<typename T>
const T * DataVector< T >::CONSTFUNFWD ( front )

◆ CONSTFUNFWD() [18/30]

template<typename T>
const T * DataVector< T >::CONSTFUNFWD ( front )

◆ CONSTFUNFWD() [19/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( max_size )

◆ CONSTFUNFWD() [20/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( max_size )

◆ CONSTFUNFWD() [21/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( max_size )

◆ CONSTFUNFWD() [22/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( rbegin )

◆ CONSTFUNFWD() [23/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( rbegin )

◆ CONSTFUNFWD() [24/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( rbegin )

◆ CONSTFUNFWD() [25/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( rend )

◆ CONSTFUNFWD() [26/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( rend )

◆ CONSTFUNFWD() [27/30]

template<typename T>
const_iterator DataVector< T >::CONSTFUNFWD ( rend )

◆ CONSTFUNFWD() [28/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( size )

◆ CONSTFUNFWD() [29/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( size )

◆ CONSTFUNFWD() [30/30]

template<typename T>
size_type DataVector< T >::CONSTFUNFWD ( size )

◆ CONSTFUNFWDN() [1/6]

template<typename T>
const T * DataVector< T >::CONSTFUNFWDN ( at )

◆ CONSTFUNFWDN() [2/6]

template<typename T>
const T * DataVector< T >::CONSTFUNFWDN ( at )

◆ CONSTFUNFWDN() [3/6]

template<typename T>
const T * DataVector< T >::CONSTFUNFWDN ( at )

◆ CONSTFUNFWDN() [4/6]

template<typename T>
const T * DataVector< T >::CONSTFUNFWDN ( operator [])

standard return value is const_reference i.e. const T*&!

◆ CONSTFUNFWDN() [5/6]

template<typename T>
const T * DataVector< T >::CONSTFUNFWDN ( operator [])

standard return value is const_reference i.e. const T*&!

◆ CONSTFUNFWDN() [6/6]

template<typename T>
const T * DataVector< T >::CONSTFUNFWDN ( operator [])

standard return value is const_reference i.e. const T*&!

◆ erase() [1/6]

template<typename T>
iterator DataVector< T >::erase ( iterator first,
iterator last )
inline

the ownership policy will determine whether to erase the pointee

Definition at line 286 of file Event/GeneratorObject/include/DataModel/DataVector.h.

286 {
287 if ( first == last ) return first;
288 if ( m_ownPolicy == SG::OWN_ELEMENTS )
289 {
292 while ( iter != new_end ) delete *( iter++ );
293 }
294 return m_pCont.erase( first, last );
295 }

◆ erase() [2/6]

template<typename T>
iterator DataVector< T >::erase ( iterator first,
iterator last )
inline

the ownership policy will determine whether to erase the pointee

Definition at line 286 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

286 {
287 if ( first == last ) return first;
288 if ( m_ownPolicy == SG::OWN_ELEMENTS )
289 {
292 while ( iter != new_end ) delete *( iter++ );
293 }
294 return m_pCont.erase( first, last );
295 }

◆ erase() [3/6]

template<typename T>
iterator DataVector< T >::erase ( iterator first,
iterator last )
inline

the ownership policy will determine whether to erase the pointee

Definition at line 286 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

286 {
287 if ( first == last ) return first;
288 if ( m_ownPolicy == SG::OWN_ELEMENTS )
289 {
292 while ( iter != new_end ) delete *( iter++ );
293 }
294 return m_pCont.erase( first, last );
295 }

◆ erase() [4/6]

template<typename T>
iterator DataVector< T >::erase ( iterator position)
inline

the ownership policy will determine whether to erase the pointee

Definition at line 281 of file Event/GeneratorObject/include/DataModel/DataVector.h.

281 {
282 if ( m_ownPolicy == SG::OWN_ELEMENTS && position != end() ) delete position;
283 return m_pCont.erase( position );
284 }

Referenced by clear(), and resize().

◆ erase() [5/6]

template<typename T>
iterator DataVector< T >::erase ( iterator position)
inline

the ownership policy will determine whether to erase the pointee

Definition at line 281 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

281 {
282 if ( m_ownPolicy == SG::OWN_ELEMENTS && position != end() ) delete position;
283 return m_pCont.erase( position );
284 }

◆ erase() [6/6]

template<typename T>
iterator DataVector< T >::erase ( iterator position)
inline

the ownership policy will determine whether to erase the pointee

Definition at line 281 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

281 {
282 if ( m_ownPolicy == SG::OWN_ELEMENTS && position != end() ) delete position;
283 return m_pCont.erase( position );
284 }

◆ front() [1/3]

template<typename T>
ElementProxy DataVector< T >::front ( )
inline

Definition at line 254 of file Event/GeneratorObject/include/DataModel/DataVector.h.

254{ return ElementProxy( m_pCont.begin() ); }

Referenced by CONSTFUNFWD().

◆ front() [2/3]

template<typename T>
ElementProxy DataVector< T >::front ( )
inline

Definition at line 254 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

254{ return ElementProxy( m_pCont.begin() ); }

◆ front() [3/3]

template<typename T>
ElementProxy DataVector< T >::front ( )
inline

Definition at line 254 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

254{ return ElementProxy( m_pCont.begin() ); }

◆ FUNFWD() [1/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( begin )

◆ FUNFWD() [2/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( begin )

◆ FUNFWD() [3/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( begin )

◆ FUNFWD() [4/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( end )

◆ FUNFWD() [5/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( end )

◆ FUNFWD() [6/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( end )

◆ FUNFWD() [7/15]

template<typename T>
void DataVector< T >::FUNFWD ( pop_back )

◆ FUNFWD() [8/15]

template<typename T>
void DataVector< T >::FUNFWD ( pop_back )

◆ FUNFWD() [9/15]

template<typename T>
void DataVector< T >::FUNFWD ( pop_back )

◆ FUNFWD() [10/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( rbegin )

◆ FUNFWD() [11/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( rbegin )

◆ FUNFWD() [12/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( rbegin )

◆ FUNFWD() [13/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( rend )

◆ FUNFWD() [14/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( rend )

◆ FUNFWD() [15/15]

template<typename T>
iterator DataVector< T >::FUNFWD ( rend )

◆ FUNFWDN() [1/3]

template<typename T>
void DataVector< T >::FUNFWDN ( reserve )

◆ FUNFWDN() [2/3]

template<typename T>
void DataVector< T >::FUNFWDN ( reserve )

◆ FUNFWDN() [3/3]

template<typename T>
void DataVector< T >::FUNFWDN ( reserve )

◆ insert() [1/6]

template<typename T>
template<class InputIterator>
void DataVector< T >::insert ( iterator position,
InputIterator first,
InputIterator last )
inline

the ownership policy will determine who owns the inserted elements

Definition at line 277 of file Event/GeneratorObject/include/DataModel/DataVector.h.

277 {
278 m_pCont.insert( position, first, last );
279 }

◆ insert() [2/6]

template<typename T>
template<class InputIterator>
void DataVector< T >::insert ( iterator position,
InputIterator first,
InputIterator last )
inline

the ownership policy will determine who owns the inserted elements

Definition at line 277 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

277 {
278 m_pCont.insert( position, first, last );
279 }

◆ insert() [3/6]

template<typename T>
template<class InputIterator>
void DataVector< T >::insert ( iterator position,
InputIterator first,
InputIterator last )
inline

the ownership policy will determine who owns the inserted elements

Definition at line 277 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

277 {
278 m_pCont.insert( position, first, last );
279 }

◆ insert() [4/6]

template<typename T>
iterator DataVector< T >::insert ( iterator position,
value_type pElem )
inline

the ownership policy will determine who owns the inserted elements

Definition at line 271 of file Event/GeneratorObject/include/DataModel/DataVector.h.

271 { // std const_ref
272 return m_pCont.insert( position, pElem );
273 }

Referenced by assign(), DataVector(), and resize().

◆ insert() [5/6]

template<typename T>
iterator DataVector< T >::insert ( iterator position,
value_type pElem )
inline

the ownership policy will determine who owns the inserted elements

Definition at line 271 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

271 { // std const_ref
272 return m_pCont.insert( position, pElem );
273 }

◆ insert() [6/6]

template<typename T>
iterator DataVector< T >::insert ( iterator position,
value_type pElem )
inline

the ownership policy will determine who owns the inserted elements

Definition at line 271 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

271 { // std const_ref
272 return m_pCont.insert( position, pElem );
273 }

◆ operator=() [1/3]

template<typename T>
DataVector< T > & DataVector< T >::operator= ( const DataVector< T > & rhs)
inline

op =: since it is a shallow copy the copy DataList does not own the elements

Definition at line 154 of file Event/GeneratorObject/include/DataModel/DataVector.h.

154 {
155 m_ownPolicy = SG::VIEW_ELEMENTS;
156 m_pCont = rhs.stdcont();
157 // cout << "op = called" << this << " = " << &rhs << endl;
158 return *this;
159 }

◆ operator=() [2/3]

template<typename T>
DataVector< T > & DataVector< T >::operator= ( const DataVector< T > & rhs)
inline

op =: since it is a shallow copy the copy DataList does not own the elements

Definition at line 154 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

154 {
155 m_ownPolicy = SG::VIEW_ELEMENTS;
156 m_pCont = rhs.stdcont();
157 // cout << "op = called" << this << " = " << &rhs << endl;
158 return *this;
159 }

◆ operator=() [3/3]

template<typename T>
DataVector< T > & DataVector< T >::operator= ( const DataVector< T > & rhs)
inline

op =: since it is a shallow copy the copy DataList does not own the elements

Definition at line 154 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

154 {
155 m_ownPolicy = SG::VIEW_ELEMENTS;
156 m_pCont = rhs.stdcont();
157 // cout << "op = called" << this << " = " << &rhs << endl;
158 return *this;
159 }

◆ operator[]() [1/3]

template<typename T>
ElementProxy DataVector< T >::operator[] ( size_type n)
inline

standard return value is reference!

Definition at line 252 of file Event/GeneratorObject/include/DataModel/DataVector.h.

252{ return ElementProxy( m_pCont, n ); }

◆ operator[]() [2/3]

template<typename T>
ElementProxy DataVector< T >::operator[] ( size_type n)
inline

standard return value is reference!

Definition at line 252 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

252{ return ElementProxy( m_pCont, n ); }

◆ operator[]() [3/3]

template<typename T>
ElementProxy DataVector< T >::operator[] ( size_type n)
inline

standard return value is reference!

Definition at line 252 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

252{ return ElementProxy( m_pCont, n ); }

◆ push_back() [1/3]

template<typename T>
void DataVector< T >::push_back ( value_type pElem)
inline

Definition at line 268 of file Event/GeneratorObject/include/DataModel/DataVector.h.

268{ m_pCont.push_back( pElem ); }

◆ push_back() [2/3]

template<typename T>
void DataVector< T >::push_back ( value_type pElem)
inline

Definition at line 268 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

268{ m_pCont.push_back( pElem ); }

◆ push_back() [3/3]

template<typename T>
void DataVector< T >::push_back ( value_type pElem)
inline

Definition at line 268 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

268{ m_pCont.push_back( pElem ); }

◆ resize() [1/3]

template<typename T>
void DataVector< T >::resize ( size_type sz)
inline

Non standard. When increasing size always set the new elements to 0.

Definition at line 206 of file Event/GeneratorObject/include/DataModel/DataVector.h.

206 {
207 if ( sz < size() ) { erase( begin() + sz, end() ); }
208 else
209 {
210 // FIXME what is the right thing to do?
211 // boost::function_requires< boost::DefaultConstructibleConcept<T> >();
212 // if (m_ownPolicy == SG::OWN_ELEMENTS && 0 == pElem) pElem = new T();
213 insert( end(), sz - size(), 0 );
214 }
215 }

◆ resize() [2/3]

template<typename T>
void DataVector< T >::resize ( size_type sz)
inline

Non standard. When increasing size always set the new elements to 0.

Definition at line 206 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

206 {
207 if ( sz < size() ) { erase( begin() + sz, end() ); }
208 else
209 {
210 // FIXME what is the right thing to do?
211 // boost::function_requires< boost::DefaultConstructibleConcept<T> >();
212 // if (m_ownPolicy == SG::OWN_ELEMENTS && 0 == pElem) pElem = new T();
213 insert( end(), sz - size(), 0 );
214 }
215 }

◆ resize() [3/3]

template<typename T>
void DataVector< T >::resize ( size_type sz)
inline

Non standard. When increasing size always set the new elements to 0.

Definition at line 206 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

206 {
207 if ( sz < size() ) { erase( begin() + sz, end() ); }
208 else
209 {
210 // FIXME what is the right thing to do?
211 // boost::function_requires< boost::DefaultConstructibleConcept<T> >();
212 // if (m_ownPolicy == SG::OWN_ELEMENTS && 0 == pElem) pElem = new T();
213 insert( end(), sz - size(), 0 );
214 }
215 }

◆ stdcont() [1/3]

template<typename T>
const PtrVector & DataVector< T >::stdcont ( ) const
inline

access the underlying std vector;

Definition at line 104 of file Event/GeneratorObject/include/DataModel/DataVector.h.

104{ return m_pCont; }

Referenced by DataVector(), and operator=().

◆ stdcont() [2/3]

template<typename T>
const PtrVector & DataVector< T >::stdcont ( ) const
inline

access the underlying std vector;

Definition at line 104 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

104{ return m_pCont; }

◆ stdcont() [3/3]

template<typename T>
const PtrVector & DataVector< T >::stdcont ( ) const
inline

access the underlying std vector;

Definition at line 104 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

104{ return m_pCont; }

◆ swap() [1/3]

template<typename T>
void DataVector< T >::swap ( DataVector< T > & rhs)
inline

Definition at line 296 of file Event/GeneratorObject/include/DataModel/DataVector.h.

296 {
297 std::swap( m_ownPolicy, rhs.m_ownPolicy );
298 m_pCont.swap( rhs.m_pCont );
299 }

Referenced by swap().

◆ swap() [2/3]

template<typename T>
void DataVector< T >::swap ( DataVector< T > & rhs)
inline

Definition at line 296 of file InstallArea/x86_64-el9-gcc13-dbg/include/DataModel/DataVector.h.

296 {
297 std::swap( m_ownPolicy, rhs.m_ownPolicy );
298 m_pCont.swap( rhs.m_pCont );
299 }

◆ swap() [3/3]

template<typename T>
void DataVector< T >::swap ( DataVector< T > & rhs)
inline

Definition at line 296 of file InstallArea/x86_64-el9-gcc13-opt/include/DataModel/DataVector.h.

296 {
297 std::swap( m_ownPolicy, rhs.m_ownPolicy );
298 m_pCont.swap( rhs.m_pCont );
299 }

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