CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
ora::PVector< Tp > Class Template Reference

#include <PVector.h>

Public Types

typedef std::vector< Tp >
::const_iterator 
const_iterator
 
typedef std::vector< Tp >
::const_reference 
const_reference
 
typedef std::vector< Tp >
::const_reverse_iterator 
const_reverse_iterator
 
typedef std::vector< Tp >::iterator iterator
 
typedef std::vector< Tp >
::reference 
reference
 
typedef std::vector< Tp >
::reverse_iterator 
reverse_iterator
 
typedef std::vector< Tp >
::size_type 
size_type
 
typedef std::vector< Tp > store_type
 
typedef std::vector< Tp >
::value_type 
value_type
 

Public Member Functions

void assign (size_type n, const Tp &u)
 
const_reference at (size_type n) const
 
reference at (size_type n)
 
reference back ()
 
const_reference back () const
 
iterator begin ()
 
const_iterator begin () const
 
size_type capacity () const
 
void clear ()
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
reference front ()
 
const_reference front () const
 
size_type max_size () const
 
bool operator!= (const PVector &vec) const
 
PVector< Tp > & operator= (const PVector< Tp > &)
 
bool operator== (const PVector &vec) const
 
reference operator[] (size_type n)
 
const_reference operator[] (size_type n) const
 
size_type persistentSize () const
 
void pop_back ()
 
void push_back (const Tp &x)
 
 PVector ()
 
 PVector (size_type n, const Tp &value=Tp())
 
 PVector (const PVector< Tp > &)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
void reserve (size_type n)
 
void resize (size_type n, const Tp &value=Tp())
 
size_type size () const
 
const void * storageAddress () const
 
virtual ~PVector ()
 

Private Attributes

size_type m_persistentSize
 
std::vector< Tp > m_vec
 

Detailed Description

template<typename Tp>
class ora::PVector< Tp >

Container class replicating std::vector functionality, designed for update/append operations in CMS-ORA with no need of delete queries. Write and Read are like standards vectors. Update assumes the following:

Definition at line 17 of file PVector.h.

Member Typedef Documentation

template<typename Tp>
typedef std::vector<Tp>::const_iterator ora::PVector< Tp >::const_iterator

Definition at line 29 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::const_reference ora::PVector< Tp >::const_reference

Definition at line 25 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::const_reverse_iterator ora::PVector< Tp >::const_reverse_iterator

Definition at line 33 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::iterator ora::PVector< Tp >::iterator

Definition at line 31 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::reference ora::PVector< Tp >::reference

Definition at line 27 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::reverse_iterator ora::PVector< Tp >::reverse_iterator

Definition at line 35 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::size_type ora::PVector< Tp >::size_type

Definition at line 23 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp> ora::PVector< Tp >::store_type

Definition at line 40 of file PVector.h.

template<typename Tp>
typedef std::vector<Tp>::value_type ora::PVector< Tp >::value_type

Definition at line 37 of file PVector.h.

Constructor & Destructor Documentation

template<class Tp >
ora::PVector< Tp >::PVector ( )

Definition at line 230 of file PVector.h.

230  :m_vec(),m_persistentSize(0){
231 }
std::vector< Tp > m_vec
Definition: PVector.h:221
size_type m_persistentSize
Definition: PVector.h:224
template<class Tp >
ora::PVector< Tp >::PVector ( size_type  n,
const Tp &  value = Tp() 
)
explicit

Definition at line 233 of file PVector.h.

234 }
std::vector< Tp > m_vec
Definition: PVector.h:221
size_type m_persistentSize
Definition: PVector.h:224
template<class Tp >
ora::PVector< Tp >::PVector ( const PVector< Tp > &  v)

Definition at line 236 of file PVector.h.

236  :m_vec(v.m_vec),m_persistentSize(v.m_persistentSize){
237 }
std::vector< Tp > m_vec
Definition: PVector.h:221
size_type m_persistentSize
Definition: PVector.h:224
template<typename Tp>
virtual ora::PVector< Tp >::~PVector ( )
inlinevirtual

Definition at line 54 of file PVector.h.

54  {
55  }

Member Function Documentation

template<typename Tp>
void ora::PVector< Tp >::assign ( size_type  n,
const Tp &  u 
)
inline

Definition at line 172 of file PVector.h.

References ora::PVector< Tp >::m_vec.

173  {
174  m_vec.assign(n,u);
175  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_reference ora::PVector< Tp >::at ( size_type  n) const
inline

Definition at line 142 of file PVector.h.

References ora::PVector< Tp >::m_vec.

143  {
144  return m_vec.at(n);
145  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
reference ora::PVector< Tp >::at ( size_type  n)
inline

Definition at line 147 of file PVector.h.

References ora::PVector< Tp >::m_vec.

148  {
149  return m_vec.at(n);
150  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
reference ora::PVector< Tp >::back ( )
inline

Definition at line 162 of file PVector.h.

References ora::PVector< Tp >::m_vec.

163  {
164  return m_vec.back();
165  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_reference ora::PVector< Tp >::back ( ) const
inline

Definition at line 167 of file PVector.h.

References ora::PVector< Tp >::m_vec.

168  {
169  return m_vec.back();
170  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
iterator ora::PVector< Tp >::begin ( void  )
inline

Definition at line 62 of file PVector.h.

References ora::PVector< Tp >::m_vec.

63  {
64  return m_vec.begin();
65  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_iterator ora::PVector< Tp >::begin ( void  ) const
inline

Definition at line 72 of file PVector.h.

References ora::PVector< Tp >::m_vec.

73  {
74  return m_vec.begin();
75  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
size_type ora::PVector< Tp >::capacity ( ) const
inline

Definition at line 117 of file PVector.h.

References ora::PVector< Tp >::m_vec.

118  {
119  return m_vec.capacity();
120  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
void ora::PVector< Tp >::clear ( void  )
inline
template<typename Tp>
bool ora::PVector< Tp >::empty ( ) const
inline

Definition at line 122 of file PVector.h.

References ora::PVector< Tp >::m_vec.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

123  {
124  return m_vec.empty();
125  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
iterator ora::PVector< Tp >::end ( void  )
inline

Definition at line 67 of file PVector.h.

References ora::PVector< Tp >::m_vec.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

68  {
69  return m_vec.end();
70  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_iterator ora::PVector< Tp >::end ( void  ) const
inline

Definition at line 77 of file PVector.h.

References ora::PVector< Tp >::m_vec.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

78  {
79  return m_vec.end();
80  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
reference ora::PVector< Tp >::front ( )
inline

Definition at line 152 of file PVector.h.

References ora::PVector< Tp >::m_vec.

153  {
154  return m_vec.front();
155  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_reference ora::PVector< Tp >::front ( ) const
inline

Definition at line 157 of file PVector.h.

References ora::PVector< Tp >::m_vec.

158  {
159  return m_vec.front();
160  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
size_type ora::PVector< Tp >::max_size ( ) const
inline

Definition at line 107 of file PVector.h.

References ora::PVector< Tp >::m_vec.

108  {
109  return m_vec.max_size();
110  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
bool ora::PVector< Tp >::operator!= ( const PVector< Tp > &  vec) const
inline

Definition at line 198 of file PVector.h.

References ora::PVector< Tp >::m_vec.

199  {
200  return m_vec!=vec.m_vec;
201  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<class Tp >
ora::PVector< Tp > & ora::PVector< Tp >::operator= ( const PVector< Tp > &  v)

Definition at line 239 of file PVector.h.

References ora::PVector< Tp >::m_persistentSize, and ora::PVector< Tp >::m_vec.

239  {
240 
241  m_vec = v.m_vec;
242  m_persistentSize = v.m_persistentSize;
243  return *this;
244 }
std::vector< Tp > m_vec
Definition: PVector.h:221
size_type m_persistentSize
Definition: PVector.h:224
template<typename Tp>
bool ora::PVector< Tp >::operator== ( const PVector< Tp > &  vec) const
inline

Definition at line 193 of file PVector.h.

References ora::PVector< Tp >::m_vec.

194  {
195  return m_vec==vec.m_vec;
196  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
reference ora::PVector< Tp >::operator[] ( size_type  n)
inline

Definition at line 132 of file PVector.h.

References ora::PVector< Tp >::m_vec, and gen::n.

133  {
134  return m_vec[n];
135  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_reference ora::PVector< Tp >::operator[] ( size_type  n) const
inline

Definition at line 137 of file PVector.h.

References ora::PVector< Tp >::m_vec, and gen::n.

138  {
139  return m_vec[n];
140  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
size_type ora::PVector< Tp >::persistentSize ( ) const
inline

Definition at line 212 of file PVector.h.

References ora::PVector< Tp >::m_persistentSize.

213  {
214  return m_persistentSize;
215  }
size_type m_persistentSize
Definition: PVector.h:224
template<typename Tp>
void ora::PVector< Tp >::pop_back ( )
inline

Definition at line 182 of file PVector.h.

References ora::PVector< Tp >::m_vec.

183  {
184  m_vec.pop_back();
185  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
void ora::PVector< Tp >::push_back ( const Tp &  x)
inline

Definition at line 177 of file PVector.h.

References ora::PVector< Tp >::m_vec.

178  {
179  m_vec.push_back(x);
180  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
reverse_iterator ora::PVector< Tp >::rbegin ( )
inline

Definition at line 82 of file PVector.h.

References ora::PVector< Tp >::m_vec.

83  {
84  return m_vec.rbegin();
85  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_reverse_iterator ora::PVector< Tp >::rbegin ( ) const
inline

Definition at line 92 of file PVector.h.

References ora::PVector< Tp >::m_vec.

93  {
94  return m_vec.rbegin();
95  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
reverse_iterator ora::PVector< Tp >::rend ( )
inline

Definition at line 87 of file PVector.h.

References ora::PVector< Tp >::m_vec.

88  {
89  return m_vec.rend();
90  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const_reverse_iterator ora::PVector< Tp >::rend ( ) const
inline

Definition at line 97 of file PVector.h.

References ora::PVector< Tp >::m_vec.

98  {
99  return m_vec.rend();
100  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
void ora::PVector< Tp >::reserve ( size_type  n)
inline

Definition at line 127 of file PVector.h.

References ora::PVector< Tp >::m_vec.

128  {
129  m_vec.reserve(n);
130  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
void ora::PVector< Tp >::resize ( size_type  n,
const Tp &  value = Tp() 
)
inline
template<typename Tp>
size_type ora::PVector< Tp >::size ( void  ) const
inline

Definition at line 102 of file PVector.h.

References ora::PVector< Tp >::m_vec.

103  {
104  return m_vec.size();
105  }
std::vector< Tp > m_vec
Definition: PVector.h:221
template<typename Tp>
const void* ora::PVector< Tp >::storageAddress ( ) const
inline

Definition at line 206 of file PVector.h.

References ora::PVector< Tp >::m_vec.

207  {
208  return &m_vec;
209  }
std::vector< Tp > m_vec
Definition: PVector.h:221

Member Data Documentation

template<typename Tp>
size_type ora::PVector< Tp >::m_persistentSize
private

Definition at line 224 of file PVector.h.

Referenced by ora::PVector< Tp >::operator=(), and ora::PVector< Tp >::persistentSize().

template<typename Tp>
std::vector<Tp> ora::PVector< Tp >::m_vec
private