event.h
来自「简单的 Discrete Event Simulator M/M/K/K q」· C头文件 代码 · 共 30 行
H
30 行
#ifndef EV_H#define EV_Hclass Event {public: double time; // Time at which Event takes place int type; // Type of Event Event* next; // Points to next event in list Event(double t, int i) { time = t; type = i; next = 0; } Event(){} ~Event(){}};class EventList { Event* head; // Points to first Event in EventList int event_count; // Total number of Events in EventListpublic: ~EventList() { clear();} EventList() { event_count = 0; head = 0;} void insert(double time, int type); // Insert new event into EventList Event* get(); // Returns first Event in EventList void clear(); // Removes all Events from EventList};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?