The Gaudi Framework  v29r0 (ff2e7097)
DataObjIDCollProperty Class Reference

#include <GaudiKernel/DataObjIDProperty.h>

Inheritance diagram for DataObjIDCollProperty:
Collaboration diagram for DataObjIDCollProperty:

Public Member Functions

 DataObjIDCollProperty (const std::string &name, DataObjIDColl &ref)
 
DataObjIDCollPropertyoperator= (const DataObjIDColl &value)
 
virtual ~DataObjIDCollProperty ()
 
DataObjIDCollPropertyclone () const override
 clones the current property More...
 
bool load (Property &destination) const override
 
bool assign (const Property &source) override
 
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 DataObjIDCollvalue () const
 
bool setValue (const DataObjIDColl &value)
 
- Public Member Functions inherited from PropertyWithHandlers<>
PropertyBasedeclareReadHandler (std::function< void(PropertyBase &)> fun) override
 set new callback for reading More...
 
PropertyBasedeclareUpdateHandler (std::function< void(PropertyBase &)> fun) override
 set new callback for update More...
 
const std::function< void(PropertyBase &)> readCallBack () const override
 get a reference to the readCallBack More...
 
const std::function< void(PropertyBase &)> updateCallBack () const override
 get a reference to the updateCallBack More...
 
void useReadHandler () const
 use the call-back function at reading, if available More...
 
bool useUpdateHandler () override
 use the call-back function at update, if available More...
 
- Public Member Functions inherited from Gaudi::Details::PropertyBase
const std::string name () const
 property name More...
 
std::string documentation () const
 property documentation More...
 
const std::type_infotype_info () const
 property type-info More...
 
std::string type () const
 property type More...
 
virtual bool load (PropertyBase &dest) const =0
 export the property value to the destination More...
 
virtual bool assign (const PropertyBase &source)=0
 import the property value form the source More...
 
virtual PropertyBasedeclareReadHandler (std::function< void(PropertyBase &)> fun)=0
 set new callback for reading More...
 
virtual PropertyBasedeclareUpdateHandler (std::function< void(PropertyBase &)> fun)=0
 set new callback for update More...
 
template<class HT >
PropertyBasedeclareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
template<class HT >
PropertyBasedeclareUpdateHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
virtual ~PropertyBase ()=default
 virtual destructor More...
 
void setName (std::string value)
 set the new value for the property name More...
 
void setDocumentation (std::string value)
 set the documentation string More...
 
virtual std::ostreamfillStream (std::ostream &) const
 the printout of the property value More...
 
void setOwnerType (const std::type_info &ownerType)
 set the type of the owner class (used for documentation) More...
 
template<class OWNER >
void setOwnerType ()
 set the type of the owner class (used for documentation) More...
 
const std::type_infoownerType () const
 get the type of the owner class (used for documentation) More...
 
std::string ownerTypeName () const
 get the string for the type of the owner class (used for documentation) More...
 

Private Attributes

DataObjIDCollm_pValue
 Pointer to the real property. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Gaudi::Details::PropertyBase
 PropertyBase (const std::type_info &type, std::string name="", std::string doc="")
 constructor from the property name and the type More...
 
 PropertyBase (std::string name, const std::type_info &type)
 constructor from the property name and the type More...
 
 PropertyBase (const PropertyBase &)=default
 copy constructor More...
 
PropertyBaseoperator= (const PropertyBase &)=default
 assignment operator More...
 

Detailed Description

Definition at line 88 of file DataObjIDProperty.h.

Constructor & Destructor Documentation

DataObjIDCollProperty::DataObjIDCollProperty ( const std::string name,
DataObjIDColl ref 
)

Definition at line 220 of file DataObjIDProperty.cpp.

221  : PropertyWithHandlers( name, typeid( DataObjIDColl ) ), m_pValue( &ref )
222 {
223 }
Helper class to simplify the migration old properties deriving directly from PropertyBase.
Definition: Property.h:786
DataObjIDColl * m_pValue
Pointer to the real property.
DataObjIDCollProperty::~DataObjIDCollProperty ( )
virtual

Definition at line 227 of file DataObjIDProperty.cpp.

227 {}

Member Function Documentation

bool DataObjIDCollProperty::assign ( const Property source)
inlineoverride

Definition at line 166 of file DataObjIDProperty.h.

167 {
168  return fromString( source.toString() ).isSuccess();
169 }
StatusCode fromString(const std::string &s) override
string -> value
DataObjIDCollProperty * DataObjIDCollProperty::clone ( ) const
inlineoverridevirtual

clones the current property

Implements Gaudi::Details::PropertyBase.

Definition at line 159 of file DataObjIDProperty.h.

159 { return new DataObjIDCollProperty( *this ); }
DataObjIDCollProperty(const std::string &name, DataObjIDColl &ref)
StatusCode DataObjIDCollProperty::fromString ( const std::string value)
overridevirtual

string -> value

Implements Gaudi::Details::PropertyBase.

Definition at line 231 of file DataObjIDProperty.cpp.

232 {
233  if ( !Gaudi::Parsers::parse( *m_pValue, s ).isSuccess() ) {
234  return StatusCode::FAILURE;
235  }
237 }
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:815
string s
Definition: gaudirun.py:253
DataObjIDColl * m_pValue
Pointer to the real property.
bool DataObjIDCollProperty::load ( Property destination) const
inlineoverride

Definition at line 161 of file DataObjIDProperty.h.

162 {
163  return destination.assign( *this );
164 }
DataObjIDCollProperty & DataObjIDCollProperty::operator= ( const DataObjIDColl value)
inline

Definition at line 153 of file DataObjIDProperty.h.

154 {
155  setValue( value );
156  return *this;
157 }
bool setValue(const DataObjIDColl &value)
bool DataObjIDCollProperty::setValue ( const DataObjIDColl value)

Definition at line 241 of file DataObjIDProperty.cpp.

242 {
243  m_pValue->operator=( value );
244  return useUpdateHandler();
245 }
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:815
DataObjIDColl * m_pValue
Pointer to the real property.
const DataObjIDColl & value() const
void DataObjIDCollProperty::toStream ( std::ostream out) const
overridevirtual

value -> stream

Implements Gaudi::Details::PropertyBase.

Definition at line 258 of file DataObjIDProperty.cpp.

259 {
260  useReadHandler();
261  out << this->toString();
262 }
std::string toString() const override
value -> string
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:812
std::string DataObjIDCollProperty::toString ( ) const
overridevirtual

value -> string

Implements Gaudi::Details::PropertyBase.

Definition at line 249 of file DataObjIDProperty.cpp.

250 {
251  useReadHandler();
254  return o.str();
255 }
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:293
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:812
DataObjIDColl * m_pValue
Pointer to the real property.
const DataObjIDColl & DataObjIDCollProperty::value ( ) const
inline

Definition at line 171 of file DataObjIDProperty.h.

172 {
173  useReadHandler();
174  return *m_pValue;
175 }
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:812
DataObjIDColl * m_pValue
Pointer to the real property.

Member Data Documentation

DataObjIDColl* DataObjIDCollProperty::m_pValue
private

Pointer to the real property.

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

Definition at line 108 of file DataObjIDProperty.h.


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