Skia
2DGraphicsLibrary
|
SkStreamSeekable is a SkStreamRewindable for which position, seek, move, and fork are required. More...
#include <SkStream.h>
Public Member Functions | |
SkStreamSeekable * | duplicate () const override=0 |
Duplicates this stream. More... | |
bool | hasPosition () const override |
Returns true if this stream can report it's current position. More... | |
size_t | getPosition () const override=0 |
Returns the current position in the stream. More... | |
bool | seek (size_t position) override=0 |
Seeks to an absolute position in the stream. More... | |
bool | move (long offset) override=0 |
Seeks to an relative offset in the stream. More... | |
SkStreamSeekable * | fork () const override=0 |
Duplicates this stream. More... | |
Public Member Functions inherited from SkStreamRewindable | |
bool | rewind () override=0 |
Rewinds to the beginning of the stream. More... | |
Public Member Functions inherited from SkStream | |
virtual size_t | read (void *buffer, size_t size)=0 |
Reads or skips size number of bytes. More... | |
size_t | skip (size_t size) |
Skip size number of bytes. More... | |
virtual size_t | peek (void *, size_t) const |
Attempt to peek at size bytes. More... | |
virtual bool | isAtEnd () const =0 |
Returns true when all the bytes in the stream have been read. More... | |
int8_t | readS8 () |
int16_t | readS16 () |
int32_t | readS32 () |
uint8_t | readU8 () |
uint16_t | readU16 () |
uint32_t | readU32 () |
bool | readBool () |
SkScalar | readScalar () |
size_t | readPackedUInt () |
virtual bool | hasLength () const |
Returns true if this stream can report it's total length. More... | |
virtual size_t | getLength () const |
Returns the total length of the stream. More... | |
virtual const void * | getMemoryBase () |
Returns the starting address for the data. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SkStream | |
static std::unique_ptr < SkStreamAsset > | MakeFromFile (const char path[]) |
Attempts to open the specified file as a stream, returns nullptr on failure. | |
SkStreamSeekable is a SkStreamRewindable for which position, seek, move, and fork are required.
|
overridepure virtual |
Duplicates this stream.
If this cannot be done, returns NULL. The returned stream will be positioned at the beginning of its data.
Implements SkStreamRewindable.
Implemented in SkMemoryStream, SkFILEStream, SkStreamMemory, and SkStreamAsset.
|
overridepure virtual |
Duplicates this stream.
If this cannot be done, returns NULL. The returned stream will be positioned the same as this stream.
Reimplemented from SkStream.
Implemented in SkMemoryStream, SkFILEStream, SkStreamMemory, and SkStreamAsset.
|
overridepure virtual |
Returns the current position in the stream.
If this cannot be done, returns 0.
Reimplemented from SkStream.
Implemented in SkMemoryStream, and SkFILEStream.
|
inlineoverridevirtual |
Returns true if this stream can report it's current position.
Reimplemented from SkStream.
|
overridepure virtual |
Seeks to an relative offset in the stream.
If this cannot be done, returns false. If an attempt is made to move to a position outside the stream, the position will be set to the closest point within the stream (beginning or end).
Reimplemented from SkStream.
Implemented in SkMemoryStream, and SkFILEStream.
|
overridepure virtual |
Seeks to an absolute position in the stream.
If this cannot be done, returns false. If an attempt is made to seek past the end of the stream, the position will be set to the end of the stream.
Reimplemented from SkStream.
Implemented in SkMemoryStream, and SkFILEStream.