ATLAS Offline Software
Loading...
Searching...
No Matches
VarHandleKeyArrayProperty.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// STL includes
6#include <sstream>
7#include <map>
8
9// StoreGate includes
11
12namespace SG {
13
14
22 : PropertyWithHandlers( name, typeid( ref ) ),
23 m_pValue( &ref )
24 {
25}
26
27
40
41
50{
51 return new VarHandleKeyArrayProperty( *this );
52}
53
54
63bool
64VarHandleKeyArrayProperty::load( Gaudi::Details::PropertyBase& destination ) const
65{
66 return destination.assign( *this );
67}
68
69
78bool
79VarHandleKeyArrayProperty::assign( const Gaudi::Details::PropertyBase& source )
80{
81 return fromString( source.toString() ).isSuccess();
82}
83
84
88std::string
90{
91 useReadHandler();
92 std::ostringstream o;
94 return o.str();
95}
96
97
102void
104{
105 useReadHandler();
106 out << this->toString();
107}
108
109
116StatusCode
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}
126
127
133{
134 useReadHandler();
135 return *m_pValue;
136}
137
138
145bool
147{
148 m_pValue->operator=(value);
149 return useUpdateHandler();
150}
151
152
153} // namespace SG
const boost::regex ref(r_ef)
class to handle Properties for VarHandleKeyArray
std::string toString() const override
Return a string representation of the value object.
SG::VarHandleKeyArray * m_pValue
Pointer to the real property.
VarHandleKeyArrayProperty(const std::string &name, SG::VarHandleKeyArray &ref)
Constructor with parameters.
bool setValue(const SG::VarHandleKeyArray &value)
Set the value object for this Property.
void toStream(std::ostream &out) const override
Write a string representation of the value object to a stream.
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.
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 assign(const Gaudi::Details::PropertyBase &source) override
Set the value of this Property from another.
VarHandleKeyArrayProperty & operator=(const SG::VarHandleKeyArray &value)
Assignment operator.
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
std::ostream & toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.
Forward declaration.