⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 event.h

📁 S.C.O.U.R.G.E.是一款类似Rogue的游戏
💻 H
字号:
/***************************************************************************                          event.h  -  description                             -------------------    begin                : Thu Apr 8 2004    copyright            : (C) 2004 by Daroth-U    email                : daroth-u@ifrance.com ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef EVENT_H#define EVENT_H#include "../constants.h"#include "../date.h"/**  *@author Daroth-U  */ class Date;      class Event  {private:  Date eventDate;  Date timeOut;   long nbExecutionsToDo;  long nbExecutions;    // For debug purpose  static int globalId;    int eventId;  // unique  public:      enum {    INFINITE_EXECUTIONS = -1   };      // This event will occur nbExecutionsTD time every tmOut from currentDate.    Event(Date currentDate, Date tmOut, long nbExecutionsToDo);    // This event will occur only one time at the given date  Event(Date eventDate);    Event();   virtual ~Event();    //virtual void execute()=0;  virtual void execute() { cout << "Event.cpp : execute function should'nt be called by event base class!" << endl; }  inline long getNbExecutionsToDo() { return nbExecutionsToDo; }  inline long getNbExecutions()     { return nbExecutions; }  inline int getEventId()           { return eventId;   }  inline void increaseNbExecutions(){ nbExecutions ++ ; }  inline void setNbExecutionsToDo(int nb){ if(nb >= -1) nbExecutionsToDo = nb; else nbExecutions = 0; }        Date getEventDate() { return eventDate; }  Date getTimeOut()   { return timeOut;   }  void setEventDate(Date d) { eventDate = d; }     void scheduleDeleteEvent();    };#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -