ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgTools
AsgTools
TProperty.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ASGTOOLS_TPROPERTY_H
6
#define ASGTOOLS_TPROPERTY_H
7
8
// System include(s):
9
#include <string>
10
#include <vector>
11
12
// Local include(s):
13
#include "
AsgTools/ToolHandle.h
"
14
#include "
AsgTools/ToolHandleArray.h
"
15
#include "
AsgTools/Property.h
"
16
27
template
<
typename
T >
28
class
TProperty
:
public
Property
{
29
30
public
:
32
TProperty
( T& val,
Type
type
);
33
35
const
T*
pointer
()
const
;
36
38
virtual
int
setFrom
(
const
Property
& rhs );
39
40
virtual
StatusCode
getString
(std::string& result)
const
;
41
42
virtual
StatusCode
getCastString
(std::string& result)
const
;
43
44
virtual
StatusCode
setString
(
const
std::string& value);
45
46
private
:
48
T*
m_ptr
;
49
50
};
// class TProperty
51
54
56
template
<>
57
int
TProperty< std::string >::setFrom
(
const
Property
& rhs );
59
61
64
66
Property
*
createProperty
(
const
bool
& rval );
67
69
Property
*
createProperty
(
const
int
& rval );
70
72
Property
*
createProperty
(
const
float
& rval );
73
75
Property
*
createProperty
(
const
double
& rval );
76
78
Property
*
createProperty
(
const
std::string& rval );
79
81
Property
*
createProperty
(
const
std::vector< int >& rval );
82
84
Property
*
createProperty
(
const
std::vector< float >& rval );
85
87
Property
*
createProperty
(
const
std::vector< std::string >& rval );
88
90
template
<
typename
T >
91
Property
*
createProperty
(
const
T& rval );
92
94
95
// Include the template implementation:
96
#include "
AsgTools/TProperty.icc
"
97
98
#endif
// ASGTOOLS_TPROPERTY_H
Property.h
createProperty
Property * createProperty(const bool &rval)
Create a boolean propert.
Definition
TProperty.cxx:589
TProperty.icc
ToolHandleArray.h
ToolHandle.h
Property
Support class for PropertyMgr.
Definition
Property.h:23
Property::type
Type type() const
Return the type index.
Definition
Property.cxx:58
Property::Type
Type
Property type enumeration.
Definition
Property.h:27
Property::Property
Property()
Default constructor.
Definition
Property.cxx:43
TProperty::setString
virtual StatusCode setString(const std::string &value)
set the property from a string
TProperty::getString
virtual StatusCode getString(std::string &result) const
get the property as a string
TProperty::m_ptr
T * m_ptr
The address of the wrapped variable.
Definition
TProperty.h:48
TProperty::getCastString
virtual StatusCode getCastString(std::string &result) const
get the property as a string I can pas to setString
TProperty::pointer
const T * pointer() const
Return the address of the property variable.
TProperty::TProperty
TProperty(T &val, Type type)
Constructor from a reference and a type.
TProperty::setFrom
virtual int setFrom(const Property &rhs)
Set value using that from another property.
Generated on
for ATLAS Offline Software by
1.17.0