CMS 3D CMS Logo

DDLMap.h
Go to the documentation of this file.
1 #ifndef DDL_Map_H
2 #define DDL_Map_H
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
11 
12 class DDCompactView;
13 class DDLElementRegistry;
14 
15 class MapPair;
16 class MapMakeName;
17 class MapMakeDouble;
18 
20 
33 class DDLMap final : public DDXMLElement {
34  friend class MapPair;
35  friend class MapMakeName;
36  friend class MapMakeDouble;
37 
38 public:
39  DDLMap(DDLElementRegistry* myreg);
40 
41  void preProcessElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
42  void processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
43 
45 
46 private:
49  double pDouble;
52 
53  void errorOut(const char* str);
54 
55  void do_pair(char const* str, char const* end);
56 
57  void do_makeName(char const* str, char const* end);
58 
59  void do_makeDouble(char const* str, char const* end);
60 };
61 
62 #endif
DDLMap(DDLElementRegistry *myreg)
Definition: DDLMap.cc:63
std::string pNameSpace
Definition: DDLMap.h:51
std::string pName
Definition: DDLMap.h:50
ReadMapType< std::map< std::string, double > > & getMapOfMaps(void)
Definition: DDLMap.cc:154
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLMap.cc:96
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
virtual std::vector< DDXMLAttribute >::const_iterator end(void)
a std::map<std::string,YourType> that offers a const operator[key]; if key is not stored in the std::...
Definition: DDReadMapType.h:14
void do_makeName(char const *str, char const *end)
Definition: DDLMap.cc:140
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLMap.cc:88
void do_pair(char const *str, char const *end)
Definition: DDLMap.cc:138
ReadMapType< std::map< std::string, double > > pMapMap
Definition: DDLMap.h:48
DDLMap handles Map container.
Definition: DDLMap.h:33
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
double pDouble
Definition: DDLMap.h:49
void errorOut(const char *str)
Definition: DDLMap.cc:147
The main class for processing parsed elements.
void do_makeDouble(char const *str, char const *end)
Definition: DDLMap.cc:142
#define str(s)
dd_map_type pMap
Definition: DDLMap.h:47