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>
19 
20 // -------------------------------------------------------------------------
21 // Class declaration
22 // -------------------------------------------------------------------------
23 
24 
26 
42 class DDLElementRegistry //: public DDXMLElementRegistry
43 {
44 
45  public:
46  typedef std::map <std::string, DDXMLElement*> RegistryMap;
47 
50 
53 
56 
58 
64 
66  const std::string& getElementName(DDXMLElement* theElement) const;
68 
69  private:
71 };
72 
75 
76 #endif
DDLElementRegistry()
Constructor.
~DDLElementRegistry()
Destructor.
DDXMLElement * getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
static value_type & instance()
ClhepEvaluator & evaluator()
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.