CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDPartSelection.h
Go to the documentation of this file.
1 #ifndef DDPartSelection_h
2 #define DDPartSelection_h
3 
4 #include <vector>
5 #include <string>
6 #include <iostream>
8 
9 //#include <boost/spirit.hpp>
10 
11 
12 class DDLogicalPart;
13 
14 enum ddselection_type { ddunknown, // -> (should never appear!)
15  ddanynode, // -> //*
16  ddanychild, // -> /*
17  ddanylogp, // -> //NameOfLogicalPart
18  ddanyposp, // -> //NameOfLogicalPart[copyno]
19  ddchildlogp, // -> /NameOfLogicalPart
20  ddchildposp // -> /NameOfLogicalPart[copyno]
21  };
22 
23 //typedef DDRedirect<DDLogicalPartImpl> lpredir_type; // logical-part-redirection_type
24 
26 {
27  DDPartSelRegExpLevel(const std::string & ns, const std::string & nm, int cpn, ddselection_type t, bool isRegex=false)
28  : ns_(ns), nm_(nm), copyno_(cpn), selectionType_(t), isRegex_(isRegex) { }
29  std::string ns_, nm_;
30  int copyno_;
32  bool isRegex_;
33 };
34 
35 
37 {
40  int copyno_;
42 };
43 
44 
45 class DDPartSelection : public std::vector<DDPartSelectionLevel>
46 {
47 public:
48  DDPartSelection() : std::vector<DDPartSelectionLevel>() { }
49 };
50 /*
51 class DDPartSelection : public std::vector<DDPartSelectionLevel>
52 {
53 public:
54  DDPartSelection() { }; // to use it in stl-containers
55  DDPartSelection(const std::string & selectionString);
56 
57  ~DDPartSelection() { }
58 
59 };
60 */
61 
62 
63 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
64 std::ostream & operator<<(std::ostream &, const std::vector<DDPartSelection> &);
65 
66 void DDTokenize2(const std::string & selectionString, std::vector<DDPartSelRegExpLevel> & result);
67 void DDTokenize(const std::string & selectionString, std::vector<DDPartSelRegExpLevel> & result);
68 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
69 
70 #endif
DDPartSelRegExpLevel(const std::string &ns, const std::string &nm, int cpn, ddselection_type t, bool isRegex=false)
ddselection_type selectionType_
DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type)
void DDTokenize(const std::string &selectionString, std::vector< DDPartSelRegExpLevel > &result)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
ddselection_type
tuple result
Definition: query.py:137
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
ddselection_type selectionType_
void DDTokenize2(const std::string &selectionString, std::vector< DDPartSelRegExpLevel > &result)