test
CMS 3D CMS Logo

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

#include <ParameterWildcard.h>

Inheritance diagram for edm::ParameterWildcard< T >:
edm::ParameterWildcardBase edm::ParameterDescriptionNode

Public Member Functions

virtual ParameterDescriptionNodeclone () const
 
 ParameterWildcard (std::string const &pattern, WildcardValidationCriteria criteria, bool isTracked)
 
 ParameterWildcard (char const *pattern, WildcardValidationCriteria criteria, bool isTracked)
 
virtual ~ParameterWildcard ()
 
- Public Member Functions inherited from edm::ParameterWildcardBase
WildcardValidationCriteria criteria () const
 
bool isTracked () const
 
ParameterTypes type () const
 
virtual ~ParameterWildcardBase ()
 
- 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 bool exists_ (ParameterSet const &pset) const
 
virtual void validate_ (ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
 

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::ParameterWildcardBase
 ParameterWildcardBase (ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
 
void throwIfInvalidPattern (char const *pattern) const
 
void throwIfInvalidPattern (std::string const &pattern) const
 
void validateMatchingNames (std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
 
- Protected Member Functions inherited from edm::ParameterDescriptionNode
virtual bool hasNestedContent_ ()
 
virtual void printNestedContent_ (std::ostream &, bool, DocFormatHelper &)
 
- Protected Attributes inherited from edm::ParameterDescriptionNode
std::string comment_
 

Detailed Description

template<class T>
class edm::ParameterWildcard< T >

Definition at line 22 of file ParameterWildcard.h.

Constructor & Destructor Documentation

template<class T >
edm::ParameterWildcard< T >::ParameterWildcard ( std::string const &  pattern,
WildcardValidationCriteria  criteria,
bool  isTracked 
)
inline

Definition at line 26 of file ParameterWildcard.h.

References edm::ParameterWildcardBase::throwIfInvalidPattern().

Referenced by edm::ParameterWildcard< T >::clone(), and edm::ParameterWildcard< ParameterSetDescription >::clone().

26  :
27  ParameterWildcardBase(ParameterTypeToEnum::toEnum<T>(), isTracked, criteria) {
29  }
WildcardValidationCriteria criteria() const
void throwIfInvalidPattern(char const *pattern) const
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
template<class T >
edm::ParameterWildcard< T >::ParameterWildcard ( char const *  pattern,
WildcardValidationCriteria  criteria,
bool  isTracked 
)
inline

Definition at line 31 of file ParameterWildcard.h.

References edm::ParameterWildcardBase::throwIfInvalidPattern().

31  :
32  ParameterWildcardBase(ParameterTypeToEnum::toEnum<T>(), isTracked, criteria) {
34  }
WildcardValidationCriteria criteria() const
void throwIfInvalidPattern(char const *pattern) const
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
template<class T >
virtual edm::ParameterWildcard< T >::~ParameterWildcard ( )
inlinevirtual

Definition at line 36 of file ParameterWildcard.h.

36 { }

Member Function Documentation

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

Implements edm::ParameterDescriptionNode.

Definition at line 38 of file ParameterWildcard.h.

References edm::ParameterWildcard< T >::ParameterWildcard().

38  {
39  return new ParameterWildcard(*this);
40  }
ParameterWildcard(std::string const &pattern, WildcardValidationCriteria criteria, bool isTracked)
template<class T >
virtual bool edm::ParameterWildcard< T >::exists_ ( ParameterSet const &  pset) const
inlineprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 53 of file ParameterWildcard.h.

References edm::ParameterWildcardBase::criteria(), edm::ParameterSet::getParameterNamesForType(), edm::ParameterWildcardBase::isTracked(), edm::RequireAtLeastOne, and edm::RequireZeroOrMore.

53  {
54 
55  if (criteria() == RequireZeroOrMore) return true;
56 
57  std::vector<std::string> parameterNames = pset.getParameterNamesForType<T>(isTracked());
58 
59  if (criteria() == RequireAtLeastOne) return parameterNames.size() >= 1U;
60  return parameterNames.size() == 1U;
61  }
WildcardValidationCriteria criteria() const
long double T
template<class T >
virtual void edm::ParameterWildcard< T >::validate_ ( ParameterSet pset,
std::set< std::string > &  validatedLabels,
bool  optional 
) const
inlineprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 44 of file ParameterWildcard.h.

References edm::ParameterSet::getParameterNamesForType(), edm::ParameterWildcardBase::isTracked(), and edm::ParameterWildcardBase::validateMatchingNames().

46  {
47 
48  std::vector<std::string> parameterNames = pset.getParameterNamesForType<T>(isTracked());
49  validateMatchingNames(parameterNames, validatedLabels, optional);
50 
51  }
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
long double T