RTI Recording Service  Version 6.0.0
 All Data Structures Namespaces Files Functions Typedefs Enumerations Enumerator Groups
StorageWriter.hpp
Go to the documentation of this file.
1 /*
2  * (c) Copyright, Real-Time Innovations, 2016-.
3  * All rights reserved.
4  * No duplications, whole or partial, manual or electronic, may be made
5  * without express written permission. Any such copies, or
6  * revisions thereof, must display this notice unaltered.
7  * This code contains trade secrets of Real-Time Innovations, Inc.
8  */
9 
10 #include "rti/routing/StreamInfo.hpp"
11 #include "rti/routing/PropertySet.hpp"
12 
13 #include "rti/recording/storage/StorageStreamWriter.hpp"
14 #include "rti/recording/storage/StorageDiscoveryStreamWriter.hpp"
15 #include "dds/dds.hpp"
16 
17 #ifndef HPP_RTI_RECORDING_STORAGE_STORAGEWRITER_HPP_
18 #define HPP_RTI_RECORDING_STORAGE_STORAGEWRITER_HPP_
19 
27 namespace rti { namespace recording { namespace storage {
28 
38 public:
39 
67  StorageWriter(const rti::routing::PropertySet& properties)
68  {
69  RTI_UNUSED_PARAMETER(properties);
70  }
71 
75  virtual ~StorageWriter() {}
76 
93  const rti::routing::StreamInfo& stream_info,
94  const rti::routing::PropertySet& properties) = 0;
95 
105  {
106  return NULL;
107  }
108 
118  {
119  return NULL;
120  }
121 
131  {
132  return NULL;
133  }
134 
141  virtual void delete_stream_writer(StorageStreamWriter *writer) = 0;
142 
143 private:
144 
145  StorageWriter() {}
146 };
147 
148 } } } /* namespace rti::recording::storage */
149 
150 #include "rti/recording/storage/detail/StorageWriterForwarder.hpp"
151 #include "rti/routing/ServiceProperty.hpp"
152 #include "rti/routing/detail/ForwarderUtils.hpp"
153 
175 #define RTI_RECORDING_STORAGE_WRITER_CREATE_DECL(STORAGE_WRITER_CLASS) \
176 extern "C" RTI_USER_DLL_EXPORT \
177 struct RTI_RecordingServiceStorageWriter * \
178 STORAGE_WRITER_CLASS ## _get_storage_writer( \
179  const struct RTI_RoutingServiceProperties *);
180 
189 #define RTI_RECORDING_STORAGE_WRITER_CREATE_DEF(STORAGE_WRITER_CLASS) \
190 struct RTI_RecordingServiceStorageWriter * \
191 STORAGE_WRITER_CLASS ## _get_storage_writer( \
192  const struct RTI_RoutingServiceProperties *native_properties) \
193 { \
194  rti::routing::PropertySet properties; \
195  rti::routing::PropertyAdapter::add_properties_from_native( \
196  properties, \
197  native_properties); \
198  return new rti::recording::storage::detail::StorageWriterForwarder( \
199  new STORAGE_WRITER_CLASS(properties)); \
200 }
201 
202 #endif /* HPP_RTI_RECORDING_STORAGE_STORAGEWRITER_HPP_ */

RTI Recording Service Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc