Public メソッド | Static Public メソッド

クラス PGJsonParser

JSON パーサー. [詳細]

#include <PGJsonParser.h>

すべてのメンバ一覧

Public メソッド

 PGJsonParser ()
 コンストラクタ
virtual ~PGJsonParser ()
 デストラクタ
bool ParseCommand (PGJsonCommands *jo, const SGString &json)
 コマンド文の解析
bool ParseDialog (PGJsonResource *jo, const SGString &json, bool shard)
 ダイアログ句の解析
bool MakeUpdateCommand (SGString &json, PGJsonResource *jo, bool allflag=false)
 UPDATE コマンドの作成.
PGJsonObjectParseObject (JsonParser &jp, PGJsonObject *parent, bool shard)
 オブジェクト句の解析
int ParseList (PGJsonObject *jo, JsonParser &jp, bool shard)
 複数形句の解析

Static Public メソッド

static PGJsonObjectCreateObject (const SGString &type, const SGString &layout, PGJsonObject *parent)
 オブジェクトの作成
static PGJsonObjectCreateCommand (const SGString &type)
 コマンドの作成

説明

JSON パーサー.

JSON 文字列を解析してオブジェクトに変換します。


コンストラクタとデストラクタ

PGJsonParser (  ) 

コンストラクタ

~PGJsonParser (  )  [virtual]

デストラクタ


関数

bool ParseCommand ( PGJsonCommands jo,
const SGString json 
)

コマンド文の解析

JSON 文字列中のコマンド文を解析します。

引数:
jo コマンド JSON オブジェクト
json JSON 文字列
戻り値:
true 正常終了
false エラー
bool ParseDialog ( PGJsonResource jo,
const SGString json,
bool  shard 
)

ダイアログ句の解析

JSON 文字列中のダイアログ句を解析します。

引数:
jo ダイアログ JSON オブジェクト
json JSON 文字列
shard 共有タイプのダイアログの場合はtrueを指定します。
trueを指定すると NotifyList の設定に関わらず全ての要素をロードします。
戻り値:
true 正常終了
false エラー
bool MakeUpdateCommand ( SGString json,
PGJsonResource jo,
bool  allflag = false 
)

UPDATE コマンドの作成.

UPDATE コマンドの JSON 文字列を作ります。

引数:
json JSON 文字列
jo ダイアログ JSON オブジェクト
allflag 
  • true 全てのオブジェクトを更新します。
  • false 変更のあったオブジェクトのみを更新します。
戻り値:
true 正常終了
false エラー
PGJsonObject * CreateObject ( const SGString type,
const SGString layout,
PGJsonObject parent 
) [static]

オブジェクトの作成

JSON オブジェクトを作る。

引数:
type オブジェクトの種別
戻り値:
JSON オブジェクトを返します。
PGJsonObject * CreateCommand ( const SGString type  )  [static]

コマンドの作成

JSON コマンドオブジェクトを作ります。

引数:
type オブジェクトの種別
戻り値:
JSON オブジェクトを返します。
PGJsonObject * ParseObject ( JsonParser jp,
PGJsonObject parent,
bool  shard 
)

オブジェクト句の解析

JSON オブジェクトを解析します。

引数:
jp JSON 解析情報
shard 共有タイプのダイアログの場合はtrueを指定します。
trueを指定すると NotifyList の設定に関わらず全ての要素をロードします。
戻り値:
JSON オブジェクトを返します。
int ParseList ( PGJsonObject jo,
JsonParser jp,
bool  shard 
)

複数形句の解析

コマンドやオブジェクトの複数形の句を解析します。

引数:
jo JSON オブジェクト
jp JSON 解析情報
shard 共有タイプのダイアログの場合はtrueを指定します。
trueを指定すると NotifyList の設定に関わらず全ての要素をロードします。
戻り値:
要素数を返します。

このクラスの説明は次のファイルから生成されました:

PlusG SMART Solution リファレンスマニュアル Ver 1.0.0