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_(
43  std::ostream& os, bool optional, bool& startWithComma, int indentation, bool& wroteSomething) const override;
44 
45  void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
46 
47  bool partiallyExists_(ParameterSet const& pset) const override;
48 
49  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
50 
52  bool isTracked_;
54 
55  // In the future we may want to add a string for the label if
56  // default values are added to be inserted into a ParameterSet
57  // when missing.
58 
59  // In the future we may want to add a string for the wildcard
60  // pattern if we implement regular expressions, globbing, or some
61  // other kind of wildcard patterns other than "*".
62  };
63 } // namespace edm
64 #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_
optional
Definition: Types.py:167
WildcardValidationCriteria criteria() const
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 writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, bool &wroteSomething) const override
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)