Orocos Real-Time Toolkit
2.5.0
|
An interface which all classes which wish to visit a Property should implement. More...
#include <rtt/base/PropertyIntrospection.hpp>
Public Member Functions | |
virtual void | introspect (Property< bool > &v)=0 |
introspect a property of type bool. | |
virtual void | introspect (Property< char > &v)=0 |
introspect a property of type char. | |
virtual void | introspect (Property< int > &v)=0 |
introspect a property of type int. | |
virtual void | introspect (Property< unsigned int > &v)=0 |
introspect a property of type unsigned int. | |
virtual void | introspect (Property< double > &v)=0 |
introspect a property of type double. | |
virtual void | introspect (Property< std::string > &v)=0 |
introspect a property of type string. | |
template<class T > | |
void | introspect (Property< T > &v) |
Unknown types must decompose theirselves into the primitives. | |
virtual void | introspect (Property< PropertyBag > &p)=0 |
Callback for a Property which is a PropertyBag. | |
Protected Member Functions | |
virtual void | introspect (PropertyBase *p) |
Fall-back function of the last resort when the type is not decomposable and not known to the introspection interface. | |
void | introspect_T (PropertyBase *p) |
This function is called for any Property unknown to the introspection interface. | |
bool | introspectAndDecompose (PropertyBase *t) |
The default handler to execute when an unknown type is being decomposed. |
An interface which all classes which wish to visit a Property should implement.
When you call PropertyBase::identify( PropertyIntrospection* ), the object will call one of below methods to expose its type to the caller.
Definition at line 60 of file PropertyIntrospection.hpp.
void RTT::PropertyIntrospection::introspect | ( | PropertyBase * | p | ) | [protected, virtual] |
Fall-back function of the last resort when the type is not decomposable and not known to the introspection interface.
Called by introspect_T and does nothing by default. You can put code inhere to handle unknown types.
Implements RTT::base::PropertyBagVisitor.
Definition at line 58 of file Property.cpp.
Referenced by RTT::extras::decomposeProperty(), RTT::Property< T >::identify(), and introspect_T().
virtual void RTT::base::PropertyIntrospection::introspect | ( | Property< bool > & | v | ) | [pure virtual] |
introspect a property of type bool.
v | The property to be introspectd. |
virtual void RTT::base::PropertyIntrospection::introspect | ( | Property< char > & | v | ) | [pure virtual] |
introspect a property of type char.
v | The property to be introspectd. |
virtual void RTT::base::PropertyIntrospection::introspect | ( | Property< int > & | v | ) | [pure virtual] |
introspect a property of type int.
v | The property to be introspectd. |
virtual void RTT::base::PropertyIntrospection::introspect | ( | Property< unsigned int > & | v | ) | [pure virtual] |
introspect a property of type unsigned int.
v | The property to be introspectd. |
virtual void RTT::base::PropertyIntrospection::introspect | ( | Property< double > & | v | ) | [pure virtual] |
introspect a property of type double.
v | The property to be introspectd. |
virtual void RTT::base::PropertyIntrospection::introspect | ( | Property< std::string > & | v | ) | [pure virtual] |
introspect a property of type string.
v | The property to be introspectd. |
void RTT::base::PropertyIntrospection::introspect | ( | Property< T > & | v | ) |
Unknown types must decompose theirselves into the primitives.
Definition at line 50 of file PropertyIntrospection.inl.
References introspect_T().
void RTT::PropertyIntrospection::introspect_T | ( | PropertyBase * | p | ) | [protected] |
This function is called for any Property unknown to the introspection interface.
It will basically call the generic decomposition function, and if that fails, pass p to introspect() where the subclass has a last chance to handle it.
Definition at line 63 of file Property.cpp.
References introspect(), and RTT::base::PropertyBagVisitor::introspectAndDecompose().
Referenced by introspect().
bool RTT::PropertyBagVisitor::introspectAndDecompose | ( | PropertyBase * | t | ) | [protected, inherited] |
The default handler to execute when an unknown type is being decomposed.
Definition at line 49 of file PropertyBagVisitor.cpp.
References RTT::types::TypeInfo::buildProperty(), RTT::types::TypeInfo::decomposeType(), RTT::deletePropertyBag(), RTT::base::PropertyBase::getDataSource(), RTT::base::PropertyBase::getDescription(), RTT::base::PropertyBase::getName(), RTT::base::PropertyBase::getTypeInfo(), RTT::base::PropertyBagVisitor::introspect(), and RTT::types::propertyDecomposition().
Referenced by introspect_T().