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 Member Functions | Private Attributes
EZArrayVL< T > Class Template Reference

#include <EZArrayVL.h>

Public Types

typedef MgrType::const_iterator const_iterator
 
typedef MgrType::const_reference const_reference
 
typedef MgrType::iterator iterator
 
typedef EZMgrVL< TMgrType
 
typedef MgrType::reference reference
 
typedef MgrType::size_type size_type
 
typedef MgrType::value_type value_type
 

Public Member Functions

virtual void assign (size_type size, const T &t=T()) const
 
const_iterator begin () const
 
size_type capacity () const
 
bool empty () const
 
const_iterator end () const
 
 EZArrayVL (const MgrType *mgr, const_iterator start, const_iterator finis)
 
 EZArrayVL (const MgrType *mgr, size_type size=0, const T &t=T())
 
reference operator[] (const unsigned int i)
 
const_reference operator[] (const unsigned int i) const
 
virtual void resize (size_type size)
 
size_type size () const
 
bool uninitialized () const
 
virtual ~EZArrayVL ()
 

Private Member Functions

 EZArrayVL ()
 

Private Attributes

iterator m_begin
 
const MgrTypem_mgr
 
size_type m_size
 

Detailed Description

template<class T>
class EZArrayVL< T >

Definition at line 7 of file EZArrayVL.h.

Member Typedef Documentation

template<class T >
typedef MgrType::const_iterator EZArrayVL< T >::const_iterator

Definition at line 13 of file EZArrayVL.h.

template<class T >
typedef MgrType::const_reference EZArrayVL< T >::const_reference

Definition at line 15 of file EZArrayVL.h.

template<class T >
typedef MgrType::iterator EZArrayVL< T >::iterator

Definition at line 12 of file EZArrayVL.h.

template<class T >
typedef EZMgrVL< T > EZArrayVL< T >::MgrType

Definition at line 11 of file EZArrayVL.h.

template<class T >
typedef MgrType::reference EZArrayVL< T >::reference

Definition at line 14 of file EZArrayVL.h.

template<class T >
typedef MgrType::size_type EZArrayVL< T >::size_type

Definition at line 16 of file EZArrayVL.h.

template<class T >
typedef MgrType::value_type EZArrayVL< T >::value_type

Definition at line 17 of file EZArrayVL.h.

Constructor & Destructor Documentation

template<class T >
EZArrayVL< T >::EZArrayVL ( const MgrType mgr,
size_type  size = 0,
const T t = T() 
)
inline

Definition at line 19 of file EZArrayVL.h.

21  :
22  m_begin ( 0 ) ,
23  m_size ( size ) ,
24  m_mgr ( mgr ) {}
const MgrType * m_mgr
Definition: EZArrayVL.h:84
size_type m_size
Definition: EZArrayVL.h:83
size_type size() const
Definition: EZArrayVL.h:71
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
EZArrayVL< T >::EZArrayVL ( const MgrType mgr,
const_iterator  start,
const_iterator  finis 
)
inline

Definition at line 26 of file EZArrayVL.h.

References assert(), EZArrayVL< T >::begin(), i, and dqm_diff::start.

28  :
29  m_begin ( 0==finis-start ? (iterator)0 : mgr->assign( finis - start ) ) ,
30  m_size ( finis - start ) ,
31  m_mgr ( mgr )
32  {
33  assert( ( finis - start ) > 0 ) ;
34  iterator i ( begin() ) ;
35  for( const_iterator ic ( start ) ; ic != finis ; ++ic )
36  {
37  (*i) = (*ic) ;
38  }
39  }
int i
Definition: DBlmapReader.cc:9
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
assert(m_qm.get())
MgrType::const_iterator const_iterator
Definition: EZArrayVL.h:13
MgrType::iterator iterator
Definition: EZArrayVL.h:12
const MgrType * m_mgr
Definition: EZArrayVL.h:84
const_iterator begin() const
Definition: EZArrayVL.h:53
size_type m_size
Definition: EZArrayVL.h:83
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
virtual EZArrayVL< T >::~EZArrayVL ( )
inlinevirtual

Definition at line 41 of file EZArrayVL.h.

41 {}
template<class T >
EZArrayVL< T >::EZArrayVL ( )
private

Member Function Documentation

template<class T >
virtual void EZArrayVL< T >::assign ( size_type  size,
const T t = T() 
) const
inlinevirtual

Definition at line 45 of file EZArrayVL.h.

References assert(), EZMgrVL< T >::assign(), EZArrayVL< T >::m_begin, EZArrayVL< T >::m_mgr, EZArrayVL< T >::m_size, EZArrayVL< T >::size(), and edmStreamStallGrapher::t.

Referenced by EZArrayVL< T >::operator[]().

47  {
48  assert( (iterator)0 == m_begin ) ;
49  m_size = size ;
50  m_begin = m_mgr->assign( size, t ) ;
51  }
assert(m_qm.get())
iterator assign(size_type size, const T &t=T()) const
Definition: EZMgrVL.h:31
MgrType::iterator iterator
Definition: EZArrayVL.h:12
const MgrType * m_mgr
Definition: EZArrayVL.h:84
size_type m_size
Definition: EZArrayVL.h:83
size_type size() const
Definition: EZArrayVL.h:71
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
const_iterator EZArrayVL< T >::begin ( void  ) const
inline

Definition at line 53 of file EZArrayVL.h.

References EZArrayVL< T >::m_begin.

Referenced by EZArrayVL< T >::EZArrayVL().

53 { return m_begin ; }
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
size_type EZArrayVL< T >::capacity ( ) const
inline

Definition at line 73 of file EZArrayVL.h.

References EZArrayVL< T >::size().

73 { return size() ; }
size_type size() const
Definition: EZArrayVL.h:71
template<class T >
bool EZArrayVL< T >::empty ( void  ) const
inline

Definition at line 69 of file EZArrayVL.h.

References EZArrayVL< T >::size().

69 { return ( 0 == size() ) ; }
size_type size() const
Definition: EZArrayVL.h:71
template<class T >
const_iterator EZArrayVL< T >::end ( void  ) const
inline

Definition at line 54 of file EZArrayVL.h.

References EZArrayVL< T >::m_begin, and EZArrayVL< T >::m_size.

54 { return m_size + m_begin ; }
size_type m_size
Definition: EZArrayVL.h:83
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
reference EZArrayVL< T >::operator[] ( const unsigned int  i)
inline

Definition at line 56 of file EZArrayVL.h.

References EZArrayVL< T >::assign(), i, EZArrayVL< T >::m_begin, and EZArrayVL< T >::m_size.

57  {
58  if( (iterator)0 == m_begin ) assign( m_size ) ;
59  return *( m_begin + i ) ;
60  }
int i
Definition: DBlmapReader.cc:9
MgrType::iterator iterator
Definition: EZArrayVL.h:12
size_type m_size
Definition: EZArrayVL.h:83
virtual void assign(size_type size, const T &t=T()) const
Definition: EZArrayVL.h:45
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
const_reference EZArrayVL< T >::operator[] ( const unsigned int  i) const
inline

Definition at line 62 of file EZArrayVL.h.

References i, and EZArrayVL< T >::m_begin.

63  {
64  return *( m_begin + i ) ;
65  }
int i
Definition: DBlmapReader.cc:9
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
virtual void EZArrayVL< T >::resize ( size_type  size)
inlinevirtual
template<class T >
size_type EZArrayVL< T >::size ( void  ) const
inline

Definition at line 71 of file EZArrayVL.h.

References EZArrayVL< T >::m_begin.

Referenced by EZArrayVL< T >::assign(), EZArrayVL< T >::capacity(), and EZArrayVL< T >::empty().

71 { return ( m_end - m_begin ) ; }
iterator m_begin
Definition: EZArrayVL.h:82
template<class T >
bool EZArrayVL< T >::uninitialized ( ) const
inline

Definition at line 67 of file EZArrayVL.h.

References EZArrayVL< T >::m_begin.

67 { return ( 0 == m_begin ) ; }
iterator m_begin
Definition: EZArrayVL.h:82

Member Data Documentation

template<class T >
iterator EZArrayVL< T >::m_begin
mutableprivate
template<class T >
const MgrType* EZArrayVL< T >::m_mgr
private

Definition at line 84 of file EZArrayVL.h.

Referenced by EZArrayVL< T >::assign(), and EZArrayVL< T >::resize().

template<class T >
size_type EZArrayVL< T >::m_size
private