All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiHandleProperty Class Reference

#include <GaudiKernel/Property.h>

Inheritance diagram for GaudiHandleProperty:
Collaboration diagram for GaudiHandleProperty:

Public Member Functions

 GaudiHandleProperty (const std::string &name, GaudiHandleBase &ref)
 
GaudiHandlePropertyoperator= (const GaudiHandleBase &value)
 
virtual GaudiHandlePropertyclone () const
 clone: "virtual constructor" More...
 
virtual bool load (Property &destination) const
 export the property value to the destination More...
 
virtual bool assign (const Property &source)
 import the property value form the source More...
 
virtual std::string toString () const
 value -> string More...
 
virtual void toStream (std::ostream &out) const
 value -> stream More...
 
virtual StatusCode fromString (const std::string &s)
 string -> value More...
 
const GaudiHandleBasevalue () const
 
bool setValue (const GaudiHandleBase &value)
 
- Public Member Functions inherited from Property
const std::string & name () const
 property name More...
 
const std::string & documentation () const
 property documentation More...
 
const std::type_info * type_info () const
 property type-info More...
 
std::string type () const
 property type More...
 
const PropertyCallbackFunctorreadCallBack () const
 Call-back functor at reading: the functor is owned by property! More...
 
const PropertyCallbackFunctorupdateCallBack () const
 Call-back functor for update: the functor is owned by property! More...
 
virtual void declareReadHandler (PropertyCallbackFunctor *pf)
 set new callback for reading More...
 
virtual void declareUpdateHandler (PropertyCallbackFunctor *pf)
 set new callback for update More...
 
template<class HT >
void declareReadHandler (void(HT::*MF)(Property &), HT *instance)
 
template<class HT >
void declareUpdateHandler (void(HT::*MF)(Property &), HT *instance)
 
virtual void useReadHandler () const
 use the call-back function at reading More...
 
virtual bool useUpdateHandler ()
 use the call-back function at update More...
 
virtual ~Property ()
 virtual destructor More...
 
void setName (const std::string &value)
 set the new value for the property name More...
 
void setDocumentation (const std::string &documentation)
 set the documentation string More...
 
virtual std::ostream & fillStream (std::ostream &) const
 the printout of the property value More...
 

Private Attributes

GaudiHandleBasem_pValue
 Pointer to the real property. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Property
 Property (const std::type_info &type, const std::string &name="")
 constructor from the property name and the type More...
 
 Property (const std::string &name, const std::type_info &type)
 constructor from the property name and the type More...
 
 Property (const Property &right)
 copy constructor More...
 
Propertyoperator= (const Property &right)
 assignment operator More...
 
- Protected Attributes inherited from Property
PropertyCallbackFunctorm_readCallBack
 
PropertyCallbackFunctorm_updateCallBack
 

Detailed Description

Definition at line 808 of file Property.h.

Constructor & Destructor Documentation

GaudiHandleProperty::GaudiHandleProperty ( const std::string &  name,
GaudiHandleBase ref 
)

Definition at line 244 of file Property.cpp.

245  : Property( name, typeid( GaudiHandleBase ) ), m_pValue( &ref )
246 {
248 }
const std::string & name() const
property name
Definition: Property.h:47
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:833
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:80
void setPropertyName(const std::string &propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:43

Member Function Documentation

bool GaudiHandleProperty::assign ( const Property source)
inlinevirtual

import the property value form the source

Implements Property.

Definition at line 853 of file Property.h.

853  {
854  return fromString( source.toString() ).isSuccess();
855 }
virtual std::string toString() const =0
value -> string
virtual StatusCode fromString(const std::string &s)
string -> value
Definition: Property.cpp:265
GaudiHandleProperty * GaudiHandleProperty::clone ( ) const
inlinevirtual

clone: "virtual constructor"

Implements Property.

Definition at line 845 of file Property.h.

845  {
846  return new GaudiHandleProperty( *this );
847 }
GaudiHandleProperty(const std::string &name, GaudiHandleBase &ref)
Definition: Property.cpp:244
StatusCode GaudiHandleProperty::fromString ( const std::string &  value)
virtual

string -> value

Implements Property.

Definition at line 265 of file Property.cpp.

265  {
268 }
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:833
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:163
void setTypeAndName(const std::string &myTypeAndName)
The component "type/name" string.
Definition: GaudiHandle.cpp:9
string s
Definition: gaudirun.py:210
bool GaudiHandleProperty::load ( Property dest) const
inlinevirtual

export the property value to the destination

Implements Property.

Definition at line 849 of file Property.h.

849  {
850  return destination.assign( *this );
851 }
GaudiHandleProperty & GaudiHandleProperty::operator= ( const GaudiHandleBase value)
inline

Definition at line 840 of file Property.h.

840  {
841  setValue( value );
842  return *this;
843 }
bool setValue(const GaudiHandleBase &value)
Definition: Property.cpp:250
bool GaudiHandleProperty::setValue ( const GaudiHandleBase value)

Definition at line 250 of file Property.cpp.

250  {
251  m_pValue->setTypeAndName( value.typeAndName() );
252  return useUpdateHandler();
253 }
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:833
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:163
void setTypeAndName(const std::string &myTypeAndName)
The component "type/name" string.
Definition: GaudiHandle.cpp:9
std::string typeAndName() const
The full type and name: "type/name".
Definition: GaudiHandle.h:107
void GaudiHandleProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

Definition at line 260 of file Property.cpp.

260  {
261  useReadHandler();
262  out << m_pValue->typeAndName();
263 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:150
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:833
std::string typeAndName() const
The full type and name: "type/name".
Definition: GaudiHandle.h:107
std::string GaudiHandleProperty::toString ( ) const
virtual

value -> string

Implements Property.

Definition at line 255 of file Property.cpp.

255  {
256  useReadHandler();
257  return m_pValue->typeAndName();
258 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:150
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:833
std::string typeAndName() const
The full type and name: "type/name".
Definition: GaudiHandle.h:107
const GaudiHandleBase & GaudiHandleProperty::value ( ) const
inline

Definition at line 857 of file Property.h.

857  {
858  useReadHandler();
859  return *m_pValue;
860 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:150
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:833

Member Data Documentation

GaudiHandleBase* GaudiHandleProperty::m_pValue
private

Pointer to the real property.

Reference would be better, but ROOT does not support references yet

Definition at line 833 of file Property.h.


The documentation for this class was generated from the following files: