Wallaroo
0.8
|
#include <attribute.h>
Public Member Functions | |
Attribute (const std::string &name, const RegToken &token) | |
virtual void | Value (const std::string &v) |
operator T () | |
operator T () const | |
const char * | c_str () const |
Attribute & | operator= (const Attribute &a) |
Attribute & | operator= (const T &v) |
Attribute & | operator++ () |
T | operator++ (int) |
Attribute & | operator-- () |
T | operator-- (int) |
Attribute & | operator+= (const T &rhs) |
Attribute & | operator-= (const T &rhs) |
Attribute & | operator*= (const T &rhs) |
Attribute & | operator/= (const T &rhs) |
Public Member Functions inherited from wallaroo::DeserializableValue | |
virtual | ~DeserializableValue () |
This is an attribute of a part. An attribute has a type T and you can set its value at runtime by code or from a configuration file.
You can put an Attribute inside your part and read its value and use it as if it were of type T.
T | The type of the value contained |
|
inline |
Create a Attribute and register it to its part so that you can assign a value to it.
name | the name of this attribute |
token | the registration token. You get an instance by calling Part::RegistrationToken() |
|
inline |
Conversion to C style string. It is available only when T
is a std::string
.
|
inline |
Conversion operator to the internal type T
. Retrieve the internal value. Non const version.
|
inline |
Conversion operator to the internal type T
. Retrieve the internal value. Const version.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Assign a value to the Attribute using a string as representation
v | the string representation of the value |
WrongType | if v cannot be converted to T |
Implements wallaroo::DeserializableValue.