Base class for all properties. More...
#include <rtt/PropertyBase.hpp>
Public Member Functions | |
| virtual | ~PropertyBase () |
| The default destructor. | |
| PropertyBase (std::string name, std::string description) | |
| The constructor. | |
| PropertyBase () | |
| Create an uninitialised PropertyBase. | |
| const std::string & | getName () const |
| Get the name of the property. | |
| void | setName (const std::string &name) |
| Set the name of the property. | |
| const std::string & | getDescription () const |
| Get a description of the property. | |
| void | setDescription (const std::string &desc) |
| Set the description of the property. | |
| bool | ready () const |
| Inspect if this Property is correctly initialised and ready for usage. | |
| virtual void | identify (PropertyIntrospection *pi)=0 |
| A call on this method will lead to a call to the PropertyIntrospection interface identifying this Property's proper type. | |
| virtual void | identify (PropertyBagVisitor *pi) |
| A call on this method will lead to a call to the PropertyBagIntrospection interface identifying this Property's proper type. | |
| virtual bool | update (const PropertyBase *other)=0 |
| Update the value of this Property with the value of an other Property. | |
| virtual CommandInterface * | updateCommand (const PropertyBase *other)=0 |
| Generate a CommandInterface object which will update this Property with the value of another Property when execute()'ed. | |
| virtual bool | refresh (const PropertyBase *other)=0 |
| Refresh the value of this Property with the value of an other Property. | |
| virtual CommandInterface * | refreshCommand (const PropertyBase *other)=0 |
| Generate a CommandInterface object which will refresh this Property with the value of another Property when execute()'ed. | |
| virtual bool | copy (const PropertyBase *other)=0 |
| Copy an other Property onto this property. | |
| virtual CommandInterface * | copyCommand (const PropertyBase *other)=0 |
| Generate a CommandInterface object which will copy this Property with the value of another Property when execute()'ed. | |
| virtual PropertyBase * | clone () const =0 |
| Deliver an identical clone of this PropertyBase. | |
| virtual PropertyBase * | create () const =0 |
| Create a new default instance of the PropertyBase. | |
| virtual DataSourceBase::shared_ptr | getDataSource () const =0 |
| Get a DataSource through which this PropertyBase can be manipulated. | |
| virtual std::string | getType () const =0 |
| Returns the type of this PropertyBase. | |
| virtual const TypeInfo * | getTypeInfo () const =0 |
| Returns the TypeInfo object of this Property. | |
Protected Attributes | |
| std::string | _name |
| A short name for this PropertyBase. | |
| std::string | _description |
| A lengthy description for this PropertyBase. | |
Base class for all properties.
Definition at line 61 of file PropertyBase.hpp.
| RTT::PropertyBase::PropertyBase | ( | std::string | name, | |
| std::string | description | |||
| ) |
The constructor.
| name | The name which will be used to refer to this property. | |
| description | A more elaborate description of the property. |
| virtual PropertyBase* RTT::PropertyBase::clone | ( | ) | const [pure virtual] |
Deliver an identical clone of this PropertyBase.
The original may be deleted and the clone can be transparantly used in its place or vice versa.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
Referenced by RTT::PropertyBagIntrospector::introspect().
| virtual bool RTT::PropertyBase::copy | ( | const PropertyBase * | other | ) | [pure virtual] |
Copy an other Property onto this property.
Update does a full update of the name, description and value, adding extra information if necessary, or in case of a Property<PropertyBag> adding all Properties.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
| virtual CommandInterface* RTT::PropertyBase::copyCommand | ( | const PropertyBase * | other | ) | [pure virtual] |
Generate a CommandInterface object which will copy this Property with the value of another Property when execute()'ed.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
| virtual PropertyBase* RTT::PropertyBase::create | ( | ) | const [pure virtual] |
Create a new default instance of the PropertyBase.
This is a factory method to 'make something of the same type'. The new PropertyBase has the same name and description as this.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
| const std::string& RTT::PropertyBase::getDescription | ( | void | ) | const [inline] |
Get a description of the property.
Definition at line 99 of file PropertyBase.hpp.
Referenced by RTT::Property< bool >::copy(), RTT::PropertyBagIntrospector::introspect(), RTT::XMLMarshaller< o_stream >::introspect(), RTT::Property< bool >::operator=(), and RTT::Property< bool >::update().
| const std::string& RTT::PropertyBase::getName | ( | void | ) | const [inline] |
Get the name of the property.
Definition at line 87 of file PropertyBase.hpp.
Referenced by RTT::Property< bool >::copy(), RTT::PropertyBagIntrospector::introspect(), RTT::XMLMarshaller< o_stream >::introspect(), RTT::Orocos1Marshaller< output_stream >::introspect(), RTT::Property< bool >::operator=(), RTT::TableMarshaller< o_stream >::serialize(), and RTT::TableHeaderMarshaller< o_stream >::serialize().
| virtual std::string RTT::PropertyBase::getType | ( | ) | const [pure virtual] |
Returns the type of this PropertyBase.
Uses the naming scheme of DataSourceTypeInfo.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
Referenced by RTT::composeProperty().
| bool RTT::PropertyBase::ready | ( | ) | const [inline] |
Inspect if this Property is correctly initialised and ready for usage.
A Property may only be used when ready() returns true, otherwise, an exception is thrown.
Definition at line 113 of file PropertyBase.hpp.
Referenced by RTT::Property< bool >::copy(), RTT::PropertyBag::findValue(), RTT::Property< bool >::refresh(), and RTT::Property< bool >::update().
| virtual bool RTT::PropertyBase::refresh | ( | const PropertyBase * | other | ) | [pure virtual] |
Refresh the value of this Property with the value of an other Property.
Refresh does only the minimal update of the value, not adding extra information, or in case of a Property<PropertyBag> not adding extra Properties.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
| virtual CommandInterface* RTT::PropertyBase::refreshCommand | ( | const PropertyBase * | other | ) | [pure virtual] |
Generate a CommandInterface object which will refresh this Property with the value of another Property when execute()'ed.
The resulting Command is real-time.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
| void RTT::PropertyBase::setDescription | ( | const std::string & | desc | ) |
Set the description of the property.
| desc | The description of the property. |
Referenced by RTT::Property< bool >::operator=().
| void RTT::PropertyBase::setName | ( | const std::string & | name | ) |
Set the name of the property.
| name | The name of the property. |
Referenced by RTT::Property< bool >::operator=().
| virtual bool RTT::PropertyBase::update | ( | const PropertyBase * | other | ) | [pure virtual] |
Update the value of this Property with the value of an other Property.
Update does a full update of the value, adding extra information if necessary, or in case of a Property<PropertyBag> adding missing Properties.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
| virtual CommandInterface* RTT::PropertyBase::updateCommand | ( | const PropertyBase * | other | ) | [pure virtual] |
Generate a CommandInterface object which will update this Property with the value of another Property when execute()'ed.
Implemented in RTT::Property< T >, and RTT::Property< bool >.
1.6.3