ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgTools
AsgTools
Property.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_PROPERTY_H
6
#define ASGTOOLS_PROPERTY_H
7
8
// System include(s):
9
#include <string>
10
#include <vector>
11
12
class
StatusCode
;
13
23
class
Property
{
24
25
public
:
27
enum
Type
{
28
UNKNOWNTYPE
,
29
BOOL
,
30
INT
,
31
FLOAT
,
32
DOUBLE
,
33
STRING
,
34
INTVECTOR
,
35
FLOATVECTOR
,
36
STRINGVECTOR
,
37
TOOLHANDLE
,
38
TOOLHANDLEARRAY
39
};
// enum Type
40
42
typedef
std::vector< int >
IntVector
;
44
typedef
std::vector< float >
FloatVector
;
46
typedef
std::vector< std::string >
StringVector
;
47
49
static
const
std::string&
name
(
Type
type
);
50
52
Property
();
54
Property
(
Type
type
);
56
virtual
~Property
() {}
57
60
bool
isValid
()
const
;
61
63
Type
type
()
const
;
64
66
const
std::string&
typeName
()
const
;
67
68
// Set the value from another property.
69
// Returns 0 for success.
70
// The implementation here fails with error -1.
71
virtual
int
setFrom
(
const
Property
& rhs );
72
73
79
virtual
StatusCode
getString
(std::string& result)
const
;
80
93
virtual
StatusCode
getCastString
(std::string& result)
const
;
94
101
virtual
StatusCode
setString
(
const
std::string& value);
102
103
104
private
:
106
Type
m_type
;
107
108
};
// class Property
109
110
#endif
// ASGTOOLS_PROPERTY_H
Property
Support class for PropertyMgr.
Definition
Property.h:23
Property::name
static const std::string & name(Type type)
Function returning a user-readable name for a property type.
Definition
Property.cxx:21
Property::type
Type type() const
Return the type index.
Definition
Property.cxx:58
Property::StringVector
std::vector< std::string > StringVector
Convenience type declaration for a string vector.
Definition
Property.h:46
Property::isValid
bool isValid() const
Return if this is a valid property.
Definition
Property.cxx:53
Property::getString
virtual StatusCode getString(std::string &result) const
get the property as a string
Definition
Property.cxx:76
Property::m_type
Type m_type
The type of the property.
Definition
Property.h:106
Property::typeName
const std::string & typeName() const
Return the type name.
Definition
Property.cxx:63
Property::setFrom
virtual int setFrom(const Property &rhs)
Definition
Property.cxx:68
Property::IntVector
std::vector< int > IntVector
Convenience type declaration for an integer vector.
Definition
Property.h:42
Property::Type
Type
Property type enumeration.
Definition
Property.h:27
Property::FLOATVECTOR
@ FLOATVECTOR
Definition
Property.h:35
Property::INTVECTOR
@ INTVECTOR
Definition
Property.h:34
Property::DOUBLE
@ DOUBLE
Definition
Property.h:32
Property::TOOLHANDLEARRAY
@ TOOLHANDLEARRAY
Definition
Property.h:38
Property::UNKNOWNTYPE
@ UNKNOWNTYPE
Definition
Property.h:28
Property::STRING
@ STRING
Definition
Property.h:33
Property::FLOAT
@ FLOAT
Definition
Property.h:31
Property::TOOLHANDLE
@ TOOLHANDLE
Definition
Property.h:37
Property::STRINGVECTOR
@ STRINGVECTOR
Definition
Property.h:36
Property::INT
@ INT
Definition
Property.h:30
Property::BOOL
@ BOOL
Definition
Property.h:29
Property::~Property
virtual ~Property()
Destructor.
Definition
Property.h:56
Property::setString
virtual StatusCode setString(const std::string &value)
set the property from a string
Definition
Property.cxx:86
Property::Property
Property()
Default constructor.
Definition
Property.cxx:43
Property::getCastString
virtual StatusCode getCastString(std::string &result) const
get the property as a string I can pas to setString
Definition
Property.cxx:81
Property::FloatVector
std::vector< float > FloatVector
Convenience type declaration for a float vector.
Definition
Property.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Type
Generated on
for ATLAS Offline Software by
1.17.0