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 
6 #include <CLHEP/Evaluator/Evaluator.h>
7 #include <string>
8 #include <map>
9 #include <memory>
10 
11 class DDXMLElement;
12 
14 
24 {
25 
26  public:
27  typedef std::map <std::string, std::shared_ptr<DDXMLElement> > RegistryMap;
28 
30 
32 
35 
37 
42  std::shared_ptr<DDXMLElement> getElement(const std::string& name);
43 
45 
46  private:
47  RegistryMap registry_;
49 };
50 
51 #endif
ClhepEvaluator evaluator_
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
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.