Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:03:26

0001 #ifndef FWCore_ParameterSet_ORGroupDescription_h
0002 #define FWCore_ParameterSet_ORGroupDescription_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterDescriptionNode.h"
0005 
0006 #include "FWCore/Utilities/interface/value_ptr.h"
0007 
0008 #include <memory>
0009 #include <iosfwd>
0010 #include <set>
0011 #include <string>
0012 
0013 namespace edm {
0014 
0015   class ParameterSet;
0016   class DocFormatHelper;
0017 
0018   class ORGroupDescription : public ParameterDescriptionNode {
0019   public:
0020     ORGroupDescription(ParameterDescriptionNode const& node_left, ParameterDescriptionNode const& node_right);
0021 
0022     ORGroupDescription(std::unique_ptr<ParameterDescriptionNode> node_left, ParameterDescriptionNode const& node_right);
0023 
0024     ORGroupDescription(ParameterDescriptionNode const& node_left, std::unique_ptr<ParameterDescriptionNode> node_right);
0025 
0026     ORGroupDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
0027                        std::unique_ptr<ParameterDescriptionNode> node_right);
0028 
0029     ParameterDescriptionNode* clone() const override { return new ORGroupDescription(*this); }
0030 
0031   private:
0032     void checkAndGetLabelsAndTypes_(std::set<std::string>& usedLabels,
0033                                     std::set<ParameterTypes>& parameterTypes,
0034                                     std::set<ParameterTypes>& wildcardTypes) const override;
0035 
0036     void validate_(ParameterSet& pset, std::set<std::string>& validatedLabels, bool optional) const override;
0037 
0038     void writeCfi_(
0039         std::ostream& os, bool optional, bool& startWithComma, int indentation, bool& wroteSomething) const override;
0040 
0041     void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
0042 
0043     bool hasNestedContent_() const override { return true; }
0044 
0045     void printNestedContent_(std::ostream& os, bool optional, DocFormatHelper& dfh) const override;
0046 
0047     bool exists_(ParameterSet const& pset) const override;
0048 
0049     bool partiallyExists_(ParameterSet const& pset) const override;
0050 
0051     int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
0052 
0053     void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
0054                                 std::set<std::string> const& labelsRight) const;
0055 
0056     void throwIfDuplicateTypes(std::set<ParameterTypes> const& types1, std::set<ParameterTypes> const& types2) const;
0057 
0058     edm::value_ptr<ParameterDescriptionNode> node_left_;
0059     edm::value_ptr<ParameterDescriptionNode> node_right_;
0060   };
0061 }  // namespace edm
0062 #endif