Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
SkStreamAsset Class Referenceabstract

#include <SkStream.h>

Inheritance diagram for SkStreamAsset:
SkStreamSeekable SkStreamRewindable SkStream SkBlockMemoryStream SkFILEStream SkStreamMemory SkDWriteFontFileStream SkMemoryStream

Public Member Functions

bool hasLength () const override
 
size_t getLength () const override=0
 
std::unique_ptr< SkStreamAssetduplicate () const
 
std::unique_ptr< SkStreamAssetfork () const
 
- Public Member Functions inherited from SkStreamSeekable
std::unique_ptr< SkStreamSeekableduplicate () const
 
bool hasPosition () const override
 
size_t getPosition () const override=0
 
bool seek (size_t position) override=0
 
bool move (long offset) override=0
 
std::unique_ptr< SkStreamSeekablefork () const
 
- Public Member Functions inherited from SkStreamRewindable
bool rewind () override=0
 
std::unique_ptr< SkStreamRewindableduplicate () const
 
- Public Member Functions inherited from SkStream
virtual ~SkStream ()
 
 SkStream ()
 
virtual size_t read (void *buffer, size_t size)=0
 
size_t skip (size_t size)
 
virtual size_t peek (void *, size_t) const
 
virtual bool isAtEnd () const =0
 
bool readS8 (int8_t *)
 
bool readS16 (int16_t *)
 
bool readS32 (int32_t *)
 
bool readU8 (uint8_t *i)
 
bool readU16 (uint16_t *i)
 
bool readU32 (uint32_t *i)
 
bool readBool (bool *b)
 
bool readScalar (SkScalar *)
 
bool readPackedUInt (size_t *)
 
std::unique_ptr< SkStreamduplicate () const
 
std::unique_ptr< SkStreamfork () const
 
virtual const void * getMemoryBase ()
 
virtual sk_sp< SkDatagetData () const
 

Private Member Functions

SkStreamAssetonDuplicate () const override=0
 
SkStreamAssetonFork () const override=0
 

Additional Inherited Members

- Static Public Member Functions inherited from SkStream
static std::unique_ptr< SkStreamAssetMakeFromFile (const char path[])
 

Detailed Description

SkStreamAsset is a SkStreamSeekable for which getLength is required.

Definition at line 186 of file SkStream.h.

Member Function Documentation

◆ duplicate()

std::unique_ptr< SkStreamAsset > SkStreamAsset::duplicate ( ) const
inline

Definition at line 191 of file SkStream.h.

191 {
192 return std::unique_ptr<SkStreamAsset>(this->onDuplicate());
193 }
SkStreamAsset * onDuplicate() const override=0

◆ fork()

std::unique_ptr< SkStreamAsset > SkStreamAsset::fork ( ) const
inline

Definition at line 194 of file SkStream.h.

194 {
195 return std::unique_ptr<SkStreamAsset>(this->onFork());
196 }
SkStreamAsset * onFork() const override=0

◆ getLength()

size_t SkStreamAsset::getLength ( ) const
overridepure virtual

Returns the total length of the stream. If this cannot be done, returns 0.

Reimplemented from SkStream.

Implemented in SkFILEStream, SkMemoryStream, SkBlockMemoryStream, and SkDWriteFontFileStream.

◆ hasLength()

bool SkStreamAsset::hasLength ( ) const
inlineoverridevirtual

Returns true if this stream can report its total length.

Reimplemented from SkStream.

Definition at line 188 of file SkStream.h.

188{ return true; }

◆ onDuplicate()

SkStreamAsset * SkStreamAsset::onDuplicate ( ) const
overrideprivatepure virtual

◆ onFork()

SkStreamAsset * SkStreamAsset::onFork ( ) const
overrideprivatepure virtual

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