Component.hpp File Reference

#include <string>
#include <map>
#include <vector>
#include "rtt-fwd.hpp"
#include "rtt-config.h"
Include dependency graph for rtt/Component.hpp:

Go to the source code of this file.

Classes

class  RTT::ComponentFactories
class  RTT::ComponentFactoryLoader< C >

Namespaces

namespace  RTT
 

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


Defines

#define ORO_CONCAT_LINE(x)   ORO_CONCAT_LINE1(x,__LINE__)
#define ORO_CONCAT_LINE1(x, y)   ORO_CONCAT_LINE2(x,y)
#define ORO_CONCAT_LINE2(x, y)   x##y
#define ORO_CREATE_COMPONENT(CLASS_NAME)   namespace { namespace ORO_CONCAT_LINE(LOADER_) { RTT::ComponentFactoryLoader<CLASS_NAME> m_cloader(ORO_LIST_COMPONENT_TYPE_str(CLASS_NAME)); } }
#define ORO_CREATE_COMPONENT_LIBRARY()   __attribute__((weak)) RTT::FactoryMap* RTT::ComponentFactories::Factories = 0;
#define ORO_CREATE_COMPONENT_TYPE()   ORO_CREATE_COMPONENT_LIBRARY( )
#define ORO_LIST_COMPONENT_TYPE(CLASS_NAME)   namespace { namespace ORO_CONCAT_LINE(LOADER_) { RTT::ComponentFactoryLoader<CLASS_NAME> m_cloader(ORO_LIST_COMPONENT_TYPE_str(CLASS_NAME)); } }
#define ORO_LIST_COMPONENT_TYPE__str(s)   #s
#define ORO_LIST_COMPONENT_TYPE_str(s)   ORO_LIST_COMPONENT_TYPE__str(s)

Define Documentation

#define ORO_CONCAT_LINE (  )     ORO_CONCAT_LINE1(x,__LINE__)

Definition at line 100 of file rtt/Component.hpp.

#define ORO_CONCAT_LINE1 ( x,
 )     ORO_CONCAT_LINE2(x,y)

Definition at line 99 of file rtt/Component.hpp.

#define ORO_CONCAT_LINE2 ( x,
 )     x##y

Definition at line 98 of file rtt/Component.hpp.

#define ORO_CREATE_COMPONENT ( CLASS_NAME   )     namespace { namespace ORO_CONCAT_LINE(LOADER_) { RTT::ComponentFactoryLoader<CLASS_NAME> m_cloader(ORO_LIST_COMPONENT_TYPE_str(CLASS_NAME)); } }

Definition at line 181 of file rtt/Component.hpp.

 
#define ORO_CREATE_COMPONENT_LIBRARY (  )     __attribute__((weak)) RTT::FactoryMap* RTT::ComponentFactories::Factories = 0;

Definition at line 182 of file rtt/Component.hpp.

 
#define ORO_CREATE_COMPONENT_TYPE (  )     ORO_CREATE_COMPONENT_LIBRARY( )

Backwards compatibility macro which is now replaced by ORO_CREATE_COMPONENT_LIBRARY( )

Definition at line 208 of file rtt/Component.hpp.

#define ORO_LIST_COMPONENT_TYPE ( CLASS_NAME   )     namespace { namespace ORO_CONCAT_LINE(LOADER_) { RTT::ComponentFactoryLoader<CLASS_NAME> m_cloader(ORO_LIST_COMPONENT_TYPE_str(CLASS_NAME)); } }

Use this macro to register multiple components in a shared library (plug-in). For each component, add this line in the .cpp file. Use this macro in combination with ORO_CREATE_COMPONENT_LIBRARY.

The advantage of this approach is that one library can create different component types and that you may link multiple component libraries with each other.

This macro can be used for both shared and static libraries. In case of a shared library, the component factory will be registered to the shared library's local FactoryMap. In case of a static library, the component factory will be registered in the static library's global FactoryMap. In both cases, the DeploymentComponent can access these factories and create the registered component types.

Parameters:
CLASS_NAME the class name of the component you are adding to the library.

Definition at line 203 of file rtt/Component.hpp.

#define ORO_LIST_COMPONENT_TYPE__str (  )     #s

Definition at line 103 of file rtt/Component.hpp.

#define ORO_LIST_COMPONENT_TYPE_str (  )     ORO_LIST_COMPONENT_TYPE__str(s)

Definition at line 102 of file rtt/Component.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:45:15 2013