refactor io

This commit is contained in:
2025-02-26 10:14:06 +01:00
parent b77c650fdf
commit 605a310ede
9 changed files with 190 additions and 140 deletions

23
include/sp/io/Memory.h Normal file
View File

@@ -0,0 +1,23 @@
#pragma once
#include <sp/io/IOInterface.h>
namespace sp {
namespace io {
struct MemoryTag {};
template <>
class IOInterface<MemoryTag> {
private:
sp::DataBuffer m_VirtualIO;
public:
sp::DataBuffer Read(std::size_t a_Amount);
void Write(const sp::DataBuffer& a_Data);
};
using Memory = IOInterface<MemoryTag>;
} // namespace io
} // namespace sp