ServicePlugin.hpp File Reference

#include <string>
#include "../TaskContext.hpp"
Include dependency graph for install/include/rtt/plugin/ServicePlugin.hpp:

Go to the source code of this file.

Namespaces

namespace  RTT
 

Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.


namespace  RTT::plugin

Defines

#define ORO_SERVICE_NAMED_PLUGIN(SERVICE, NAME)
#define ORO_SERVICE_PLUGIN(SERVICE)
#define ORO_SERVICEPLUGIN_str(s)   #s
#define ORO_SERVICEPLUGIN_xstr(s)   ORO_SERVICEPLUGIN_str(s)

Define Documentation

#define ORO_SERVICE_NAMED_PLUGIN ( SERVICE,
NAME   ) 
Value:
extern "C" {\
        RTT_EXPORT bool loadRTTPlugin(RTT::TaskContext* tc);  \
        bool loadRTTPlugin(RTT::TaskContext* tc) {    \
            if (tc == 0) return true; \
            RTT::Service::shared_ptr sp( new SERVICE( tc ) ); \
            return tc->provides()->addService( sp ); \
        } \
        RTT_EXPORT RTT::Service::shared_ptr createService();  \
        RTT::Service::shared_ptr createService() {    \
            RTT::Service::shared_ptr sp( new SERVICE( 0 ) ); \
            return sp; \
        } \
        RTT_EXPORT std::string getRTTPluginName(); \
        std::string getRTTPluginName() { \
            return NAME; \
        } \
        RTT_EXPORT std::string getRTTTargetName(); \
        std::string getRTTTargetName() { \
            return OROCOS_TARGET_NAME; \
        } \
    }

You can use this macro to make any Service available as a plugin.

Parameters:
SERVICE A class that inherits from Service and takes a TaskContext* as argument in a constructor.
NAME A string being the name of the plugin.
Note:
Do not use this macro inside a namespace ! For example: ORO_SERVICE_NAMED_PLUGIN ( KDL::KDLService, "kdl" ) where KDL::KDLService is a class name.

Definition at line 70 of file install/include/rtt/plugin/ServicePlugin.hpp.

#define ORO_SERVICE_PLUGIN ( SERVICE   ) 
Value:
extern "C" {                      \
        RTT_EXPORT bool loadRTTPlugin(RTT::TaskContext* tc); \
        bool loadRTTPlugin(RTT::TaskContext* tc) {    \
            if (tc == 0) return true; \
            RTT::Service::shared_ptr sp( new SERVICE( tc ) ); \
            return tc->provides()->addService( sp ); \
        } \
        RTT_EXPORT RTT::Service::shared_ptr createService();  \
        RTT::Service::shared_ptr createService() {    \
            RTT::Service::shared_ptr sp( new SERVICE( 0 ) ); \
            return sp; \
        } \
        RTT_EXPORT std::string getRTTPluginName(); \
        std::string getRTTPluginName() { \
            return ORO_SERVICEPLUGIN_xstr(SERVICE); \
        } \
        RTT_EXPORT std::string getRTTTargetName(); \
        std::string getRTTTargetName() { \
            return OROCOS_TARGET_NAME; \
        } \
    }

You can use this macro to make any Service available as a plugin.

Parameters:
SERVICE A class that inherits from Service and takes a TaskContext* as argument in a constructor. The name of the plugin is equal to SERVICE, but the name of the service (ie Service::getName() ) may be different.
Note:
Do not use this macro inside a namespace ! For example: ORO_SERVICE_PLUGIN ( KDL::KDLService ) where KDL::KDLService is a class name.

Definition at line 103 of file install/include/rtt/plugin/ServicePlugin.hpp.

#define ORO_SERVICEPLUGIN_str (  )     #s

Definition at line 52 of file install/include/rtt/plugin/ServicePlugin.hpp.

#define ORO_SERVICEPLUGIN_xstr (  )     ORO_SERVICEPLUGIN_str(s)

Definition at line 51 of file install/include/rtt/plugin/ServicePlugin.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:48:17 2013