Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
More...
#include <Property.hpp>
Inherits PropertyBase.
|
| Property (const std::string &identifier, const std::string &description, T value) |
| Constructs Property. More...
|
|
| Property (const std::string &identifier, const std::string &description, const PropertyType &type, T value) |
| Constructs Property. More...
|
|
virtual | ~Property () |
| Destroys Property If the property value is a pointer, the object pointed to will NOT be destroyed.
|
|
T & | getValue () |
| Returns a reference to the property value. More...
|
|
const T & | getValue () const |
| Returns a constant reference to the property value. More...
|
|
PropertyValue< T > & | getPropertyValue () |
| returns reference to the property value More...
|
|
const PropertyValue< T > & | getPropertyValue () const |
| returns const reference to the property value More...
|
|
void | setValue (const T &value) |
| Sets the property value. More...
|
|
Property< T > * | clone () const |
| Construct a clone of the property. More...
|
|
| PropertyBase (const std::string &identifier, const std::string &description) |
| Constructor. More...
|
|
| PropertyBase (const std::string &identifier, const std::string &description, const PropertyType &type) |
| Constructor. More...
|
|
virtual | ~PropertyBase () |
| Destroys PropertyBase.
|
|
const std::string & | getIdentifier () const |
| Returns the Property identifier. More...
|
|
const std::string & | getDescription () const |
| Returns description. More...
|
|
void | setDescription (const std::string &desc, bool fireChangedEvent=true) |
| Set description. More...
|
|
ChangedEvent & | changedEvent () |
| get changed event More...
|
|
const rw::core::PropertyType & | getType () const |
| Returns the PropertyType. More...
|
|
template<class T>
class rw::core::Property< T >
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
◆ Property() [1/2]
Property |
( |
const std::string & |
identifier, |
|
|
const std::string & |
description, |
|
|
T |
value |
|
) |
| |
|
inline |
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
-
identifier | [in] identifier |
description | [in] description |
value | [in] value |
◆ Property() [2/2]
Property |
( |
const std::string & |
identifier, |
|
|
const std::string & |
description, |
|
|
const PropertyType & |
type, |
|
|
T |
value |
|
) |
| |
|
inline |
Constructs Property.
- Parameters
-
identifier | [in] identifier |
description | [in] description |
type | [in] type of property |
value | [in] value |
◆ clone()
◆ getPropertyValue() [1/2]
returns reference to the property value
- Returns
- value
Implements PropertyBase.
◆ getPropertyValue() [2/2]
returns const reference to the property value
- Returns
- value
Implements PropertyBase.
◆ getValue() [1/2]
Returns a reference to the property value.
- Note
- Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Returns
- reference to the property value.
◆ getValue() [2/2]
const T& getValue |
( |
| ) |
const |
|
inline |
Returns a constant reference to the property value.
- Returns
- constant reference to the property value.
◆ setValue()
void setValue |
( |
const T & |
value | ) |
|
|
inline |
Sets the property value.
This function will fire the changed event.
- Parameters
-
The documentation for this class was generated from the following file: