ATLAS Offline Software
|
Support class for PropertyMgr. More...
#include <Property.h>
Public Types | |
enum | Type { UNKNOWNTYPE, BOOL, INT, FLOAT, DOUBLE, STRING, INTVECTOR, FLOATVECTOR, STRINGVECTOR, TOOLHANDLE, TOOLHANDLEARRAY } |
Property type enumeration. More... | |
typedef std::vector< int > | IntVector |
Convenience type declaration for an integer vector. More... | |
typedef std::vector< float > | FloatVector |
Convenience type declaration for a float vector. More... | |
typedef std::vector< std::string > | StringVector |
Convenience type declaration for a string vector. More... | |
Public Member Functions | |
Property () | |
Default constructor. More... | |
Property (Type type) | |
Constructor with a type. More... | |
virtual | ~Property () |
Destructor. More... | |
bool | isValid () const |
Return if this is a valid property. More... | |
Type | type () const |
Return the type index. More... | |
const std::string & | typeName () const |
Return the type name. More... | |
virtual int | setFrom (const Property &rhs) |
virtual StatusCode | getString (std::string &result) const |
get the property as a string More... | |
virtual StatusCode | getCastString (std::string &result) const |
get the property as a string I can pas to setString More... | |
virtual StatusCode | setString (const std::string &value) |
set the property from a string More... | |
Static Public Member Functions | |
static const std::string & | name (Type type) |
Function returning a user-readable name for a property type. More... | |
Private Attributes | |
Type | m_type |
The type of the property. More... | |
Support class for PropertyMgr.
Base class for all property types that can be set on a tool.
Definition at line 23 of file Property.h.
typedef std::vector< float > Property::FloatVector |
Convenience type declaration for a float vector.
Definition at line 44 of file Property.h.
typedef std::vector< int > Property::IntVector |
Convenience type declaration for an integer vector.
Definition at line 42 of file Property.h.
typedef std::vector< std::string > Property::StringVector |
Convenience type declaration for a string vector.
Definition at line 46 of file Property.h.
enum Property::Type |
Property type enumeration.
Enumerator | |
---|---|
UNKNOWNTYPE | |
BOOL | |
INT | |
FLOAT | |
DOUBLE | |
STRING | |
INTVECTOR | |
FLOATVECTOR | |
STRINGVECTOR | |
TOOLHANDLE | |
TOOLHANDLEARRAY |
Definition at line 27 of file Property.h.
Property::Property | ( | ) |
Default constructor.
Definition at line 43 of file Property.cxx.
Property::Property | ( | Type | type | ) |
|
inlinevirtual |
|
virtual |
get the property as a string I can pas to setString
the main difference to getString is that this will not quote strings, i.e. it will assume strings are already properly quoted if they need to be and won't be otherwise. otherwise there will be an issue when setting non-strings from strings the user provided
Reimplemented in TProperty< T >.
Definition at line 81 of file Property.cxx.
|
virtual |
get the property as a string
Reimplemented in TProperty< T >.
Definition at line 76 of file Property.cxx.
bool Property::isValid | ( | ) | const |
Return if this is a valid property.
Must have a known type.
Definition at line 53 of file Property.cxx.
Function returning a user-readable name for a property type.
Definition at line 21 of file Property.cxx.
Reimplemented in TProperty< T >, TProperty< T >, and TProperty< T >.
Definition at line 68 of file Property.cxx.
|
virtual |
set the property from a string
Reimplemented in TProperty< T >.
Definition at line 86 of file Property.cxx.
Property::Type Property::type | ( | ) | const |
const std::string & Property::typeName | ( | ) | const |
Return the type name.
Definition at line 63 of file Property.cxx.
|
private |
The type of the property.
Definition at line 106 of file Property.h.