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

#include <GaudiKernel/Property.h>

Inheritance diagram for GaudiHandleArrayProperty:
Collaboration diagram for GaudiHandleArrayProperty:

Public Member Functions

 GaudiHandleArrayProperty (const std::string &name, GaudiHandleArrayBase &ref)
 
GaudiHandleArrayPropertyoperator= (const GaudiHandleArrayBase &value)
 
virtual GaudiHandleArrayPropertyclone () 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 GaudiHandleArrayBasevalue () const
 
bool setValue (const GaudiHandleArrayBase &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

GaudiHandleArrayBasem_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 866 of file Property.h.

Constructor & Destructor Documentation

GaudiHandleArrayProperty::GaudiHandleArrayProperty ( const std::string &  name,
GaudiHandleArrayBase ref 
)

Definition at line 274 of file Property.cpp.

275  : Property( name, typeid( GaudiHandleArrayBase ) ), m_pValue( &ref )
276 {
278 }
const std::string & name() const
property name
Definition: Property.h:47
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:293
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:892
void setPropertyName(const std::string &propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:43

Member Function Documentation

bool GaudiHandleArrayProperty::assign ( const Property source)
inlinevirtual

import the property value form the source

Implements Property.

Definition at line 913 of file Property.h.

913  {
914  return fromString( source.toString() ) != 0;
915 }
virtual std::string toString() const =0
value -> string
virtual StatusCode fromString(const std::string &s)
string -> value
Definition: Property.cpp:297
GaudiHandleArrayProperty * GaudiHandleArrayProperty::clone ( ) const
inlinevirtual

clone: "virtual constructor"

Implements Property.

Definition at line 905 of file Property.h.

905  {
906  return new GaudiHandleArrayProperty( *this );
907 }
GaudiHandleArrayProperty(const std::string &name, GaudiHandleArrayBase &ref)
Definition: Property.cpp:274
StatusCode GaudiHandleArrayProperty::fromString ( const std::string &  value)
virtual

string -> value

Implements Property.

Definition at line 297 of file Property.cpp.

297  {
298  // treat as if a StringArrayProperty
299  std::vector< std::string > tmp;
300  StatusCode sc = Gaudi::Parsers::parse ( tmp , source );
301  if ( sc.isFailure() ) return sc;
302  if ( !m_pValue->setTypesAndNames( tmp ) ) return StatusCode::FAILURE;
304 }
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:163
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:892
bool GaudiHandleArrayProperty::load ( Property dest) const
inlinevirtual

export the property value to the destination

Implements Property.

Definition at line 909 of file Property.h.

909  {
910  return destination.assign( *this );
911 }
GaudiHandleArrayProperty & GaudiHandleArrayProperty::operator= ( const GaudiHandleArrayBase value)
inline

Definition at line 900 of file Property.h.

900  {
901  setValue( value );
902  return *this;
903 }
bool setValue(const GaudiHandleArrayBase &value)
Definition: Property.cpp:280
bool GaudiHandleArrayProperty::setValue ( const GaudiHandleArrayBase value)

Definition at line 280 of file Property.cpp.

280  {
282  return useUpdateHandler();
283 }
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:163
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:892
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:83
void GaudiHandleArrayProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

Definition at line 291 of file Property.cpp.

291  {
292  // treat as if a StringArrayProperty
293  useReadHandler();
295 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:150
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:341
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:892
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:83
std::string GaudiHandleArrayProperty::toString ( ) const
virtual

value -> string

Implements Property.

Definition at line 285 of file Property.cpp.

285  {
286  // treat as if a StringArrayProperty
287  useReadHandler();
289 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:150
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:892
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:83
const GaudiHandleArrayBase & GaudiHandleArrayProperty::value ( ) const
inline

Definition at line 917 of file Property.h.

917  {
918  useReadHandler();
919  return *m_pValue;
920 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:150
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:892

Member Data Documentation

GaudiHandleArrayBase* GaudiHandleArrayProperty::m_pValue
private

Pointer to the real property.

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

Definition at line 892 of file Property.h.


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