CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
DynArray< T > Class Template Reference

#include <DynArray.h>

Public Member Functions

Tbegin ()
 
T const * begin () const
 
 DynArray (unsigned char *storage, unsigned int isize)
 
 DynArray (unsigned char *storage, unsigned int isize, T const &it)
 
Tend ()
 
T const * end () const
 
Toperator[] (unsigned int i)
 
T const & operator[] (unsigned int i) const
 
unsigned int size () const
 
 ~DynArray ()
 

Public Attributes

Ta =nullptr
 
unsigned int s =0
 

Detailed Description

template<typename T>
class DynArray< T >

Definition at line 5 of file DynArray.h.

Constructor & Destructor Documentation

template<typename T >
DynArray< T >::DynArray ( unsigned char *  storage,
unsigned int  isize 
)
inline

Definition at line 10 of file DynArray.h.

References DynArray< T >::begin(), i, and DynArray< T >::s.

10  : a((T*)(storage)), s(isize){
11  for (auto i=0U; i<s; ++i) new((begin()+i)) T();
12  }
int i
Definition: DBlmapReader.cc:9
T * a
Definition: DynArray.h:7
T * begin()
Definition: DynArray.h:20
unsigned int s
Definition: DynArray.h:8
long double T
template<typename T >
DynArray< T >::DynArray ( unsigned char *  storage,
unsigned int  isize,
T const &  it 
)
inline

Definition at line 13 of file DynArray.h.

References DynArray< T >::begin(), i, and DynArray< T >::s.

13  : a((T*)(storage)), s(isize){
14  for (auto i=0U; i<s; ++i) new((begin()+i)) T(it);
15  }
int i
Definition: DBlmapReader.cc:9
T * a
Definition: DynArray.h:7
T * begin()
Definition: DynArray.h:20
unsigned int s
Definition: DynArray.h:8
long double T
template<typename T >
DynArray< T >::~DynArray ( )
inline

Definition at line 17 of file DynArray.h.

References DynArray< T >::a, i, and DynArray< T >::s.

17 { for (auto i=0U; i<s; ++i) a[i].~T(); }
int i
Definition: DBlmapReader.cc:9
T * a
Definition: DynArray.h:7
unsigned int s
Definition: DynArray.h:8
long double T

Member Function Documentation

template<typename T >
T* DynArray< T >::begin ( void  )
inline

Definition at line 20 of file DynArray.h.

References DynArray< T >::a.

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

20 { return a;}
T * a
Definition: DynArray.h:7
template<typename T >
T const* DynArray< T >::begin ( void  ) const
inline

Definition at line 23 of file DynArray.h.

References DynArray< T >::a.

23 { return a;}
T * a
Definition: DynArray.h:7
template<typename T >
T* DynArray< T >::end ( void  )
inline

Definition at line 21 of file DynArray.h.

References DynArray< T >::a, and DynArray< T >::s.

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

21 { return a+s;}
T * a
Definition: DynArray.h:7
unsigned int s
Definition: DynArray.h:8
template<typename T >
T const* DynArray< T >::end ( void  ) const
inline

Definition at line 24 of file DynArray.h.

References DynArray< T >::a, and DynArray< T >::s.

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

24 { return a+s;}
T * a
Definition: DynArray.h:7
unsigned int s
Definition: DynArray.h:8
template<typename T >
T& DynArray< T >::operator[] ( unsigned int  i)
inline

Definition at line 19 of file DynArray.h.

References DynArray< T >::a, and i.

19 { return a[i];}
int i
Definition: DBlmapReader.cc:9
T * a
Definition: DynArray.h:7
template<typename T >
T const& DynArray< T >::operator[] ( unsigned int  i) const
inline

Definition at line 22 of file DynArray.h.

References DynArray< T >::a, and i.

22 { return a[i];}
int i
Definition: DBlmapReader.cc:9
T * a
Definition: DynArray.h:7
template<typename T >
unsigned int DynArray< T >::size ( void  ) const
inline

Definition at line 25 of file DynArray.h.

References DynArray< T >::s.

25 { return s;}
unsigned int s
Definition: DynArray.h:8

Member Data Documentation

template<typename T >
T* DynArray< T >::a =nullptr
template<typename T >
unsigned int DynArray< T >::s =0