CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DetectorDescription/Parser/src/DDLVector.h

Go to the documentation of this file.
00001 #ifndef DDL_Vector_H
00002 #define DDL_Vector_H
00003 
00004 // -------------------------------------------------------------------------
00005 // Includes
00006 // -------------------------------------------------------------------------
00007 #include "DDXMLElement.h"
00008 #include "DetectorDescription/Core/interface/DDVector.h"
00009 #include "DetectorDescription/Base/interface/DDTypes.h"
00010 
00011 #include <string>
00012 #include <vector>
00013 #include <map>
00014 
00015 class VectorMakeDouble;
00016 class VectorMakeString;
00017 
00019 
00031 class DDLVector : public DDXMLElement
00032 {
00033 
00034   friend class VectorMakeDouble;
00035   friend class VectorMakeString;
00036 
00037  public:
00038 
00039   DDLVector( DDLElementRegistry* myreg );
00040 
00041   ~DDLVector();
00042 
00043   void preProcessElement (const std::string& name, const std::string& nmspace, DDCompactView& cpv);
00044 
00045   void processElement (const std::string& name, const std::string& nmspace, DDCompactView& cpv);
00046 
00047   void clearall();
00048 
00049   ReadMapType<std::vector<double> >  & getMapOfVectors();
00050   ReadMapType<std::vector<std::string> >  & getMapOfStrVectors();
00051   
00052 
00053  private:
00054   std::vector<double> pVector;
00055   std::vector<std::string> pStrVector;
00056   ReadMapType< std::vector<double> > pVecMap;
00057   ReadMapType< std::vector<std::string> > pStrVecMap;
00058   std::string pNameSpace;
00059   void errorOut(const char* str) const;
00060   void do_makeDouble(char const* str, char const* end);
00061   void do_makeString(char const* str, char const* end);
00062   bool parse_numbers(char const* str) const;
00063   bool parse_strings(char const* str) const;
00064 };
00065 #endif