ATLAS Offline Software
Loading...
Searching...
No Matches
VarHandleKeyProperty.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5*/
6
17
18
19#ifndef STOREGATE_VARHANDLEKEYPROPERTY_H
20#define STOREGATE_VARHANDLEKEYPROPERTY_H
21
22
31#include "GaudiKernel/DataHandleProperty.h"
32#include <iostream>
33
34namespace Gaudi {
35namespace Parsers {
36
37
47StatusCode parse(SG::VarHandleKey& v, const std::string& s);
48
49} //> ns Parsers
50
51namespace Utils {
52
53
63std::ostream& toStream(const SG::VarHandleKey& v, std::ostream& o);
64
65} //> ns Utils
66} //> ns Gaudi
67
68
69namespace SG {
70
71
78class VarHandleKeyProperty : public DataHandleProperty
79{
80public:
81
87 VarHandleKeyProperty( const std::string& name, SG::VarHandleKey& ref );
88
89
97
98
105 virtual VarHandleKeyProperty* clone() const override;
106
107
116 virtual bool load( Gaudi::Details::PropertyBase& destination ) const override;
117
118
127 virtual bool assign( const Gaudi::Details::PropertyBase& source ) override;
128
129
133 virtual std::string toString() const override;
134
135
140 virtual void toStream(std::ostream& out) const override;
141
142
149 virtual StatusCode fromString(const std::string& s) override;
150
151
155 const SG::VarHandleKey& value() const;
156
157
164 bool setValue( const SG::VarHandleKey& value );
165
166
167private:
172};
173
174
175} // namespace SG
176
177
178// ** Specializations of SimplePropertyRef for the HandleKey classes.
179
180namespace Gaudi {
181
182
183template<>
184class Property<::SG::VarHandleKey&> : public ::SG::VarHandleKeyProperty {
185public:
187};
188
189
190template<typename T>
191class Property<::SG::ReadHandleKey<T>&> : public ::SG::VarHandleKeyProperty {
192public:
194};
195
196
197template<typename T>
198class Property<::SG::WriteHandleKey<T>&> : public ::SG::VarHandleKeyProperty {
199public:
201};
202
203
204template<typename T>
206public:
208};
209
210
211template<typename T>
213public:
215};
216
217
218template<typename T>
219class Property<::SG::UpdateHandleKey<T>&> : public ::SG::VarHandleKeyProperty {
220public:
222};
223
224
225template<typename T>
226class Property<::SG::ReadCondHandleKey<T>&> : public ::SG::VarHandleKeyProperty {
227public:
229};
230
231
232template<typename T>
234public:
236};
237
238
239} // namespace Gaudi
240
241
242#endif // not STOREGATE_VARHANDLEKEYPROPERTY_H
const boost::regex ref(r_ef)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
A property holding a SG store/key/clid from which a VarHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which an UpdateHandle is made.
VarHandleKeyProperty is the class which wraps a SG::VarHandleKey.
bool setValue(const SG::VarHandleKey &value)
Set the value object for this Property.
VarHandleKeyProperty(const std::string &name, SG::VarHandleKey &ref)
Constructor with parameters.
virtual VarHandleKeyProperty * clone() const override
Return a new copy of this Property object.
VarHandleKeyProperty & operator=(const SG::VarHandleKey &value)
Assignment operator.
const SG::VarHandleKey & value() const
Return the value object for this Property.
virtual bool load(Gaudi::Details::PropertyBase &destination) const override
Set the value of another Property.
virtual StatusCode fromString(const std::string &s) override
Set this value object from a string.
virtual void toStream(std::ostream &out) const override
Write a string representation of the value object to a stream.
virtual bool assign(const Gaudi::Details::PropertyBase &source) override
Set the value of this Property from another.
SG::VarHandleKey * m_pValue
Pointer to the real property.
virtual std::string toString() const override
Return a string representation of the value object.
A property holding a SG store/key/clid from which a VarHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
::StatusCode StatusCode
StatusCode definition for legacy code.
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.