RTI Routing Service
Version 6.0.0
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Typedefs
Enumerations
Enumerator
Groups
Pages
TransformationPlugin.hpp
Go to the documentation of this file.
1
/*
2
* (c) Copyright, Real-Time Innovations, 2017.
3
* All rights reserved.
4
*
5
* No duplications, whole or partial, manual or electronic, may be made
6
* without express written permission. Any such copies, or
7
* revisions thereof, must display this notice unaltered.
8
* This code contains trade secrets of Real-Time Innovations, Inc.
9
*/
10
11
#ifndef RTI_ROUTING_TRANSF_TRANSFORMATION_PLUGIN_HPP_
12
#define RTI_ROUTING_TRANSF_TRANSFORMATION_PLUGIN_HPP_
13
14
#include "routingservice/routingservice_log.h"
15
16
#include <rti/config/Version.hpp>
17
#include <rti/routing/TypeInfo.hpp>
18
#include <rti/routing/PropertySet.hpp>
19
#include <rti/routing/transf/Transformation.hpp>
20
#include <rti/routing/detail/ForwarderUtils.hpp>
21
22
/*e \file
23
@brief RTI Routing Service Transformation API
24
*/
34
namespace
rti {
namespace
routing {
namespace
transf {
35
44
class
TransformationPlugin
{
45
public
:
46
72
virtual
Transformation
*
create_transformation
(
73
const
rti::routing::TypeInfo
& input_type_info,
74
const
rti::routing::TypeInfo
& output_type_info,
75
const
rti::routing::PropertySet
& properties) = 0;
76
89
virtual
void
delete_transformation
(
Transformation
*transformation) = 0;
90
100
virtual
rti::config::LibraryVersion
get_version
()
const
101
{
102
return
rti::config::LibraryVersion();
103
}
104
108
virtual
~TransformationPlugin
() {}
109
};
110
111
}}}
112
113
#include <rti/routing/transf/detail/TransformationPluginForwarder.hpp>
114
184
#define RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DECL(TRANSFORMATION_PLUGIN_CLASS) \
185
extern "C" RTI_USER_DLL_EXPORT struct RTI_RoutingServiceTransformationPlugin * \
186
TRANSFORMATION_PLUGIN_CLASS ## _create_transformation_plugin(\
187
const struct RTI_RoutingServiceProperties *, \
188
RTI_RoutingServiceEnvironment *); \
189
190
195
#define RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DEF(TRANSFORMATION_PLUGIN_CLASS) \
196
struct RTI_RoutingServiceTransformationPlugin * \
197
TRANSFORMATION_PLUGIN_CLASS ## _create_transformation_plugin( \
198
const struct RTI_RoutingServiceProperties * native_properties, \
199
RTI_RoutingServiceEnvironment *environment) \
200
{ \
201
rti::routing::PropertySet properties; \
202
rti::routing::PropertyAdapter::add_properties_from_native(\
203
properties,\
204
native_properties); \
205
try { \
206
return rti::routing::transf::detail::TransformationPluginForwarder::create_plugin(\
207
new TRANSFORMATION_PLUGIN_CLASS(properties)); \
208
} catch (const std::exception& ex) {\
209
RTI_RoutingServiceEnvironment_set_error(\
210
environment,\
211
"%s",\
212
ex.what());\
213
} catch (...) {}\
214
\
215
return NULL; \
216
}
217
218
219
220
221
#endif // RTI_ROUTING_TRANSF_TRANSFORMATION_PLUGIN_HPP_
RTI Routing Service Version 6.0.0
Copyright © Sun Mar 3 2019
Real-Time Innovations, Inc