Public 型 | Public メソッド | Public 変数

クラス PGJsonObject

JSON オブジェクト. [詳細]

#include <PGJsonObject.h>

PGJsonObjectに対する継承グラフ
PGJsonObjectのコラボレーション図

すべてのメンバ一覧

Public 型

typedef vector< PGJsonObject * > JObjectList
 JSON オブジェクトリスト型.
typedef vector< PGJsonObject * >
::iterator 
JOIterator
 List のイテレーター型
typedef map< SGString, PGValueKeyValueList
 キー値リスト型
typedef map< SGString, PGValue >
::iterator 
KVIterator
 KeyValueList のイテレーター型
typedef set< SGStringDirtyList
 キー値リスト型
typedef set< SGString >::iterator DLIterator
 KeyValueList のイテレーター型

Public メソッド

 PGJsonObject (PGJsonObject *parent)
 コンストラクタ
virtual ~PGJsonObject ()
 デストラクタ
virtual bool HasGroup ()
 グループの有無
virtual bool AddObject (PGJsonObject *jo)
 子オブジェクトの追加
virtual ostream & OutJson (ostream &out)
 JSON 文字列の出力.
virtual ostream & OutJson (ostream &out, int &b)
 JSON 文字列の出力.
virtual ostream & OutJsonMember (ostream &out, int &b)
 JSON 文字列の出力.
virtual ostream & OutJsonDirtyMember (ostream &out, int &b)
 JSON 文字列の出力(差分).
virtual ostream & OutJsonList (ostream &out, int &b)
 子オブジェクトのJSON文字列の出力
virtual PGJsonObjectSearchName (const SGString &name)
 JSON オブジェクトの検索.
virtual PGJsonObjectSetValue (const SGString &key, PGValue value)
 キー値の設定
virtual bool Parse (JsonParser &jp)
 JSON の解析.
virtual SGString GetJson ()
 JSON 文字列の取得.
virtual PGJsonObjectSetValueByName (const SGString &key, PGValue value, const SGString &name)
 子オブジェクトのキー値設定
virtual PGValueGetValue (const SGString &key)
 キー値の取得
virtual PGJsonObjectGetParent ()
 親オブジェクトの取得
virtual bool HasKey (const SGString &key) const
 キーの有無
void SetDirty (const SGString &key)
void ResetDirty ()
bool IsDirty ()
KVIterator KeyValueBegin ()
KVIterator KeyValueEnd ()

Public 変数

SGString mName
 名前

説明

JSON オブジェクト.

JSON のオブジェクト型データを保持します。


型定義

typedef vector<PGJsonObject*> JObjectList

JSON オブジェクトリスト型.

typedef vector<PGJsonObject*>::iterator JOIterator

List のイテレーター型

キー値リスト型

typedef map<SGString,PGValue>::iterator KVIterator

KeyValueList のイテレーター型

typedef set<SGString> DirtyList

キー値リスト型

typedef set<SGString>::iterator DLIterator

KeyValueList のイテレーター型


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

PGJsonObject ( PGJsonObject parent  ) 

コンストラクタ

引数:
type 種別
~PGJsonObject (  )  [virtual]

デストラクタ


関数

bool HasGroup (  )  [virtual]

グループの有無

グループの有無を取得します。

戻り値:
常に false を返します。

PGJsonObjectHasListで再定義されています。

bool AddObject ( PGJsonObject jo  )  [virtual]

子オブジェクトの追加

子となるオブジェクトを追加します。

注意:
このメソッドは、 PGJsonObjectHasList との互換性のために用意されました。実際の動作は行いません。
引数:
jo JSON オブジェクト
戻り値:
常に false を返します。

PGJsonObjectHasListで再定義されています。

ostream & OutJson ( ostream &  out  )  [virtual]

JSON 文字列の出力.

JSON 文字列を出力します。

引数:
out 出力先ストリーム
戻り値:
出力先ストリームを返します。
ostream & OutJson ( ostream &  out,
int &  b 
) [virtual]

JSON 文字列の出力.

JSON 文字列を出力します。

引数:
out 出力先ストリーム
b 出力項目カウンタ
戻り値:
出力先ストリームを返します。
ostream & OutJsonMember ( ostream &  out,
int &  b 
) [virtual]

JSON 文字列の出力.

JSON 文字列を出力します。

引数:
out 出力先ストリーム
b 項目カウンタ
戻り値:
出力先ストリームを返します。

PGJsonGridで再定義されています。

ostream & OutJsonDirtyMember ( ostream &  out,
int &  b 
) [virtual]

JSON 文字列の出力(差分).

変化のあった部分のみの JSON 文字列を出力します。

引数:
out 出力先ストリーム
b 項目カウンタ
戻り値:
出力先ストリームを返します。

PGJsonGridで再定義されています。

ostream & OutJsonList ( ostream &  out,
int &  b 
) [virtual]

子オブジェクトのJSON文字列の出力

全ての子オブジェクトの JSON 文字列を出力します。

注意:
このメソッドは、 PGJsonObjectHasList との互換性のために用意されました。実際の動作は行いません。
引数:
out 出力先ストリーム
b 項目カウンタ
戻り値:
出力先ストリームを返します。

PGJsonObjectHasListで再定義されています。

PGJsonObject * SearchName ( const SGString name  )  [virtual]

JSON オブジェクトの検索.

JSON オブジェクトを検索します。

引数:
name 名前
戻り値:
JSON オブジェクトを返します。見つからなかった場合は NULL を返します。

PGJsonObjectHasListで再定義されています。

PGJsonObject * SetValue ( const SGString key,
PGValue  value 
) [virtual]

キー値の設定

キー値を設定します。

引数:
キー名 
戻り値:
JSON オブジェクトを返します。見つからなかった場合は自身を帰します。

PGJsonRadioButtonObjectで再定義されています。

bool Parse ( JsonParser jp  )  [virtual]

JSON の解析.

JSON を解析して属性を取り込む。

引数:
jp JSON 解析情報
戻り値:
常に true を返します。
SGString GetJson (  )  [virtual]

JSON 文字列の取得.

JSON 文字列を取得します。

戻り値:
JSON 文字列を返します。
PGJsonObject * SetValueByName ( const SGString key,
PGValue  value,
const SGString name 
) [virtual]

子オブジェクトのキー値設定

オブジェクトを検索して、キー値を設定します。

引数:
key キー名
value 
name JSON オブジェクト名
戻り値:
JSON オブジェクトを返します。見つからなかった場合は自身を返します。
PGValue & GetValue ( const SGString key  )  [virtual]

キー値の取得

キー値を取得します。

引数:
key キー名
戻り値:
値を返します。
PGJsonObject * GetParent (  )  [virtual]

親オブジェクトの取得

自分を管理している(保持している)オブジェクトを取得します。

戻り値:
親オブジェクトポインタ
bool HasKey ( const SGString key  )  const [virtual]

キーの有無

キーの有無を確認します。

void SetDirty ( const SGString key  ) 
void ResetDirty (  ) 
bool IsDirty (  ) 
PGJsonObject::KVIterator KeyValueBegin (  ) 
PGJsonObject::KVIterator KeyValueEnd (  ) 

変数

名前


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

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