Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4VectorCache< VALTYPE > Class Template Reference

#include <G4Cache.hh>

Inheritance diagram for G4VectorCache< VALTYPE >:
Collaboration diagram for G4VectorCache< VALTYPE >:

Public Types

typedef VALTYPE value_type
 
typedef std::vector< value_typevector_type
 
typedef vector_type::size_type size_type
 
typedef vector_type::iterator iterator
 
typedef vector_type::const_iterator const_iterator
 
- Public Types inherited from G4Cache< std::vector< VALTYPE > >
typedef std::vector< VALTYPE > value_type
 

Public Member Functions

 G4VectorCache ()
 
 G4VectorCache (G4int nElems)
 
 G4VectorCache (G4int nElems, value_type *vals)
 
virtual ~G4VectorCache ()
 
void Push_back (const value_type &val)
 
value_type Pop_back ()
 
value_typeoperator[] (const G4int &idx)
 
iterator Begin ()
 
iterator End ()
 
void Clear ()
 
size_type Size ()
 
- Public Member Functions inherited from G4Cache< std::vector< VALTYPE > >
 G4Cache ()
 
 G4Cache (const value_type &v)
 
 G4Cache (const G4Cache &rhs)
 
virtual ~G4Cache ()
 
value_typeGet () const
 
void Put (const value_type &val) const
 
value_type Pop ()
 
G4Cacheoperator= (const G4Cache &rhs)
 

Additional Inherited Members

- Protected Member Functions inherited from G4Cache< std::vector< VALTYPE > >
const intGetId () const
 

Detailed Description

template<class VALTYPE>
class G4VectorCache< VALTYPE >

Definition at line 131 of file G4Cache.hh.

Member Typedef Documentation

template<class VALTYPE>
typedef vector_type::const_iterator G4VectorCache< VALTYPE >::const_iterator

Definition at line 138 of file G4Cache.hh.

template<class VALTYPE>
typedef vector_type::iterator G4VectorCache< VALTYPE >::iterator

Definition at line 137 of file G4Cache.hh.

template<class VALTYPE>
typedef vector_type::size_type G4VectorCache< VALTYPE >::size_type

Definition at line 136 of file G4Cache.hh.

template<class VALTYPE>
typedef VALTYPE G4VectorCache< VALTYPE >::value_type

Definition at line 134 of file G4Cache.hh.

template<class VALTYPE>
typedef std::vector<value_type> G4VectorCache< VALTYPE >::vector_type

Definition at line 135 of file G4Cache.hh.

Constructor & Destructor Documentation

template<class V >
G4VectorCache< V >::G4VectorCache ( )

Definition at line 305 of file G4Cache.hh.

306 { }
template<class V >
G4VectorCache< V >::G4VectorCache ( G4int  nElems)

Definition at line 319 of file G4Cache.hh.

319  {
321  cc.resize(nElems);
322 }
value_type & Get() const
Definition: G4Cache.hh:282
std::vector< value_type > vector_type
Definition: G4Cache.hh:135

Here is the call graph for this function:

template<class VALTYPE>
G4VectorCache< VALTYPE >::G4VectorCache ( G4int  nElems,
value_type vals 
)
template<class V >
G4VectorCache< V >::~G4VectorCache ( )
virtual

Definition at line 309 of file G4Cache.hh.

309  {
310 #ifdef g4cdebug
311  cout<<"~G4VectorCache "<<G4Cache<G4VectorCache<V>::vector_type>::GetId()<<" with size: "<<Size()<<"->";
312  for ( size_type i = 0 ; i < Size() ; ++i )
313  cout<<operator[](i)<<",";
314  cout<<"<-"<<endl;
315 #endif
316 }
size_type Size()
Definition: G4Cache.hh:159
const int & GetId() const
Definition: G4Cache.hh:112
vector_type::size_type size_type
Definition: G4Cache.hh:136

Member Function Documentation

template<class V >
G4VectorCache< V >::iterator G4VectorCache< V >::Begin ( )
inline

Definition at line 355 of file G4Cache.hh.

356 {
357  return G4Cache<vector_type>::Get().begin();
358 }
value_type & Get() const
Definition: G4Cache.hh:282

Here is the call graph for this function:

template<class V >
void G4VectorCache< V >::Clear ( )
inline

Definition at line 367 of file G4Cache.hh.

368 {
369  G4Cache<vector_type>::Get().clear();
370 }
value_type & Get() const
Definition: G4Cache.hh:282

Here is the call graph for this function:

template<class V >
G4VectorCache< V >::iterator G4VectorCache< V >::End ( )
inline

Definition at line 361 of file G4Cache.hh.

362 {
363  return G4Cache<vector_type>::Get().end();
364 }
value_type & Get() const
Definition: G4Cache.hh:282

Here is the call graph for this function:

template<class V >
V & G4VectorCache< V >::operator[] ( const G4int idx)
inline

Definition at line 348 of file G4Cache.hh.

349 {
351  return cc[idx];
352 }
value_type & Get() const
Definition: G4Cache.hh:282
std::vector< value_type > vector_type
Definition: G4Cache.hh:135

Here is the call graph for this function:

template<class V >
V G4VectorCache< V >::Pop_back ( )
inline

Definition at line 339 of file G4Cache.hh.

340 {
342  value_type val = cc[cc.size()-1];
343  cc.pop_back();
344  return val;
345 }
VALTYPE value_type
Definition: G4Cache.hh:134
value_type & Get() const
Definition: G4Cache.hh:282
std::vector< value_type > vector_type
Definition: G4Cache.hh:135

Here is the call graph for this function:

template<class VALTYPE>
void G4VectorCache< V >::Push_back ( const value_type val)
inline

Definition at line 333 of file G4Cache.hh.

334 {
335  G4Cache<vector_type>::Get().push_back( val );
336 }
value_type & Get() const
Definition: G4Cache.hh:282

Here is the call graph for this function:

Here is the caller graph for this function:

template<class VALTYPE>
size_type G4VectorCache< VALTYPE >::Size ( )
inline

Definition at line 159 of file G4Cache.hh.

159 { return G4Cache<vector_type>::Get().size(); } //Needs to be here for a VC9 compilation problem
value_type & Get() const
Definition: G4Cache.hh:282

Here is the caller graph for this function:


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