AuroraRuntime/Source/IO/Adapters/AuIOAdapterMemoryView.cpp

32 lines
1.0 KiB
C++

/***
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuIOAdapterMemoryView.cpp
Date: 2023-09-23
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Aurora/IO/IOExperimental.hpp>
#include "AuIOAdapterByteBuffer.hpp"
namespace Aurora::IO::Adapters
{
AUKN_SYM AuSPtr<IStreamReader> NewMemoryViewReadAdapter(const AuSPtr<Memory::MemoryViewRead> &pView)
{
SysCheckArgNotNull(pView, {});
SysCheckRetExpNotNullMemory(AuMakeShared<Buffered::ViewReader>(pView), {});
}
AUKN_SYM AuSPtr<ISeekingReader> NewMemoryViewLinearSeekableAdapter(const AuSPtr<Memory::MemoryViewRead> &pView)
{
SysCheckArgNotNull(pView, {});
SysCheckRetExpNotNullMemory(AuMakeShared<Buffered::ViewSeekableReadable>(pView), {});
}
AUKN_SYM AuSPtr<IStreamWriter> NewMemoryViewWriteAdapter(const AuSPtr<Memory::MemoryViewWrite> &pView)
{
SysCheckArgNotNull(pView, {});
SysCheckRetExpNotNullMemory(AuMakeShared<Buffered::ViewWriter>(pView), {});
}
}