27 lines
793 B
C++
27 lines
793 B
C++
/***
|
|
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::Utility
|
|
{
|
|
struct ByteBufferStreamPair : IByteBufferStreamPair, AuEnableSharedFromThis<ByteBufferStreamPair>
|
|
{
|
|
ByteBufferStreamPair(const AuSPtr<Memory::ByteBuffer> &pBuffer);
|
|
|
|
AuSPtr<IStreamReader> ToStreamReader() override;
|
|
AuSPtr<ISeekingReader> ToSeekingReader() override;
|
|
AuSPtr<IStreamWriter> ToStreamWriter() override;
|
|
|
|
AuSPtr<Memory::ByteBuffer> ToByteBuffer() override;
|
|
|
|
AuSPtr<Memory::ByteBuffer> pBuffer;
|
|
Buffered::BlobReader reader;
|
|
Buffered::BlobWriter writer;
|
|
Buffered::BlobSeekableReader seeker;
|
|
};
|
|
} |