LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
|
rcg data serializer interface class More...
#include <serializer.h>
Public Types | |
typedef std::shared_ptr< Serializer > | Ptr |
rcg serializer pointer type | |
typedef Ptr(* | Creator) () |
rcg serializer creator function | |
typedef rcss::Factory< Creator, int > | Creators |
creator function holder | |
Public Member Functions | |
virtual | ~Serializer () |
virtual destructor | |
virtual std::ostream & | serializeHeader (std::ostream &os)=0 |
write header More... | |
virtual std::ostream & | serializeParam (std::ostream &os, const std::string &msg)=0 |
write parameter message More... | |
virtual std::ostream & | serialize (std::ostream &os, const server_params_t ¶m)=0 |
write header More... | |
virtual std::ostream & | serialize (std::ostream &os, const player_params_t &pparam)=0 |
write header More... | |
virtual std::ostream & | serialize (std::ostream &os, const player_type_t &type)=0 |
write header More... | |
virtual std::ostream & | serialize (std::ostream &os, const dispinfo_t &disp)=0 |
write dispinfo_t. More... | |
virtual std::ostream & | serialize (std::ostream &os, const showinfo_t &show)=0 |
write showinfo_t. More... | |
virtual std::ostream & | serialize (std::ostream &os, const showinfo_t2 &show2)=0 |
write showinfo_t2. More... | |
virtual std::ostream & | serialize (std::ostream &os, const short_showinfo_t2 &show2)=0 |
write short_showinfo_t2. More... | |
virtual std::ostream & | serialize (std::ostream &os, const msginfo_t &msg)=0 |
write message info More... | |
virtual std::ostream & | serialize (std::ostream &os, const Int16 board, const std::string &msg)=0 |
write message info More... | |
virtual std::ostream & | serialize (std::ostream &os, const drawinfo_t &draw)=0 |
write drawinfo_t More... | |
virtual std::ostream & | serialize (std::ostream &os, const char playmode)=0 |
write playmode More... | |
virtual std::ostream & | serialize (std::ostream &os, const team_t &team_l, const team_t &team_r)=0 |
write team info More... | |
virtual std::ostream & | serialize (std::ostream &os, const TeamT &team_l, const TeamT &team_r)=0 |
write team info More... | |
virtual std::ostream & | serialize (std::ostream &os, const ShowInfoT &show)=0 |
write ShowInfoT More... | |
virtual std::ostream & | serialize (std::ostream &os, const DispInfoT &disp)=0 |
write DispInfoT More... | |
Static Public Member Functions | |
static Creators & | creators () |
factory holder singleton More... | |
static Ptr | create (const int version) |
create a suitable version serializer instance depending on the input version. More... | |
Protected Member Functions | |
Serializer () | |
initialize member variables. constructor is accessible only from the derived classes. | |
std::ostream & | serializeImpl (std::ostream &os, const int version) |
write header More... | |
std::ostream & | serializeImpl (std::ostream &os, const server_params_t ¶m) |
write server param More... | |
std::ostream & | serializeImpl (std::ostream &os, const player_params_t &pparam) |
write player param More... | |
std::ostream & | serializeImpl (std::ostream &os, const player_type_t &type) |
write player type param More... | |
std::ostream & | serializeImpl (std::ostream &os, const team_t &team_l, const team_t &team_r) |
write team info More... | |
std::ostream & | serializeImpl (std::ostream &os, const char pmode) |
write playmode More... | |
std::ostream & | serializeImpl (std::ostream &os, const PlayMode pmode) |
write playmode More... | |
std::ostream & | serializeImpl (std::ostream &os, const dispinfo_t &disp) |
write dispinfo (version 1 protocol) More... | |
std::ostream & | serializeImpl (std::ostream &os, const showinfo_t &show) |
write showinfo (version 2 protocol) More... | |
std::ostream & | serializeImpl (std::ostream &os, const showinfo_t2 &show2) |
write showinfo_t2 (version 3 protocol). data is converted to short_showinfo_t2. More... | |
std::ostream & | serializeImpl (std::ostream &os, const short_showinfo_t2 &show2) |
write short_showinfo (version 3 protocol) More... | |
std::ostream & | serializeImpl (std::ostream &os, const msginfo_t &msg) |
write message info More... | |
std::ostream & | serializeImpl (std::ostream &os, const drawinfo_t &draw) |
write draw info More... | |
std::ostream & | serializeImpl (std::ostream &os, const dispinfo_t2 &disp2) |
write dispinfo_t2, but data is converted. More... | |
Protected Attributes | |
char | M_playmode |
temporal playmode holder | |
TeamT | M_teams [2] |
temporal team info holder | |
rcg data serializer interface class
|
static |
create a suitable version serializer instance depending on the input version.
version | rcg format version. |
|
static |
factory holder singleton
|
pure virtual |
write playmode
os | reference to the output stream |
playmode | play mode variable |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write dispinfo_t.
os | reference to the output stream |
disp | network byte order data |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write DispInfoT
os | reference to the output stream |
disp | data to be written |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write drawinfo_t
os | reference to the output stream |
draw | drawinfo_t variable |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write message info
os | reference to the output stream |
board | message board type |
msg | message string |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write message info
os | reference to the output stream |
msg | msginfo_t variable by network byte order |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write header
os | reference to the output stream |
pparam | player_params_t variable by network byte order |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write header
os | reference to the output stream |
type | player_type_t variable by network byte order |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write header
os | reference to the output stream |
param | server_params_t variable by network byte order |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write short_showinfo_t2.
os | reference to the output stream |
show2 | network byte order data |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write showinfo_t.
os | reference to the output stream |
show | network byte order data |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write showinfo_t2.
os | reference to the output stream |
show2 | network byte order data |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write ShowInfoT
os | reference to the output stream |
show | data to be written |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, rcsc::rcg::SerializerV4, rcsc::rcg::SerializerV5, and rcsc::rcg::SerializerV6.
|
pure virtual |
write team info
os | reference to the output stream |
team_l | left team variable |
team_r | right team variable |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write team info
os | reference to the output stream |
team_l | left team variable |
team_r | right team variable |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.
|
pure virtual |
write header
os | reference to the output stream |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, rcsc::rcg::SerializerV4, rcsc::rcg::SerializerV5, and rcsc::rcg::SerializerV6.
|
protected |
write playmode
os | reference to the output stream |
pmode | playmode index |
|
protected |
write dispinfo (version 1 protocol)
os | reference to the output stream |
disp | serialized data |
|
protected |
write dispinfo_t2, but data is converted.
os | reference to the output stream |
disp2 | serialized data |
|
protected |
write draw info
os | reference to the output stream |
draw | serialized data |
|
protected |
write header
os | reference to the output stream |
version | log version |
|
protected |
write message info
os | reference to the output stream |
msg | serialized data |
|
protected |
write player param
os | reference to the output stream |
pparam | plyaer_params_t data |
|
protected |
write player type param
os | reference to the output stream |
type | player_type_t data |
|
protected |
write playmode
os | reference to the output stream |
pmode | playmode index |
|
protected |
write server param
os | reference to the output stream |
param | server_params_t data |
|
protected |
write short_showinfo (version 3 protocol)
os | reference to the output stream |
show2 | serialized data |
|
protected |
write showinfo (version 2 protocol)
os | reference to the output stream |
show | serialized data |
|
protected |
write showinfo_t2 (version 3 protocol). data is converted to short_showinfo_t2.
os | reference to the output stream |
show2 | serialized data |
|
protected |
write team info
os | reference to the output stream |
team_l | left team data |
team_r | right team data |
|
pure virtual |
write parameter message
os | reference to the output stream |
msg | server parameter message |
Implemented in rcsc::rcg::SerializerV1, rcsc::rcg::SerializerV2, rcsc::rcg::SerializerV3, and rcsc::rcg::SerializerV4.