Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkStreamMemory Class Referenceabstract

SkStreamMemory is a SkStreamAsset for which getMemoryBase is required. More...

#include <SkStream.h>

Inheritance diagram for SkStreamMemory:
SkStreamAsset SkStreamSeekable SkStreamRewindable SkStream SkMemoryStream

Public Member Functions

SkStreamMemoryduplicate () const override=0
 Duplicates this stream. More...
 
SkStreamMemoryfork () const override=0
 Duplicates this stream. More...
 
const void * getMemoryBase () override=0
 Returns the starting address for the data. More...
 
- Public Member Functions inherited from SkStreamAsset
bool hasLength () const override
 Returns true if this stream can report it's total length. More...
 
size_t getLength () const override=0
 Returns the total length of the stream. More...
 
- Public Member Functions inherited from SkStreamSeekable
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...
 
- 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 ()
 

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.
 

Detailed Description

SkStreamMemory is a SkStreamAsset for which getMemoryBase is required.

Member Function Documentation

SkStreamMemory* SkStreamMemory::duplicate ( ) const
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 SkStreamAsset.

Implemented in SkMemoryStream.

SkStreamMemory* SkStreamMemory::fork ( ) const
overridepure virtual

Duplicates this stream.

If this cannot be done, returns NULL. The returned stream will be positioned the same as this stream.

Implements SkStreamAsset.

Implemented in SkMemoryStream.

const void* SkStreamMemory::getMemoryBase ( )
overridepure virtual

Returns the starting address for the data.

If this cannot be done, returns NULL.

Reimplemented from SkStream.

Implemented in SkMemoryStream.


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