CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DetectorDescription/Parser/interface/DDLElementRegistry.h

Go to the documentation of this file.
00001 #ifndef DDL_ElementRegistry_H
00002 #define DDL_ElementRegistry_H
00003 // -------------------------------------------------------------------------
00004 // Includes
00005 // -------------------------------------------------------------------------
00006 
00007 #include <string>
00008 #include <map>
00009 
00010 #include <DetectorDescription/Base/interface/Singleton.h>
00011 #include <DetectorDescription/Base/interface/Singleton.icc>
00012 //#include <DetectorDescription/interface/DDXMLElement.h>
00013 
00014 class DDXMLElement;
00015 
00016 // CLHEP Dependencies
00017 #include <CLHEP/Evaluator/Evaluator.h>
00018 
00019 // -------------------------------------------------------------------------
00020 // Class declaration
00021 // -------------------------------------------------------------------------
00022 
00023 
00025 
00041 class DDLElementRegistry //: public DDXMLElementRegistry
00042 {
00043 
00044  public:
00045   typedef std::map <std::string, DDXMLElement*> RegistryMap;
00046 
00048   DDLElementRegistry();
00049 
00051   ~DDLElementRegistry();
00052   
00054   void registerElement(const std::string& name, DDXMLElement*);
00055 
00057 
00062   DDXMLElement* getElement(const std::string& name); 
00063 
00065   const std::string& getElementName(DDXMLElement* theElement) const;
00066 
00067  private:
00068   RegistryMap registry_;
00069 };
00070 
00072 typedef DDI::Singleton<DDLElementRegistry> DDLGlobalRegistry;
00073 
00074 #endif