ATLAS Offline Software
|
Templated wrapper around user properties. More...
#include <TProperty.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 | |
TProperty (T &val, Type type) | |
Constructor from a reference and a type. More... | |
const T * | pointer () const |
Return the address of the property variable. More... | |
virtual int | setFrom (const Property &rhs) |
Set value using that from another property. More... | |
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... | |
int | setFrom (const Property &rhs) |
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... | |
Declare specialization(s) for TProperty::setFrom | |
int | setFrom (const Property &rhs) |
Special handling for strings to interpret the user supplied 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 | |
T * | m_ptr |
The address of the wrapped variable. More... | |
Type | m_type |
The type of the property. More... | |
Templated wrapper around user properties.
This class is used to wrap user-defined tool properties, to be able to set them through the PropertyMgr.
Definition at line 28 of file TProperty.h.
|
inherited |
Convenience type declaration for a float vector.
Definition at line 44 of file Property.h.
|
inherited |
Convenience type declaration for an integer vector.
Definition at line 42 of file Property.h.
|
inherited |
Convenience type declaration for a string vector.
Definition at line 46 of file Property.h.
|
inherited |
Property type enumeration.
Enumerator | |
---|---|
UNKNOWNTYPE | |
BOOL | |
INT | |
FLOAT | |
DOUBLE | |
STRING | |
INTVECTOR | |
FLOATVECTOR | |
STRINGVECTOR | |
TOOLHANDLE | |
TOOLHANDLEARRAY |
Definition at line 27 of file Property.h.
Constructor from a reference and a type.
|
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 from Property.
|
virtual |
get the property as a string
Reimplemented from Property.
|
inherited |
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.
Return the address of the property variable.
Set value using that from another property.
Reimplemented from Property.
Special handling for strings to interpret the user supplied string.
Reimplemented from Property.
|
virtual |
set the property from a string
Reimplemented from Property.
|
inherited |
|
inherited |
Return the type name.
Definition at line 63 of file Property.cxx.
|
private |
The address of the wrapped variable.
Definition at line 48 of file TProperty.h.
|
privateinherited |
The type of the property.
Definition at line 106 of file Property.h.