serializer_v3.h

説明を見る。
00001 // -*-c++-*-
00002 
00008 /*
00009  *Copyright:
00010 
00011  Copyright (C) Hidehisa AKIYAMA
00012 
00013  This code is free software; you can redistribute it and/or
00014  modify it under the terms of the GNU Lesser General Public
00015  License as published by the Free Software Foundation; either
00016  version 2.1 of the License, or (at your option) any later version.
00017 
00018  This library is distributed in the hope that it will be useful,
00019  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021  Lesser General Public License for more details.
00022 
00023  You should have received a copy of the GNU Lesser General Public
00024  License along with this library; if not, write to the Free Software
00025  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 
00027  *EndCopyright:
00028  */
00029 
00031 
00032 #ifndef RCSC_RCG_SERIALIZER_V3_H
00033 #define RCSC_RCG_SERIALIZER_V3_H
00034 
00035 #include <rcsc/rcg/serializer.h>
00036 
00037 #include <map>
00038 
00039 namespace rcsc {
00040 namespace rcg {
00041 
00046 class SerializerV3
00047     : public Serializer {
00048 private:
00049 
00050 public:
00051 
00055     ~SerializerV3()
00056       { }
00057 
00063     virtual
00064     std::ostream & serializeHeader( std::ostream & os );
00065 
00072     virtual
00073     std::ostream & serializeParam( std::ostream & os,
00074                                    const std::string & msg );
00075 
00081     virtual
00082     std::ostream & serialize( std::ostream & os,
00083                               const server_params_t & param );
00084 
00090     virtual
00091     std::ostream & serialize( std::ostream & os,
00092                               const player_params_t & pparam );
00093 
00099     virtual
00100     std::ostream & serialize( std::ostream & os,
00101                               const player_type_t & type );
00102 
00109     virtual
00110     std::ostream & serialize( std::ostream & os,
00111                               const dispinfo_t & disp );
00112 
00119     virtual
00120     std::ostream & serialize( std::ostream & os,
00121                               const showinfo_t & show );
00122 
00129     virtual
00130     std::ostream & serialize( std::ostream & os,
00131                               const showinfo_t2 & show2 );
00132 
00139     virtual
00140     std::ostream & serialize( std::ostream & os,
00141                               const short_showinfo_t2 & show2 );
00142 
00148     virtual
00149     std::ostream & serialize( std::ostream & os,
00150                               const msginfo_t & msg );
00151 
00159     virtual
00160     std::ostream & serialize( std::ostream & os,
00161                               const Int16 board,
00162                               const std::string & msg );
00163 
00170     virtual
00171     std::ostream & serialize( std::ostream & os,
00172                               const drawinfo_t & draw );
00173 
00180     virtual
00181     std::ostream & serialize( std::ostream & os,
00182                               const char playmode );
00183 
00191     virtual
00192     std::ostream & serialize( std::ostream & os,
00193                               const team_t & team_l,
00194                               const team_t & team_r );
00195 
00203     virtual
00204     std::ostream & serialize( std::ostream & os,
00205                               const TeamT & team_l,
00206                               const TeamT & team_r );
00207 
00214     virtual
00215     std::ostream & serialize( std::ostream & os,
00216                               const ShowInfoT & show );
00217 
00224     virtual
00225     std::ostream & serialize( std::ostream & os,
00226                               const DispInfoT & disp );
00227 
00228 private:
00229 
00236     bool parseParam( const std::string & msg,
00237                      std::map< std::string, std::string > & param_map );
00238 
00245     bool parseParam( const std::string & from,
00246                      server_params_t & to );
00247 
00254     bool parseParam( const std::string & from,
00255                      player_params_t & to );
00256 
00263     bool parseParam( const std::string & from,
00264                      player_type_t & to );
00265 
00266 };
00267 
00268 } // end of namespace rcg
00269 } // end of namespace rcsc
00270 
00271 #endif

librcscに対してThu May 1 15:41:21 2008に生成されました。  doxygen 1.5.0