lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lintel::SharedMemoryObjectRepository< DATA, DAO > Class Template Reference

#include <SharedMemoryRepository.h>

Inheritance diagram for lintel::SharedMemoryObjectRepository< DATA, DAO >:
lintel::SharedMemoryRepository lintel::JsonSerializable

Public Member Functions

 SharedMemoryObjectRepository (const std::shared_ptr< SharedMemoryService > &sharedMemoryService, const std::shared_ptr< SharedMemorySegment > &segment, int32_t codeVersion, std::string uuid)
 
SharedMemoryType getType () const override
 
void serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override
 
bool deserialize (const rapidjson::Value &obj) override
 
- Public Member Functions inherited from lintel::SharedMemoryRepository
 SharedMemoryRepository (std::shared_ptr< SharedMemorySegment > sharedMemorySegment, std::size_t sizeOfData, std::string_view sharedMemoryRepository, int32_t codeVersion, std::string uuid)
 
const std::shared_ptr< SharedMemorySegment > & getSharedMemorySegment () const
 
std::size_t getSizeOfData () const
 
const std::string & getSharedMemoryRepository () const
 
int32_t getCodeVersion () const
 
const std::string & getUuid () const
 
std::string_view getTypeName () const
 
 ~SharedMemoryRepository () override=default
 
virtual void onMigrate (int32_t currentActiveVersion)=0
 
- Public Member Functions inherited from lintel::JsonSerializable
 JsonSerializable ()=default
 
virtual ~JsonSerializable ()=default
 
virtual std::string serialize () const
 
virtual void deserialize (const std::string &json)
 

Protected Member Functions

DATA & getData () const
 
- Protected Member Functions inherited from lintel::SharedMemoryRepository
virtual void onAcquireReadLock () const
 
virtual void onReleaseReadLock () const
 

Protected Attributes

std::shared_ptr< SharedMemoryService > m_sharedMemoryService
 

Additional Inherited Members

- Static Protected Member Functions inherited from lintel::SharedMemoryRepository
template<typename TYPE >
static constexpr bool isSerializable ()
 

Detailed Description

template<typename DATA, typename DAO>
class lintel::SharedMemoryObjectRepository< DATA, DAO >

Shared memory repository backed by a single object.

Template Parameters
DATAobject type
DAOserializable DAO wrapper for DATA

Constructor & Destructor Documentation

◆ SharedMemoryObjectRepository()

template<typename DATA , typename DAO >
lintel::SharedMemoryObjectRepository< DATA, DAO >::SharedMemoryObjectRepository ( const std::shared_ptr< SharedMemoryService > &  sharedMemoryService,
const std::shared_ptr< SharedMemorySegment > &  segment,
int32_t  codeVersion,
std::string  uuid 
)
inline

Member Function Documentation

◆ deserialize()

template<typename DATA , typename DAO >
bool lintel::SharedMemoryObjectRepository< DATA, DAO >::deserialize ( const rapidjson::Value &  obj)
inlineoverridevirtual

deserialization of given value in json

Parameters
objjson value
Returns
success or not ?

Reimplemented from lintel::JsonSerializable.

◆ getData()

template<typename DATA , typename DAO >
DATA & lintel::SharedMemoryObjectRepository< DATA, DAO >::getData ( ) const
inlineprotected

◆ getType()

template<typename DATA , typename DAO >
SharedMemoryType lintel::SharedMemoryObjectRepository< DATA, DAO >::getType ( ) const
inlineoverridevirtual
Returns
the shared memory data structure type

Implements lintel::SharedMemoryRepository.

◆ serialize()

template<typename DATA , typename DAO >
void lintel::SharedMemoryObjectRepository< DATA, DAO >::serialize ( rapidjson::Writer< rapidjson::StringBuffer > *  writer) const
inlineoverridevirtual

serialization of object to json itself

Parameters
writerfor serialization of object

Implements lintel::JsonSerializable.

Member Data Documentation

◆ m_sharedMemoryService

template<typename DATA , typename DAO >
std::shared_ptr<SharedMemoryService> lintel::SharedMemoryObjectRepository< DATA, DAO >::m_sharedMemoryService
protected

The documentation for this class was generated from the following file: