#include <PropertyBase.hpp>
Public Member Functions | |
virtual PropertyBase * | clone () const =0 |
virtual bool | compose (const PropertyBag &source) |
virtual bool | copy (const PropertyBase *other)=0 |
virtual PropertyBase * | create () const =0 |
virtual PropertyBase * | create (const base::DataSourceBase::shared_ptr &datasource) const =0 |
virtual DataSourceBase::shared_ptr | getDataSource () const =0 |
const std::string & | getDescription () const |
const std::string & | getName () const |
virtual std::string | getType () const =0 |
virtual const types::TypeInfo * | getTypeInfo () const =0 |
virtual void | identify (PropertyIntrospection *pi)=0 |
virtual void | identify (PropertyBagVisitor *pi) |
virtual PropertyBase & | operator= (PropertyBase *source)=0 |
PropertyBase (std::string name, std::string description) | |
PropertyBase () | |
bool | ready () const |
virtual bool | refresh (const PropertyBase *other)=0 |
virtual bool | setDataSource (const DataSourceBase::shared_ptr &dsb)=0 |
void | setDescription (const std::string &desc) |
void | setName (const std::string &name) |
virtual bool | update (const PropertyBase *other)=0 |
virtual | ~PropertyBase () |
Protected Attributes | |
std::string | _description |
std::string | _name |
Base class for all properties.
Definition at line 56 of file PropertyBase.hpp.
|
virtual |
The default destructor.
Definition at line 49 of file PropertyBase.cpp.
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. |
Definition at line 55 of file PropertyBase.cpp.
RTT::PropertyBase::PropertyBase | ( | ) |
Create an uninitialised PropertyBase.
Definition at line 52 of file PropertyBase.cpp.
|
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 >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
virtual |
Composes the data of this property with information found in a PropertyBag. This only works for data types that defined a compose/decompose function in their type info structure.
Definition at line 80 of file PropertyBase.cpp.
|
pure virtual |
Copy an other Property onto this property. Copy 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.
Copy only works on properties that are ready() and both have the same data type T.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
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 >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
pure virtual |
Create a new instance of the PropertyBase with a custom data source. 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 >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
pure virtual |
Get an assignable base::DataSource through which this PropertyBase can be manipulated.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
inline |
Get a description of the property.
Definition at line 100 of file PropertyBase.hpp.
|
inline |
Get the name of the property.
Definition at line 88 of file PropertyBase.hpp.
|
pure virtual |
Returns the type of this PropertyBase. Uses the naming scheme of DataSourceTypeInfo.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
pure virtual |
Returns the types::TypeInfo object of this Property.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
pure virtual |
A call on this method will lead to a call to the PropertyIntrospection interface identifying this Property's proper type.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
virtual |
A call on this method will lead to a call to the PropertyBagIntrospection interface identifying this Property's proper type.
Reimplemented in RTT::Property< T >, RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, RTT::Property< PropertyBag >, and RTT::Property< T >.
Definition at line 47 of file Property.cpp.
|
pure virtual |
Mirror another PropertyBase (name, description and value).
source | A pointer to the property to mirror. |
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
inline |
|
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.
Refresh only works on properties that are ready() and both have the same data type T.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
pure virtual |
Assign an external assignable base::DataSource to this property.
dsb | The other data source |
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
void RTT::PropertyBase::setDescription | ( | const std::string & | desc | ) |
Set the description of the property.
desc | The description of the property. |
Definition at line 64 of file PropertyBase.cpp.
void RTT::PropertyBase::setName | ( | const std::string & | name | ) |
Set the name of the property.
name | The name of the property. |
Definition at line 59 of file PropertyBase.cpp.
|
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.
Update only works on properties that are ready() and both have the same data type T.
Implemented in RTT::Property< T >, RTT::Property< std::vector< int > >, RTT::Property< double >, RTT::Property< std::string >, RTT::Property< unsigned long long >, RTT::Property< float >, RTT::Property< int >, RTT::Property< unsigned int >, RTT::Property< std::vector< double > >, RTT::Property< string >, RTT::Property< long long >, RTT::Property< vector< double > >, RTT::Property< char >, RTT::Property< bool >, and RTT::Property< PropertyBag >.
|
protected |
A lengthy description for this PropertyBase.
Definition at line 228 of file PropertyBase.hpp.
|
protected |
A short name for this PropertyBase.
Definition at line 223 of file PropertyBase.hpp.