Name |
Description |
NPLBoolObject |
|
NPLHelper |
|
NPLLex |
lexer for NPL files. It is the same lexer of lua 5.1 |
NPLLex.LexState |
|
NPLLex.SemInfo |
|
NPLLex.Token |
|
NPLLex.Zio |
|
NPLNumberObject |
|
NPLObjectBase |
base class for all NPL date members. Do not use this class directly. Use NPLObjectProxy |
NPLObjectProxy |
/** NPL object proxy. This is both a smart pointer and accessors // Example 1: Create NPLTable and serialize to string NPLObjectProxy msg = new NPLObjectProxy(); msg["nid"].Assign(10); msg["name"].Assign("value"); msg["tab"]["name1"].Assign("value1"); StringBuilder output = new StringBuilder(); NPLHelper.NPLTableToString(null, msg, output); // Example 2: serialized NPLTable from string. NPLObjectProxy tabMsg = NPLHelper.StringToNPLTable("{nid=10, name=\"value\", tab={name1=\"value1\"}}"); ParaGlobal.applog(String.Format("Example 5: {0}==10, {1}==value, {2}==value1", (double)tabMsg["nid"], (string)tabMsg["name"], (string)(tabMsg["tab"]["name1"]))); |
NPLParser |
|
NPLStringObject |
|
NPLTable |
Do not use this class directly, use NPLObjectProxy instead. |
NPLWriter |
a simple class for creating NPL script code, especially data table code. this class is reentrant (thread-safe). Please note that this class does not ensure that the code is a pure table. See Example: // to generate the string : msg={name=1,2,{"3"="4",},}; NPLWriter writer = new NPLWriter(); writer.WriteName("msg"); writer.BeginTable(); writer.WriteName("name"); writer.WriteValue(1); writer.WriteValue(2); writer.BeginTable(); writer.WriteName("3", true); writer.WriteValue("4"); writer.EndTable(); writer.EndTable(); writer.WriteParamDelimiter(); ParaGlobal.log(writer.ToString()); One can also provide their own string buffer to write to, like below. StringBuilder buff = new StringBuilder(); buff.EnsureCapacity(100); NPLWriter writer = new NPLWriter(buff); |