DataObjectDescriptorProperty Class Reference

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

Inheritance diagram for DataObjectDescriptorProperty:
Collaboration diagram for DataObjectDescriptorProperty:

Public Member Functions

 DataObjectDescriptorProperty (const std::string &name, DataObjectDescriptor &item)
 
 DataObjectDescriptorProperty (DataObjectDescriptorProperty &other)
 
 DataObjectDescriptorProperty (const DataObjectDescriptorProperty &other)
 
DataObjectDescriptorPropertyoperator= (DataObjectDescriptorProperty &value)
 
DataObjectDescriptorPropertyoperator= (const DataObjectDescriptorProperty &value)
 
virtual DataObjectDescriptorPropertyclone () 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...
 
virtual const DataObjectDescriptorvalue () const
 
virtual bool setValue (DataObjectDescriptor &value)
 
 DataObjectDescriptorProperty (const std::string &name, DataObjectDescriptor &item)
 
 DataObjectDescriptorProperty (DataObjectDescriptorProperty &other)
 
 DataObjectDescriptorProperty (const DataObjectDescriptorProperty &other)
 
DataObjectDescriptorPropertyoperator= (DataObjectDescriptorProperty &value)
 
DataObjectDescriptorPropertyoperator= (const DataObjectDescriptorProperty &value)
 
virtual DataObjectDescriptorPropertyclone () 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...
 
virtual const DataObjectDescriptorvalue () const
 
virtual bool setValue (DataObjectDescriptor &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

DataObjectDescriptorm_item
 

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 144 of file DataObjectDescriptor.h.

Constructor & Destructor Documentation

DataObjectDescriptorProperty::DataObjectDescriptorProperty ( const std::string &  name,
DataObjectDescriptor item 
)

Definition at line 255 of file DataObjectDescriptor.cpp.

258  m_item(&item) {
259 }
const std::string & name() const
property name
Definition: Property.h:45
DataObjectDescriptorProperty::DataObjectDescriptorProperty ( DataObjectDescriptorProperty other)

Definition at line 261 of file DataObjectDescriptor.cpp.

262 : Property(other.name(), typeid(DataObjectDescriptor)), m_item(other.m_item) {
263 }
const std::string & name() const
property name
Definition: Property.h:45
DataObjectDescriptorProperty::DataObjectDescriptorProperty ( const DataObjectDescriptorProperty other)

Definition at line 265 of file DataObjectDescriptor.cpp.

266 : Property(other.name(), typeid(DataObjectDescriptor)) {
267 
268  m_item = const_cast<DataObjectDescriptor *>(&other.value());
269 
270 }
const std::string & name() const
property name
Definition: Property.h:45
virtual const DataObjectDescriptor & value() const
DataObjectDescriptorProperty::DataObjectDescriptorProperty ( const std::string &  name,
DataObjectDescriptor item 
)
DataObjectDescriptorProperty::DataObjectDescriptorProperty ( DataObjectDescriptorProperty other)
DataObjectDescriptorProperty::DataObjectDescriptorProperty ( const DataObjectDescriptorProperty other)

Member Function Documentation

bool DataObjectDescriptorProperty::assign ( const Property source)
virtual

import the property value form the source

Implements Property.

Definition at line 300 of file DataObjectDescriptor.cpp.

300  {
301  return fromString(source.toString()).isSuccess();
302 }
virtual std::string toString() const =0
value -> string
virtual StatusCode fromString(const std::string &s)
string -> value
virtual bool DataObjectDescriptorProperty::assign ( const Property source)
virtual

import the property value form the source

Implements Property.

DataObjectDescriptorProperty * DataObjectDescriptorProperty::clone ( ) const
virtual

clone: "virtual constructor"

Implements Property.

Definition at line 292 of file DataObjectDescriptor.cpp.

292  {
293  return new DataObjectDescriptorProperty(*this);
294 }
DataObjectDescriptorProperty(const std::string &name, DataObjectDescriptor &item)
virtual DataObjectDescriptorProperty* DataObjectDescriptorProperty::clone ( ) const
virtual

clone: "virtual constructor"

Implements Property.

StatusCode DataObjectDescriptorProperty::fromString ( const std::string &  value)
virtual

string -> value

Implements Property.

Definition at line 313 of file DataObjectDescriptor.cpp.

313  {
314  m_item->fromString(s);
315 
316  return useUpdateHandler();
317 }
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:92
void fromString(const std::string &s)
string s
Definition: gaudirun.py:245
virtual StatusCode DataObjectDescriptorProperty::fromString ( const std::string &  value)
virtual

string -> value

Implements Property.

bool DataObjectDescriptorProperty::load ( Property dest) const
virtual

export the property value to the destination

Implements Property.

Definition at line 296 of file DataObjectDescriptor.cpp.

296  {
297  return destination.assign(*this);
298 }
virtual bool DataObjectDescriptorProperty::load ( Property dest) const
virtual

export the property value to the destination

Implements Property.

DataObjectDescriptorProperty& DataObjectDescriptorProperty::operator= ( DataObjectDescriptorProperty value)
DataObjectDescriptorProperty & DataObjectDescriptorProperty::operator= ( DataObjectDescriptorProperty value)

Definition at line 272 of file DataObjectDescriptor.cpp.

273  {
274 
275  setName(value.name());
276  m_item = value.m_item;
277 
278  return *this;
279 }
const std::string & name() const
property name
Definition: Property.h:45
void setName(std::string value)
set the new value for the property name
Definition: Property.h:92
DataObjectDescriptorProperty & DataObjectDescriptorProperty::operator= ( const DataObjectDescriptorProperty value)

Definition at line 281 of file DataObjectDescriptor.cpp.

282  {
283 
284  setName(value.name());
285 
286  delete m_item;
287  m_item = const_cast<DataObjectDescriptor *>(&value.value());
288 
289  return *this;
290 }
const std::string & name() const
property name
Definition: Property.h:45
virtual const DataObjectDescriptor & value() const
void setName(std::string value)
set the new value for the property name
Definition: Property.h:92
DataObjectDescriptorProperty& DataObjectDescriptorProperty::operator= ( const DataObjectDescriptorProperty value)
bool DataObjectDescriptorProperty::setValue ( DataObjectDescriptor value)
virtual

Definition at line 324 of file DataObjectDescriptor.cpp.

324  {
325  m_item = &value;
326 
327  return useUpdateHandler();
328 }
virtual const DataObjectDescriptor & value() const
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:92
virtual bool DataObjectDescriptorProperty::setValue ( DataObjectDescriptor value)
virtual
void DataObjectDescriptorProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

Definition at line 304 of file DataObjectDescriptor.cpp.

304  {
305  out << toString();
306 }
virtual std::string toString() const
value -> string
virtual void DataObjectDescriptorProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

virtual std::string DataObjectDescriptorProperty::toString ( ) const
virtual

value -> string

Implements Property.

std::string DataObjectDescriptorProperty::toString ( ) const
virtual

value -> string

Implements Property.

Definition at line 308 of file DataObjectDescriptor.cpp.

308  {
309  useReadHandler();
310  return m_item->toString();
311 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
const std::string toString() const
const DataObjectDescriptor & DataObjectDescriptorProperty::value ( ) const
virtual

Definition at line 319 of file DataObjectDescriptor.cpp.

319  {
320  useReadHandler();
321  return *m_item;
322 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
virtual const DataObjectDescriptor& DataObjectDescriptorProperty::value ( ) const
virtual

Member Data Documentation

DataObjectDescriptor * DataObjectDescriptorProperty::m_item
private

Definition at line 173 of file DataObjectDescriptor.h.


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