lintel 0.2.0
Loading...
Searching...
No Matches
SharedMemorySegmentInfo.h
Go to the documentation of this file.
1#ifndef LINTEL_SHAREDMEMORYSEGMENTINFO_H
2#define LINTEL_SHAREDMEMORYSEGMENTINFO_H
3
4#include <memory>
5
7
8namespace lintel {
13{
14private:
15 std::shared_ptr<SharedMemorySegment> m_sharedMemorySegment;
16 std::size_t m_currentSize;
17 std::size_t m_freeSize;
18 std::size_t m_amountNamedObjects;
19 std::size_t m_amountUniqueObjects;
20 bool m_sanity;
21
22public:
32 SharedMemorySegmentInfo(std::shared_ptr<SharedMemorySegment> sharedMemorySegment,
33 size_t currentSize,
34 size_t freeSize,
35 size_t amountNamedObjects,
37 bool sanity);
38
40 [[nodiscard]] const std::shared_ptr<SharedMemorySegment> &getSharedMemorySegment() const;
41
43 [[nodiscard]] constexpr size_t getCurrentSize() const { return m_currentSize; }
44
46 [[nodiscard]] constexpr size_t getFreeSize() const { return m_freeSize; }
47
49 [[nodiscard]] constexpr size_t getAmountNamedObjects() const { return m_amountNamedObjects; }
50
52 [[nodiscard]] constexpr size_t getAmountUniqueObjects() const { return m_amountUniqueObjects; }
53
55 [[nodiscard]] constexpr bool isSanity() const { return m_sanity; }
56};
57
58}// namespace lintel
59#endif// LINTEL_SHAREDMEMORYSEGMENTINFO_H
Definition SharedMemorySegmentInfo.h:13
constexpr bool isSanity() const
Definition SharedMemorySegmentInfo.h:55
const std::shared_ptr< SharedMemorySegment > & getSharedMemorySegment() const
constexpr size_t getAmountNamedObjects() const
Definition SharedMemorySegmentInfo.h:49
constexpr size_t getCurrentSize() const
Definition SharedMemorySegmentInfo.h:43
constexpr size_t getFreeSize() const
Definition SharedMemorySegmentInfo.h:46
constexpr size_t getAmountUniqueObjects() const
Definition SharedMemorySegmentInfo.h:52
SharedMemorySegmentInfo(std::shared_ptr< SharedMemorySegment > sharedMemorySegment, size_t currentSize, size_t freeSize, size_t amountNamedObjects, size_t amountUniqueObjects, bool sanity)
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9