RTI Recording Service  Version 6.1.0
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/recording/PropertySet.hpp"
14 #include "rti/recording/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::recording::PropertySet& properties)
93  {
94  RTI_UNUSED_PARAMETER(properties);
95  }
96 
100  virtual ~StorageReader()
101  {
102  }
103 
121  const rti::recording::PropertySet& properties) = 0;
122 
128  virtual void delete_stream_info_reader(
129  StorageStreamInfoReader *stream_info_reader) = 0;
130 
155  const rti::recording::StreamInfo& stream_info,
156  const rti::recording::PropertySet& properties) = 0;
157 
163  virtual void delete_stream_reader(StorageStreamReader *stream_reader) = 0;
164 
165 private:
166 
167  StorageReader() {}
168 
169 };
170 
171 } } } /* namespace rti::recording::storage */
172 
173 #include "rti/recording/storage/detail/StorageReaderForwarder.hpp"
174 #include "rti/routing/ServiceProperty.hpp"
175 #include "rti/routing/detail/ForwarderUtils.hpp"
176 
198 #define RTI_RECORDING_STORAGE_READER_CREATE_DECL(STORAGE_READER_CLASS) \
199 extern "C" RTI_USER_DLL_EXPORT \
200 struct RTI_RecordingServiceStorageReader * \
201 STORAGE_READER_CLASS ## _get_storage_reader( \
202  const struct RTI_RoutingServiceProperties *);
203 
212 #define RTI_RECORDING_STORAGE_READER_CREATE_DEF(STORAGE_READER_CLASS) \
213 struct RTI_RecordingServiceStorageReader * \
214 STORAGE_READER_CLASS ## _get_storage_reader( \
215  const struct RTI_RoutingServiceProperties *native_properties) \
216 { \
217  rti::recording::PropertySet properties; \
218  rti::routing::PropertyAdapter::add_properties_from_native( \
219  properties, \
220  native_properties); \
221  return new rti::recording::storage::detail::StorageReaderForwarder( \
222  new STORAGE_READER_CLASS(properties)); \
223 }
224 
225 #endif /* HPP_RECORDER_DB_REPLAYPLUGIN_HPP_ */
226 
virtual ~StorageReader()
Virtual destructor.
Definition: StorageReader.hpp:100
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:56
Storage discovery stream reader.
Definition: StorageStreamInfoReader.hpp:31
StorageReader(const rti::recording::PropertySet &properties)
Constructor.
Definition: StorageReader.hpp:92