RTT::PropertyBase Class Reference

Base class for all properties. More...

#include <rtt/PropertyBase.hpp>

Inheritance diagram for RTT::PropertyBase:
RTT::Property< T >

List of all members.

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 CommandInterfaceupdateCommand (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 CommandInterfacerefreshCommand (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 CommandInterfacecopyCommand (const PropertyBase *other)=0
 Generate a CommandInterface object which will copy this Property with the value of another Property when execute()'ed.
virtual PropertyBaseclone () const =0
 Deliver an identical clone of this PropertyBase.
virtual PropertyBasecreate () 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 TypeInfogetTypeInfo () 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.

Detailed Description

Base class for all properties.

Definition at line 61 of file PropertyBase.hpp.


Constructor & Destructor Documentation

RTT::PropertyBase::PropertyBase ( std::string  name,
std::string  description 
)

The constructor.

Parameters:
name The name which will be used to refer to this property.
description A more elaborate description of the property.

Member Function Documentation

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.

Returns:
false if the Properties are of different type.

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.

Returns:
zero if the Property types do not match

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]
const std::string& RTT::PropertyBase::getName ( void   )  const [inline]
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.

Returns:
false if the Properties are of different type.

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.

Returns:
zero if the Property types do not match

Implemented in RTT::Property< T >, and RTT::Property< bool >.

void RTT::PropertyBase::setDescription ( const std::string &  desc  ) 

Set the description of the property.

Parameters:
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.

Parameters:
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.

Returns:
false if the Properties are of different type.

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.

Returns:
zero if the Property types do not match
Todo:
: check if this method is necessary/used.

Implemented in RTT::Property< T >, and RTT::Property< bool >.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:44 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3