ATLAS Offline Software
Loading...
Searching...
No Matches
VarHandleKeyArrayProperty.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef STOREGATE_VARHANDLEKEYARRAYPROPERTY
6#define STOREGATE_VARHANDLEKEYARRAYPROPERTY 1
7
14
18#include "Gaudi/Property.h"
19#include <iostream>
20
21namespace Gaudi {
22 namespace Parsers {
23 StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s);
24 }
25
26 namespace Utils {
27 std::ostream& toStream(const SG::VarHandleKeyArray& v, std::ostream& o);
28 }
29}
30
31namespace SG {
32
34 : public ::PropertyWithHandlers <>
35 {
36 public:
37
38 VarHandleKeyArrayProperty( const std::string& name,
40
42
43 VarHandleKeyArrayProperty* clone() const override;
44
45 bool load( Gaudi::Details::PropertyBase& destination ) const override;
46
47 bool assign( const Gaudi::Details::PropertyBase& source ) override;
48
49 std::string toString() const override;
50
51 void toStream(std::ostream& out) const override;
52
53 StatusCode fromString(const std::string& s) override;
54
55 const SG::VarHandleKeyArray& value() const;
56
58
59
60 private:
65 };
66
67
68} // namespace SG
69
70namespace Gaudi {
71template<>
72 class Property<SG::VarHandleKeyArray&> : public SG::VarHandleKeyArrayProperty
73{
74public:
75 Property(const std::string& name, SG::VarHandleKeyArray& value) :
77 virtual ~Property() {}
78};
79
80template<typename T>
81 class Property<SG::ReadHandleKeyArray<T>&> : public SG::VarHandleKeyArrayProperty
82{
83public:
84 Property(const std::string& name, SG::ReadHandleKeyArray<T>& value) :
86 virtual ~Property() {}
87};
88
89template<typename T>
90 class Property<SG::WriteHandleKeyArray<T>&> : public SG::VarHandleKeyArrayProperty
91{
92public:
93 Property(const std::string& name, SG::WriteHandleKeyArray<T>& value) :
95 virtual ~Property() {}
96};
97
98}
99
100
101
102
103#endif
const boost::regex ref(r_ef)
Base class for VarHandleKeyArray for reading from StoreGate.
Property(const std::string &name, SG::ReadHandleKeyArray< T > &value)
Property(const std::string &name, SG::VarHandleKeyArray &value)
Property(const std::string &name, SG::WriteHandleKeyArray< T > &value)
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 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.
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray