CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::ParameterDescriptionCases< T > Class Template Reference

#include <ParameterDescriptionCases.h>

Public Types

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

std::unique_ptr< CaseMapcaseMap_
 
bool duplicateCaseValues_
 

Friends

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

Detailed Description

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

Definition at line 35 of file ParameterDescriptionCases.h.

Member Typedef Documentation

◆ CaseMap

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

Definition at line 37 of file ParameterDescriptionCases.h.

Constructor & Destructor Documentation

◆ ParameterDescriptionCases()

template<typename T >
edm::ParameterDescriptionCases< T >::ParameterDescriptionCases ( T const &  caseValue,
std::unique_ptr< ParameterDescriptionNode node 
)
inlineprivate

Definition at line 67 of file ParameterDescriptionCases.h.

References edm::ParameterDescriptionCases< T >::caseMap_, and eostools::move().

68  : caseMap_(new CaseMap), duplicateCaseValues_(false) {
69  std::pair<T, edm::value_ptr<ParameterDescriptionNode> > casePair(caseValue,
71  caseMap_->insert(casePair);
72  (*caseMap_)[caseValue] = std::move(node);
73  }
std::unique_ptr< CaseMap > caseMap_
def move(src, dest)
Definition: eostools.py:511
std::map< T, edm::value_ptr< ParameterDescriptionNode > > CaseMap

Member Function Documentation

◆ caseMap()

template<typename T >
std::unique_ptr<CaseMap> edm::ParameterDescriptionCases< T >::caseMap ( )
inline

Definition at line 49 of file ParameterDescriptionCases.h.

References edm::ParameterDescriptionCases< T >::caseMap_, and eostools::move().

49 { return std::move(caseMap_); }
std::unique_ptr< CaseMap > caseMap_
def move(src, dest)
Definition: eostools.py:511

◆ duplicateCaseValues()

template<typename T >
bool edm::ParameterDescriptionCases< T >::duplicateCaseValues ( ) const
inline

◆ insert()

template<typename T >
void edm::ParameterDescriptionCases< T >::insert ( T  caseValue,
std::unique_ptr< ParameterDescriptionNode node 
)
inline

Definition at line 39 of file ParameterDescriptionCases.h.

References edm::ParameterDescriptionCases< T >::caseMap_, edm::ParameterDescriptionCases< T >::duplicateCaseValues_, eostools::move(), and mps_update::status.

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

39  {
40  std::pair<T, edm::value_ptr<ParameterDescriptionNode> > casePair(caseValue,
42  std::pair<typename CaseMap::iterator, bool> status;
43  status = caseMap_->insert(casePair);
44  (*caseMap_)[caseValue] = std::move(node);
45  if (status.second == false)
46  duplicateCaseValues_ = true;
47  }
std::unique_ptr< CaseMap > caseMap_
def move(src, dest)
Definition: eostools.py:511

Friends And Related Function Documentation

◆ operator>> [1/4]

template<typename T >
std::unique_ptr<ParameterDescriptionCases<bool> > operator>> ( bool  caseValue,
std::unique_ptr< ParameterDescriptionNode node 
)
friend

Definition at line 158 of file ParameterDescriptionNode.cc.

159  {
160  return std::unique_ptr<ParameterDescriptionCases<bool>>(
161  new ParameterDescriptionCases<bool>(caseValue, std::move(node)));
162  }
def move(src, dest)
Definition: eostools.py:511

◆ operator>> [2/4]

template<typename T >
std::unique_ptr<ParameterDescriptionCases<int> > operator>> ( int  caseValue,
std::unique_ptr< ParameterDescriptionNode node 
)
friend

Definition at line 164 of file ParameterDescriptionNode.cc.

165  {
166  return std::unique_ptr<ParameterDescriptionCases<int>>(
167  new ParameterDescriptionCases<int>(caseValue, std::move(node)));
168  }
def move(src, dest)
Definition: eostools.py:511

◆ operator>> [3/4]

template<typename T >
std::unique_ptr<ParameterDescriptionCases<std::string> > operator>> ( std::string const &  caseValue,
std::unique_ptr< ParameterDescriptionNode node 
)
friend

Definition at line 170 of file ParameterDescriptionNode.cc.

171  {
172  return std::unique_ptr<ParameterDescriptionCases<std::string>>(
173  new ParameterDescriptionCases<std::string>(caseValue, std::move(node)));
174  }
def move(src, dest)
Definition: eostools.py:511

◆ operator>> [4/4]

template<typename T >
std::unique_ptr<ParameterDescriptionCases<std::string> > operator>> ( char const *  caseValue,
std::unique_ptr< ParameterDescriptionNode node 
)
friend

Definition at line 176 of file ParameterDescriptionNode.cc.

177  {
178  std::string caseValueString(caseValue);
179  return std::unique_ptr<ParameterDescriptionCases<std::string>>(
180  new ParameterDescriptionCases<std::string>(caseValue, std::move(node)));
181  }
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ caseMap_

template<typename T >
std::unique_ptr<CaseMap> edm::ParameterDescriptionCases< T >::caseMap_
private

◆ duplicateCaseValues_

template<typename T >
bool edm::ParameterDescriptionCases< T >::duplicateCaseValues_
private