RobWorkProject
23.9.11-
|
PropertyValue class. More...
#include <PropertyValue.hpp>
Inherits PropertyValueBase.
Public Types | |
typedef rw::core::Ptr< PropertyValue > | Ptr |
Smart pointer type to this class. | |
Public Types inherited from PropertyValueBase | |
typedef rw::core::Ptr< PropertyValueBase > | Ptr |
Smart pointer type to this class. | |
typedef std::function< void(PropertyValueBase *)> | PropertyListener |
Method signature for a callback function. | |
typedef rw::core::Event< PropertyListener, PropertyValueBase * > | ChangedEvent |
Type for changed property events. | |
Public Member Functions | |
PropertyValue (T value) | |
Constructs PropertyValue. More... | |
PropertyValue (const PropertyType &type, T value) | |
Constructs PropertyValue. More... | |
virtual | ~PropertyValue () |
Destroys PropertyValue 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... | |
void | setValue (const T &value) |
Sets the property value. More... | |
PropertyValue< T > * | clone () const |
Construct a clone of the property. More... | |
Public Member Functions inherited from PropertyValueBase | |
PropertyValueBase () | |
Constructor. | |
PropertyValueBase (const PropertyType &type) | |
Constructor. More... | |
virtual | ~PropertyValueBase () |
Destroys PropertyValueBase. | |
const rw::core::PropertyType & | getType () const |
Returns the PropertyType. More... | |
ChangedEvent & | changedEvent () |
get changed event More... | |
PropertyValue class.
The PropertyValue class is a template to support property values of any type.
|
inline |
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
value | [in] value |
|
inline |
Constructs PropertyValue.
type | [in] type of property |
value | [in] value |
|
inlinevirtual |
Construct a clone of the property.
Implements PropertyValueBase.
|
inline |
Returns a reference to the property value.
|
inline |
Returns a constant reference to the property value.
|
inline |
Sets the property value.
This function will fire the changed event.
value | [in] the new value of the Property |