ATLAS Offline Software
Loading...
Searching...
No Matches
SG::VarHandleKeyArrayProperty Class Reference

#include <VarHandleKeyArrayProperty.h>

Inheritance diagram for SG::VarHandleKeyArrayProperty:
Collaboration diagram for SG::VarHandleKeyArrayProperty:

Public Member Functions

 VarHandleKeyArrayProperty (const std::string &name, SG::VarHandleKeyArray &ref)
 Constructor with parameters.
VarHandleKeyArrayPropertyoperator= (const SG::VarHandleKeyArray &value)
 Assignment operator.
VarHandleKeyArrayPropertyclone () 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::VarHandleKeyArrayvalue () const
 Return the value object for this Property.
bool setValue (const SG::VarHandleKeyArray &value)
 Set the value object for this Property.

Private Attributes

SG::VarHandleKeyArraym_pValue
 Pointer to the real property.

Detailed Description

Definition at line 33 of file VarHandleKeyArrayProperty.h.

Constructor & Destructor Documentation

◆ VarHandleKeyArrayProperty()

SG::VarHandleKeyArrayProperty::VarHandleKeyArrayProperty ( const std::string & name,
SG::VarHandleKeyArray & ref )

Constructor with parameters.

Parameters
nameName of the property.
refObject which this property is setting.

Definition at line 21 of file VarHandleKeyArrayProperty.cxx.

23 : PropertyWithHandlers( name, typeid( ref ) ),
24 m_pValue( &ref )
25 {
26}
const boost::regex ref(r_ef)
SG::VarHandleKeyArray * m_pValue
Pointer to the real property.

Member Function Documentation

◆ assign()

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

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 80 of file VarHandleKeyArrayProperty.cxx.

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

◆ clone()

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

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 50 of file VarHandleKeyArrayProperty.cxx.

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

◆ fromString()

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

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 118 of file VarHandleKeyArrayProperty.cxx.

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

◆ load()

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

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 65 of file VarHandleKeyArrayProperty.cxx.

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

◆ operator=()

VarHandleKeyArrayProperty & SG::VarHandleKeyArrayProperty::operator= ( const SG::VarHandleKeyArray & value)

Assignment operator.

Parameters
valueValue from which to assign.

Copy the value object which we control from another value object.

Definition at line 36 of file VarHandleKeyArrayProperty.cxx.

37{
38 setValue( value );
39 return *this;
40}
bool setValue(const SG::VarHandleKeyArray &value)
Set the value object for this Property.
const SG::VarHandleKeyArray & value() const
Return the value object for this Property.

◆ setValue()

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

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 147 of file VarHandleKeyArrayProperty.cxx.

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

◆ toStream()

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

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

Parameters
outStream to which to write.

Definition at line 104 of file VarHandleKeyArrayProperty.cxx.

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

◆ toString()

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

Return a string representation of the value object.

Definition at line 90 of file VarHandleKeyArrayProperty.cxx.

91{
92 useReadHandler();
93 std::ostringstream o;
95 return o.str();
96}
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

Return the value object for this Property.

Definition at line 133 of file VarHandleKeyArrayProperty.cxx.

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

Member Data Documentation

◆ m_pValue

SG::VarHandleKeyArray* SG::VarHandleKeyArrayProperty::m_pValue
private

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