84 template<
class VALTYPE>
109 const int&
GetId()
const {
return id; }
114 static unsigned int instancesctr;
115 static unsigned int dstrctr;
130 template<
class VALTYPE>
167 template<
class KEYTYPE,
class VALTYPE>
173 typedef typename std::map<key_type,value_type>
map_type;
221 cout<<
"G4Cache id: "<<
id<<endl;
232 cout<<
"G4Cache id: "<<
id<<
" "<<endl;
240 cout<<
"~G4Cache id: "<<
id<<
" "<<endl;
244 G4bool last = ( dstrctr == instancesctr );
245 theCache.Destroy(
id,last);
254 {
return GetCache(); }
258 { GetCache() = val; }
263 {
return GetCache(); }
283 for (
size_type i = 0 ; i < Size() ; ++i )
284 cout<<
operator[](i)<<
",";
299 for (
G4int idx = 0 ; idx < nElems ; ++idx )
350 template<
class K,
class V>
355 for (
iterator it = Begin() ; it != End() ; ++it )
356 cout<<it->first<<
":"<<it->second<<
",";
361 template<
class K,
class V>
376 template<
class K,
class V>
381 template<
class K,
class V>
387 template<
class K,
class V>
393 template<
class K,
class V>
396 return ( Find(k) != End() );
399 template<
class K,
class V>
402 return Find(k)->second;
405 template<
class K,
class V>
411 template<
class K,
class V>
void Initialize(unsigned int id)
vector_type::const_iterator const_iterator
std::vector< value_type > vector_type
#define G4MUTEX_INITIALIZER
vector_type::iterator iterator
G4bool Has(const key_type &k)
size_type Erase(const key_type &k)
const int & GetId() const
map_type::const_iterator const_iterator
VALTYPE & GetCache(unsigned int id) const
value_type & operator[](const G4int &idx)
void Push_back(const value_type &val)
iterator Find(const key_type &k)
map_type::iterator iterator
map_type::size_type size_type
std::map< key_type, value_type > map_type
value_type & operator[](const key_type &k)
void Put(const value_type &val) const
std::pair< iterator, G4bool > Insert(const key_type &k, const value_type &v)
vector_type::size_type size_type