GaudiHandleArrayProperty Class Reference

#include </tmp/marcocle/lhcb-release/1122/GAUDI/GAUDI_v27r0/InstallArea/x86_64-slc6-gcc49-opt/include/GaudiKernel/Property.h>

Inheritance diagram for GaudiHandleArrayProperty:
Collaboration diagram for GaudiHandleArrayProperty:

Public Member Functions

 GaudiHandleArrayProperty (std::string name, GaudiHandleArrayBase &ref)
 
GaudiHandleArrayPropertyoperator= (const GaudiHandleArrayBase &value)
 
GaudiHandleArrayPropertyclone () const override
 clone: "virtual constructor" More...
 
bool load (Property &destination) const override
 export the property value to the destination More...
 
bool assign (const Property &source) override
 import the property value form the source More...
 
std::string toString () const override
 value -> string More...
 
void toStream (std::ostream &out) const override
 value -> stream More...
 
StatusCode fromString (const std::string &s) override
 string -> value More...
 
const GaudiHandleArrayBasevalue () const
 
bool setValue (const GaudiHandleArrayBase &value)
 
 GaudiHandleArrayProperty (std::string name, GaudiHandleArrayBase &ref)
 
GaudiHandleArrayPropertyoperator= (const GaudiHandleArrayBase &value)
 
GaudiHandleArrayPropertyclone () const override
 clone: "virtual constructor" More...
 
bool load (Property &destination) const override
 export the property value to the destination More...
 
bool assign (const Property &source) override
 import the property value form the source More...
 
std::string toString () const override
 value -> string More...
 
void toStream (std::ostream &out) const override
 value -> stream More...
 
StatusCode fromString (const std::string &s) override
 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 std::function< void(Property &)> & readCallBack () const
 get a reference to the readCallBack More...
 
const std::function< void(Property &)> & updateCallBack () const
 get a reference to the updateCallBack More...
 
virtual PropertydeclareReadHandler (std::function< void(Property &)> fun)
 set new callback for reading More...
 
virtual PropertydeclareUpdateHandler (std::function< void(Property &)> fun)
 set new callback for update More...
 
template<class HT >
PropertydeclareReadHandler (void(HT::*MF)(Property &), HT *instance)
 
template<class HT >
PropertydeclareUpdateHandler (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 ()=default
 virtual destructor More...
 
void setName (std::string value)
 set the new value for the property name More...
 
void setDocumentation (std::string documentation)
 set the documentation string More...
 
virtual std::ostream & fillStream (std::ostream &) const
 the printout of the property value More...
 
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 std::function< void(Property &)> & readCallBack () const
 get a reference to the readCallBack More...
 
const std::function< void(Property &)> & updateCallBack () const
 get a reference to the updateCallBack More...
 
virtual PropertydeclareReadHandler (std::function< void(Property &)> fun)
 set new callback for reading More...
 
virtual PropertydeclareUpdateHandler (std::function< void(Property &)> fun)
 set new callback for update More...
 
template<class HT >
PropertydeclareReadHandler (void(HT::*MF)(Property &), HT *instance)
 
template<class HT >
PropertydeclareUpdateHandler (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 ()=default
 virtual destructor More...
 
void setName (std::string value)
 set the new value for the property name More...
 
void setDocumentation (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, std::string name="")
 constructor from the property name and the type More...
 
 Property (std::string name, const std::type_info &type)
 constructor from the property name and the type More...
 
 Property (const Property &)=default
 copy constructor More...
 
Propertyoperator= (const Property &)=default
 assignment operator More...
 
 Property (const std::type_info &type, std::string name="")
 constructor from the property name and the type More...
 
 Property (std::string name, const std::type_info &type)
 constructor from the property name and the type More...
 
 Property (const Property &)=default
 copy constructor More...
 
Propertyoperator= (const Property &)=default
 assignment operator More...
 
- Protected Attributes inherited from Property
std::function< void(Property &)> m_readCallBack
 
std::function< void(Property &)> m_updateCallBack
 

Detailed Description

Definition at line 841 of file Property.h.

Constructor & Destructor Documentation

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

Definition at line 200 of file Property.cpp.

201  : Property( std::move(name_), typeid( GaudiHandleArrayBase ) ), m_pValue( &ref )
202 {
204 }
const std::string & name() const
property name
Definition: Property.h:45
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:320
void setPropertyName(std::string propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:44
GaudiHandleArrayProperty::GaudiHandleArrayProperty ( std::string  name,
GaudiHandleArrayBase ref 
)

Member Function Documentation

bool GaudiHandleArrayProperty::assign ( const Property source)
inlineoverridevirtual

import the property value form the source

Implements Property.

Definition at line 888 of file Property.h.

888  {
889  return fromString( source.toString() ) != 0;
890 }
virtual std::string toString() const =0
value -> string
StatusCode fromString(const std::string &s) override
string -> value
Definition: Property.cpp:223
bool GaudiHandleArrayProperty::assign ( const Property source)
overridevirtual

import the property value form the source

Implements Property.

GaudiHandleArrayProperty * GaudiHandleArrayProperty::clone ( ) const
inlineoverridevirtual

clone: "virtual constructor"

Implements Property.

Definition at line 880 of file Property.h.

880  {
881  return new GaudiHandleArrayProperty( *this );
882 }
GaudiHandleArrayProperty(std::string name, GaudiHandleArrayBase &ref)
Definition: Property.cpp:200
GaudiHandleArrayProperty* GaudiHandleArrayProperty::clone ( ) const
overridevirtual

clone: "virtual constructor"

Implements Property.

StatusCode GaudiHandleArrayProperty::fromString ( const std::string &  value)
overridevirtual

string -> value

Implements Property.

StatusCode GaudiHandleArrayProperty::fromString ( const std::string &  value)
overridevirtual

string -> value

Implements Property.

Definition at line 223 of file Property.cpp.

223  {
224  // treat as if a StringArrayProperty
225  std::vector< std::string > tmp;
226  StatusCode sc = Gaudi::Parsers::parse ( tmp , source );
227  if ( sc.isFailure() ) return sc;
228  if ( !m_pValue->setTypesAndNames( std::move(tmp) ) ) return StatusCode::FAILURE;
230 }
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:86
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:92
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
bool GaudiHandleArrayProperty::load ( Property dest) const
overridevirtual

export the property value to the destination

Implements Property.

bool GaudiHandleArrayProperty::load ( Property dest) const
inlineoverridevirtual

export the property value to the destination

Implements Property.

Definition at line 884 of file Property.h.

884  {
885  return destination.assign( *this );
886 }
GaudiHandleArrayProperty & GaudiHandleArrayProperty::operator= ( const GaudiHandleArrayBase value)
inline

Definition at line 875 of file Property.h.

875  {
876  setValue( value );
877  return *this;
878 }
bool setValue(const GaudiHandleArrayBase &value)
Definition: Property.cpp:206
GaudiHandleArrayProperty& GaudiHandleArrayProperty::operator= ( const GaudiHandleArrayBase value)
bool GaudiHandleArrayProperty::setValue ( const GaudiHandleArrayBase value)

Definition at line 206 of file Property.cpp.

206  {
208  return useUpdateHandler();
209 }
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:92
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:78
bool GaudiHandleArrayProperty::setValue ( const GaudiHandleArrayBase value)
void GaudiHandleArrayProperty::toStream ( std::ostream &  out) const
overridevirtual

value -> stream

Implements Property.

void GaudiHandleArrayProperty::toStream ( std::ostream &  out) const
overridevirtual

value -> stream

Implements Property.

Definition at line 217 of file Property.cpp.

217  {
218  // treat as if a StringArrayProperty
219  useReadHandler();
221 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
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:319
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:78
std::string GaudiHandleArrayProperty::toString ( ) const
overridevirtual

value -> string

Implements Property.

Definition at line 211 of file Property.cpp.

211  {
212  // treat as if a StringArrayProperty
213  useReadHandler();
215 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:78
std::string GaudiHandleArrayProperty::toString ( ) const
overridevirtual

value -> string

Implements Property.

const GaudiHandleArrayBase & GaudiHandleArrayProperty::value ( ) const
inline

Definition at line 892 of file Property.h.

892  {
893  useReadHandler();
894  return *m_pValue;
895 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
const GaudiHandleArrayBase& GaudiHandleArrayProperty::value ( ) const

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


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