|
MoSync 3.0.1
|
Facilitates consecutive reads and writes to a MoSync data object. More...
#include <MAUtil/DataHandler.h>
Public Member Functions | |
| DataHandler (MAHandle data) | |
| bool | read (void *dst, int len) |
| bool | skip (int len) |
| void | write (const void *src, int len) |
Public Attributes | |
| const int | size |
Facilitates consecutive reads and writes to a MoSync data object.
Keeps a handle and a position.
| MAUtil::DataHandler::DataHandler | ( | MAHandle | data | ) | [inline] |
Initializes DataHandler::size and sets the position to 0.
| bool MAUtil::DataHandler::read | ( | void * | dst, |
| int | len | ||
| ) | [inline] |
Copies len bytes from the data object to memory pointed to by dst.
References maReadData(), and size.
| bool MAUtil::DataHandler::skip | ( | int | len | ) | [inline] |
Moves the position forward len bytes.
References size.
| void MAUtil::DataHandler::write | ( | const void * | src, |
| int | len | ||
| ) | [inline] |
Copies len bytes to the data object from memory pointed to by src.
References maWriteData().
| const int MAUtil::DataHandler::size |