SkRBuffer Class Reference

#include <SkBuffer.h>

List of all members.

Public Member Functions

 SkRBuffer ()
 SkRBuffer (const void *data)
 SkRBuffer (const void *data, size_t size)
size_t pos () const
size_t size () const
bool eof () const
void read (void *buffer, size_t size)
const void * skip (size_t size)
size_t skipToAlign4 ()
void * readPtr ()
SkScalar readScalar ()
uint32_t readU32 ()
int32_t readS32 ()
uint16_t readU16 ()
int16_t readS16 ()
uint8_t readU8 ()
bool readBool ()

Protected Member Functions

void readNoSizeCheck (void *buffer, size_t size)

Protected Attributes

const char * fData
const char * fPos
const char * fStop

Detailed Description

Light weight class for reading data from a memory block. The RBuffer is given the buffer to read from, with either a specified size or no size (in which case no range checking is performed). It is iillegal to attempt to read a value from an empty RBuffer (data == null).

Definition at line 29 of file SkBuffer.h.


Constructor & Destructor Documentation

SkRBuffer::SkRBuffer (  )  [inline]

Definition at line 31 of file SkBuffer.h.

SkRBuffer::SkRBuffer ( const void *  data  )  [inline]

Initialize RBuffer with a data pointer, but no specified length. This signals the RBuffer to not perform range checks during reading.

Definition at line 35 of file SkBuffer.h.

SkRBuffer::SkRBuffer ( const void *  data,
size_t  size 
) [inline]

Initialize RBuffer with a data point and length.

Definition at line 43 of file SkBuffer.h.


Member Function Documentation

bool SkRBuffer::eof (  )  const [inline]

Return true if the buffer has read to the end of the data pointer. Only defined if the length was specified in the constructor or in a call to reset(). Always returns true if the length was not specified.

Definition at line 63 of file SkBuffer.h.

size_t SkRBuffer::pos (  )  const [inline]

Return the number of bytes that have been read from the beginning of the data pointer.

Definition at line 54 of file SkBuffer.h.

void SkRBuffer::read ( void *  buffer,
size_t  size 
) [inline]

Read the specified number of bytes from the data pointer. If buffer is not null, copy those bytes into buffer.

Definition at line 68 of file SkBuffer.h.

bool SkRBuffer::readBool (  )  [inline]

Definition at line 79 of file SkBuffer.h.

void SkRBuffer::readNoSizeCheck ( void *  buffer,
size_t  size 
) [protected]
void* SkRBuffer::readPtr (  )  [inline]

Definition at line 72 of file SkBuffer.h.

int16_t SkRBuffer::readS16 (  )  [inline]

Definition at line 77 of file SkBuffer.h.

int32_t SkRBuffer::readS32 (  )  [inline]

Definition at line 75 of file SkBuffer.h.

SkScalar SkRBuffer::readScalar (  )  [inline]

Definition at line 73 of file SkBuffer.h.

uint16_t SkRBuffer::readU16 (  )  [inline]

Definition at line 76 of file SkBuffer.h.

uint32_t SkRBuffer::readU32 (  )  [inline]

Definition at line 74 of file SkBuffer.h.

uint8_t SkRBuffer::readU8 (  )  [inline]

Definition at line 78 of file SkBuffer.h.

size_t SkRBuffer::size (  )  const [inline]

Return the total size of the data pointer. Only defined if the length was specified in the constructor or in a call to reset().

Definition at line 58 of file SkBuffer.h.

const void* SkRBuffer::skip ( size_t  size  ) 
size_t SkRBuffer::skipToAlign4 (  ) 

Member Data Documentation

const char* SkRBuffer::fData [protected]

Definition at line 84 of file SkBuffer.h.

const char* SkRBuffer::fPos [protected]

Definition at line 85 of file SkBuffer.h.

const char* SkRBuffer::fStop [protected]

Definition at line 86 of file SkBuffer.h.


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

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1