CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::InMemoryResourceStreamData Class Reference

A ResourceStream stored fully in memory. More...

#include <CeresEngine/Resource/ResourceStream.hpp>

Inheritance diagram for CeresEngine::InMemoryResourceStreamData:
CeresEngine::ResourceStreamData CeresEngine::RefCounted< ResourceStreamData >

Public Member Functions

 InMemoryResourceStreamData (ResourceData &resourceData, const ResourceStreamID &streamID, const ResourceStreamFlags &flags)
 Creates a new InMemoryResourceStream for the given resource and with the given stream ID.
 
 ~InMemoryResourceStreamData () noexcept override=default
 
Async< ResourceInputStreamopenInputStream () override
 
Async< ResourceOutputStreamopenOutputStream () override
 
- Public Member Functions inherited from CeresEngine::ResourceStreamData
 ResourceStreamData (ResourceData &resourceData, const ResourceStreamID &streamID, const ResourceStreamFlags &flags)
 Creates a new ResourceStreamData for the given resource and with the given stream ID.
 
virtual ~ResourceStreamData () noexcept=default
 Destroys the resource stream data.
 
bool isSeekable () const noexcept
 If defined, indicates that returned stream must be seekable.
 
bool isCompressible () const noexcept
 If defined, will indicate that the stream can be compressed.
 
- Public Member Functions inherited from CeresEngine::RefCounted< ResourceStreamData >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Private Attributes

MemoryDataStream mStream
 The backing data stream.
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::ResourceStreamData
ResourceDataresourceData
 A handle to the resource that owns the stream.
 
const ResourceStreamID streamID
 The resource stream ID.
 
const ResourceStreamFlags flags
 A set of flags that determine the behavior of the resource stream.
 
- Protected Member Functions inherited from CeresEngine::ResourceStreamData
auto acquireReadLock ()
 Asynchronously acquires a read lock on the stream.
 
auto acquireWriteLock ()
 Asynchronously acquires a write lock on the stream.
 

Detailed Description

A ResourceStream stored fully in memory.

Constructor & Destructor Documentation

◆ InMemoryResourceStreamData()

CeresEngine::InMemoryResourceStreamData::InMemoryResourceStreamData ( ResourceData resourceData,
const ResourceStreamID streamID,
const ResourceStreamFlags flags 
)
inlineexplicit

Creates a new InMemoryResourceStream for the given resource and with the given stream ID.

Parameters
resourceThe resource to create a new stream for.
streamIDThe stream ID.

◆ ~InMemoryResourceStreamData()

CeresEngine::InMemoryResourceStreamData::~InMemoryResourceStreamData ( )
overridedefaultnoexcept

Member Function Documentation

◆ openInputStream()

Async< ResourceInputStream > CeresEngine::InMemoryResourceStreamData::openInputStream ( )
overridevirtual

◆ openOutputStream()

Async< ResourceOutputStream > CeresEngine::InMemoryResourceStreamData::openOutputStream ( )
overridevirtual

Member Data Documentation

◆ mStream

MemoryDataStream CeresEngine::InMemoryResourceStreamData::mStream
private

The backing data stream.


The documentation for this class was generated from the following file: