mirror of https://github.com/axmolengine/axmol.git
update document for CCAutoreleaseData.h
This commit is contained in:
parent
5b55e873d0
commit
36bf7c6d39
|
@ -33,28 +33,58 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
/**
|
||||
* @lua NA
|
||||
*/
|
||||
class CC_DLL Data
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* This parameter is defined for convenient reference if a null Data object is needed.
|
||||
*/
|
||||
static const Data Null;
|
||||
|
||||
/**
|
||||
* Constructor of Data.
|
||||
*/
|
||||
Data();
|
||||
|
||||
/**
|
||||
* Copy constructor of Data.
|
||||
*/
|
||||
Data(const Data& other);
|
||||
|
||||
/**
|
||||
* Copy constructor of Data.
|
||||
*/
|
||||
Data(Data&& other);
|
||||
|
||||
/**
|
||||
* Destructor of Data.
|
||||
*/
|
||||
~Data();
|
||||
|
||||
// Assignment operator
|
||||
/**
|
||||
* Overroads of operator=.
|
||||
*/
|
||||
Data& operator= (const Data& other);
|
||||
|
||||
/**
|
||||
* Overroads of operator=.
|
||||
*/
|
||||
Data& operator= (Data&& other);
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
* Gets internal bytes of Data. It will retrun the pointer directly used in Data, so don't delete it.
|
||||
*
|
||||
* @return Pointer of bytes used internal in Data.
|
||||
*/
|
||||
unsigned char* getBytes() const;
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
* Gets the size of the bytes.
|
||||
*
|
||||
* @return The size of bytes of Data.
|
||||
*/
|
||||
ssize_t getSize() const;
|
||||
|
||||
|
@ -74,10 +104,16 @@ public:
|
|||
*/
|
||||
void fastSet(unsigned char* bytes, const ssize_t size);
|
||||
|
||||
/** Clears data, free buffer and reset data size */
|
||||
/**
|
||||
* Clears data, free buffer and reset data size.
|
||||
*/
|
||||
void clear();
|
||||
|
||||
/** Check whether the data is null. */
|
||||
/**
|
||||
* Check whether the data is null.
|
||||
*
|
||||
* @return True if the the Data is null, false if not.
|
||||
*/
|
||||
bool isNull() const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue