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 namespace edm {
13 
14  class ParameterSet;
15  class DocFormatHelper;
16 
18 
20  public:
21  ~ParameterWildcardBase() override;
22 
23  ParameterTypes type() const { return type_; }
24  bool isTracked() const { return isTracked_; }
26 
27  protected:
29 
30  void throwIfInvalidPattern(char const* pattern) const;
31  void throwIfInvalidPattern(std::string const& pattern) const;
32 
33  void validateMatchingNames(std::vector<std::string> const& matchingNames,
34  std::set<std::string>& validatedLabels,
35  bool optional) const;
36 
37  private:
38  void checkAndGetLabelsAndTypes_(std::set<std::string>& usedLabels,
39  std::set<ParameterTypes>& parameterTypes,
40  std::set<ParameterTypes>& wildcardTypes) const override;
41 
42  void writeCfi_(std::ostream& os, bool& startWithComma, int indentation, bool& wroteSomething) const override;
43 
44  void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
45 
46  bool partiallyExists_(ParameterSet const& pset) const override;
47 
48  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
49 
51  bool isTracked_;
53 
54  // In the future we may want to add a string for the label if
55  // default values are added to be inserted into a ParameterSet
56  // when missing.
57 
58  // In the future we may want to add a string for the wildcard
59  // pattern if we implement regular expressions, globbing, or some
60  // other kind of wildcard patterns other than "*".
61  };
62 } // namespace edm
63 #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)