2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: ByteBufferStreamPair.hpp
|
|
|
|
Date: 2022-6-6
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::IO
|
|
|
|
{
|
|
|
|
struct ByteBufferStreamPair : IByteBufferStreamPair, AuEnableSharedFromThis<ByteBufferStreamPair>
|
|
|
|
{
|
2022-12-17 20:14:19 +00:00
|
|
|
ByteBufferStreamPair(const AuSPtr<Memory::ByteBuffer> &pBuffer);
|
2022-06-11 23:01:27 +00:00
|
|
|
|
|
|
|
AuSPtr<IStreamReader> ToStreamReader() override;
|
|
|
|
AuSPtr<ISeekingReader> ToSeekingReader() override;
|
|
|
|
AuSPtr<IStreamWriter> ToStreamWriter() override;
|
|
|
|
|
|
|
|
AuSPtr<Memory::ByteBuffer> ToByteBuffer() override;
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
AuSPtr<Memory::ByteBuffer> pBuffer;
|
2022-06-11 23:01:27 +00:00
|
|
|
Buffered::BlobReader reader;
|
|
|
|
Buffered::BlobWriter writer;
|
|
|
|
Buffered::BlobSeekableReader seeker;
|
|
|
|
};
|
|
|
|
}
|