Reflection interface to a property in a PropertySet.
More...
#include <properties.h>
Inherited by core::TypedProperty< T >, and core::VariantProperty< T >.
|
|
const string & | name () const |
| | Property name.
|
| |
|
const string & | description () const |
| | Property description.
|
| |
|
PropertySet * | parent () const |
| | The PropertySet which contains this property.
|
| |
|
virtual string | value () const =0 |
| | The property value, formatted as a string.
|
| |
|
virtual string | defaultValue () const =0 |
| | The default property value, formatted as a string.
|
| |
|
virtual PropertySet * | childPropertySet () const |
| | Return the optional child PropertySet, or nullptr
|
| |
|
virtual void | setValue (const string &str)=0 |
| | Update the current value from a string representation.
|
| |
|
virtual vector< string > | knownValues () const =0 |
| | The list of known possible values (when available, for example enums)
|
| |
| virtual void | copyFrom (const Property &src)=0 |
| | Copies values between properties of the same runtime type. More...
|
| |
|
virtual json | toJson () const =0 |
| | Serialize the property value to a json object.
|
| |
|
virtual void | fromJson (const json &json_obj)=0 |
| | Deserialize the property value from a json object.
|
| |
| template<class T > |
| const T & | nativeValue () const |
| | Type-safe accessor to the native property value. More...
|
| |
|
template<class T > |
| bool | isA () const |
| | Returns true if the property wraps a T value.
|
| |
Reflection interface to a property in a PropertySet.
- See also
- PropertySet
◆ copyFrom()
| virtual void core::Property::copyFrom |
( |
const Property & |
src | ) |
|
|
pure virtual |
Copies values between properties of the same runtime type.
- Exceptions
-
| std::bad_cast | if the types don't match |
◆ nativeValue()
template<class T >
| const T& core::Property::nativeValue |
( |
| ) |
const |
|
inline |
Type-safe accessor to the native property value.
- Exceptions
-
The documentation for this class was generated from the following file: