| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
DataObjIDCollProperty Class Reference

`#include <GaudiKernel/DataObjIDProperty.h>`

Inheritance diagram for DataObjIDCollProperty:
[legend]
Collaboration diagram for DataObjIDCollProperty:
[legend]

## Public Member Functions
| DataObjIDCollProperty (const std::string &name, DataObjIDColl &ref)
DataObjIDCollProperty & | operator= (const DataObjIDColl &value)
virtual | ~DataObjIDCollProperty ()
DataObjIDCollProperty * | clone () 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 DataObjIDColl & | value () const
bool | setValue (const DataObjIDColl &value)
Public Member Functions inherited from PropertyWithHandlers<>
PropertyBase & | declareReadHandler (std::function< void(PropertyBase &)> fun) override
| set new callback for reading More...
PropertyBase & | declareUpdateHandler (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_info * | type_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 PropertyBase & | declareReadHandler (std::function< void(PropertyBase &)> fun)=0
| set new callback for reading More...
virtual PropertyBase & | declareUpdateHandler (std::function< void(PropertyBase &)> fun)=0
| set new callback for update More...
template<class HT >
PropertyBase & | declareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
template<class HT >
PropertyBase & | declareUpdateHandler (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::ostream & | fillStream (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_info * | ownerType () 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
DataObjIDColl * | m_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...
PropertyBase & | operator= (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 230 of file DataObjIDProperty.cpp.

232 : PropertyWithHandlers( name, typeid( DataObjIDColl ) ),
233 m_pValue( &ref )
234 {}
PropertyWithHandlers
Helper class to simplify the migration old properties deriving directly from PropertyBase.
Definition: Property.h:751
std::unordered_set< DataObjID, DataObjID_Hasher >
DataObjIDCollProperty::m_pValue
DataObjIDColl * m_pValue
Pointer to the real property.
Definition: DataObjIDProperty.h:108

DataObjIDCollProperty::~DataObjIDCollProperty | ( |  | ) |
| virtual

Definition at line 238 of file DataObjIDProperty.cpp.

239 {}

## Member Function Documentation

bool DataObjIDCollProperty::assign | ( | const Property & | source | ) |
| inline override

Definition at line 165 of file DataObjIDProperty.h.

166 {
167 return fromString( source.toString() ).isSuccess();
168 }
DataObjIDCollProperty::fromString
StatusCode fromString(const std::string &s) override
string -> value
Definition: DataObjIDProperty.cpp:244

DataObjIDCollProperty * DataObjIDCollProperty::clone | ( |  | ) | const
| inline override virtual

clones the current property

Implements Gaudi::Details::PropertyBase.

Definition at line 158 of file DataObjIDProperty.h.

158 { return new DataObjIDCollProperty( *this ); }
DataObjIDCollProperty::DataObjIDCollProperty
DataObjIDCollProperty(const std::string &name, DataObjIDColl &ref)
Definition: DataObjIDProperty.cpp:230

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

string -> value

Implements Gaudi::Details::PropertyBase.

Definition at line 244 of file DataObjIDProperty.cpp.

245 {
246 if (!Gaudi::Parsers::parse(*m_pValue, s).isSuccess()) {
247 return StatusCode::FAILURE;
248 }
249 return useUpdateHandler()
250 ? StatusCode::SUCCESS
251 : StatusCode::FAILURE;
252 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode::FAILURE
Definition: StatusCode.h:29
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:11
PropertyWithHandlers<>::useUpdateHandler
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:780
gaudirun.s
string s
Definition: gaudirun.py:245
DataObjIDCollProperty::m_pValue
DataObjIDColl * m_pValue
Pointer to the real property.
Definition: DataObjIDProperty.h:108

bool DataObjIDCollProperty::load | ( | Property & | destination | ) | const
| inline override

Definition at line 160 of file DataObjIDProperty.h.

161 {
162 return destination.assign( *this );
163 }

DataObjIDCollProperty & DataObjIDCollProperty::operator= | ( | const DataObjIDColl & | value | ) |
| inline

Definition at line 152 of file DataObjIDProperty.h.

153 {
154 setValue( value );
155 return *this;
156 }
DataObjIDCollProperty::setValue
bool setValue(const DataObjIDColl &value)
Definition: DataObjIDProperty.cpp:257

bool DataObjIDCollProperty::setValue | ( | const DataObjIDColl & | value | ) |

Definition at line 257 of file DataObjIDProperty.cpp.

258 {
259 m_pValue->operator=(value);
260 return useUpdateHandler();
261 }
PropertyWithHandlers<>::useUpdateHandler
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:780
DataObjIDCollProperty::m_pValue
DataObjIDColl * m_pValue
Pointer to the real property.
Definition: DataObjIDProperty.h:108
DataObjIDCollProperty::value
const DataObjIDColl & value() const
Definition: DataObjIDProperty.h:170

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

value -> stream

Implements Gaudi::Details::PropertyBase.

Definition at line 276 of file DataObjIDProperty.cpp.

277 {
278 useReadHandler();
279 out << this->toString();
280 }
DataObjIDCollProperty::toString
std::string toString() const override
value -> string
Definition: DataObjIDProperty.cpp:266
PropertyWithHandlers<>::useReadHandler
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:777

std::string DataObjIDCollProperty::toString | ( |  | ) | const
| override virtual

value -> string

Implements Gaudi::Details::PropertyBase.

Definition at line 266 of file DataObjIDProperty.cpp.

267 {
268 useReadHandler();
269 std::ostringstream o;
270 Gaudi::Utils::toStream(*m_pValue, o);
271 return o.str();
272 }
Gaudi::Utils::toStream
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:315
std::ostringstream
STL class.
std::ostringstream::str
T str(T...args)
PropertyWithHandlers<>::useReadHandler
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:777
DataObjIDCollProperty::m_pValue
DataObjIDColl * m_pValue
Pointer to the real property.
Definition: DataObjIDProperty.h:108

const DataObjIDColl & DataObjIDCollProperty::value | ( |  | ) | const
| inline

Definition at line 170 of file DataObjIDProperty.h.

171 {
172 useReadHandler();
173 return *m_pValue;
174 }
PropertyWithHandlers<>::useReadHandler
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:777
DataObjIDCollProperty::m_pValue
DataObjIDColl * m_pValue
Pointer to the real property.
Definition: DataObjIDProperty.h:108

## 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:

- GaudiKernel/GaudiKernel/DataObjIDProperty.h
- GaudiKernel/src/Lib/DataObjIDProperty.cpp