DataObjectDescriptorCollectionProperty Class Reference

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

Inheritance diagram for DataObjectDescriptorCollectionProperty:
Collaboration diagram for DataObjectDescriptorCollectionProperty:

Public Member Functions

 DataObjectDescriptorCollectionProperty (const std::string &name, DataObjectDescriptorCollection &items)
 
 DataObjectDescriptorCollectionProperty (DataObjectDescriptorCollectionProperty &other)
 
 DataObjectDescriptorCollectionProperty (const DataObjectDescriptorCollectionProperty &other)
 
DataObjectDescriptorCollectionPropertyoperator= (DataObjectDescriptorCollectionProperty &value)
 
DataObjectDescriptorCollectionPropertyoperator= (const DataObjectDescriptorCollectionProperty &value)
 
virtual DataObjectDescriptorCollectionPropertyclone () 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 DataObjectDescriptorCollectionvalue () const
 
bool setValue (DataObjectDescriptorCollection &value)
 
 DataObjectDescriptorCollectionProperty (const std::string &name, DataObjectDescriptorCollection &items)
 
 DataObjectDescriptorCollectionProperty (DataObjectDescriptorCollectionProperty &other)
 
 DataObjectDescriptorCollectionProperty (const DataObjectDescriptorCollectionProperty &other)
 
DataObjectDescriptorCollectionPropertyoperator= (DataObjectDescriptorCollectionProperty &value)
 
DataObjectDescriptorCollectionPropertyoperator= (const DataObjectDescriptorCollectionProperty &value)
 
virtual DataObjectDescriptorCollectionPropertyclone () 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 DataObjectDescriptorCollectionvalue () const
 
bool setValue (DataObjectDescriptorCollection &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

DataObjectDescriptorCollectionm_dataItems
 

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

Constructor & Destructor Documentation

DataObjectDescriptorCollectionProperty::DataObjectDescriptorCollectionProperty ( const std::string &  name,
DataObjectDescriptorCollection items 
)

Definition at line 330 of file DataObjectDescriptor.cpp.

333 }
DataObjectDescriptorCollection * m_dataItems
const std::string & name() const
property name
Definition: Property.h:45
DataObjectDescriptorCollectionProperty::DataObjectDescriptorCollectionProperty ( DataObjectDescriptorCollectionProperty other)

Definition at line 335 of file DataObjectDescriptor.cpp.

338 }
DataObjectDescriptorCollection * m_dataItems
const std::string & name() const
property name
Definition: Property.h:45
DataObjectDescriptorCollectionProperty::DataObjectDescriptorCollectionProperty ( const DataObjectDescriptorCollectionProperty other)

Definition at line 340 of file DataObjectDescriptor.cpp.

342 : Property(other.name(), typeid(DataObjectDescriptorCollection)){
343 
345 }
DataObjectDescriptorCollection * m_dataItems
const std::string & name() const
property name
Definition: Property.h:45
const DataObjectDescriptorCollection & value() const
DataObjectDescriptorCollectionProperty::DataObjectDescriptorCollectionProperty ( const std::string &  name,
DataObjectDescriptorCollection items 
)
DataObjectDescriptorCollectionProperty::DataObjectDescriptorCollectionProperty ( DataObjectDescriptorCollectionProperty other)
DataObjectDescriptorCollectionProperty::DataObjectDescriptorCollectionProperty ( const DataObjectDescriptorCollectionProperty other)

Member Function Documentation

bool DataObjectDescriptorCollectionProperty::assign ( const Property source)
virtual

import the property value form the source

Implements Property.

Definition at line 370 of file DataObjectDescriptor.cpp.

370  {
371  return fromString(source.toString());
372 }
virtual std::string toString() const =0
value -> string
virtual StatusCode fromString(const std::string &s)
string -> value
virtual bool DataObjectDescriptorCollectionProperty::assign ( const Property source)
virtual

import the property value form the source

Implements Property.

DataObjectDescriptorCollectionProperty * DataObjectDescriptorCollectionProperty::clone ( ) const
virtual

clone: "virtual constructor"

Implements Property.

Definition at line 362 of file DataObjectDescriptor.cpp.

362  {
363  return new DataObjectDescriptorCollectionProperty(*this);
364 }
DataObjectDescriptorCollectionProperty(const std::string &name, DataObjectDescriptorCollection &items)
virtual DataObjectDescriptorCollectionProperty* DataObjectDescriptorCollectionProperty::clone ( ) const
virtual

clone: "virtual constructor"

Implements Property.

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

string -> value

Implements Property.

Definition at line 384 of file DataObjectDescriptor.cpp.

384  {
385  if(s == "") // nothing to do
386  return StatusCode::SUCCESS;
387 
388  std::vector<std::string> items;
389  boost::split(items, s, boost::is_any_of(boost::lexical_cast<std::string>(ITEM_SEP)), boost::token_compress_on);
390 
391  for(uint i = 0; i < items.size(); ++i){
392  if(!m_dataItems->update(items[i]))
393  return StatusCode::FAILURE;
394  }
395 
396  return useUpdateHandler();
397 }
DataObjectDescriptorCollection * m_dataItems
bool update(MinimalDataObjectHandle *item)
const char ITEM_SEP
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:92
string s
Definition: gaudirun.py:245
list i
Definition: ana.py:128
virtual StatusCode DataObjectDescriptorCollectionProperty::fromString ( const std::string &  value)
virtual

string -> value

Implements Property.

bool DataObjectDescriptorCollectionProperty::load ( Property dest) const
virtual

export the property value to the destination

Implements Property.

Definition at line 366 of file DataObjectDescriptor.cpp.

366  {
367  return destination.assign(*this);
368 }
virtual bool DataObjectDescriptorCollectionProperty::load ( Property dest) const
virtual

export the property value to the destination

Implements Property.

DataObjectDescriptorCollectionProperty& DataObjectDescriptorCollectionProperty::operator= ( DataObjectDescriptorCollectionProperty value)
DataObjectDescriptorCollectionProperty & DataObjectDescriptorCollectionProperty::operator= ( DataObjectDescriptorCollectionProperty value)

Definition at line 347 of file DataObjectDescriptor.cpp.

348  {
349 
350  m_dataItems = value.m_dataItems;
351  return *this;
352 }
DataObjectDescriptorCollection * m_dataItems
DataObjectDescriptorCollectionProperty & DataObjectDescriptorCollectionProperty::operator= ( const DataObjectDescriptorCollectionProperty value)

Definition at line 354 of file DataObjectDescriptor.cpp.

355  {
356 
357  delete m_dataItems;
359  return *this;
360 }
DataObjectDescriptorCollection * m_dataItems
const DataObjectDescriptorCollection & value() const
DataObjectDescriptorCollectionProperty& DataObjectDescriptorCollectionProperty::operator= ( const DataObjectDescriptorCollectionProperty value)
bool DataObjectDescriptorCollectionProperty::setValue ( DataObjectDescriptorCollection value)

Definition at line 404 of file DataObjectDescriptor.cpp.

404  {
405  m_dataItems = &value;
406  return useUpdateHandler();
407 }
DataObjectDescriptorCollection * m_dataItems
const DataObjectDescriptorCollection & value() const
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:92
bool DataObjectDescriptorCollectionProperty::setValue ( DataObjectDescriptorCollection value)
void DataObjectDescriptorCollectionProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

Definition at line 379 of file DataObjectDescriptor.cpp.

379  {
380  useReadHandler();
381  out << m_dataItems->toString();
382 }
DataObjectDescriptorCollection * m_dataItems
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
const std::string toString() const
virtual void DataObjectDescriptorCollectionProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

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

value -> string

Implements Property.

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

value -> string

Implements Property.

Definition at line 374 of file DataObjectDescriptor.cpp.

374  {
375  useReadHandler();
376  return m_dataItems->toString();
377 }
DataObjectDescriptorCollection * m_dataItems
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
const std::string toString() const
const DataObjectDescriptorCollection & DataObjectDescriptorCollectionProperty::value ( ) const

Definition at line 399 of file DataObjectDescriptor.cpp.

399  {
400  useReadHandler();
401  return *m_dataItems;
402 }
DataObjectDescriptorCollection * m_dataItems
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
const DataObjectDescriptorCollection& DataObjectDescriptorCollectionProperty::value ( ) const

Member Data Documentation

DataObjectDescriptorCollection * DataObjectDescriptorCollectionProperty::m_dataItems
private

Definition at line 206 of file DataObjectDescriptor.h.


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