|
static void | DevideString (const string &input, string &str1, string &str2, char separator=';') |
|
static bool | IsSCodePureData (const char *sCode, int nCodeSize=-1) |
| verify the script code. More...
|
|
static bool | IsPureData (const char *sCode, int nCodeSize=-1) |
| it will return true if input string is "false", "true", NUMBER, STRING, and {table} More...
|
|
static bool | IsPureTable (const char *sCode, int nCodeSize=-1) |
| it will return true if input string is a {table} containing only "false", "true", NUMBER, STRING, and other such {table} More...
|
|
template<typename StringType > |
static bool | SerializeToSCode (const char *sStorageVar, const luabind::object &input, StringType &sCode, int nCodeOffset=0, STableStack *pRecursionTable=NULL, bool sort=false) |
| serialize a luabind object into sCode. More...
|
|
template<typename StringType > |
static bool | SerializeToJson (const luabind::object &input, StringType &sCode, int nCodeOffset=0, STableStack *pRecursionTable=NULL, bool bUseEmptyArray=false) |
|
static bool | isControlCharacter (char ch) |
|
static bool | containsControlCharacter (const char *str) |
|
static const char * | LuaObjectToString (const luabind::object &input, int *pSize=NULL) |
| safe convert the lua object to string. More...
|
|
static bool | LuaObjectToString (const luabind::object &input, string &output) |
| safe convert the lua object to string. More...
|
|
static int | LuaObjectToInt (const luabind::object &input, int default_value=0) |
| safe convert the lua object to int
|
|
static float | LuaObjectToFloat (const luabind::object &input, float default_value=0.f) |
| safe convert the lua object to float
|
|
static bool | LuaObjectIsTable (const luabind::object &input) |
|
static double | LuaObjectToDouble (const luabind::object &input, double default_value=0.) |
| safe convert the lua object to double
|
|
static bool | LuaObjectToBool (const luabind::object &input, bool default_value=false) |
| safe convert the lua object to boolean
|
|
static DWORD | LuaObjectToColor (const luabind::object &pen, DWORD default_value=0) |
| safe convert the lua object to color
|
|
static bool | StringToLuaObject (const char *input, int nLen, luabind::object &output, lua_State *pState=NULL) |
| Currently it will only convert pure data table from string to object. More...
|
|
static bool | StringToAnyObject (const char *input, int nLen, luabind::object &output, lua_State *pState=NULL) |
|
static bool | MsgStringToLuaObject (const char *input, int nLen, lua_State *pState) |
| the input must be a string that begins with "msg={", msg={name=value, ...} it will replace the global msg table with a new table.
|
|
static NPLObjectProxy | StringToNPLTable (const char *input, int nLen=-1) |
| converting string to NPL table object More...
|
|
static NPLObjectProxy | MsgStringToNPLTable (const char *input, int nLen=-1) |
| same as StringToNPLTable(), except that it begins with "msg={...}" More...
|
|
static bool | LuaObjectToNPLObject (const luabind::object &input, NPLObjectProxy &out) |
| lua object to npl object. More...
|
|
template<typename StringType > |
static bool | SerializeNPLTableToString (const char *sStorageVar, NPLObjectProxy &input, StringType &sCode, int nCodeOffset=0) |
| safe convert the lua object to string. More...
|
|
static bool | NPLTableToString (const char *sStorageVar, NPLObjectProxy &input, std::string &sCode, int nCodeOffset=0) |
| same as SerializeNPLTableToString. More...
|
|
template<typename StringType > |
static void | EncodeStringInQuotation (StringType &output, int nOutputOffset, const char *input, int nInputSize) |
| this is something like string.format("%q") in NPL. More...
|
|
template<typename StringType > |
static void | EncodeStringInQuotation (StringType &output, int nOutputOffset, const std::string &input) |
|
template<typename StringType > |
static void | EncodeStringInQuotation (StringType &output, int nOutputOffset, const char *input) |
|
template<typename StringType > |
static void | EncodeJsonStringInQuotation (StringType &output, int nOutputOffset, const char *input, int nInputSize) |
|
template<typename StringType > |
static void | EncodeJsonStringInQuotation (StringType &output, int nOutputOffset, const std::string &input) |
|
template<typename StringType > |
static void | EncodeJsonStringInQuotation (StringType &output, int nOutputOffset, const char *input) |
|
static bool | CanEncodeStringInDoubleBrackets (const char *buffer, int nLength) |
| this function is thread-safe. More...
|
|
a collection of helper functions.