📄 serializercommonstdv7.cpp
字号:
// -*-c++-*-/*************************************************************************** serializercommonstdv7.cc Class for serializing data to std v7 clients ------------------- begin : 24-JAN-2003 copyright : (C) 2003 by The RoboCup Soccer Server Maintenance Group. email : sserver-admin@lists.sourceforge.net***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU LGPL as published by the Free Software * * Foundation; either version 2 of the License, or (at your option) any * * later version. * * * ***************************************************************************/#include "serializercommonstdv7.h"#include "clangmsg.h"namespace rcss {SerializerCommonStdv7::SerializerCommonStdv7(){}SerializerCommonStdv7::~SerializerCommonStdv7(){}constSerializerCommonStdv7 &SerializerCommonStdv7::instance(){ static SerializerCommonStdv7 ser; return ser;}voidSerializerCommonStdv7::serializeServerParamBegin( std::ostream & strm ) const{ strm << "(server_param";}voidSerializerCommonStdv7::serializeServerParamEnd( std::ostream & strm ) const{ strm << ")";}voidSerializerCommonStdv7::serializePlayerParamBegin( std::ostream & strm ) const{ strm << "(player_param";}voidSerializerCommonStdv7::serializePlayerParamEnd( std::ostream & strm ) const{ strm << ")";}voidSerializerCommonStdv7::serializePlayerTypeBegin( std::ostream & strm ) const{ strm << "(player_type";}voidSerializerCommonStdv7::serializePlayerTypeEnd( std::ostream & strm ) const{ strm << ')';}voidSerializerCommonStdv7::serializeParam( std::ostream & strm, const int param ) const{ strm << ' ' << param;}voidSerializerCommonStdv7::serializeParam( std::ostream & strm, const unsigned int param ) const{ strm << ' ' << param;}voidSerializerCommonStdv7::serializeParam( std::ostream & strm, const bool param ) const{ strm << ' ' << param;}voidSerializerCommonStdv7::serializeParam( std::ostream & strm, const double & param ) const{ strm << ' ' << param;}voidSerializerCommonStdv7::serializeParam( std::ostream & strm, const std::string & param ) const{ strm << ' ' << param;}namespace {constSerializerCommon &create(){ return SerializerCommonStdv7::instance();}RegHolder v7 = SerializerCommon::factory().autoReg( &create, 7 );}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -