CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends

edm::ParameterDescriptionCases< T > Class Template Reference

#include <ParameterDescriptionCases.h>

List of all members.

Public Types

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

Public Member Functions

std::auto_ptr< CaseMapcaseMap ()
bool duplicateCaseValues () const
void insert (T caseValue, std::auto_ptr< ParameterDescriptionNode > node)

Private Member Functions

 ParameterDescriptionCases (T const &caseValue, std::auto_ptr< ParameterDescriptionNode > node)

Private Attributes

std::auto_ptr< CaseMapcaseMap_
bool duplicateCaseValues_

Friends

std::auto_ptr
< ParameterDescriptionCases
< bool > > 
operator>> (bool caseValue, std::auto_ptr< ParameterDescriptionNode > node)
std::auto_ptr
< ParameterDescriptionCases
< std::string > > 
operator>> (char const *caseValue, std::auto_ptr< ParameterDescriptionNode > node)
std::auto_ptr
< ParameterDescriptionCases
< std::string > > 
operator>> (std::string const &caseValue, std::auto_ptr< ParameterDescriptionNode > node)
std::auto_ptr
< ParameterDescriptionCases
< int > > 
operator>> (int caseValue, std::auto_ptr< ParameterDescriptionNode > node)

Detailed Description

template<typename T>
class edm::ParameterDescriptionCases< T >

Definition at line 38 of file ParameterDescriptionCases.h.


Member Typedef Documentation

template<typename T >
typedef std::map<T, edm::value_ptr<ParameterDescriptionNode> > edm::ParameterDescriptionCases< T >::CaseMap

Definition at line 40 of file ParameterDescriptionCases.h.


Constructor & Destructor Documentation

template<typename T >
edm::ParameterDescriptionCases< T >::ParameterDescriptionCases ( T const &  caseValue,
std::auto_ptr< ParameterDescriptionNode node 
) [inline, private]

Definition at line 77 of file ParameterDescriptionCases.h.

References edm::ParameterDescriptionCases< T >::caseMap_, and python::Node::node.

                                                                                              :
      caseMap_(new CaseMap),
      duplicateCaseValues_(false)
    {
      std::pair<T, edm::value_ptr<ParameterDescriptionNode> > casePair(caseValue,edm::value_ptr<ParameterDescriptionNode>());
      caseMap_->insert(casePair);
      (*caseMap_)[caseValue] = node;
    }

Member Function Documentation

template<typename T >
std::auto_ptr<CaseMap> edm::ParameterDescriptionCases< T >::caseMap ( ) [inline]

Definition at line 50 of file ParameterDescriptionCases.h.

References edm::ParameterDescriptionCases< T >::caseMap_.

{ return caseMap_; }
template<typename T >
bool edm::ParameterDescriptionCases< T >::duplicateCaseValues ( ) const [inline]
template<typename T >
void edm::ParameterDescriptionCases< T >::insert ( caseValue,
std::auto_ptr< ParameterDescriptionNode node 
) [inline]

Definition at line 42 of file ParameterDescriptionCases.h.

References edm::ParameterDescriptionCases< T >::caseMap_, edm::ParameterDescriptionCases< T >::duplicateCaseValues_, python::Node::node, and ntuplemaker::status.

                                                                         {
      std::pair<T, edm::value_ptr<ParameterDescriptionNode> > casePair(caseValue,edm::value_ptr<ParameterDescriptionNode>());
      std::pair<typename CaseMap::iterator,bool> status;
      status = caseMap_->insert(casePair);
      (*caseMap_)[caseValue] = node;
      if (status.second == false) duplicateCaseValues_ = true;
    }

Friends And Related Function Documentation

template<typename T >
std::auto_ptr<ParameterDescriptionCases<bool> > operator>> ( bool  caseValue,
std::auto_ptr< ParameterDescriptionNode node 
) [friend]
template<typename T >
std::auto_ptr<ParameterDescriptionCases<std::string> > operator>> ( char const *  caseValue,
std::auto_ptr< ParameterDescriptionNode node 
) [friend]
template<typename T >
std::auto_ptr<ParameterDescriptionCases<std::string> > operator>> ( std::string const &  caseValue,
std::auto_ptr< ParameterDescriptionNode node 
) [friend]
template<typename T >
std::auto_ptr<ParameterDescriptionCases<int> > operator>> ( int  caseValue,
std::auto_ptr< ParameterDescriptionNode node 
) [friend]

Member Data Documentation

template<typename T >
std::auto_ptr<CaseMap> edm::ParameterDescriptionCases< T >::caseMap_ [private]
template<typename T >
bool edm::ParameterDescriptionCases< T >::duplicateCaseValues_ [private]