クラス テンプレート langedge::OutputSerializer< STORAGE >

出力用基本シリアライザクラス. [詳細]

#include <BasicSerializer.hpp>

langedge::OutputSerializer< STORAGE >に対する継承グラフ

Inheritance graph
[凡例]
langedge::OutputSerializer< STORAGE >のコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public メソッド

 OutputSerializer ()
 ~OutputSerializer ()
void storeInteger (unsigned long val)
 整数型のパック.
void packULong (unsigned long val)
 unsigned long の格納.
OutputSerializeroperator<< (bool val)
 bool 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (char val)
 char 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (unsigned char val)
 unsigned char 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (short val)
 short 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (unsigned short val)
 unsigned short 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (int val)
 int 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (unsigned int val)
 unsigned int 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (long val)
 long 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (unsigned long val)
 unsigned long 型の格納 (可変バイト長でパックする)
OutputSerializeroperator<< (float val)
 浮動小数点の格納
OutputSerializeroperator<< (double val)
 倍精度浮動小数点の格納
OutputSerializeroperator<< (const char *cstr)
 C-string の格納.
OutputSerializeroperator<< (const unsigned char *cstr)
 unsigned c-string の格納.
OutputSerializeroperator<< (const wchar_t *cstr)
 wchar-string の格納.
OutputSerializeroperator<< (const std::string &str)
 std::string の格納
OutputSerializeroperator<< (const DataBlockHandle &dataBlock)
 データブロックの格納
OutputSerializeroperator<< (const std::vector< char > &vec)
 vector<char> の格納
OutputSerializeroperator<< (const std::vector< unsigned char > &vec)
 vector<unsigned char> の格納
void storeDataBlock (const void *data, size_t size)
 データブロックの格納 (実装)
template<typename T>
void storeArray (const T *array, size_t size)
 配列の格納
template<class COMPOUND>
void storeCompound (const COMPOUND &obj)
 構造体などの複合型のシリアライズをする
template<class CONTAINER>
void storePrimitiveContainer (CONTAINER &container)
 プリミティブオブジェクトのシーケンシャルコンテナの格納.
template<class CONTAINER>
void storeCompoundContainer (CONTAINER &container)
 複合オブジェクトのシーケンシャルコンテナの格納.

Protected 変数

STORAGE * a_storageObject
 シリアライズされたデータを格納するオブジェクト.

説明

template<class STORAGE>
class langedge::OutputSerializer< STORAGE >

出力用基本シリアライザクラス.

様々なオブジェクトをシリアライザオブジェクトに格納する。 このクラスから派生するシリアライザクラスとして、

がある。

一般に、ユーザ定義型オブジェクトのシリアライズをサポートしたい場合は、 ユーザ定義クラスごとに以下のような メンバ関数 (仮に名前は serialize とする) を定義し、

 struct FOO {
     int x;
     short y;
     char z;
 public:
     template<class STORAGE>
     void serialize( OutputSerializer<STORAGE>& serializer ) const {
         serializer << x << y << z;
     }
 }; 
さらに、非メンバ関数で
 template<class STORAGE>
 OutputSerializer<STORAGE>& operator<< ( OutputSerializer<STORAGE>& serializer, const FOO& obj ) {
     obj.serialize( serializer );
     return serializer;
 }
を定義する。
引数:
STORAGE データの格納先のクラス。 SerializerOutputFileStream や SerializerOutputMemoryBuffer。


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

template<class STORAGE>
langedge::OutputSerializer< STORAGE >::OutputSerializer  )  [inline]
 

template<class STORAGE>
langedge::OutputSerializer< STORAGE >::~OutputSerializer  )  [inline]
 


関数

template<class STORAGE>
void langedge::OutputSerializer< STORAGE >::storeInteger unsigned long  val  ) 
 

整数型のパック.

unsigned long 値を 4バイト固定、ビッグエンディアンで格納する。

template<class STORAGE>
void langedge::OutputSerializer< STORAGE >::packULong unsigned long  val  ) 
 

unsigned long の格納.

unsigned long を可変バイト長でバッファにパックする

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< bool  val  )  [inline]
 

bool 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< char  val  )  [inline]
 

char 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< unsigned char  val  )  [inline]
 

unsigned char 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< short  val  )  [inline]
 

short 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< unsigned short  val  )  [inline]
 

unsigned short 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< int  val  )  [inline]
 

int 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< unsigned int  val  )  [inline]
 

unsigned int 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< long  val  )  [inline]
 

long 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< unsigned long  val  )  [inline]
 

unsigned long 型の格納 (可変バイト長でパックする)

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< float  val  )  [inline]
 

浮動小数点の格納

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< double  val  )  [inline]
 

倍精度浮動小数点の格納

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const char *  cstr  )  [inline]
 

C-string の格納.

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const unsigned char *  cstr  )  [inline]
 

unsigned c-string の格納.

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const wchar_t *  cstr  )  [inline]
 

wchar-string の格納.

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const std::string &  str  )  [inline]
 

std::string の格納

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const DataBlockHandle &  dataBlock  )  [inline]
 

データブロックの格納

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const std::vector< char > &  vec  )  [inline]
 

vector<char> の格納

template<class STORAGE>
OutputSerializer& langedge::OutputSerializer< STORAGE >::operator<< const std::vector< unsigned char > &  vec  )  [inline]
 

vector<unsigned char> の格納

template<class STORAGE>
void langedge::OutputSerializer< STORAGE >::storeDataBlock const void *  data,
size_t  size
[inline]
 

データブロックの格納 (実装)

template<class STORAGE>
template<typename T>
void langedge::OutputSerializer< STORAGE >::storeArray const T *  array,
size_t  size
[inline]
 

配列の格納

template<class STORAGE>
template<class COMPOUND>
void langedge::OutputSerializer< STORAGE >::storeCompound const COMPOUND &  obj  )  [inline]
 

構造体などの複合型のシリアライズをする

template<class STORAGE>
template<class CONTAINER>
void langedge::OutputSerializer< STORAGE >::storePrimitiveContainer CONTAINER &  container  )  [inline]
 

プリミティブオブジェクトのシーケンシャルコンテナの格納.

template<class STORAGE>
template<class CONTAINER>
void langedge::OutputSerializer< STORAGE >::storeCompoundContainer CONTAINER &  container  )  [inline]
 

複合オブジェクトのシーケンシャルコンテナの格納.


変数

template<class STORAGE>
STORAGE* langedge::OutputSerializer< STORAGE >::a_storageObject [protected]
 

シリアライズされたデータを格納するオブジェクト.

データの格納先の違いにより、SerializerOutputFileStream や SerializerOutputMemoryBuffer を用いる。


このクラスの説明は次のファイルから生成されました:
LangEdge ライブラリに対してFri May 6 22:43:04 2005に生成されました。  doxygen 1.4.2