global_visual_sensor.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_COACH_GLOBAL_VISUAL_SENSOR_H
00033 #define RCSC_COACH_GLOBAL_VISUAL_SENSOR_H
00034 
00035 #include <rcsc/coach/global_object.h>
00036 #include <rcsc/rcg/types.h>
00037 #include <rcsc/game_time.h>
00038 
00039 #include <string>
00040 #include <iostream>
00041 
00042 namespace rcsc {
00043 
00048 class GlobalVisualSensor {
00049 private:
00051     GameTime M_time;
00052 
00053     std::string M_team_name_left; 
00054     std::string M_team_name_right; 
00055 
00056     GlobalBallObject M_ball; 
00057     std::vector< GlobalPlayerObject > M_players; 
00058 
00059 public:
00063     GlobalVisualSensor();
00064 
00068     ~GlobalVisualSensor();
00069 
00074     const
00075     GameTime & time() const
00076       {
00077           return M_time;
00078       }
00079 
00084     const
00085     std::string & teamNameLeft() const
00086       {
00087           return M_team_name_left;
00088       }
00089 
00094     const
00095     std::string & teamNameRight() const
00096       {
00097           return M_team_name_right;
00098       }
00099 
00104     const
00105     GlobalBallObject & ball() const
00106       {
00107           return M_ball;
00108       }
00109 
00114     const
00115     std::vector< GlobalPlayerObject > & players() const
00116       {
00117           return M_players;
00118       }
00119 
00126     void parse( const char * msg,
00127                 const double & version,
00128                 const GameTime & current );
00129 
00130 private:
00136     void parseV6( const char * msg );
00137 
00142     void parseV7( const char * msg );
00143 
00144 public:
00145 
00151     std::ostream & print( std::ostream & os ) const;
00152 
00153 };
00154 
00155 }
00156 
00157 #endif

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