DataObjIDCollProperty Class Reference

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/996/GAUDI/GAUDI_v26r4/InstallArea/x86_64-slc6-gcc48-opt/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 ()
 
virtual DataObjIDCollPropertyclone () 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 DataObjIDCollvalue () const
 
bool setValue (const DataObjIDColl &value)
 
 DataObjIDCollProperty (const std::string &name, DataObjIDColl &ref)
 
DataObjIDCollPropertyoperator= (const DataObjIDColl &value)
 
virtual ~DataObjIDCollProperty ()
 
virtual DataObjIDCollPropertyclone () 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 DataObjIDCollvalue () const
 
bool setValue (const DataObjIDColl &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 void declareReadHandler (std::function< void(Property &)> fun)
 set new callback for reading More...
 
virtual void declareUpdateHandler (std::function< void(Property &)> fun)
 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 ()=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 void declareReadHandler (std::function< void(Property &)> fun)
 set new callback for reading More...
 
virtual void declareUpdateHandler (std::function< void(Property &)> fun)
 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 ()=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

DataObjIDCollm_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 104 of file DataObjIDProperty.h.

Constructor & Destructor Documentation

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

Definition at line 227 of file DataObjIDProperty.cpp.

229  : Property( name, typeid( DataObjIDColl ) ),
230  m_pValue( &ref )
231 {}
const std::string & name() const
property name
Definition: Property.h:45
DataObjIDColl * m_pValue
Pointer to the real property.
std::unordered_set< DataObjID, DataObjID_Hasher > DataObjIDColl
Definition: DataObjID.h:124
DataObjIDCollProperty::~DataObjIDCollProperty ( )
virtual

Definition at line 235 of file DataObjIDProperty.cpp.

236 {}
DataObjIDCollProperty::DataObjIDCollProperty ( const std::string &  name,
DataObjIDColl ref 
)
virtual DataObjIDCollProperty::~DataObjIDCollProperty ( )
virtual

Member Function Documentation

bool DataObjIDCollProperty::assign ( const Property source)
inlinevirtual

import the property value form the source

Implements Property.

Definition at line 165 of file DataObjIDProperty.h.

166 {
167  return fromString( source.toString() ).isSuccess();
168 }
virtual StatusCode fromString(const std::string &s)
string -> value
virtual std::string toString() const =0
value -> string
virtual bool DataObjIDCollProperty::assign ( const Property source)
virtual

import the property value form the source

Implements Property.

DataObjIDCollProperty * DataObjIDCollProperty::clone ( ) const
inlinevirtual

clone: "virtual constructor"

Implements Property.

Definition at line 151 of file DataObjIDProperty.h.

152 {
153  return new DataObjIDCollProperty( *this );
154 }
DataObjIDCollProperty(const std::string &name, DataObjIDColl &ref)
virtual DataObjIDCollProperty* DataObjIDCollProperty::clone ( ) const
virtual

clone: "virtual constructor"

Implements Property.

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

string -> value

Implements Property.

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

string -> value

Implements Property.

Definition at line 241 of file DataObjIDProperty.cpp.

242 {
243  if (!Gaudi::Parsers::parse(*m_pValue, s).isSuccess()) {
244  return StatusCode::FAILURE;
245  }
246  return useUpdateHandler()
249 }
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:90
DataObjIDColl * m_pValue
Pointer to the real property.
string s
Definition: gaudirun.py:246
virtual bool DataObjIDCollProperty::load ( Property dest) const
virtual

export the property value to the destination

Implements Property.

bool DataObjIDCollProperty::load ( Property dest) const
inlinevirtual

export the property value to the destination

Implements Property.

Definition at line 158 of file DataObjIDProperty.h.

159 {
160  return destination.assign( *this );
161 }
DataObjIDCollProperty & DataObjIDCollProperty::operator= ( const DataObjIDColl value)
inline

Definition at line 143 of file DataObjIDProperty.h.

144 {
145  setValue( value );
146  return *this;
147 }
bool setValue(const DataObjIDColl &value)
const DataObjIDColl & value() const
DataObjIDCollProperty& DataObjIDCollProperty::operator= ( const DataObjIDColl value)
bool DataObjIDCollProperty::setValue ( const DataObjIDColl value)

Definition at line 254 of file DataObjIDProperty.cpp.

255 {
256  m_pValue->operator=(value);
257  return useUpdateHandler();
258 }
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:90
DataObjIDColl * m_pValue
Pointer to the real property.
const DataObjIDColl & value() const
bool DataObjIDCollProperty::setValue ( const DataObjIDColl value)
virtual void DataObjIDCollProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

void DataObjIDCollProperty::toStream ( std::ostream &  out) const
virtual

value -> stream

Implements Property.

Definition at line 273 of file DataObjIDProperty.cpp.

274 {
275  useReadHandler();
276  out << this->toString();
277 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:78
virtual std::string toString() const
value -> string
std::string DataObjIDCollProperty::toString ( ) const
virtual

value -> string

Implements Property.

Definition at line 263 of file DataObjIDProperty.cpp.

264 {
265  useReadHandler();
266  std::ostringstream o;
268  return o.str();
269 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:78
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:338
DataObjIDColl * m_pValue
Pointer to the real property.
virtual std::string DataObjIDCollProperty::toString ( ) const
virtual

value -> string

Implements Property.

const DataObjIDColl & DataObjIDCollProperty::value ( ) const
inline

Definition at line 172 of file DataObjIDProperty.h.

173 {
174  useReadHandler();
175  return *m_pValue;
176 }
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:78
DataObjIDColl * m_pValue
Pointer to the real property.
const DataObjIDColl& DataObjIDCollProperty::value ( ) const

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 124 of file DataObjIDProperty.h.


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