AuroraRuntime/Include/Aurora/IO/IByteBufferStreamPair.hpp

24 lines
747 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IByteBufferStreamPair.hpp
Date: 2022-6-6
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IByteBufferStreamPair
{
virtual AuSPtr<IStreamReader> ToStreamReader() = 0;
virtual AuSPtr<ISeekingReader> ToSeekingReader() = 0;
virtual AuSPtr<IStreamWriter> ToStreamWriter() = 0;
virtual AuSPtr<Memory::ByteBuffer> ToByteBuffer() = 0;
};
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewByteBufferPair();
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewByteBufferPairEx(AuUInt uLength, bool bPermitResize);
AUKN_SYM AuSPtr<IByteBufferStreamPair> NewRingByteBuffer(AuUInt uLength);
}