CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

ora::PVector< Tp > Class Template Reference

#include <PVector.h>

List of all members.

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)
reference at (size_type n)
const_reference at (size_type n) const
const_reference back () const
reference back ()
iterator begin ()
const_iterator begin () const
size_type capacity () const
void clear ()
bool empty () const
const_iterator end () const
iterator end ()
const_reference front () const
reference front ()
size_type max_size () const
bool operator!= (const PVector &vec) const
PVector< Tp > & operator= (const PVector< Tp > &)
bool operator== (const PVector &vec) const
const_reference operator[] (size_type n) const
reference operator[] (size_type n)
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 > &)
const_reverse_iterator rbegin () const
reverse_iterator rbegin ()
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.

template<class Tp>
ora::PVector< Tp >::PVector ( size_type  n,
const Tp &  value = Tp() 
) [explicit]

Definition at line 233 of file PVector.h.

template<class Tp>
ora::PVector< Tp >::PVector ( const PVector< Tp > &  v)

Definition at line 236 of file PVector.h.

                                                               :m_vec(v.m_vec),m_persistentSize(v.m_persistentSize){
}
template<typename Tp>
virtual ora::PVector< Tp >::~PVector ( ) [inline, virtual]

Definition at line 54 of file PVector.h.

                      {
    }

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.

    {
      m_vec.assign(n,u);
    }
template<typename Tp>
reference ora::PVector< Tp >::at ( size_type  n) [inline]

Definition at line 147 of file PVector.h.

    {
      return m_vec.at(n);
    }
template<typename Tp>
const_reference ora::PVector< Tp >::at ( size_type  n) const [inline]

Definition at line 142 of file PVector.h.

    {
      return m_vec.at(n);
    }
template<typename Tp>
reference ora::PVector< Tp >::back ( ) [inline]

Definition at line 162 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::back().

    {
      return m_vec.back();
    }
template<typename Tp>
const_reference ora::PVector< Tp >::back ( ) const [inline]

Definition at line 167 of file PVector.h.

    {
      return m_vec.back();
    }
template<typename Tp>
iterator ora::PVector< Tp >::begin ( void  ) [inline]
template<typename Tp>
const_iterator ora::PVector< Tp >::begin ( void  ) const [inline]

Definition at line 72 of file PVector.h.

    {
      return m_vec.begin();
    }
template<typename Tp>
size_type ora::PVector< Tp >::capacity ( ) const [inline]

Definition at line 117 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::capacity().

    {
      return m_vec.capacity();
    }
template<typename Tp>
void ora::PVector< Tp >::clear ( void  ) [inline]

Definition at line 187 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::clear().

    {
      m_vec.clear();
    }
template<typename Tp>
bool ora::PVector< Tp >::empty ( ) const [inline]

Definition at line 122 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::empty().

    {
      return m_vec.empty();
    }
template<typename Tp>
const_iterator ora::PVector< Tp >::end ( void  ) const [inline]

Definition at line 77 of file PVector.h.

    {
      return m_vec.end();
    }
template<typename Tp>
iterator ora::PVector< Tp >::end ( void  ) [inline]
template<typename Tp>
reference ora::PVector< Tp >::front ( ) [inline]

Definition at line 152 of file PVector.h.

Referenced by cond::IOVSequence::firstSince(), and ora::QueryableVectorData< Tp >::front().

    {
      return m_vec.front();
    }
template<typename Tp>
const_reference ora::PVector< Tp >::front ( ) const [inline]

Definition at line 157 of file PVector.h.

    {
      return m_vec.front();
    }
template<typename Tp>
size_type ora::PVector< Tp >::max_size ( ) const [inline]

Definition at line 107 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::max_size().

    {
      return m_vec.max_size();
    }
template<typename Tp>
bool ora::PVector< Tp >::operator!= ( const PVector< Tp > &  vec) const [inline]

Definition at line 198 of file PVector.h.

    {
      return m_vec!=vec.m_vec;
    }
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.

                                                                                 {

  m_vec = v.m_vec;
  m_persistentSize = v.m_persistentSize;
  return *this;
}
template<typename Tp>
bool ora::PVector< Tp >::operator== ( const PVector< Tp > &  vec) const [inline]

Definition at line 193 of file PVector.h.

    {
      return m_vec==vec.m_vec;
    }
template<typename Tp>
reference ora::PVector< Tp >::operator[] ( size_type  n) [inline]

Definition at line 132 of file PVector.h.

    {
      return m_vec[n];
    }
template<typename Tp>
const_reference ora::PVector< Tp >::operator[] ( size_type  n) const [inline]

Definition at line 137 of file PVector.h.

    {
      return m_vec[n];
    }
template<typename Tp>
size_type ora::PVector< Tp >::persistentSize ( ) const [inline]

Definition at line 212 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::persistentSize().

    {
      return m_persistentSize;
    }
template<typename Tp>
void ora::PVector< Tp >::pop_back ( ) [inline]

Definition at line 182 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::pop_back(), and cond::IOVSequence::truncate().

    {
      m_vec.pop_back();
    }
template<typename Tp>
void ora::PVector< Tp >::push_back ( const Tp &  x) [inline]

Definition at line 177 of file PVector.h.

Referenced by cond::IOVSequence::add(), cond::IOV::add(), and ora::QueryableVectorData< Tp >::push_back().

    {
      m_vec.push_back(x);
    }
template<typename Tp>
const_reverse_iterator ora::PVector< Tp >::rbegin ( ) const [inline]

Definition at line 92 of file PVector.h.

    {
      return m_vec.rbegin();
    }
template<typename Tp>
reverse_iterator ora::PVector< Tp >::rbegin ( ) [inline]

Definition at line 82 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::crbegin(), and ora::QueryableVectorData< Tp >::rbegin().

    {
      return m_vec.rbegin();
    }
template<typename Tp>
const_reverse_iterator ora::PVector< Tp >::rend ( ) const [inline]

Definition at line 97 of file PVector.h.

    {
      return m_vec.rend();
    }
template<typename Tp>
reverse_iterator ora::PVector< Tp >::rend ( ) [inline]

Definition at line 87 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::crend(), and ora::QueryableVectorData< Tp >::rend().

    {
      return m_vec.rend();
    }
template<typename Tp>
void ora::PVector< Tp >::reserve ( size_type  n) [inline]

Definition at line 127 of file PVector.h.

Referenced by ora::QueryableVectorData< Tp >::reserve().

    {
      m_vec.reserve(n);
    }
template<typename Tp>
void ora::PVector< Tp >::resize ( size_type  n,
const Tp &  value = Tp() 
) [inline]

Definition at line 112 of file PVector.h.

    {
      m_vec.resize(n,value);
    }
template<typename Tp>
size_type ora::PVector< Tp >::size ( void  ) const [inline]
template<typename Tp>
const void* ora::PVector< Tp >::storageAddress ( ) const [inline]

Definition at line 206 of file PVector.h.

    {
      return &m_vec;
    }

Member Data Documentation

template<typename Tp>
size_type ora::PVector< Tp >::m_persistentSize [private]
template<typename Tp>
std::vector<Tp> ora::PVector< Tp >::m_vec [private]