RTI Recording Service  Version 6.0.1
 All Data Structures Namespaces Files Functions Typedefs Enumerations Enumerator Groups
StorageReader.hpp
Go to the documentation of this file.
1 /*
2  * (c) Copyright, Real-Time Innovations, 2018-.
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 #ifndef HPP_RECORDER_DB_REPLAYPLUGIN_HPP_
11 #define HPP_RECORDER_DB_REPLAYPLUGIN_HPP_
12 
13 #include "rti/routing/PropertySet.hpp"
14 #include "rti/routing/StreamInfo.hpp"
15 
16 #include "StorageStreamInfoReader.hpp"
17 #include "rti/recording/storage/StorageStreamReader.hpp"
18 
30 namespace rti {
31 
37 namespace recording {
38 
44 namespace storage {
45 
57 public:
58 
59  typedef void* SampleType;
60  typedef void* InfoType;
61  typedef std::vector<SampleType> SampleSeqType;
62  typedef std::vector<InfoType> InfoSeqType;
63 
92  StorageReader(const rti::routing::PropertySet& properties)
93  {
94  RTI_UNUSED_PARAMETER(properties);
95  }
96 
100  virtual ~StorageReader()
101  {
102  }
103 
121  const rti::routing::PropertySet& properties) = 0;
122 
128  virtual void delete_stream_info_reader(
129  StorageStreamInfoReader *stream_info_reader) = 0;
130 
151  const rti::routing::StreamInfo& stream_info,
152  const rti::routing::PropertySet& properties) = 0;
153 
159  virtual void delete_stream_reader(StorageStreamReader *stream_reader) = 0;
160 
161 private:
162 
163  StorageReader() {}
164 
165 };
166 
167 } } } /* namespace rti::recording::storage */
168 
169 #include "rti/recording/storage/detail/StorageReaderForwarder.hpp"
170 #include "rti/routing/ServiceProperty.hpp"
171 #include "rti/routing/detail/ForwarderUtils.hpp"
172 
194 #define RTI_RECORDING_STORAGE_READER_CREATE_DECL(STORAGE_READER_CLASS) \
195 extern "C" RTI_USER_DLL_EXPORT \
196 struct RTI_RecordingServiceStorageReader * \
197 STORAGE_READER_CLASS ## _get_storage_reader( \
198  const struct RTI_RoutingServiceProperties *);
199 
208 #define RTI_RECORDING_STORAGE_READER_CREATE_DEF(STORAGE_READER_CLASS) \
209 struct RTI_RecordingServiceStorageReader * \
210 STORAGE_READER_CLASS ## _get_storage_reader( \
211  const struct RTI_RoutingServiceProperties *native_properties) \
212 { \
213  rti::routing::PropertySet properties; \
214  rti::routing::PropertyAdapter::add_properties_from_native( \
215  properties, \
216  native_properties); \
217  return new rti::recording::storage::detail::StorageReaderForwarder( \
218  new STORAGE_READER_CLASS(properties)); \
219 }
220 
221 #endif /* HPP_RECORDER_DB_REPLAYPLUGIN_HPP_ */
222 

RTI Recording Service Version 6.0.1 Copyright © Sun Nov 17 2019 Real-Time Innovations, Inc