81 #include <system_error>
90 template<
class VALTYPE>
141 template<
class VALTYPE>
183 template<
class KEYTYPE,
class VALTYPE>
192 typedef typename std::map<key_type,value_type>
map_type;
226 std::cout <<
"G4Cache id: " <<
id << std::endl;
236 if (
this == &rhs )
return;
246 std::cout <<
"Copy constructor with id: " <<
id << std::endl;
253 if (
this == &rhs)
return *
this;
261 std::cout <<
"Assignement operator with id: " <<
id << std::endl;
274 std::cout <<
"G4Cache id: " <<
id << std::endl;
282 std::cout <<
"~G4Cache id: " <<
id << std::endl;
300 catch (std::system_error&
e)
304 G4cout <<
"Non-critical error: mutex lock failure in ~G4Cache<"
306 <<
"If the RunManagerKernel has been deleted, it failed to "
307 <<
"delete an allocated resource" <<
G4endl
308 <<
"and this destructor is being called after the statics "
309 <<
"were destroyed." <<
G4endl;
310 G4cout <<
"Exception: [code: " << e.code() <<
"] caught: "
315 G4bool last = ( dstrctr == instancesctr );
316 theCache.Destroy(
id, last);
319 instancesctr.store(0);
326 {
return GetCache(); }
330 { GetCache() = val; }
335 {
return GetCache(); }
354 std::cout <<
"~G4VectorCache "
356 <<
" with size: " << Size() <<
"->";
357 for (
size_type i = 0 ; i < Size() ; ++i )
358 std::cout <<
operator[](i) <<
",";
359 std::cout <<
"<-" << std::endl;
427 template<
class K,
class V>
432 <<
" with size: " << Size() <<
"->";
434 std::cout<<
it->first <<
":" <<
it->second <<
",";
435 std::cout <<
"<-" << std::endl;
439 template<
class K,
class V>
440 std::pair<typename G4MapCache<K,V>::iterator,
G4bool>
452 template<
class K,
class V>
457 template<
class K,
class V>
463 template<
class K,
class V>
469 template<
class K,
class V>
472 return ( Find(k) != End() );
475 template<
class K,
class V>
478 return Find(k)->second;
481 template<
class K,
class V>
487 template<
class K,
class V>