クラス rcsc::rcg::Serializer

rcg data serializer interface class [詳細]

#include <serializer.h>

rcsc::rcg::Serializerに対する継承グラフ

rcsc::rcg::SerializerV1 rcsc::rcg::SerializerV2 rcsc::rcg::SerializerV3 rcsc::rcg::SerializerV4 すべてのメンバ一覧

Public メソッド

virtual std::ostream & serializeHeader (std::ostream &os)=0
 write header
virtual std::ostream & serializeParam (std::ostream &os, const std::string &msg)=0
 write parameter message
virtual std::ostream & serialize (std::ostream &os, const server_params_t &param)=0
 write header
virtual std::ostream & serialize (std::ostream &os, const player_params_t &pparam)=0
 write header
virtual std::ostream & serialize (std::ostream &os, const player_type_t &type)=0
 write header
virtual std::ostream & serialize (std::ostream &os, const dispinfo_t &disp)=0
 write dispinfo_t.
virtual std::ostream & serialize (std::ostream &os, const showinfo_t &show)=0
 write showinfo_t.
virtual std::ostream & serialize (std::ostream &os, const showinfo_t2 &show2)=0
 write showinfo_t2.
virtual std::ostream & serialize (std::ostream &os, const short_showinfo_t2 &show2)=0
 write short_showinfo_t2.
virtual std::ostream & serialize (std::ostream &os, const msginfo_t &msg)=0
 write message info
virtual std::ostream & serialize (std::ostream &os, const Int16 board, const std::string &msg)=0
 write message info
virtual std::ostream & serialize (std::ostream &os, const drawinfo_t &draw)=0
 write drawinfo_t
virtual std::ostream & serialize (std::ostream &os, const char playmode)=0
 write playmode
virtual std::ostream & serialize (std::ostream &os, const team_t &team_l, const team_t &team_r)=0
 write team info
virtual std::ostream & serialize (std::ostream &os, const TeamT &team_l, const TeamT &team_r)=0
 write team info
virtual std::ostream & serialize (std::ostream &os, const ShowInfoT &show)=0
 write ShowInfoT
virtual std::ostream & serialize (std::ostream &os, const DispInfoT &disp)=0
 write DispInfoT

Static Public メソッド

static void convert (const pos_t &from, BallT &to)
 convert pos_t to BallT
static void convert (const ball_t &from, BallT &to)
 convert ball_t to BallT
static void convert (const pos_t &from, player_t &to)
 convert pos_t to player_t
static void convert (const SideID side, const int unum, const player_t &from, pos_t &to)
 convert player_t to pos_t
static void convert (const pos_t &from, PlayerT &to)
 convert pos_t to PlayerT
static void convert (const PlayerT &from, player_t &to)
 convert player info to player_t
static void convert (const player_t &from, PlayerT &to)
 convert player_t to PlayerT
static void convert (const std::string &name, const int score, team_t &to)
 convert team info to team_t
static void convert (const TeamT &from, team_t &to)
 convert team_t to TeamT
static void convert (const team_t &from, TeamT &to)
 convert TeamT to team_t
static void convert (const showinfo_t &from, showinfo_t2 &to)
 convert showinfo_t to showinfo_t2
static void convert (const showinfo_t &from, short_showinfo_t2 &to)
 convert showinfo_t to short_showinfo_t2
static void convert (const showinfo_t2 &from, showinfo_t &to)
 convert showinfo_t2 to showinfo_t
static void convert (const char playmode, const TeamT &team_l, const TeamT &team_r, const short_showinfo_t2 &from, showinfo_t &to)
 convert short_showinfo_t2 to showinfo_t
static void convert (const char playmode, const TeamT &team_l, const TeamT &team_r, const ShowInfoT &from, showinfo_t &to)
 convert ShowInfoT to showinfo_t
static void convert (const showinfo_t &from, ShowInfoT &to)
 convert showinfot_t to ShowInfoT
static void convert (const char playmode, const TeamT &team_l, const TeamT &team_r, const ShowInfoT &from, showinfo_t2 &to)
 convert ShowInfoT to showinfo_t2
static void convert (const showinfo_t2 &from, ShowInfoT &to)
 convert showinfot_t2 to ShowInfoT
static void convert (const ShowInfoT &from, short_showinfo_t2 &to)
 convert ShowInfoT to short_showinfo_t2
static void convert (const short_showinfo_t2 &from, ShowInfoT &to)
 convert short_showinfot_t2 to ShowInfoT
static void convert (const std::string &from, msginfo_t &to)
 make msginfo_t from string

Protected メソッド

 Serializer ()
 initialize member variables. constructor is accessible only from the derived classes.
virtual ~Serializer ()
 virtual destructor
std::ostream & serializeImpl (std::ostream &os, const int version)
 write header
std::ostream & serializeImpl (std::ostream &os, const server_params_t &param)
 write server param
std::ostream & serializeImpl (std::ostream &os, const player_params_t &pparam)
 write player param
std::ostream & serializeImpl (std::ostream &os, const player_type_t &type)
 write player type param
std::ostream & serializeImpl (std::ostream &os, const team_t &team_l, const team_t &team_r)
 write team info
std::ostream & serializeImpl (std::ostream &os, const char pmode)
 write playmode
std::ostream & serializeImpl (std::ostream &os, const PlayMode pmode)
 write playmode
std::ostream & serializeImpl (std::ostream &os, const dispinfo_t &disp)
 write dispinfo (version 1 protocol)
std::ostream & serializeImpl (std::ostream &os, const showinfo_t &show)
 write showinfo (version 2 protocol)
std::ostream & serializeImpl (std::ostream &os, const showinfo_t2 &show2)
 write showinfo_t2 (version 3 protocol). data is converted to short_showinfo_t2.
std::ostream & serializeImpl (std::ostream &os, const short_showinfo_t2 &show2)
 write short_showinfo (version 3 protocol)
std::ostream & serializeImpl (std::ostream &os, const msginfo_t &msg)
 write message info
std::ostream & serializeImpl (std::ostream &os, const drawinfo_t &draw)
 write draw info
std::ostream & serializeImpl (std::ostream &os, const dispinfo_t2 &disp2)
 write dispinfo_t2, but data is converted.

Protected 変数

char M_playmode
 temporal playmode holder
TeamT M_teams [2]
 temporal team info holder

説明

rcg data serializer interface class


関数

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const int  version 
) [protected]

write header

引数:
os reference to the output stream
version log version
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const server_params_t param 
) [protected]

write server param

引数:
os reference to the output stream
param server_params_t variable
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const player_params_t pparam 
) [protected]

write player param

引数:
os reference to the output stream
pparam plyaer_params_t variable
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const player_type_t type 
) [protected]

write player type param

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const team_t team_l,
const team_t team_r 
) [protected]

write team info

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const char  pmode 
) [protected]

write playmode

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const PlayMode  pmode 
) [protected]

write playmode

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const dispinfo_t disp 
) [protected]

write dispinfo (version 1 protocol)

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const showinfo_t show 
) [protected]

write showinfo (version 2 protocol)

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const showinfo_t2 show2 
) [protected]

write showinfo_t2 (version 3 protocol). data is converted to short_showinfo_t2.

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const short_showinfo_t2 show2 
) [protected]

write short_showinfo (version 3 protocol)

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const msginfo_t msg 
) [protected]

write message info

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const drawinfo_t draw 
) [protected]

write draw info

引数:
os reference to the output stream
戻り値:
reference to the output stream

std::ostream & rcsc::rcg::Serializer::serializeImpl ( std::ostream &  os,
const dispinfo_t2 disp2 
) [protected]

write dispinfo_t2, but data is converted.

引数:
os reference to the output stream
戻り値:
reference to the output stream

void rcsc::rcg::Serializer::convert ( const pos_t from,
BallT to 
) [static]

convert pos_t to BallT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const ball_t from,
BallT to 
) [static]

convert ball_t to BallT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const pos_t from,
player_t to 
) [static]

convert pos_t to player_t

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const SideID  side,
const int  unum,
const player_t from,
pos_t to 
) [static]

convert player_t to pos_t

引数:
side player's side id
unum uniform number
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const pos_t from,
PlayerT to 
) [static]

convert pos_t to PlayerT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const PlayerT from,
player_t to 
) [static]

convert player info to player_t

引数:
from source player info
to destination player_t variable

void rcsc::rcg::Serializer::convert ( const player_t from,
PlayerT to 
) [static]

convert player_t to PlayerT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const std::string &  name,
const int  score,
team_t to 
) [static]

convert team info to team_t

引数:
name source team name string
score source team score
to destination team_t variable

void rcsc::rcg::Serializer::convert ( const TeamT from,
team_t to 
) [static]

convert team_t to TeamT

引数:
from source data
to destination team_t variable

void rcsc::rcg::Serializer::convert ( const team_t from,
TeamT to 
) [static]

convert TeamT to team_t

引数:
from source data
to destination TeamT variable

void rcsc::rcg::Serializer::convert ( const showinfo_t from,
showinfo_t2 to 
) [static]

convert showinfo_t to showinfo_t2

引数:
from source showinfo_t variable
to destination showinfo_t2 variable

void rcsc::rcg::Serializer::convert ( const showinfo_t from,
short_showinfo_t2 to 
) [static]

convert showinfo_t to short_showinfo_t2

引数:
from source showinfo_t variable
to destination short_showinfo_t2 variable

void rcsc::rcg::Serializer::convert ( const showinfo_t2 from,
showinfo_t to 
) [static]

convert showinfo_t2 to showinfo_t

引数:
from source showinfo_t2 variable
to destination showinfo_t variable

void rcsc::rcg::Serializer::convert ( const char  playmode,
const TeamT team_l,
const TeamT team_r,
const short_showinfo_t2 from,
showinfo_t to 
) [static]

convert short_showinfo_t2 to showinfo_t

引数:
playmode playmode variable
team_l left team variable
team_r right team variable
from source short_showinfo_t2 variable
to destination showinfo_t variable

void rcsc::rcg::Serializer::convert ( const char  playmode,
const TeamT team_l,
const TeamT team_r,
const ShowInfoT from,
showinfo_t to 
) [static]

convert ShowInfoT to showinfo_t

引数:
playmode playmode variable
team_l left team variable
team_r right team variable
from source ShowInfoT variable
to destination showinfo_t variable

void rcsc::rcg::Serializer::convert ( const showinfo_t from,
ShowInfoT to 
) [static]

convert showinfot_t to ShowInfoT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const char  playmode,
const TeamT team_l,
const TeamT team_r,
const ShowInfoT from,
showinfo_t2 to 
) [static]

convert ShowInfoT to showinfo_t2

引数:
playmode playmode variable
team_l left team variable
team_r right team variable
from source ShowInfoT variable
to destination showinfo_t2 variable

void rcsc::rcg::Serializer::convert ( const showinfo_t2 from,
ShowInfoT to 
) [static]

convert showinfot_t2 to ShowInfoT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const ShowInfoT from,
short_showinfo_t2 to 
) [static]

convert ShowInfoT to short_showinfo_t2

引数:
from source ShowInfoT variable
to destination short_showinfo_t2 variable

void rcsc::rcg::Serializer::convert ( const short_showinfo_t2 from,
ShowInfoT to 
) [static]

convert short_showinfot_t2 to ShowInfoT

引数:
from source variable
to destination variable

void rcsc::rcg::Serializer::convert ( const std::string &  from,
msginfo_t to 
) [static]

make msginfo_t from string

引数:
from source message string
to destination msginfo_t variable

virtual std::ostream& rcsc::rcg::Serializer::serializeHeader ( std::ostream &  os  )  [pure virtual]

write header

引数:
os reference to the output stream
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serializeParam ( std::ostream &  os,
const std::string &  msg 
) [pure virtual]

write parameter message

引数:
os reference to the output stream
msg server parameter message
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const server_params_t param 
) [pure virtual]

write header

引数:
os reference to the output stream
param server_params_t variable by network byte order
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const player_params_t pparam 
) [pure virtual]

write header

引数:
os reference to the output stream
pparam player_params_t variable by network byte order
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const player_type_t type 
) [pure virtual]

write header

引数:
os reference to the output stream
type player_type_t variable by network byte order
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const dispinfo_t disp 
) [pure virtual]

write dispinfo_t.

引数:
os reference to the output stream
disp network byte order data
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const showinfo_t show 
) [pure virtual]

write showinfo_t.

引数:
os reference to the output stream
show network byte order data
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const showinfo_t2 show2 
) [pure virtual]

write showinfo_t2.

引数:
os reference to the output stream
show2 network byte order data
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const short_showinfo_t2 show2 
) [pure virtual]

write short_showinfo_t2.

引数:
os reference to the output stream
show2 network byte order data
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const msginfo_t msg 
) [pure virtual]

write message info

引数:
os reference to the output stream
msg msginfo_t variable by network byte order
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const Int16  board,
const std::string &  msg 
) [pure virtual]

write message info

引数:
os reference to the output stream
board message board type
msg message string
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const drawinfo_t draw 
) [pure virtual]

write drawinfo_t

引数:
os reference to the output stream
draw drawinfo_t variable
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const char  playmode 
) [pure virtual]

write playmode

引数:
os reference to the output stream
playmode play mode variable
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const team_t team_l,
const team_t team_r 
) [pure virtual]

write team info

引数:
os reference to the output stream
team_l left team variable
team_r right team variable
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const TeamT team_l,
const TeamT team_r 
) [pure virtual]

write team info

引数:
os reference to the output stream
team_l left team variable
team_r right team variable
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const ShowInfoT show 
) [pure virtual]

write ShowInfoT

引数:
os reference to the output stream
show data to be written
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。

virtual std::ostream& rcsc::rcg::Serializer::serialize ( std::ostream &  os,
const DispInfoT disp 
) [pure virtual]

write DispInfoT

引数:
os reference to the output stream
disp data to be written
戻り値:
reference to the output stream

rcsc::rcg::SerializerV1rcsc::rcg::SerializerV2rcsc::rcg::SerializerV3rcsc::rcg::SerializerV4で実装されています。


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:28 2008に生成されました。  doxygen 1.5.0