StatelessPersistentReader.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @file StatelessPersistentReader.h
  16. */
  17. #ifndef _FASTDDS_RTPS_STATELESSPERSISTENTREADER_H_
  18. #define _FASTDDS_RTPS_STATELESSPERSISTENTREADER_H_
  19. #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
  20. #include <fastdds/rtps/reader/StatelessReader.h>
  21. namespace eprosima {
  22. namespace fastrtps{
  23. namespace rtps {
  24. class IPersistenceService;
  25. /**
  26. * Class StatelessPersistentReader, specialization of StatelessReader that manages sequence number persistence.
  27. * @ingroup READER_MODULE
  28. */
  29. class StatelessPersistentReader : public StatelessReader
  30. {
  31. friend class RTPSParticipantImpl;
  32. StatelessPersistentReader(RTPSParticipantImpl*, GUID_t& guid,
  33. ReaderAttributes& att, ReaderHistory* hist, ReaderListener* listen,
  34. IPersistenceService* persistence);
  35. public:
  36. virtual ~StatelessPersistentReader();
  37. protected:
  38. virtual void set_last_notified(const GUID_t& persistence_guid, const SequenceNumber_t& seq) override;
  39. private:
  40. IPersistenceService* persistence_;
  41. std::string persistence_guid_;
  42. };
  43. }
  44. } /* namespace rtps */
  45. } /* namespace eprosima */
  46. #endif
  47. #endif /* _FASTDDS_RTPS_STATELESSPERSISTENTREADER_H_ */