Skip to content

Commit

Permalink
Merge pull request #20199 from wddgit/codeChecksParameterSet
Browse files Browse the repository at this point in the history
Cleanup suggested by scram b code-checks
  • Loading branch information
cmsbuild committed Aug 20, 2017
2 parents 689722a + 660c4f2 commit 1f919e0
Show file tree
Hide file tree
Showing 15 changed files with 310 additions and 310 deletions.
44 changes: 22 additions & 22 deletions FWCore/ParameterSet/interface/ANDGroupDescription.h
Expand Up @@ -29,43 +29,43 @@ namespace edm {
ANDGroupDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
std::unique_ptr<ParameterDescriptionNode> node_right);

virtual ParameterDescriptionNode* clone() const {
ParameterDescriptionNode* clone() const override {
return new ANDGroupDescription(*this);
}

private:

virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const;
void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const override;

virtual void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const;
void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const override;

virtual void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const;
void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const override;

virtual void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const;
void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const override;

virtual bool hasNestedContent_() const {
bool hasNestedContent_() const override {
return true;
}

virtual void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const;
void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const override;

virtual bool exists_(ParameterSet const& pset) const;
bool exists_(ParameterSet const& pset) const override;

virtual bool partiallyExists_(ParameterSet const& pset) const;
bool partiallyExists_(ParameterSet const& pset) const override;

virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
int howManyXORSubNodesExist_(ParameterSet const& pset) const override;


void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
Expand Down
36 changes: 18 additions & 18 deletions FWCore/ParameterSet/interface/AllowedLabelsDescription.h
Expand Up @@ -34,15 +34,15 @@ namespace edm {
{
}

virtual ParameterDescriptionNode* clone() const {
ParameterDescriptionNode* clone() const override {
return new AllowedLabelsDescription(*this);
}

private:

virtual void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
std::set<std::string> & validatedLabels) const {
void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
std::set<std::string> & validatedLabels) const override {
if (pset.existsAs<T>(allowedLabel, isTracked())) {
validatedLabels.insert(allowedLabel);
}
Expand All @@ -67,17 +67,17 @@ namespace edm {
ParameterSetDescription const& value,
bool isTracked);

virtual ParameterDescriptionNode* clone() const;
ParameterDescriptionNode* clone() const override;

private:

virtual void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & helper) const;
void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & helper) const override;

virtual void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
std::set<std::string> & validatedLabels) const;
void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
std::set<std::string> & validatedLabels) const override;

value_ptr<ParameterSetDescription> psetDesc_;
};
Expand All @@ -100,17 +100,17 @@ namespace edm {
ParameterSetDescription const& value,
bool isTracked);

virtual ParameterDescriptionNode* clone() const;
ParameterDescriptionNode* clone() const override;

private:

virtual void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & helper) const;
void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & helper) const override;

virtual void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
std::set<std::string> & validatedLabels) const;
void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
std::set<std::string> & validatedLabels) const override;

value_ptr<ParameterSetDescription> psetDesc_;
};
Expand Down
44 changes: 22 additions & 22 deletions FWCore/ParameterSet/interface/AllowedLabelsDescriptionBase.h
Expand Up @@ -16,7 +16,7 @@ namespace edm {
class AllowedLabelsDescriptionBase : public ParameterDescriptionNode {
public:

virtual ~AllowedLabelsDescriptionBase();
~AllowedLabelsDescriptionBase() override;

ParameterTypes type() const { return type_; }
bool isTracked() const { return isTracked_; }
Expand All @@ -33,36 +33,36 @@ namespace edm {

private:

virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const;
void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const override;

virtual void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const;
void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const override;

virtual void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const;
void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const override;


virtual void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const;
void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const override;

virtual bool hasNestedContent_() const;
bool hasNestedContent_() const override;

virtual void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const;
void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const override;

virtual bool exists_(ParameterSet const& pset) const;
bool exists_(ParameterSet const& pset) const override;

virtual bool partiallyExists_(ParameterSet const& pset) const;
bool partiallyExists_(ParameterSet const& pset) const override;

virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
int howManyXORSubNodesExist_(ParameterSet const& pset) const override;

virtual void validateAllowedLabel_(std::string const& allowedLabel,
ParameterSet & pset,
Expand Down
36 changes: 18 additions & 18 deletions FWCore/ParameterSet/interface/EmptyGroupDescription.h
Expand Up @@ -16,35 +16,35 @@ namespace edm {
public:
EmptyGroupDescription();

virtual ParameterDescriptionNode* clone() const {
ParameterDescriptionNode* clone() const override {
return new EmptyGroupDescription(*this);
}

private:

virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const;
void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const override;

virtual void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const;
void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const override;

virtual void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const;
void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const override;

virtual void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const;
void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const override;

virtual bool exists_(ParameterSet const& pset) const;
bool exists_(ParameterSet const& pset) const override;

virtual bool partiallyExists_(ParameterSet const& pset) const;
bool partiallyExists_(ParameterSet const& pset) const override;

virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
};
}
#endif
44 changes: 22 additions & 22 deletions FWCore/ParameterSet/interface/IfExistsDescription.h
Expand Up @@ -29,43 +29,43 @@ namespace edm {
IfExistsDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
std::unique_ptr<ParameterDescriptionNode> node_right);

virtual ParameterDescriptionNode* clone() const {
ParameterDescriptionNode* clone() const override {
return new IfExistsDescription(*this);
}

private:

virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const;
void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const override;

virtual void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const;
void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const override;

virtual void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const;
void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const override;

virtual void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const;
void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const override;

virtual bool hasNestedContent_() const {
bool hasNestedContent_() const override {
return true;
}

virtual void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const;
void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const override;

virtual bool exists_(ParameterSet const& pset) const;
bool exists_(ParameterSet const& pset) const override;

virtual bool partiallyExists_(ParameterSet const& pset) const;
bool partiallyExists_(ParameterSet const& pset) const override;

virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
int howManyXORSubNodesExist_(ParameterSet const& pset) const override;

void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
std::set<std::string> const& labelsRight) const;
Expand Down
44 changes: 22 additions & 22 deletions FWCore/ParameterSet/interface/ORGroupDescription.h
Expand Up @@ -29,43 +29,43 @@ namespace edm {
ORGroupDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
std::unique_ptr<ParameterDescriptionNode> node_right);

virtual ParameterDescriptionNode* clone() const {
ParameterDescriptionNode* clone() const override {
return new ORGroupDescription(*this);
}

private:

virtual void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const;
void checkAndGetLabelsAndTypes_(std::set<std::string> & usedLabels,
std::set<ParameterTypes> & parameterTypes,
std::set<ParameterTypes> & wildcardTypes) const override;

virtual void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const;
void validate_(ParameterSet & pset,
std::set<std::string> & validatedLabels,
bool optional) const override;

virtual void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const;
void writeCfi_(std::ostream & os,
bool & startWithComma,
int indentation,
bool & wroteSomething) const override;

virtual void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const;
void print_(std::ostream & os,
bool optional,
bool writeToCfi,
DocFormatHelper & dfh) const override;

virtual bool hasNestedContent_() const {
bool hasNestedContent_() const override {
return true;
}

virtual void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const;
void printNestedContent_(std::ostream & os,
bool optional,
DocFormatHelper & dfh) const override;

virtual bool exists_(ParameterSet const& pset) const;
bool exists_(ParameterSet const& pset) const override;

virtual bool partiallyExists_(ParameterSet const& pset) const;
bool partiallyExists_(ParameterSet const& pset) const override;

virtual int howManyXORSubNodesExist_(ParameterSet const& pset) const;
int howManyXORSubNodesExist_(ParameterSet const& pset) const override;

void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
std::set<std::string> const& labelsRight) const;
Expand Down

0 comments on commit 1f919e0

Please sign in to comment.