Weather.hh

00001 /*
00002 ** TowBowlTactics, a turn-based strategy football game.
00003 ** 
00004 ** Copyright (C) 2006-2010 The TBT Team.
00005 ** 
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 ** 
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 ** 
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
00015 */
00016 
00017 #ifndef WEATHER_HH_
00018 # define WEATHER_HH_
00019 
00020 # include "Constants.hh"
00021 # include "rules/PacketHandler.hh"
00022 
00029 DECLARE_PACKET(MSG_WEATHER, MsgWeather)
00030   int weather;
00031 END_PACKET;
00032 
00037 class Weather
00038 {
00039 public:
00040   Weather();
00041   virtual ~Weather() {}
00042 
00043   virtual void serialize(std::ostream& os) const;
00044   virtual void unserialize(std::istream& is);
00045 
00048   int getWeather() const;
00051   const char* getWeatherStr() const;
00052 
00054   void setWeather(const MsgWeather* m);
00055   
00056 protected:
00057 
00058   int weather_; 
00059 };
00060 
00061 inline int Weather::getWeather() const
00062 {
00063   return weather_;
00064 }
00065 
00066 #endif /* !WEATHER_HH_ */
Generated on Mon Apr 5 21:17:14 2010 for Stechec/TBT by  doxygen 1.6.3