CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
edm::ParameterSwitch< T > Class Template Reference

#include <ParameterSwitch.h>

Inheritance diagram for edm::ParameterSwitch< T >:
edm::ParameterSwitchBase edm::ParameterDescriptionNode

Public Types

typedef std::map< T,
edm::value_ptr
< ParameterDescriptionNode > > 
CaseMap
 
typedef std::map< T,
edm::value_ptr
< ParameterDescriptionNode >
>::const_iterator 
CaseMapConstIter
 

Public Member Functions

virtual ParameterDescriptionNodeclone () const
 
 ParameterSwitch (ParameterDescription< T > const &switchParameter, std::auto_ptr< ParameterDescriptionCases< T > > cases)
 
- Public Member Functions inherited from edm::ParameterSwitchBase
virtual ~ParameterSwitchBase ()
 
- Public Member Functions inherited from edm::ParameterDescriptionNode
void checkAndGetLabelsAndTypes (std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const
 
std::string const & comment () const
 
bool exists (ParameterSet const &pset) const
 
bool hasNestedContent ()
 
int howManyXORSubNodesExist (ParameterSet const &pset) const
 
bool partiallyExists (ParameterSet const &pset) const
 
void print (std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh)
 
void printNestedContent (std::ostream &os, bool optional, DocFormatHelper &dfh)
 
void setComment (std::string const &value)
 
void setComment (char const *value)
 
void validate (ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
 
void writeCfi (std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const
 
virtual ~ParameterDescriptionNode ()
 

Private Member Functions

virtual void checkAndGetLabelsAndTypes_ (std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const
 
virtual bool exists_ (ParameterSet const &pset) const
 
virtual void print_ (std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh)
 
virtual void printNestedContent_ (std::ostream &os, bool optional, DocFormatHelper &dfh)
 
virtual void validate_ (ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
 
virtual void writeCfi_ (std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const
 

Static Private Member Functions

static void checkCaseLabels (std::pair< T, edm::value_ptr< ParameterDescriptionNode > > const &thePair, std::set< std::string > &labels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes)
 

Private Attributes

CaseMap cases_
 
ParameterDescription< Tswitch_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::ParameterDescriptionNode
static void printSpaces (std::ostream &os, int n)
 
- Protected Member Functions inherited from edm::ParameterSwitchBase
virtual bool hasNestedContent_ ()
 
void insertAndCheckLabels (std::string const &switchLabel, std::set< std::string > &usedLabels, std::set< std::string > &labels) const
 
void insertAndCheckTypes (ParameterTypes switchType, std::set< ParameterTypes > const &caseParameterTypes, std::set< ParameterTypes > const &caseWildcardTypes, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const
 
void printBase (std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh, std::string const &switchLabel, bool isTracked, std::string const &typeString) const
 
void printNestedContentBase (std::ostream &os, DocFormatHelper &dfh, DocFormatHelper &new_dfh, std::string const &switchLabel)
 
void throwDuplicateCaseValues (std::string const &switchLabel) const
 
void throwNoCaseForDefault (std::string const &switchLabel) const
 
void throwNoCaseForSwitchValue (std::string const &message) const
 
- Static Protected Member Functions inherited from edm::ParameterSwitchBase
template<typename T >
static void printCaseT (std::pair< T, edm::value_ptr< ParameterDescriptionNode > > const &p, std::ostream &os, bool optional, DocFormatHelper &dfh, std::string const &switchLabel)
 
- Protected Attributes inherited from edm::ParameterDescriptionNode
std::string comment_
 

Detailed Description

template<class T>
class edm::ParameterSwitch< T >

Definition at line 25 of file ParameterSwitch.h.

Member Typedef Documentation

template<class T >
typedef std::map<T, edm::value_ptr<ParameterDescriptionNode> > edm::ParameterSwitch< T >::CaseMap

Definition at line 28 of file ParameterSwitch.h.

template<class T >
typedef std::map<T, edm::value_ptr<ParameterDescriptionNode> >::const_iterator edm::ParameterSwitch< T >::CaseMapConstIter

Definition at line 29 of file ParameterSwitch.h.

Constructor & Destructor Documentation

template<class T >
edm::ParameterSwitch< T >::ParameterSwitch ( ParameterDescription< T > const &  switchParameter,
std::auto_ptr< ParameterDescriptionCases< T > >  cases 
)
inline

Definition at line 31 of file ParameterSwitch.h.

Member Function Documentation

template<class T >
virtual void edm::ParameterSwitch< T >::checkAndGetLabelsAndTypes_ ( std::set< std::string > &  usedLabels,
std::set< ParameterTypes > &  parameterTypes,
std::set< ParameterTypes > &  wildcardTypes 
) const
inlineprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 47 of file ParameterSwitch.h.

template<class T >
static void edm::ParameterSwitch< T >::checkCaseLabels ( std::pair< T, edm::value_ptr< ParameterDescriptionNode > > const &  thePair,
std::set< std::string > &  labels,
std::set< ParameterTypes > &  parameterTypes,
std::set< ParameterTypes > &  wildcardTypes 
)
inlinestaticprivate

Definition at line 173 of file ParameterSwitch.h.

template<class T >
virtual ParameterDescriptionNode* edm::ParameterSwitch< T >::clone ( void  ) const
inlinevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 41 of file ParameterSwitch.h.

template<class T >
virtual bool edm::ParameterSwitch< T >::exists_ ( ParameterSet const &  pset) const
inlineprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 171 of file ParameterSwitch.h.

template<class T >
virtual void edm::ParameterSwitch< T >::print_ ( std::ostream &  os,
bool  optional,
bool  writeToCfi,
DocFormatHelper dfh 
)
inlineprivatevirtual

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 124 of file ParameterSwitch.h.

template<class T >
virtual void edm::ParameterSwitch< T >::printNestedContent_ ( std::ostream &  os,
bool  optional,
DocFormatHelper dfh 
)
inlineprivatevirtual

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 131 of file ParameterSwitch.h.

template<class T >
virtual void edm::ParameterSwitch< T >::validate_ ( ParameterSet pset,
std::set< std::string > &  validatedLabels,
bool  optional 
) const
inlineprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 75 of file ParameterSwitch.h.

template<class T >
virtual void edm::ParameterSwitch< T >::writeCfi_ ( std::ostream &  os,
bool &  startWithComma,
int  indentation,
bool &  wroteSomething 
) const
inlineprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 112 of file ParameterSwitch.h.

Member Data Documentation

template<class T >
CaseMap edm::ParameterSwitch< T >::cases_
private

Definition at line 181 of file ParameterSwitch.h.

template<class T >
ParameterDescription<T> edm::ParameterSwitch< T >::switch_
private

Definition at line 180 of file ParameterSwitch.h.