CMS 3D CMS Logo

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

#include <ExtensionCord.h>

Classes

struct  Holder
 

Public Member Functions

bool connected () const
 Returns true if the ExtensionCord is connected to an outlet and can therefore deliver data. More...
 
 ExtensionCord ()
 
const Tget () const
 
const Toperator* () const
 
const Toperator-> () const
 

Private Member Functions

void setGetter (extensioncord::ECGetterBase< T > *iGetter)
 

Private Attributes

std::shared_ptr< Holderholder_
 

Friends

class OutletBase< T >
 

Detailed Description

template<class T>
class edm::ExtensionCord< T >

Definition at line 35 of file ExtensionCord.h.

Constructor & Destructor Documentation

template<class T>
edm::ExtensionCord< T >::ExtensionCord ( )
inline

Definition at line 45 of file ExtensionCord.h.

45 : holder_(new Holder()) {}
std::shared_ptr< Holder > holder_
Definition: ExtensionCord.h:74

Member Function Documentation

template<class T>
bool edm::ExtensionCord< T >::connected ( ) const
inline

Returns true if the ExtensionCord is connected to an outlet and can therefore deliver data.

Definition at line 62 of file ExtensionCord.h.

References edm::ExtensionCord< T >::holder_.

Referenced by edm::ExtensionCord< T >::get().

62 { return 0 != holder_->getter_; }
std::shared_ptr< Holder > holder_
Definition: ExtensionCord.h:74
template<class T>
const T* edm::ExtensionCord< T >::get ( ) const
inline

Definition at line 51 of file ExtensionCord.h.

References edm::ExtensionCord< T >::connected(), Exception, edm::ExtensionCord< T >::holder_, and dataset::name.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

51  {
52  if (!this->connected()) {
53  throw cms::Exception("InvalidExtensionCord") << "an edm::ExtensionCord for type " << typeid(T).name()
54  << " was not connected to an outlet. This is a programming error.";
55  }
56  return holder_->getter_->get();
57  }
std::shared_ptr< Holder > holder_
Definition: ExtensionCord.h:74
bool connected() const
Returns true if the ExtensionCord is connected to an outlet and can therefore deliver data...
Definition: ExtensionCord.h:62
long double T
template<class T>
const T& edm::ExtensionCord< T >::operator* ( void  ) const
inline

Definition at line 59 of file ExtensionCord.h.

59 { return *(this->get()); }
template<class T>
const T* edm::ExtensionCord< T >::operator-> ( ) const
inline

Definition at line 49 of file ExtensionCord.h.

49 { return this->get(); }
template<class T>
void edm::ExtensionCord< T >::setGetter ( extensioncord::ECGetterBase< T > *  iGetter)
inlineprivate

Definition at line 72 of file ExtensionCord.h.

References edm::ExtensionCord< T >::holder_.

72 { holder_->getter_ = iGetter; }
std::shared_ptr< Holder > holder_
Definition: ExtensionCord.h:74

Friends And Related Function Documentation

template<class T>
friend class OutletBase< T >
friend

Definition at line 38 of file ExtensionCord.h.

Member Data Documentation

template<class T>
std::shared_ptr<Holder> edm::ExtensionCord< T >::holder_
private