CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDLVector.h
Go to the documentation of this file.
1 #ifndef DDL_Vector_H
2 #define DDL_Vector_H
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "DDXMLElement.h"
12 
13 class DDCompactView;
14 class DDLElementRegistry;
15 class VectorMakeDouble;
16 class VectorMakeString;
17 
19 
31 class DDLVector final : public DDXMLElement
32 {
33 
34  friend class VectorMakeDouble;
35  friend class VectorMakeString;
36 
37  public:
38 
39  DDLVector( 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  void clearall();
44 
47 
48  private:
49  std::vector<double> pVector;
50  std::vector<std::string> pStrVector;
54  void errorOut(const char* str) const;
55  void do_makeDouble(char const* str, char const* end);
56  void do_makeString(char const* str, char const* end);
57  bool parse_numbers(char const* str) const;
58  bool parse_strings(char const* str) const;
59 };
60 
61 #endif
std::vector< double > pVector
Definition: DDLVector.h:49
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLVector.cc:77
DDLVector handles Rotation and ReflectionRotation elements.
Definition: DDLVector.h:31
DDLVector(DDLElementRegistry *myreg)
Definition: DDLVector.cc:72
ReadMapType< std::vector< std::string > > & getMapOfStrVectors()
Definition: DDLVector.cc:163
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void do_makeDouble(char const *str, char const *end)
Definition: DDLVector.cc:169
ReadMapType< std::vector< double > > & getMapOfVectors()
Definition: DDLVector.cc:157
void do_makeString(char const *str, char const *end)
Definition: DDLVector.cc:177
virtual std::vector< DDXMLAttribute >::const_iterator end(void)
void errorOut(const char *str) const
Definition: DDLVector.cc:184
std::string pNameSpace
Definition: DDLVector.h:53
bool parse_strings(char const *str) const
Definition: DDLVector.cc:62
a std::map&lt;std::string,YourType&gt; that offers a const operator[key]; if key is not stored in the std::...
Definition: DDReadMapType.h:13
void clearall()
Definition: DDLVector.cc:193
std::vector< std::string > pStrVector
Definition: DDLVector.h:50
ReadMapType< std::vector< double > > pVecMap
Definition: DDLVector.h:51
bool parse_numbers(char const *str) const
Definition: DDLVector.cc:51
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
ReadMapType< std::vector< std::string > > pStrVecMap
Definition: DDLVector.h:52
The main class for processing parsed elements.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLVector.cc:85