CMS 3D CMS Logo

DDLElementRegistry.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_PARSER_DDL_ELEMENT_REGISTRY_H
2 #define DETECTOR_DESCRIPTION_PARSER_DDL_ELEMENT_REGISTRY_H
3 
5 #include "DetectorDescription/Base/interface/Singleton.icc"
7 
8 #include <CLHEP/Evaluator/Evaluator.h>
9 #include <string>
10 #include <map>
11 #include <memory>
12 
13 class DDXMLElement;
14 
16 
26 {
27 
28  public:
29  typedef std::map <std::string, std::shared_ptr<DDXMLElement> > RegistryMap;
30 
32 
34 
37 
39 
44  std::shared_ptr<DDXMLElement> getElement(const std::string& name);
45 
47 
48  private:
49  RegistryMap registry_;
50 };
51 
54 
55 #endif
static value_type & instance()
std::map< std::string, std::shared_ptr< DDXMLElement > > RegistryMap
ClhepEvaluator & evaluator()
std::shared_ptr< 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:48
DDI::Singleton< DDLElementRegistry > DDLGlobalRegistry
This is only here because of the boost::spirit::parser stuff of DDLMap needing to be re-designed...
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.