/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IPCMemory.NT.hpp
Date: 2022-4-15
Author: Reece
***/
#pragma once
#include <Source/IO/IPC/IPC.hpp>
#include <Source/IO/IPC/IPCHandle.hpp>
namespace Aurora::IO::IPC
{
struct IPCSharedMemoryImpl : IPCSharedMemory
IPCSharedMemoryImpl(HANDLE handle, void *ptr, const IPC::IPCHandle &ipcHandle);
~IPCSharedMemoryImpl();
virtual Memory::MemoryViewWrite GetMemory() override;
virtual AuUInt GetLength() override;
virtual AuString ExportToString() override;
private:
IPC::IPCHandle ipcHandle_;
bool owns_;
HANDLE handle_{};
void *base_{};
AuUInt len_ {};
};
}