CMS 3D CMS Logo

AllowedLabelsDescriptionBase.h
Go to the documentation of this file.
1 #ifndef FWCore_ParameterSet_AllowedLabelsDescriptionBase_h
2 #define FWCore_ParameterSet_AllowedLabelsDescriptionBase_h
3 
6 
7 #include <vector>
8 #include <string>
9 #include <set>
10 #include <iosfwd>
11 
12 namespace edm {
13 
14  class ParameterSet;
15 
17  public:
18 
20 
21  ParameterTypes type() const { return type_; }
22  bool isTracked() const { return isTracked_; }
23 
24  protected:
25 
27 
28  AllowedLabelsDescriptionBase(char const* label, ParameterTypes iType, bool isTracked);
29 
30  void printNestedContentBase_(std::ostream & os,
31  bool optional,
32  DocFormatHelper & dfh) const;
33 
34  private:
35 
36  void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
37  std::set<ParameterTypes> & parameterTypes,
38  std::set<ParameterTypes> & wildcardTypes) const override;
39 
41  std::set<std::string> & validatedLabels,
42  bool optional) const override;
43 
44  void writeCfi_(std::ostream & os,
45  bool & startWithComma,
46  int indentation,
47  bool & wroteSomething) const override;
48 
49 
50  void print_(std::ostream & os,
51  bool optional,
52  bool writeToCfi,
53  DocFormatHelper & dfh) const override;
54 
55  bool hasNestedContent_() const override;
56 
57  void printNestedContent_(std::ostream & os,
58  bool optional,
59  DocFormatHelper & dfh) const override;
60 
61  bool exists_(ParameterSet const& pset) const override;
62 
63  bool partiallyExists_(ParameterSet const& pset) const override;
64 
65  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
66 
67  virtual void validateAllowedLabel_(std::string const& allowedLabel,
68  ParameterSet & pset,
69  std::set<std::string> & validatedLabels) const = 0;
70 
73  bool isTracked_;
74  };
75 }
76 
77 #endif
bool exists_(ParameterSet const &pset) const override
virtual void validateAllowedLabel_(std::string const &allowedLabel, ParameterSet &pset, std::set< std::string > &validatedLabels) const =0
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const override
AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
bool partiallyExists_(ParameterSet const &pset) const override
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
void printNestedContentBase_(std::ostream &os, bool optional, DocFormatHelper &dfh) const
ParameterDescription< std::vector< std::string > > parameterHoldingLabels_
HLT enums.
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const override