A specialized InputStream for a ResourceStream.
More...
#include <CeresEngine/Resource/ResourceStream.hpp>
|
| enum class | Seek { Start = SEEK_SET
, Current = SEEK_CUR
, End = SEEK_END
} |
| | An enumeration that describes how a data stream should be seeked. More...
|
| |
◆ WrappedResourceInputStream()
◆ getInputStream() [1/2]
| const InputStream & CeresEngine::WrappedResourceInputStream::getInputStream |
( |
| ) |
const |
|
inlinenoexcept |
◆ getInputStream() [2/2]
| InputStream & CeresEngine::WrappedResourceInputStream::getInputStream |
( |
| ) |
|
|
inlinenoexcept |
◆ invalidate()
| bool CeresEngine::WrappedResourceInputStream::invalidate |
( |
| ) |
|
|
inlineoverridevirtual |
In the stream is buffered, invalidates any buffered read data from the stream.
Non-buffered streams are free to ignore this method.
- Returns
- True if the invalidation finished successfully; false otherwise.
Reimplemented from CeresEngine::IInputStream.
◆ isReadable()
| bool CeresEngine::WrappedResourceInputStream::isReadable |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ isSeekable()
|
|
inlineoverridevirtualnoexcept |
Checks if the stream is seekable.
If this method returns true, seek() is safe to be called on this stream.
Reimplemented from CeresEngine::IStream.
◆ isSizeKnown()
| bool CeresEngine::WrappedResourceInputStream::isSizeKnown |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Checks if the stream knows the size of the data.
If this method returns true, size() is safe to be called on this stream.
Reimplemented from CeresEngine::IStream.
◆ isTellable()
| bool CeresEngine::WrappedResourceInputStream::isTellable |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Checks if the stream knows it's current absolute position.
If this method returns true, tell() is safe to be called on this stream.
Reimplemented from CeresEngine::IStream.
◆ read()
Reads data from the data stream to a buffer of raw memory data with length n.
- Note
- This method is only callable if
isReadable() returns true.
- Parameters
-
| data | The memory location to which read data should be placed. |
| n | The maximum number of bytes to be read from the data stream. |
- Returns
- The number of bytes actually read. Can be smaller than
n. If 0, indicates that the stream has ended.
Reimplemented from CeresEngine::IInputStream.
◆ seek()
Changes the position of the data stream.
- Note
- This method is only callable if
isSeekable() returns true.
- Parameters
-
| position | The position to set the data stream to. |
| mode | The mode to change the data stream position. |
Reimplemented from CeresEngine::IStream.
◆ size()
| size_t CeresEngine::WrappedResourceInputStream::size |
( |
| ) |
|
|
inlineoverridevirtual |
◆ tell()
| size_t CeresEngine::WrappedResourceInputStream::tell |
( |
| ) |
|
|
inlineoverridevirtual |
◆ mStream
| InputStream CeresEngine::WrappedResourceInputStream::mStream |
|
private |
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Resource/ResourceStream.hpp