Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
LuaValue Class Reference

Wrap different general types of data into a same specific type named LuaValue. More...

Public Member Functions

 LuaValue (void)
 Default constructor of LuaValue. More...
 
 LuaValue (const LuaValue &rhs)
 Copy constructor of LuaValue.
 
LuaValueoperator= (const LuaValue &rhs)
 Override of operator= .
 
 ~LuaValue (void)
 Destructor.
 
const LuaValueType getType (void) const
 Get the type of LuaValue object. More...
 
const std::string & getObjectTypename (void) const
 Get the typename of the Ref object. More...
 
int intValue (void) const
 Get the int value of LuaValue object. More...
 
float floatValue (void) const
 Get the float value of LuaValue object. More...
 
bool booleanValue (void) const
 Get the boolean value of LuaValue object. More...
 
const std::string & stringValue (void) const
 Get the std::string value of LuaValue object. More...
 
const LuaValueDict & dictValue (void) const
 Get the LuaValueDict value of LuaValue object. More...
 
const LuaValueArray & arrayValue (void) const
 Get the LuaValueArray value of LuaValue object. More...
 
RefccobjectValue (void) const
 Get the Ref object of LuaValue object. More...
 

Static Public Member Functions

static const LuaValue intValue (const int intValue)
 Construct a LuaValue object by a int value. More...
 
static const LuaValue floatValue (const float floatValue)
 Construct a LuaValue object by a float value. More...
 
static const LuaValue booleanValue (const bool booleanValue)
 Construct a LuaValue object by a boolean value. More...
 
static const LuaValue stringValue (const char *stringValue)
 Construct a LuaValue object by a string pointer. More...
 
static const LuaValue stringValue (const std::string &stringValue)
 Construct a LuaValue object by a std::string object. More...
 
static const LuaValue dictValue (const LuaValueDict &dictValue)
 Construct a LuaValue object by a LuaValueDict value. More...
 
static const LuaValue arrayValue (const LuaValueArray &arrayValue)
 Construct a LuaValue object by a LuaValueArray value. More...
 
static const LuaValue ccobjectValue (Ref *ccobjectValue, const char *objectTypename)
 Construct a LuaValue object by a Ref object and the type name of object. More...
 
static const LuaValue ccobjectValue (Ref *ccobjectValue, const std::string &objectTypename)
 Construct a LuaValue object by a Ref object. More...
 

Detailed Description

Wrap different general types of data into a same specific type named LuaValue.

The general types supported are as follows:int,float,bool,std::string,const char*,LuaValueDict,LuaValueArray,Ref object.

Constructor & Destructor Documentation

LuaValue ( void  )
inline

Default constructor of LuaValue.

Set the default value for _type and _ccobjectType,and init the _field.

Member Function Documentation

static const LuaValue intValue ( const int  intValue)
static

Construct a LuaValue object by a int value.

a int value. a LuaValue object.

static const LuaValue floatValue ( const float  floatValue)
static

Construct a LuaValue object by a float value.

a float value. a LuaValue object.

static const LuaValue booleanValue ( const bool  booleanValue)
static

Construct a LuaValue object by a boolean value.

a bool value. a LuaValue object.

static const LuaValue stringValue ( const char *  stringValue)
static

Construct a LuaValue object by a string pointer.

a string pointer. a LuaValue object.

static const LuaValue stringValue ( const std::string &  stringValue)
static

Construct a LuaValue object by a std::string object.

a std::string object. a LuaValue object.

static const LuaValue dictValue ( const LuaValueDict &  dictValue)
static

Construct a LuaValue object by a LuaValueDict value.

a LuaValueDict object. a LuaValue object.

static const LuaValue arrayValue ( const LuaValueArray &  arrayValue)
static

Construct a LuaValue object by a LuaValueArray value.

a LuaValueArray object. a LuaValue object.

static const LuaValue ccobjectValue ( Ref ccobjectValue,
const char *  objectTypename 
)
static

Construct a LuaValue object by a Ref object and the type name of object.

a Ref object. a string pointer point to the typename of object. a LuaValue object.

static const LuaValue ccobjectValue ( Ref ccobjectValue,
const std::string &  objectTypename 
)
static

Construct a LuaValue object by a Ref object.

a Ref object. a std::string object represent the typename of object. a LuaValue object.

const LuaValueType getType ( void  ) const
inline

Get the type of LuaValue object.

the type of LuaValue object.

const std::string&
getObjectTypename
( void  ) const
inline

Get the typename of the Ref object.

the type name of Ref object.

int intValue ( void  ) const
inline

Get the int value of LuaValue object.

the int value.

float floatValue ( void  ) const
inline

Get the float value of LuaValue object.

the float value.

bool booleanValue ( void  ) const
inline

Get the boolean value of LuaValue object.

the boolean value.

const std::string& stringValue ( void  ) const
inline

Get the std::string value of LuaValue object.

the refrence about string value.

const LuaValueDict& dictValue ( void  ) const
inline

Get the LuaValueDict value of LuaValue object.

the LuaValueDict value.

const LuaValueArray& arrayValue ( void  ) const
inline

Get the LuaValueArray value of LuaValue object.

the LuaValueArray value.

Ref* ccobjectValue ( void  ) const
inline

Get the Ref object of LuaValue object.

the pointer point to a Ref object.


The documentation for this class was generated from the following file: