test
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 // -------------------------------------------------------------------------
5 // Includes
6 // -------------------------------------------------------------------------
7 #include "DDXMLElement.h"
10 
11 #include <string>
12 #include <vector>
13 #include <map>
14 
15 class VectorMakeDouble;
16 class VectorMakeString;
17 
19 
31 class DDLVector : public DDXMLElement
32 {
33 
34  friend class VectorMakeDouble;
35  friend class VectorMakeString;
36 
37  public:
38 
39  DDLVector( DDLElementRegistry* myreg );
40 
41  ~DDLVector();
42 
43  void preProcessElement (const std::string& name, const std::string& nmspace, DDCompactView& cpv);
44 
45  void processElement (const std::string& name, const std::string& nmspace, DDCompactView& cpv);
46 
47  void clearall();
48 
51 
52 
53  private:
54  std::vector<double> pVector;
55  std::vector<std::string> pStrVector;
59  void errorOut(const char* str) const;
60  void do_makeDouble(char const* str, char const* end);
61  void do_makeString(char const* str, char const* end);
62  bool parse_numbers(char const* str) const;
63  bool parse_strings(char const* str) const;
64 };
65 #endif
std::vector< double > pVector
Definition: DDLVector.h:54
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:169
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Processing the element.
Definition: DDLVector.cc:88
type of data representation of DDCompactView
Definition: DDCompactView.h:77
void do_makeDouble(char const *str, char const *end)
Definition: DDLVector.cc:175
ReadMapType< std::vector< double > > & getMapOfVectors()
Definition: DDLVector.cc:163
void do_makeString(char const *str, char const *end)
Definition: DDLVector.cc:183
virtual std::vector< DDXMLAttribute >::const_iterator end(void)
void errorOut(const char *str) const
Definition: DDLVector.cc:190
std::string pNameSpace
Definition: DDLVector.h:58
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 preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLVector.cc:80
void clearall()
Definition: DDLVector.cc:199
std::vector< std::string > pStrVector
Definition: DDLVector.h:55
ReadMapType< std::vector< double > > pVecMap
Definition: DDLVector.h:56
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:58
ReadMapType< std::vector< std::string > > pStrVecMap
Definition: DDLVector.h:57
The main class for processing parsed elements.
~DDLVector()
Definition: DDLVector.cc:76