MAUtil::DataHandler Class Reference

#include <MAUtil/DataHandler.h>

List of all members.


Detailed Description

Facilitates consecutive reads and writes to a MoSync data object.

Keeps a handle and a position.


Public Member Functions

 DataHandler (MAHandle data)
bool read (void *dst, int len)
void write (const void *src, int len)

Public Attributes

const int size


Constructor & Destructor Documentation

MAUtil::DataHandler::DataHandler MAHandle  data  )  [inline]
 

Initializes DataHandler::size and sets the position to 0.


Member Function Documentation

bool MAUtil::DataHandler::read void *  dst,
int  len
[inline]
 

Copies len bytes from the data object to memory pointed to by dst.

Returns:
True on success. False if the operation could not be completed because there's not enough data left.
See also:
maReadData()

void MAUtil::DataHandler::write const void *  src,
int  len
[inline]
 

Copies len bytes to the data object from memory pointed to by src.

See also:
maWriteData()


Member Data Documentation

const int MAUtil::DataHandler::size
 

The size, in bytes, of the data object.


Generated on Sat Feb 13 00:15:39 2010 for MoSync 2 beta 1 by  doxygen 1.4.6-NO