|
CeresEngine 0.2.0
A game development framework
|
A base class for InputStream and OutputStream of a ResourceStream.
More...
#include <CeresEngine/Resource/ResourceStream.hpp>
Public Member Functions | |
| ResourceStream (ResourceStreamLock &&lock) | |
| HResource | getResource () const |
| Gets the resource to which this stream belongs to. | |
| ResourceManager * | getResourceManager () const |
| Gets the resource manager of the resource that owns the stream. | |
Public Member Functions inherited from CeresEngine::IStream | |
| IStream ()=default | |
| IStream (const IStream &) noexcept=delete | |
| IStream & | operator= (const IStream &) noexcept=delete |
| IStream (IStream &&) noexcept=default | |
| IStream & | operator= (IStream &&) noexcept=default |
| virtual | ~IStream () noexcept=default |
| virtual bool | isSeekable (Seek mode=Seek::Start) const noexcept |
| Checks if the stream is seekable. | |
| virtual void | seek (std::streamsize position, Seek mode=Seek::Start) |
| Changes the position of the data stream. | |
| void | skip (const size_t n) |
Skips n bytes from the data stream. | |
| virtual bool | isTellable () const noexcept |
| Checks if the stream knows it's current absolute position. | |
| virtual size_t | tell () |
| Gets the absolute stream position, in bytes. | |
| virtual bool | isSizeKnown () const noexcept |
| Checks if the stream knows the size of the data. | |
| virtual size_t | size () |
| Gets the number of bytes available on the stream. | |
Private Attributes | |
| ResourceStreamLock | mStreamLock |
| A lock acquired for the stream. Must be kept for as long as the stream is open. | |
Additional Inherited Members | |
Public Types inherited from CeresEngine::IStream | |
| enum class | Seek { Start = SEEK_SET , Current = SEEK_CUR , End = SEEK_END } |
| An enumeration that describes how a data stream should be seeked. More... | |
A base class for InputStream and OutputStream of a ResourceStream.
|
inlineexplicit |
| HResource CeresEngine::ResourceStream::getResource | ( | ) | const |
Gets the resource to which this stream belongs to.
| ResourceManager * CeresEngine::ResourceStream::getResourceManager | ( | ) | const |
Gets the resource manager of the resource that owns the stream.
|
private |
A lock acquired for the stream. Must be kept for as long as the stream is open.