CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLElementRegistry.h
Go to the documentation of this file.
1 #ifndef DDL_ElementRegistry_H
2 #define DDL_ElementRegistry_H
3 // -------------------------------------------------------------------------
4 // Includes
5 // -------------------------------------------------------------------------
6 
7 #include <string>
8 #include <map>
9 
11 #include <DetectorDescription/Base/interface/Singleton.icc>
12 //#include <DetectorDescription/interface/DDXMLElement.h>
13 
14 class DDXMLElement;
15 
16 // CLHEP Dependencies
17 #include <CLHEP/Evaluator/Evaluator.h>
18 
19 // -------------------------------------------------------------------------
20 // Class declaration
21 // -------------------------------------------------------------------------
22 
23 
25 
41 class DDLElementRegistry //: public DDXMLElementRegistry
42 {
43 
44  public:
45  typedef std::map <std::string, DDXMLElement*> RegistryMap;
46 
49 
52 
54  void registerElement(const std::string& name, DDXMLElement*);
55 
57 
62  DDXMLElement* getElement(const std::string& name);
63 
65  const std::string& getElementName(DDXMLElement* theElement) const;
66 
67  private:
69 };
70 
73 
74 #endif
DDLElementRegistry()
Constructor.
~DDLElementRegistry()
Destructor.
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:58
const std::string & getElementName(DDXMLElement *theElement) const
Get the name given a pointer. This may not be needed...
DDI::Singleton< DDLElementRegistry > DDLGlobalRegistry
This is only here because of the boost::spirit::parser stuff of DDLMap needing to be re-designed...
std::map< std::string, DDXMLElement * > RegistryMap
The main class for processing parsed elements.
void registerElement(const std::string &name, DDXMLElement *)
This allows other Elements to register themselves with the static registry.