GammaCombo  Rev:Unversioneddirectory
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SharedArrayImp< TYPE > Class Template Reference

class to hold array data, refcounted More...

#include <SharedArray.h>

Inheritance diagram for SharedArrayImp< TYPE >:
Inheritance graph
[legend]
Collaboration diagram for SharedArrayImp< TYPE >:
Collaboration graph
[legend]

Public Member Functions

SharedArrayImp< TYPE > * acquire ()
 acquire a reference More...
 
virtual SharedArrayImp< TYPE > * Clone (const char *newname=0) const
 clone method More...
 
const TYPE & operator[] (unsigned idx) const
 read-only access More...
 
TYPE & operator[] (unsigned idx)
 read-write access More...
 
unsigned refCount () const
 return reference count More...
 
void release ()
 release a reference More...
 
 SharedArrayImp ()
 for ROOT I/O More...
 
 SharedArrayImp (unsigned size)
 constructor More...
 
 SharedArrayImp (const SharedArrayImp< TYPE > &other)
 copy constructor More...
 
unsigned size () const
 return size of array More...
 
virtual ~SharedArrayImp ()
 destructor More...
 

Private Member Functions

 ClassDef (SharedArrayImp, 1)
 

Private Attributes

std::vector< TYPE > arr
 array More...
 
unsigned refcount
 reference count More...
 

Detailed Description

template<class TYPE>
class SharedArrayImp< TYPE >

class to hold array data, refcounted

Author
Manuel Tobias Schiller manue.nosp@m.l.sc.nosp@m.hille.nosp@m.r@ni.nosp@m.khef..nosp@m.nl
Date
2012-08-30

Definition at line 20 of file SharedArray.h.

Constructor & Destructor Documentation

§ SharedArrayImp() [1/3]

template<class TYPE>
SharedArrayImp< TYPE >::SharedArrayImp ( )
inline

for ROOT I/O

Definition at line 24 of file SharedArray.h.

§ SharedArrayImp() [2/3]

template<class TYPE >
SharedArrayImp< TYPE >::SharedArrayImp ( unsigned  size)

constructor

Definition at line 28 of file SharedArray.cpp.

§ SharedArrayImp() [3/3]

template<class TYPE>
SharedArrayImp< TYPE >::SharedArrayImp ( const SharedArrayImp< TYPE > &  other)

copy constructor

Definition at line 41 of file SharedArray.cpp.

§ ~SharedArrayImp()

template<class TYPE >
SharedArrayImp< TYPE >::~SharedArrayImp ( )
virtual

destructor

Definition at line 33 of file SharedArray.cpp.

Member Function Documentation

§ acquire()

template<class TYPE>
SharedArrayImp<TYPE>* SharedArrayImp< TYPE >::acquire ( )
inline

acquire a reference

Definition at line 39 of file SharedArray.h.

§ ClassDef()

template<class TYPE>
SharedArrayImp< TYPE >::ClassDef ( SharedArrayImp< TYPE >  ,
 
)
private

§ Clone()

template<class TYPE >
SharedArrayImp< TYPE > * SharedArrayImp< TYPE >::Clone ( const char *  newname = 0) const
virtual

clone method

Definition at line 37 of file SharedArray.cpp.

§ operator[]() [1/2]

template<class TYPE>
const TYPE& SharedArrayImp< TYPE >::operator[] ( unsigned  idx) const
inline

read-only access

Definition at line 47 of file SharedArray.h.

§ operator[]() [2/2]

template<class TYPE>
TYPE& SharedArrayImp< TYPE >::operator[] ( unsigned  idx)
inline

read-write access

Definition at line 50 of file SharedArray.h.

§ refCount()

template<class TYPE>
unsigned SharedArrayImp< TYPE >::refCount ( ) const
inline

return reference count

Definition at line 37 of file SharedArray.h.

§ release()

template<class TYPE>
void SharedArrayImp< TYPE >::release ( )
inline

release a reference

Definition at line 42 of file SharedArray.h.

§ size()

template<class TYPE>
unsigned SharedArrayImp< TYPE >::size ( ) const
inline

return size of array

Definition at line 45 of file SharedArray.h.

Member Data Documentation

§ arr

template<class TYPE>
std::vector<TYPE> SharedArrayImp< TYPE >::arr
private

array

Definition at line 56 of file SharedArray.h.

§ refcount

template<class TYPE>
unsigned SharedArrayImp< TYPE >::refcount
private

reference count

Definition at line 54 of file SharedArray.h.


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