ATLAS Offline Software
Loading...
Searching...
No Matches
Gaudi::Property< SG::ReadHandleKeyArray< T > & > Class Template Reference

#include <VarHandleKeyArrayProperty.h>

Inheritance diagram for Gaudi::Property< SG::ReadHandleKeyArray< T > & >:
Collaboration diagram for Gaudi::Property< SG::ReadHandleKeyArray< T > & >:

Public Member Functions

 Property (const std::string &name, SG::ReadHandleKeyArray< T > &value)
virtual ~Property ()
VarHandleKeyArrayProperty * clone () const override
 Return a new copy of this Property object.
bool load (Gaudi::Details::PropertyBase &destination) const override
 Set the value of another Property.
bool assign (const Gaudi::Details::PropertyBase &source) override
 Set the value of this Property from another.
std::string toString () const override
 Return a string representation of the value object.
void toStream (std::ostream &out) const override
 Write a string representation of the value object to a stream.
StatusCode fromString (const std::string &s) override
 Set this value object from a string.
const SG::VarHandleKeyArray & value () const
 Return the value object for this Property.
bool setValue (const SG::VarHandleKeyArray &value)
 Set the value object for this Property.

Private Attributes

SG::VarHandleKeyArray * m_pValue
 Pointer to the real property.

Detailed Description

template<typename T>
class Gaudi::Property< SG::ReadHandleKeyArray< T > & >

Definition at line 81 of file VarHandleKeyArrayProperty.h.

Constructor & Destructor Documentation

◆ Property()

template<typename T>
Gaudi::Property< SG::ReadHandleKeyArray< T > & >::Property ( const std::string & name,
SG::ReadHandleKeyArray< T > & value )
inline

Definition at line 84 of file VarHandleKeyArrayProperty.h.

84 :
85 SG::VarHandleKeyArrayProperty(name, value) {}
const SG::VarHandleKeyArray & value() const
Return the value object for this Property.

◆ ~Property()

template<typename T>
virtual Gaudi::Property< SG::ReadHandleKeyArray< T > & >::~Property ( )
inlinevirtual

Definition at line 86 of file VarHandleKeyArrayProperty.h.

86{}

Member Function Documentation

◆ assign()

bool SG::VarHandleKeyArrayProperty::assign ( const Gaudi::Details::PropertyBase & source)
overrideinherited

Set the value of this Property from another.

Parameters
destinationThe Property from which the value should be copied.

The value object of this source is copied to that of this Property by converting to a string and back again. Returns true on success, false on failure.

Definition at line 79 of file VarHandleKeyArrayProperty.cxx.

80{
81 return fromString( source.toString() ).isSuccess();
82}
StatusCode fromString(const std::string &s) override
Set this value object from a string.

◆ clone()

VarHandleKeyArrayProperty * SG::VarHandleKeyArrayProperty::clone ( ) const
overrideinherited

Return a new copy of this Property object.

The new object will be associated with the same value object as the original.

Definition at line 49 of file VarHandleKeyArrayProperty.cxx.

50{
51 return new VarHandleKeyArrayProperty( *this );
52}
VarHandleKeyArrayProperty(const std::string &name, SG::VarHandleKeyArray &ref)
Constructor with parameters.

◆ fromString()

StatusCode SG::VarHandleKeyArrayProperty::fromString ( const std::string & s)
overrideinherited

Set this value object from a string.

Parameters
sString from which to initialize the value.

Returns failure if the conversion does not succeed.

Definition at line 117 of file VarHandleKeyArrayProperty.cxx.

118{
119 if (!Gaudi::Parsers::parse(*m_pValue, s).isSuccess()) {
120 return StatusCode::FAILURE;
121 }
122 return useUpdateHandler()
123 ? StatusCode::SUCCESS
124 : StatusCode::FAILURE;
125}
SG::VarHandleKeyArray * m_pValue
Pointer to the real property.
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)

◆ load()

bool SG::VarHandleKeyArrayProperty::load ( Gaudi::Details::PropertyBase & destination) const
overrideinherited

Set the value of another Property.

Parameters
destinationThe Property whose value is changed.

The value object of this Property is copied to that of destination by converting to a string and back again. Returns true on success, false on failure.

Definition at line 64 of file VarHandleKeyArrayProperty.cxx.

65{
66 return destination.assign( *this );
67}

◆ setValue()

bool SG::VarHandleKeyArrayProperty::setValue ( const SG::VarHandleKeyArray & value)
inherited

Set the value object for this Property.

Parameters
valueValue from which to copy.

Return true on success; false if the update handler failed.

Definition at line 146 of file VarHandleKeyArrayProperty.cxx.

147{
148 m_pValue->operator=(value);
149 return useUpdateHandler();
150}

◆ toStream()

void SG::VarHandleKeyArrayProperty::toStream ( std::ostream & out) const
overrideinherited

Write a string representation of the value object to a stream.

Parameters
outStream to which to write.

Definition at line 103 of file VarHandleKeyArrayProperty.cxx.

104{
105 useReadHandler();
106 std::print (out, "{}", this->toString());
107}
std::string toString() const override
Return a string representation of the value object.

◆ toString()

std::string SG::VarHandleKeyArrayProperty::toString ( ) const
overrideinherited

Return a string representation of the value object.

Definition at line 89 of file VarHandleKeyArrayProperty.cxx.

90{
91 useReadHandler();
92 std::ostringstream o;
94 return o.str();
95}
std::ostream & toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.

◆ value()

const SG::VarHandleKeyArray & SG::VarHandleKeyArrayProperty::value ( ) const
inherited

Return the value object for this Property.

Definition at line 132 of file VarHandleKeyArrayProperty.cxx.

133{
134 useReadHandler();
135 return *m_pValue;
136}

Member Data Documentation

◆ m_pValue

SG::VarHandleKeyArray* SG::VarHandleKeyArrayProperty::m_pValue
privateinherited

Pointer to the real property.

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

Definition at line 64 of file VarHandleKeyArrayProperty.h.


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