ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Gaudi::Property< SG::VarHandleKeyArray & > Class Reference

#include <VarHandleKeyArrayProperty.h>

Inheritance diagram for Gaudi::Property< SG::VarHandleKeyArray & >:
Collaboration diagram for Gaudi::Property< SG::VarHandleKeyArray & >:

Public Member Functions

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

Private Attributes

SG::VarHandleKeyArraym_pValue
 Pointer to the real property. More...
 

Detailed Description

Definition at line 74 of file VarHandleKeyArrayProperty.h.

Constructor & Destructor Documentation

◆ Property()

Gaudi::Property< SG::VarHandleKeyArray & >::Property ( const std::string &  name,
SG::VarHandleKeyArray value 
)
inline

Definition at line 77 of file VarHandleKeyArrayProperty.h.

◆ ~Property()

virtual Gaudi::Property< SG::VarHandleKeyArray & >::~Property ( )
inlinevirtual

Definition at line 79 of file VarHandleKeyArrayProperty.h.

79 {}

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

81 {
82  return fromString( source.toString() ).isSuccess();
83 }

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

51 {
52  return new VarHandleKeyArrayProperty( *this );
53 }

◆ 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 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 }

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

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

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

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

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

105 {
106  useReadHandler();
107  out << this->toString();
108 }

◆ toString()

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

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 }

◆ value()

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

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
privateinherited

Pointer to the real property.

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

Definition at line 66 of file VarHandleKeyArrayProperty.h.


The documentation for this class was generated from the following file:
SG::VarHandleKeyArrayProperty::VarHandleKeyArrayProperty
VarHandleKeyArrayProperty(const std::string &name, SG::VarHandleKeyArray &ref)
Constructor with parameters.
Definition: VarHandleKeyArrayProperty.cxx:21
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Gaudi::Parsers::parse
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:284
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::VarHandleKeyArrayProperty::toString
std::string toString() const override
Return a string representation of the value object.
Definition: VarHandleKeyArrayProperty.cxx:90
SG::VarHandleKeyArrayProperty::value
const SG::VarHandleKeyArray & value() const
Return the value object for this Property.
Definition: VarHandleKeyArrayProperty.cxx:133
SG::VarHandleKeyArrayProperty
Definition: VarHandleKeyArrayProperty.h:37
SG::VarHandleKeyArrayProperty::m_pValue
SG::VarHandleKeyArray * m_pValue
Pointer to the real property.
Definition: VarHandleKeyArrayProperty.h:66
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::VarHandleKeyArrayProperty::fromString
StatusCode fromString(const std::string &s) override
Set this value object from a string.
Definition: VarHandleKeyArrayProperty.cxx:118
Gaudi::Utils::toStream
std::ostream &GAUDI_API toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.
Definition: StoreGate/src/VarHandleKeyArray.cxx:49