Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkDataTableBuilder Class Reference

Helper class that allows for incrementally building up the data needed to create a SkDataTable. More...

#include <SkDataTable.h>

Inheritance diagram for SkDataTableBuilder:

Public Member Functions

 SkDataTableBuilder (size_t minChunkSize)
 
int count () const
 
size_t minChunkSize () const
 
void reset (size_t minChunkSize)
 Forget any previously appended entries, setting count() back to 0.
 
void reset ()
 
void append (const void *data, size_t size)
 Copy size-bytes from data, and append it to the growing SkDataTable.
 
void appendStr (const char str[])
 Helper version of append() passes strlen() + 1 for the size, so the trailing-zero will be copied as well.
 
void appendString (const SkString &string)
 Helper version of append() passes string.size() + 1 for the size, so the trailing-zero will be copied as well.
 
sk_sp< SkDataTabledetachDataTable ()
 Return an SkDataTable from the accumulated entries that were added by calls to append(). More...
 

Private Attributes

SkTDArray< SkDataTable::DirfDir
 
SkChunkAllocfHeap
 
size_t fMinChunkSize
 

Detailed Description

Helper class that allows for incrementally building up the data needed to create a SkDataTable.

Member Function Documentation

sk_sp<SkDataTable> SkDataTableBuilder::detachDataTable ( )

Return an SkDataTable from the accumulated entries that were added by calls to append().

This call also clears any accumluated entries from this builder, so its count() will be 0 after this call.


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