#include <CCData.h>
local Data |
( |
local |
other) | |
|
local Data |
( |
local |
other) | |
|
Clears data, free buffer and reset data size.
Clears data, free buffer and reset data size.
Clears data, free buffer and reset data size.
void copy |
( |
unsigned char * |
bytes, |
|
|
const ssize_t |
size |
|
) |
| |
Copies the buffer pointer and its size.
- Note
- This method will copy the whole buffer. Developer should free the pointer after invoking this method.
- See Also
- Data::fastSet
var copy |
( |
var |
bytes, |
|
|
var |
size |
|
) |
| |
Copies the buffer pointer and its size.
- Note
- This method will copy the whole buffer. Developer should free the pointer after invoking this method.
- See Also
- Data::fastSet
local copy |
( |
local |
bytes, |
|
|
local |
size |
|
) |
| |
Copies the buffer pointer and its size.
- Note
- This method will copy the whole buffer. Developer should free the pointer after invoking this method.
- See Also
- Data::fastSet
void fastSet |
( |
unsigned char * |
bytes, |
|
|
const ssize_t |
size |
|
) |
| |
Fast set the buffer pointer and its size.
Please use it carefully.
- Parameters
-
bytes | The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc', since in the destructor of Data, the buffer will be deleted by 'free'. |
- Note
- 1. This method will move the ownship of 'bytes'pointer to Data,
- The pointer should not be used outside after it was passed to this method.
- See Also
- Data::copy
var fastSet |
( |
var |
bytes, |
|
|
var |
size |
|
) |
| |
Fast set the buffer pointer and its size.
Please use it carefully.
- Parameters
-
bytes | The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc', since in the destructor of Data, the buffer will be deleted by 'free'. |
- Note
- 1. This method will move the ownship of 'bytes'pointer to Data,
- The pointer should not be used outside after it was passed to this method.
- See Also
- Data::copy
local fastSet |
( |
local |
bytes, |
|
|
local |
size |
|
) |
| |
Fast set the buffer pointer and its size.
Please use it carefully.
- Parameters
-
bytes | The buffer pointer, note that it have to be allocated by 'malloc' or 'calloc', since in the destructor of Data, the buffer will be deleted by 'free'. |
- Note
- 1. This method will move the ownship of 'bytes'pointer to Data,
- The pointer should not be used outside after it was passed to this method.
- See Also
- Data::copy
unsigned char* getBytes |
( |
) | |
const |
Check whether the data is null.
Check whether the data is null.
Check whether the data is null.
Data& operator= |
( |
var |
other) | |
|
Data& operator= |
( |
local |
other) | |
|
Data& operator= |
( |
var |
other) | |
|
Data& operator= |
( |
local |
other) | |
|
The documentation for this class was generated from the following file:
- /Users/cocos2d/MyWork/cocos2d-x-develop/cocos/base/CCData.h