lintel 0.2.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
lintel::SharedMemorySegmentDto Class Reference

#include <SharedMemorySegmentDto.h>

Inheritance diagram for lintel::SharedMemorySegmentDto:
lintel::JsonSerializable

Public Member Functions

 SharedMemorySegmentDto (const SharedMemorySegmentInfo &sharedMemoryInfo)
 
 SharedMemorySegmentDto ()=default
 
const std::filesystem::path & getPath () const
 
const std::string & getName () const
 
size_t getSize () const
 
bool isAutoExtend () const
 
size_t getAutoExtendSize () const
 
size_t getMaxSize () const
 
bool isSanity () const
 
size_t getCurrentSize () const
 
size_t getFreeSize () const
 
size_t getAmountNamedObjects () const
 
size_t getAmountUniqueObjects () const
 
void serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override
 
bool deserialize (const rapidjson::Value &obj) override
 
- Public Member Functions inherited from lintel::JsonSerializable
 JsonSerializable ()=default
 
virtual ~JsonSerializable ()=default
 
virtual std::string serialize () const
 
virtual void deserialize (const std::string &json)
 

Static Public Member Functions

static const Shapes & getShape ()
 

Detailed Description

DTO representing detailed shared memory segment information

Constructor & Destructor Documentation

◆ SharedMemorySegmentDto() [1/2]

lintel::SharedMemorySegmentDto::SharedMemorySegmentDto ( const SharedMemorySegmentInfo &  sharedMemoryInfo)
explicit

Construct from a SharedMemorySegmentInfo model

Parameters
sharedMemoryInfoThe source segment info

◆ SharedMemorySegmentDto() [2/2]

lintel::SharedMemorySegmentDto::SharedMemorySegmentDto ( )
default

Default constructor

Member Function Documentation

◆ deserialize()

bool lintel::SharedMemorySegmentDto::deserialize ( const rapidjson::Value &  obj)
overridevirtual

Deserialize from JSON

Parameters
objThe JSON value
Returns
True on success

Reimplemented from lintel::JsonSerializable.

◆ getAmountNamedObjects()

size_t lintel::SharedMemorySegmentDto::getAmountNamedObjects ( ) const

Get the number of named objects

Returns
The count

◆ getAmountUniqueObjects()

size_t lintel::SharedMemorySegmentDto::getAmountUniqueObjects ( ) const

Get the number of unique objects

Returns
The count

◆ getAutoExtendSize()

size_t lintel::SharedMemorySegmentDto::getAutoExtendSize ( ) const

Get the auto-extend increment size

Returns
The auto-extend size

◆ getCurrentSize()

size_t lintel::SharedMemorySegmentDto::getCurrentSize ( ) const

Get the current allocated size

Returns
The current size

◆ getFreeSize()

size_t lintel::SharedMemorySegmentDto::getFreeSize ( ) const

Get the remaining free size

Returns
The free size

◆ getMaxSize()

size_t lintel::SharedMemorySegmentDto::getMaxSize ( ) const

Get the maximum segment size

Returns
The max size

◆ getName()

const std::string & lintel::SharedMemorySegmentDto::getName ( ) const

Get the segment name

Returns
The name

◆ getPath()

const std::filesystem::path & lintel::SharedMemorySegmentDto::getPath ( ) const

Get the filesystem path

Returns
The path

◆ getShape()

static const Shapes & lintel::SharedMemorySegmentDto::getShape ( )
static

Get the shape (field name) constants

Returns
Reference to the Shapes struct

◆ getSize()

size_t lintel::SharedMemorySegmentDto::getSize ( ) const

Get the configured segment size

Returns
The size

◆ isAutoExtend()

bool lintel::SharedMemorySegmentDto::isAutoExtend ( ) const

Check if auto-extend is enabled

Returns
True if auto-extend

◆ isSanity()

bool lintel::SharedMemorySegmentDto::isSanity ( ) const

Check if the segment passed sanity check

Returns
True if sane

◆ serialize()

void lintel::SharedMemorySegmentDto::serialize ( rapidjson::Writer< rapidjson::StringBuffer > *  writer) const
overridevirtual

Serialize to JSON

Parameters
writerThe rapidjson writer

Implements lintel::JsonSerializable.


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