CMS 3D CMS Logo

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  ~ParameterWildcardBase() override;
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  void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
49  std::set<ParameterTypes> & parameterTypes,
50  std::set<ParameterTypes> & wildcardTypes) const override;
51 
52  void writeCfi_(std::ostream & os,
53  bool & startWithComma,
54  int indentation,
55  bool & wroteSomething) const override;
56 
57  void print_(std::ostream & os,
58  bool optional,
59  bool writeToCfi,
60  DocFormatHelper & dfh) const override;
61 
62  bool partiallyExists_(ParameterSet const& pset) const override;
63 
64  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
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
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const override
bool partiallyExists_(ParameterSet const &pset) const override
ParameterTypes type() const
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
WildcardValidationCriteria criteria_
WildcardValidationCriteria criteria() const
void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const override
void throwIfInvalidPattern(char const *pattern) const
HLT enums.
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)