CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ParameterWildcardBase.h
Go to the documentation of this file.
1 
2 #ifndef FWCore_ParameterSet_ParameterWildcardBase_h
3 #define FWCore_ParameterSet_ParameterWildcardBase_h
4 
6 
7 #include <set>
8 #include <string>
9 #include <iosfwd>
10 #include <vector>
11 
12 
13 namespace edm {
14 
15  class ParameterSet;
16  class DocFormatHelper;
17 
22  };
23 
25  {
26  public:
27  virtual ~ParameterWildcardBase();
28 
29  ParameterTypes type() const { return type_; }
30  bool isTracked() const { return isTracked_; }
32 
33  protected:
35  bool isTracked,
37  );
38 
39  void throwIfInvalidPattern(char const* pattern) const;
40  void throwIfInvalidPattern(std::string const& pattern) const;
41 
42  void validateMatchingNames(std::vector<std::string> const& matchingNames,
43  std::set<std::string> & validatedLabels,
44  bool optional) const;
45 
46  private:
47 
48  virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
49  std::set<ParameterTypes> & parameterTypes,
50  std::set<ParameterTypes> & wildcardTypes) const;
51 
52  virtual void writeCfi_(std::ostream & os,
53  bool & startWithComma,
54  int indentation,
55  bool & wroteSomething) const;
56 
57  virtual void print_(std::ostream & os,
58  bool optional,
59  bool writeToCfi,
60  DocFormatHelper & dfh);
61 
62  virtual bool partiallyExists_(ParameterSet const& pset) const;
63 
64  virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
65 
67  bool isTracked_;
69 
70  // In the future we may want to add a string for the label if
71  // default values are added to be inserted into a ParameterSet
72  // when missing.
73 
74  // In the future we may want to add a string for the wildcard
75  // pattern if we implement regular expressions, globbing, or some
76  // other kind of wildcard patterns other than "*".
77  };
78 }
79 #endif
WildcardValidationCriteria
ParameterTypes type() const
virtual void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const
WildcardValidationCriteria criteria_
virtual bool partiallyExists_(ParameterSet const &pset) const
WildcardValidationCriteria criteria() const
void throwIfInvalidPattern(char const *pattern) const
virtual void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
virtual void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh)
virtual int howManyXORSubNodesExist_(ParameterSet const &pset) const
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)