00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef BASECRULES_HH_
00018 # define BASECRULES_HH_
00019
00020 # include "BaseRules.hh"
00021
00022 class Event;
00023 class Api;
00024
00025 class BaseCRules : public BaseRules
00026 {
00027 public:
00028 BaseCRules();
00029 virtual ~BaseCRules();
00030
00033 int getCoachId() const;
00034
00037 int getLeagueId() const;
00038
00045 bool isBusy() const;
00046
00050 void sendPacket(const Packet& p) const;
00051
00054 void setEventHandler(Event* evp);
00055
00060 void onEvent(int event);
00061
00064 void onEvent(const Packet* pkt);
00065
00067 virtual Api* getApi() = 0;
00068
00069 private:
00070 void msgCatchSync(const MsgSync* m);
00071 void msgCatchUid(const ClientUid* m);
00072
00073 int coach_id_;
00074 int league_id_;
00075 EventProcess evp_;
00076 mutable int busy_count_;
00077 };
00078
00079 # include "BaseCRules.hxx"
00080
00081 #endif