PacketSender.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 **
00004 ** Copyright (C) 2006 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 PACKETSENDER_HH_
00018 # define PACKETSENDER_HH_
00019 
00020 # include "tools.hh"
00021 
00029 class PacketSender
00030 {
00031 public:
00032   PacketSender();
00033   virtual ~PacketSender();
00034 
00035   void setTeamId(int team_id);
00036 
00037   virtual void sendPacket(const Packet& p) = 0;
00038 
00039   virtual void gameFinished();
00040   
00041 protected:
00042   int team_id_;
00043 };
00044 
00045 inline PacketSender::PacketSender()
00046   : team_id_(-1)
00047 {
00048 }
00049 
00050 inline PacketSender::~PacketSender()
00051 {
00052 }
00053 
00054 inline void PacketSender::setTeamId(int team_id)
00055 {
00056   team_id_ = team_id;
00057 }
00058 
00059 inline void PacketSender::gameFinished()
00060 {
00061 }
00062 
00063 #endif /* !PACKETSENDER_HH_ */

Generated on Sat Jun 23 16:07:23 2007 for Stechec/TBT by  doxygen 1.4.7