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

copy on write TYPE array class to make cloning cheap More...

#include <SharedArray.h>

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

Classes

class  RWProxy
 proxy class to distinguish reads from writes More...
 

Public Member Functions

virtual SharedArray< TYPE > * Clone (const char *newname=0) const
 clone method More...
 
SharedArrayoperator= (const SharedArray< TYPE > &other)
 assignment More...
 
const RWProxy operator[] (unsigned idx) const
 read-only access to array elements More...
 
RWProxy operator[] (unsigned idx)
 read-write access to array elements More...
 
 SharedArray (unsigned sz)
 constructor More...
 
 SharedArray (const SharedArray< TYPE > &other)
 copy constructor More...
 
unsigned size () const
 get size of array More...
 
virtual ~SharedArray ()
 destructor More...
 

Private Member Functions

 ClassDef (SharedArray, 1)
 
 SharedArray ()
 for ROOT I/O More...
 
void triggerCOW ()
 trigger copy-on-write More...
 

Private Attributes

SharedArrayImp< TYPE > * pimpl
 pointer to array implementation More...
 

Friends

class RWProxy
 

Detailed Description

template<class TYPE>
class SharedArray< TYPE >

copy on write TYPE array class to make cloning cheap

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 67 of file SharedArray.h.

Constructor & Destructor Documentation

§ SharedArray() [1/3]

template<class TYPE>
SharedArray< TYPE >::SharedArray ( )
inlineprivate

for ROOT I/O

Definition at line 75 of file SharedArray.h.

§ SharedArray() [2/3]

template<class TYPE>
SharedArray< TYPE >::SharedArray ( unsigned  sz)
inline

constructor

Definition at line 78 of file SharedArray.h.

§ SharedArray() [3/3]

template<class TYPE>
SharedArray< TYPE >::SharedArray ( const SharedArray< TYPE > &  other)
inline

copy constructor

Definition at line 82 of file SharedArray.h.

§ ~SharedArray()

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

destructor

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-29

Definition at line 8 of file SharedArray.cpp.

Member Function Documentation

§ ClassDef()

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

§ Clone()

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

clone method

Definition at line 12 of file SharedArray.cpp.

§ operator=()

template<class TYPE>
SharedArray< TYPE > & SharedArray< TYPE >::operator= ( const SharedArray< TYPE > &  other)

assignment

Definition at line 16 of file SharedArray.cpp.

§ operator[]() [1/2]

template<class TYPE>
const RWProxy SharedArray< TYPE >::operator[] ( unsigned  idx) const
inline

read-only access to array elements

Definition at line 94 of file SharedArray.h.

§ operator[]() [2/2]

template<class TYPE>
RWProxy SharedArray< TYPE >::operator[] ( unsigned  idx)
inline

read-write access to array elements

Definition at line 97 of file SharedArray.h.

§ size()

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

get size of array

Definition at line 92 of file SharedArray.h.

§ triggerCOW()

template<class TYPE>
void SharedArray< TYPE >::triggerCOW ( )
inlineprivate

trigger copy-on-write

Definition at line 102 of file SharedArray.h.

Friends And Related Function Documentation

§ RWProxy

template<class TYPE>
friend class RWProxy
friend

Definition at line 71 of file SharedArray.h.

Member Data Documentation

§ pimpl

template<class TYPE>
SharedArrayImp<TYPE>* SharedArray< TYPE >::pimpl
private

pointer to array implementation

Definition at line 109 of file SharedArray.h.


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