lintel 0.2.0
Loading...
Searching...
No Matches
SharedMemorySegment.h
Go to the documentation of this file.
1#ifndef LINTEL_SHAREDMEMORYSEGMENT_H
2#define LINTEL_SHAREDMEMORYSEGMENT_H
3
4#include <filesystem>
5#include <string>
6
7namespace lintel {
12{
13public:
16 {
18 std::size_t size;
20 std::size_t maxSize;
21 };
22
23private:
24 std::filesystem::path m_path;
25 std::string m_name;
26 std::size_t m_size;
27 bool m_isAutoExtend;
28 std::size_t m_autoExtendSize;
29 std::size_t m_maxSize;
30
31public:
38 SharedMemorySegment(std::filesystem::path sharedMemoryPath, std::string name, std::size_t size);
39
48 std::string name,
49 std::size_t size,
51
53 [[nodiscard]] std::filesystem::path getPath() const;
54
56 [[nodiscard]] const std::string &getName() const;
57
59 [[nodiscard]] constexpr size_t getSize() const { return m_size; }
60
62 [[nodiscard]] constexpr bool isAutoExtend() const { return m_isAutoExtend; }
63
65 [[nodiscard]] constexpr size_t getAutoExtendSize() const { return m_autoExtendSize; }
66
68 [[nodiscard]] constexpr size_t getMaxSize() const { return m_maxSize; }
69};
70
71}// namespace lintel
72#endif// LINTEL_SHAREDMEMORYSEGMENT_H
Definition SharedMemorySegment.h:12
constexpr size_t getAutoExtendSize() const
Definition SharedMemorySegment.h:65
constexpr bool isAutoExtend() const
Definition SharedMemorySegment.h:62
constexpr size_t getSize() const
Definition SharedMemorySegment.h:59
constexpr size_t getMaxSize() const
Definition SharedMemorySegment.h:68
SharedMemorySegment(std::filesystem::path sharedMemoryPath, std::string name, std::size_t size, AutoExtendConfig autoExtendConfig)
SharedMemorySegment(std::filesystem::path sharedMemoryPath, std::string name, std::size_t size)
const std::string & getName() const
std::filesystem::path getPath() const
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9
Definition SharedMemorySegment.h:16
std::size_t maxSize
Definition SharedMemorySegment.h:20
std::size_t size
Definition SharedMemorySegment.h:18