RTI Recording Service  Version 6.1.1
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 "dds/dds.hpp"
14 #include "rti/recording/PropertySet.hpp"
15 #include "rti/recording/StreamInfo.hpp"
16 
17 #include "StorageStreamInfoReader.hpp"
18 #include "rti/recording/storage/StorageStreamReader.hpp"
19 
31 namespace rti {
32 
38 namespace recording {
39 
45 namespace storage {
46 
58 public:
59 
60  typedef void* SampleType;
61  typedef void* InfoType;
62  typedef std::vector<SampleType> SampleSeqType;
63  typedef std::vector<InfoType> InfoSeqType;
64 
93  StorageReader(const rti::recording::PropertySet& properties)
94  {
95  RTI_UNUSED_PARAMETER(properties);
96  }
97 
101  virtual ~StorageReader()
102  {
103  }
104 
122  const rti::recording::PropertySet& properties) = 0;
123 
129  virtual void delete_stream_info_reader(
130  StorageStreamInfoReader *stream_info_reader) = 0;
131 
156  const rti::recording::StreamInfo& stream_info,
157  const rti::recording::PropertySet& properties) = 0;
158 
164  virtual void delete_stream_reader(StorageStreamReader *stream_reader) = 0;
165 
166 private:
167 
168  StorageReader() {}
169 
170 };
171 
172 } } } /* namespace rti::recording::storage */
173 
174 #include "rti/recording/storage/detail/StorageReaderForwarder.hpp"
175 #include "rti/routing/ServiceProperty.hpp"
176 #include "rti/routing/detail/ForwarderUtils.hpp"
177 
199 #define RTI_RECORDING_STORAGE_READER_CREATE_DECL(STORAGE_READER_CLASS) \
200 extern "C" RTI_USER_DLL_EXPORT \
201 struct RTI_RecordingServiceStorageReader * \
202 STORAGE_READER_CLASS ## _get_storage_reader( \
203  const struct RTI_RoutingServiceProperties *);
204 
213 #define RTI_RECORDING_STORAGE_READER_CREATE_DEF(STORAGE_READER_CLASS) \
214 struct RTI_RecordingServiceStorageReader * \
215 STORAGE_READER_CLASS ## _get_storage_reader( \
216  const struct RTI_RoutingServiceProperties *native_properties) \
217 { \
218  rti::recording::PropertySet properties; \
219  rti::routing::PropertyAdapter::add_properties_from_native( \
220  properties, \
221  native_properties); \
222  return new rti::recording::storage::detail::StorageReaderForwarder( \
223  new STORAGE_READER_CLASS(properties)); \
224 }
225 
226 #endif /* HPP_RECORDER_DB_REPLAYPLUGIN_HPP_ */
227 
virtual ~StorageReader()
Virtual destructor.
Definition: StorageReader.hpp:101
virtual void delete_stream_reader(StorageStreamReader *stream_reader)=0
Replay Service calls this to delete a stream reader.
Storage stream reader.
Definition: StorageStreamReader.hpp:31
virtual StorageStreamReader * create_stream_reader(const rti::recording::StreamInfo &stream_info, const rti::recording::PropertySet &properties)=0
Replay Service calls this to create a user-data stream reader.
virtual void delete_stream_info_reader(StorageStreamInfoReader *stream_info_reader)=0
Replay Service calls this to delete a stream information reader.
virtual StorageStreamInfoReader * create_stream_info_reader(const rti::recording::PropertySet &properties)=0
Replay Service calls this to create a stream in charge of discovering information about the available...
The RTI namespace.
Definition: RecordingServiceImpl.hpp:22
Storage reader.
Definition: StorageReader.hpp:57
Storage discovery stream reader.
Definition: StorageStreamInfoReader.hpp:31
StorageReader(const rti::recording::PropertySet &properties)
Constructor.
Definition: StorageReader.hpp:93