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 {
35  friend class MapPair;
36  friend class MapMakeName;
37  friend class MapMakeDouble;
38 
39 public:
40 
41  DDLMap( DDLElementRegistry* myreg );
42 
43  void preProcessElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv ) override;
44  void processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv ) override;
45 
47 
48 private:
51  double pDouble;
54 
55  void errorOut( const char* str );
56 
57  void do_pair( char const* str, char const* end );
58 
59  void do_makeName( char const* str, char const* end );
60 
61  void do_makeDouble( char const* str, char const* end );
62 };
63 
64 #endif
ReadMapType< std::map< std::string, double > > pMapMap
Definition: DDLMap.h:50
DDLMap(DDLElementRegistry *myreg)
Definition: DDLMap.cc:56
std::string pNameSpace
Definition: DDLMap.h:53
std::string pName
Definition: DDLMap.h:52
ReadMapType< std::map< std::string, double > > & getMapOfMaps(void)
Definition: DDLMap.cc:199
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLMap.cc:118
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:13
void do_makeName(char const *str, char const *end)
Definition: DDLMap.cc:177
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLMap.cc:108
void do_pair(char const *str, char const *end)
Definition: DDLMap.cc:171
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:51
void errorOut(const char *str)
Definition: DDLMap.cc:190
The main class for processing parsed elements.
void do_makeDouble(char const *str, char const *end)
Definition: DDLMap.cc:183
#define str(s)
dd_map_type pMap
Definition: DDLMap.h:49