CMS 3D CMS Logo

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

#include <Fireworks/Core/interface/FWGenericParameter.h>

Inheritance diagram for FWGenericParameter< T >:
FWParameterBase FWConfigurable FWGenericParameterWithRange< T > FWEnumParameter

Public Types

typedef T value_type
 

Public Member Functions

virtual void addTo (FWConfiguration &iTo) const
 
 FWGenericParameter ()
 
 FWGenericParameter (FWParameterizable *iParent, const std::string &iName, const T &iDefault=T())
 
template<class K >
 FWGenericParameter (FWParameterizable *iParent, const std::string &iName, K iCallback, const T &iDefault=T())
 
void set (T iValue)
 
virtual void setFrom (const FWConfiguration &iFrom)
 
T value () const
 
- Public Member Functions inherited from FWParameterBase
 FWParameterBase (FWParameterizable *iParent, const std::string &iName)
 
const std::string & name () const
 
virtual ~FWParameterBase ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 

Public Attributes

sigc::signal< void, Tchanged_
 

Private Member Functions

 FWGenericParameter (const FWGenericParameter &)
 
const FWGenericParameteroperator= (const FWGenericParameter &)
 

Private Attributes

T m_value
 

Detailed Description

template<class T>
class FWGenericParameter< T >

Description: Provides access to a simple generic parameter.

Usage:

Definition at line 31 of file FWGenericParameter.h.

Member Typedef Documentation

template<class T>
typedef T FWGenericParameter< T >::value_type

Definition at line 34 of file FWGenericParameter.h.

Constructor & Destructor Documentation

template<class T>
FWGenericParameter< T >::FWGenericParameter ( )
inline

Definition at line 36 of file FWGenericParameter.h.

36  :
37  FWParameterBase(0, "invalid")
38  {}
FWParameterBase(FWParameterizable *iParent, const std::string &iName)
template<class T>
FWGenericParameter< T >::FWGenericParameter ( FWParameterizable iParent,
const std::string &  iName,
const T iDefault = T() 
)
inline

Definition at line 40 of file FWGenericParameter.h.

42  :
43  FWParameterBase(iParent,iName),
44  m_value(iDefault)
45  {}
FWParameterBase(FWParameterizable *iParent, const std::string &iName)
template<class T>
template<class K >
FWGenericParameter< T >::FWGenericParameter ( FWParameterizable iParent,
const std::string &  iName,
iCallback,
const T iDefault = T() 
)
inline

Definition at line 48 of file FWGenericParameter.h.

References FWGenericParameter< T >::changed_.

51  :
52  FWParameterBase(iParent,iName),
53  m_value(iDefault)
54  {
55  changed_.connect(iCallback);
56  }
sigc::signal< void, T > changed_
FWParameterBase(FWParameterizable *iParent, const std::string &iName)
template<class T>
FWGenericParameter< T >::FWGenericParameter ( const FWGenericParameter< T > &  )
private

Member Function Documentation

template<class T>
virtual void FWGenericParameter< T >::addTo ( FWConfiguration iTo) const
inlinevirtual

Implements FWConfigurable.

Definition at line 65 of file FWGenericParameter.h.

References FWConfiguration::addKeyValue(), FWGenericParameter< T >::m_value, FWParameterBase::name(), and alignCSCRings::s.

66  {
67  std::ostringstream s;
68  s<<m_value;
69  iTo.addKeyValue(name(),FWConfiguration(s.str()));
70  }
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
const std::string & name() const
template<class T>
const FWGenericParameter& FWGenericParameter< T >::operator= ( const FWGenericParameter< T > &  )
private
template<class T>
void FWGenericParameter< T >::set ( T  iValue)
inline
template<class T>
virtual void FWGenericParameter< T >::setFrom ( const FWConfiguration iFrom)
inlinevirtual

Implements FWConfigurable.

Definition at line 76 of file FWGenericParameter.h.

References FWGenericParameter< T >::changed_, HDQMDatabaseProducer::config, FWGenericParameter< T >::m_value, FWParameterBase::name(), alignCSCRings::s, and FWConfiguration::valueForKey().

Referenced by FWProxyBuilderConfiguration::assertParam(), and FWTriggerTableView::setFrom().

77  {
78  if (const FWConfiguration* config = iFrom.valueForKey(name()))
79  {
80  std::istringstream s(config->value());
81  s>>m_value;
82  }
84  }
sigc::signal< void, T > changed_
const FWConfiguration * valueForKey(const std::string &iKey) const
const std::string & name() const
template<class T>
T FWGenericParameter< T >::value ( ) const
inline

Definition at line 63 of file FWGenericParameter.h.

References FWGenericParameter< T >::m_value.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), FWStringParameterSetter::build(), FWBoolParameterSetter::build(), FWEnumParameterSetter::build(), FWLongParameterSetter::build(), FWDoubleParameterSetter::build(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), FWViewEnergyScale::calculateScaleFactor(), FWEveView::cameraGuideChanged(), FWOverlapTableView::cdTop(), FWGeometryTableViewBase::checkExpandLevel(), FWGeometryTableView::checkRegionOfInterest(), Types.string::configValue(), Types.FileInPath::configValue(), FWRPZView::doFishEyeDistortion(), FWRPZView::doPreScaleDistortion(), FWRPZView::doShiftOriginToBeamSpot(), FWOverlapTableView::drawPoints(), FWGeometryTableView::drawTopNode(), Mixins.UsingBlock::dumpPython(), FWL1TriggerTableView::fillTable(), FWHLTTriggerTableView::fillTable(), FWOverlapTableView::FWOverlapTableView(), FWRPZView::FWRPZView(), CmsShowCommon::gamma(), FWGeometryTableView::getAutoExpand(), FWGeometryTableViewBase::getEnableHighlight(), FWGeometryTableView::getFilter(), FWGeometryTableView::getFilterType(), FWGeometryTableView::getIgnoreVisLevelWhenFilter(), FWGeometryTableViewBase::getLeafTransparencyFactor(), FWGeometryTableViewBase::getMinLeafTransparency(), FWGeometryTableViewBase::getMinParentTransparency(), FWGeometryTableViewBase::getParentTransparencyFactor(), FWViewEnergyScale::getPlotEt(), CmsShowCommon::getProjTrackBreaking(), CmsShowCommon::getRnrPTBMarkers(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableView::getVisLevel(), FWGeometryTableView::getVolumeMode(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Mixins.UsingBlock::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), FWEveView::isEnergyScaleGlobal(), FWTriggerTableView::isProcessValid(), FWGeometryTableView::isSelectedByRegion(), Vispa.Views.PropertyView.FileProperty::labelDoubleClicked(), FWOverlapTableView::listAllNodes(), FWEveOverlap::paintChildNodesRecurse(), FWEveView::pointLineScalesChanged(), FWOverlapTableView::pointSize(), FWEveView::populateController(), FWRPZView::projectionAxesLabelSize(), FWOverlapTableView::recalculate(), FWOverlapTableView::refreshTable3D(), FWTriggerTableView::resetCombo(), FWEveView::saveImageTo(), FWLegoViewBase::setAutoRebin(), FWLegoViewBase::setCell2DMode(), FWLegoViewBase::setContext(), FWEveView::setContext(), CmsShowCommon::setDrawBreakMarkers(), FWRPZView::setEtaRng(), FWLegoViewBase::setFontSizein2D(), FWOverlapTableView::setFrom(), CmsShowCommon::setFrom(), FWGeometryTableView::setFrom(), FWTriggerTableView::setFrom(), CmsShowCommon::setGamma(), FWGeometryTableView::setPath(), FWLegoViewBase::setPixelsPerBin(), FWLegoViewBase::setProjectionMode(), CmsShowCommon::setTrackBreakMode(), FWGlimpseView::showAxes(), FWGlimpseView::showCylinder(), FWLegoViewBase::showOverlay(), FWRPZView::showProjectionAxes(), FWGeometryTableView::updateFilter(), FWGeometryTableView::updateVisibilityTopNode(), FWEveView::useGlobalEnergyScaleChanged(), and FWProxyBuilderConfiguration::value().

63 { return m_value; }

Member Data Documentation

template<class T>
sigc::signal<void,T> FWGenericParameter< T >::changed_
template<class T>
T FWGenericParameter< T >::m_value
private