CMS 3D CMS Logo

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

List of all members.

Public Member Functions

virtual ParameterDescriptionNodeclone () const
 ParameterWildcard (char const *pattern, WildcardValidationCriteria criteria, bool isTracked)
 ParameterWildcard (std::string const &pattern, WildcardValidationCriteria criteria, bool isTracked)
virtual ~ParameterWildcard ()

Private Member Functions

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

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]
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().

                                                                                                :
      ParameterWildcardBase(ParameterTypeToEnum::toEnum<T>(), isTracked, criteria) {
      throwIfInvalidPattern(pattern);
    }
template<class T >
virtual edm::ParameterWildcard< T >::~ParameterWildcard ( ) [inline, virtual]

Definition at line 36 of file ParameterWildcard.h.

{ }

Member Function Documentation

template<class T >
virtual ParameterDescriptionNode* edm::ParameterWildcard< T >::clone ( void  ) const [inline, virtual]

Implements edm::ParameterDescriptionNode.

Definition at line 38 of file ParameterWildcard.h.

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

                                                    {
      return new ParameterWildcard(*this);
    }
template<class T >
virtual bool edm::ParameterWildcard< T >::exists_ ( ParameterSet const &  pset) const [inline, private, virtual]

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.

                                                         {

      if (criteria() == RequireZeroOrMore) return true;

      std::vector<std::string> parameterNames  = pset.getParameterNamesForType<T>(isTracked());

      if (criteria() == RequireAtLeastOne) return parameterNames.size() >= 1U;
      return parameterNames.size() == 1U;
    }
template<class T >
virtual void edm::ParameterWildcard< T >::validate_ ( ParameterSet pset,
std::set< std::string > &  validatedLabels,
bool  optional 
) const [inline, private, virtual]

Implements edm::ParameterDescriptionNode.

Definition at line 44 of file ParameterWildcard.h.

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

                                                {

      std::vector<std::string> parameterNames  = pset.getParameterNamesForType<T>(isTracked());
      validateMatchingNames(parameterNames, validatedLabels, optional);

    }