CMS 3D CMS Logo

HCMethods.h

Go to the documentation of this file.
00001 #ifndef Framework_HCMethods_h
00002 #define Framework_HCMethods_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     HeteroContainer
00006 // Module:      HCMethods
00007 // 
00008 // Description: Templated methods to be used to 'construct' a 
00009 //              heterogenous container
00010 //
00011 // Usage:
00012 //    <usage>
00013 //
00014 // Author:      Chris D. Jones
00015 // Created:     Sun Mar 27 15:58:05 EDT 2005
00016 //
00017 
00018 // system include files
00019 #include "boost/type_traits/remove_const.hpp"
00020 // user include files
00021 
00022 // forward declarations
00023 namespace edm {
00024    namespace eventsetup {
00025       namespace heterocontainer {
00026          template<class Type, class Key, class IdTag>
00027          Key makeKey(const IdTag&);
00028    
00029          template<class Type, class Key>
00030             Key makeKey();
00031 
00032          //NOTE: the following functions use this struct to determine
00033          //  how to find the 'Type' (what is returned from the Storage)
00034          //  when given only an ItemType (what is stored in Storage). 
00035          //  This allows the Storage to be composed of proxies instead of
00036          //  the 'Type' themselves
00037          template<class Key, class ItemType> struct type_from_itemtype {
00038             typedef typename boost::remove_const<ItemType>::type Type;
00039          };
00040    
00041          template<class Key, class ItemType, class Storage, class IdTag>
00042             bool insert(Storage&, ItemType*, const IdTag&);
00043          
00044          template<class Key, class ItemType, class Storage>
00045             bool insert(Storage&, ItemType*);
00046          
00047          template<class Key, class ItemType, class Storage, class IdTag>
00048             ItemType* find(const Storage&, const IdTag&);
00049          
00050          template<class Key,class ItemType, class Storage>
00051             ItemType* find(const Storage&);
00052       }
00053    }
00054 }
00055 #endif

Generated on Tue Jun 9 17:35:41 2009 for CMSSW by  doxygen 1.5.4