My Project
|
#include <NPLInterface.hpp>
Static Public Member Functions | |
static bool | DeserializePureNPLDataBlock (LexState *ls, NPLObjectProxy &objProxy) |
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... | |
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... | |
template<typename StringType > | |
static bool | SerializeNPLTableToString (const char *sStorageVar, NPLObjectProxy &input, StringType &sCode, int nCodeOffset) |
template<typename StringType > | |
static void | EncodeStringInQuotation (StringType &buff, int nOutputOffset, const char *str, int nSize) |
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 std::string &input) |
template<typename StringType > | |
static void | EncodeStringInQuotation (StringType &output, int nOutputOffset, const char *input) |
NPL helper class.
|
inlinestatic |
Fixed: 2008.6.3 LiXizhi the following is for auto indexed table items {"string1", "string2\r\n", 213, nil,["A"]="B", true, false, {"another table", "field1"}}
|
inlinestatic |
it will return true if input string is "false", "true", NUMBER, STRING, and {table}
sCode | the input string |
nCodeSize | number of bytes in string. if -1, strlen() is used to determine the size. |
|
inlinestatic |
it will return true if input string is a {table} containing only "false", "true", NUMBER, STRING, and other such {table}
sCode | the input string |
nCodeSize | number of bytes in string. if -1, strlen() is used to determine the size. |
|
inlinestatic |
verify the script code.
it returns true if the script code contains pure msg data or table. this function is used to verify scode received from the network. So that the execution of a pure data in the local runtime is harmless.
sCode | the input string |
nCodeSize | number of bytes in string. if -1, strlen() is used to determine the size. |
|
inlinestatic |
same as StringToNPLTable(), except that it begins with "msg={...}"
input | such as "msg={nid=10, name=\"value", tab={name1="value1"}}" |
|
inlinestatic |
same as SerializeNPLTableToString.
Except that it is used via DLL interface.
|
inlinestatic |
converting string to NPL table object
input | such as "{nid=10, name=\"value", tab={name1="value1"}}" |