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:
19 
20  ParameterTypes type() const { return type_; }
21  bool isTracked() const { return isTracked_; }
22 
23  protected:
25 
26  AllowedLabelsDescriptionBase(char const* label, ParameterTypes iType, bool isTracked);
27 
28  void printNestedContentBase_(std::ostream& os, bool optional, DocFormatHelper& dfh) const;
29 
30  private:
31  void checkAndGetLabelsAndTypes_(std::set<std::string>& usedLabels,
32  std::set<ParameterTypes>& parameterTypes,
33  std::set<ParameterTypes>& wildcardTypes) const override;
34 
35  void validate_(ParameterSet& pset, std::set<std::string>& validatedLabels, bool optional) const override;
36 
37  void writeCfi_(std::ostream& os, bool& startWithComma, int indentation, bool& wroteSomething) const override;
38 
39  void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
40 
41  bool hasNestedContent_() const override;
42 
43  void printNestedContent_(std::ostream& os, bool optional, DocFormatHelper& dfh) const override;
44 
45  bool exists_(ParameterSet const& pset) const override;
46 
47  bool partiallyExists_(ParameterSet const& pset) const override;
48 
49  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
50 
51  virtual void validateAllowedLabel_(std::string const& allowedLabel,
52  ParameterSet& pset,
53  std::set<std::string>& validatedLabels) const = 0;
54 
57  bool isTracked_;
58  };
59 } // namespace edm
60 
61 #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
char const * label
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