Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4FastVector< Type, N > Class Template Reference

#include <G4FastVector.hh>

Public Member Functions

 G4FastVector ()
 
 ~G4FastVector ()
 
Type * operator[] (G4int anIndex) const
 
void Initialize (G4int items)
 
void SetElement (G4int anIndex, Type *anElement)
 

Detailed Description

template<class Type, G4int N>
class G4FastVector< Type, N >

Definition at line 43 of file G4FastVector.hh.

Constructor & Destructor Documentation

template<class Type, G4int N>
G4FastVector< Type, N >::G4FastVector ( )
inline

Definition at line 50 of file G4FastVector.hh.

50 { ptr = &theArray[0]; }
template<class Type, G4int N>
G4FastVector< Type, N >::~G4FastVector ( )
inline

Definition at line 52 of file G4FastVector.hh.

53  {
54  if (ptr != &theArray[0]) delete [] ptr;
55  }

Member Function Documentation

template<class Type, G4int N>
void G4FastVector< Type, N >::Initialize ( G4int  items)
inline

Definition at line 63 of file G4FastVector.hh.

67  {
68  if (ptr != &theArray[0])
69  delete [] ptr;
70  if (items > N)
71  ptr = new Type*[items];
72  else
73  ptr = &theArray[0];
74  }
const int N
Definition: mixmax.h:43

Here is the caller graph for this function:

template<class Type, G4int N>
Type* G4FastVector< Type, N >::operator[] ( G4int  anIndex) const
inline

Definition at line 57 of file G4FastVector.hh.

59  {
60  return ptr[anIndex];
61  }
template<class Type, G4int N>
void G4FastVector< Type, N >::SetElement ( G4int  anIndex,
Type *  anElement 
)
inline

Definition at line 76 of file G4FastVector.hh.

79  {
80  ptr[anIndex] = anElement;
81  }

Here is the caller graph for this function:


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