1 #ifndef Framework_HCMethods_h 2 #define Framework_HCMethods_h 21 #include "boost/type_traits/remove_const.hpp" 25 namespace eventsetup {
26 namespace heterocontainer {
27 template<
class Type,
class Key,
class IdTag >
29 HCTypeTag typeTag = HCTypeTag::make<Type>();
30 return Key(typeTag, iIdTag);
33 template<
class Type,
class Key>
35 HCTypeTag typeTag = HCTypeTag::make<Type>();
48 template<
class Key,
class ItemType,
class Storage,
class IdTag >
49 inline bool insert(
Storage& iStorage, ItemType* iItem,
const IdTag& iIdTag) {
51 Key>(iIdTag) , iItem);
54 template<
class Key,
class ItemType,
class Storage>
56 return iStorage.insert(
makeKey<ItemType,
61 template<
class Key,
class ItemType,
class Storage,
class IdTag >
62 inline ItemType*
find(
const Storage& iStorage,
const IdTag& iIdTag) {
64 return static_cast<ItemType*
>(iStorage.find(
69 template<
class Key,
class ItemType,
class Storage>
72 return static_cast<ItemType*
>( iStorage.find(
Key makeKey(const IdTag &iIdTag)
ItemType * find(const Storage &iStorage, const IdTag &iIdTag)
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
boost::remove_const< ItemType >::type Type