BundleReader is an interface for reading sequence of bytes.
More...
Inherits Ref.
|
| BundleReader () |
| Constructor.
|
|
| ~BundleReader () |
| Destructor.
|
|
void | init (char *buffer, ssize_t length) |
| initialise More...
|
|
ssize_t | read (void *ptr, ssize_t size, ssize_t count) |
| Reads an array of elements. More...
|
|
char * | readLine (int num, char *line) |
| Reads a line from the buffer.
|
|
bool | eof () |
| Returns true if the end of the buffer has been reached.
|
|
ssize_t | length () |
| Returns the length of the buffer in bytes.
|
|
ssize_t | tell () |
| Returns the position of the file pointer.
|
|
bool | seek (long int offset, int origin) |
| Sets the position of the file pointer.
|
|
bool | rewind () |
| Sets the file pointer at the start of the file.
|
|
template<typename T > |
bool | read (T *ptr) |
| read binary typed value.
|
|
std::string | readString () |
| first read length, then read string text
|
|
bool | readMatrix (float *m) |
| Read the matrix. More...
|
|
void | retain () |
| Retains the ownership. More...
|
|
void | release () |
| Releases the ownership immediately. More...
|
|
local | release () |
| Releases the ownership immediately. More...
|
|
Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More...
|
|
unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More...
|
|
local | getReferenceCount () |
| Returns the Ref's current reference count. More...
|
|
virtual | ~Ref () |
| Destructor. More...
|
|
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
local | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
local | _luaID |
| Lua reference id.
|
|
void * | _scriptObject |
| scriptObject, support for swift
|
|
local | _scriptObject |
| scriptObject, support for swift
|
|
bool | _rooted |
| When true, it means that the object was already rooted.
|
|
local | _rooted |
| When true, it means that the object was already rooted.
|
|
BundleReader is an interface for reading sequence of bytes.
void init |
( |
char * |
buffer, |
|
|
ssize_t |
length |
|
) |
| |
initialise
- Parameters
-
buffer | The data buffer pointer |
length | The data buffer size |
ssize_t read |
( |
void * |
ptr, |
|
|
ssize_t |
size, |
|
|
ssize_t |
count |
|
) |
| |
Reads an array of elements.
- Parameters
-
ptr | The pointer to the memory to copy into. The available size should be at least bytes. |
size | The size of each element to be read, in bytes. |
count | The number of elements to read. |
- Returns
- The number of elements read.
bool readMatrix |
( |
float * |
m | ) |
|
Read the matrix.
- Note
- the matrix type must be the 4*4 float matrix
The documentation for this class was generated from the following file: