Orocos Real-Time Toolkit  2.9.0
Public Member Functions | Protected Member Functions | List of all members
RTT::base::PropertyIntrospection Class Referenceabstract

An interface which all classes which wish to visit a Property should implement. More...

#include <rtt/base/PropertyIntrospection.hpp>

Inheritance diagram for RTT::base::PropertyIntrospection:
RTT::base::PropertyBagVisitor RTT::marsh::CPFMarshaller< std::ostream > RTT::marsh::XMLRPCMarshaller< output_stream >

Public Member Functions

virtual ~PropertyIntrospection ()
 
virtual void introspect (Property< bool > &v)=0
 introspect a property of type bool. More...
 
virtual void introspect (Property< char > &v)=0
 introspect a property of type char. More...
 
virtual void introspect (Property< int > &v)=0
 introspect a property of type int. More...
 
virtual void introspect (Property< unsigned int > &v)=0
 introspect a property of type unsigned int. More...
 
virtual void introspect (Property< long long > &v)=0
 introspect a property of type long long. More...
 
virtual void introspect (Property< unsigned long long > &v)=0
 introspect a property of type unsigned long long. More...
 
virtual void introspect (Property< double > &v)=0
 introspect a property of type double. More...
 
virtual void introspect (Property< std::string > &v)=0
 introspect a property of type string. More...
 
template<class T >
void introspect (Property< T > &v)
 Unknown types must decompose theirselves into the primitives. More...
 
virtual void introspect (Property< PropertyBag > &p)=0
 Callback for a Property which is a PropertyBag. More...
 

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. More...
 
void introspect_T (PropertyBase *p)
 This function is called for any Property unknown to the introspection interface. More...
 
bool introspectAndDecompose (PropertyBase *t)
 The default handler to execute when an unknown type is being decomposed. More...
 

Detailed Description

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.

See also
Property
PropertyBag
PropertyBagVisitor to only browse the contents of a PropertyBag hierarchy.
Deprecated:
DO NOT USE. Will be removed in 2.x release series.

Definition at line 60 of file PropertyIntrospection.hpp.

Constructor & Destructor Documentation

virtual RTT::base::PropertyIntrospection::~PropertyIntrospection ( )
inlinevirtual

Member Function Documentation

void RTT::PropertyIntrospection::introspect ( PropertyBase p)
protectedvirtual

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(), and RTT::Property< T >::identify().

virtual void RTT::base::PropertyBagVisitor::introspect ( Property< PropertyBag > &  p)
pure virtualinherited

Callback for a Property which is a PropertyBag.

Implemented in RTT::marsh::PropertyBagIntrospector.

virtual void RTT::base::PropertyIntrospection::introspect ( Property< bool > &  v)
pure virtual

introspect a property of type bool.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< char > &  v)
pure virtual

introspect a property of type char.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< int > &  v)
pure virtual

introspect a property of type int.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< unsigned int > &  v)
pure virtual

introspect a property of type unsigned int.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< long long > &  v)
pure virtual

introspect a property of type long long.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< unsigned long long > &  v)
pure virtual

introspect a property of type unsigned long long.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< double > &  v)
pure virtual

introspect a property of type double.

Parameters
vThe property to be introspected.
virtual void RTT::base::PropertyIntrospection::introspect ( Property< std::string > &  v)
pure virtual

introspect a property of type string.

Parameters
vThe property to be introspected.
template<class T >
void RTT::base::PropertyIntrospection::introspect ( Property< T > &  v)

Unknown types must decompose theirselves into the primitives.

See also
types::TemplateTypeInfo

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.

Referenced by introspect().

bool RTT::PropertyBagVisitor::introspectAndDecompose ( PropertyBase t)
protectedinherited

The documentation for this class was generated from the following files: