#ifndef SIRIEL_EVENT #define SIRIEL_EVENT #include #include #include #include "cl_luawrapper.h" #include "si_system.h" using namespace std; class EVENT_DRIVER { map > ev; deque todo; //events that will be executed deque src; //source of event deque dst; //destination of event deque code; //code of event public: void init(); //initialization void reg(string name, string func); //register function to event deque get(); //returns first function string get_name(); //returns name of EVENT string get_src(); //returns source of event string get_dst(); //returns destination of event int get_code(); //returns code of event int todo_empty(); //returns state of todo-list void add(string name); //add event to todo-list void add(string name, string source); //add event to todo-list void add(string name, string source, string dest); //add event to todo-list void add(int c); //add event by code to todo-list void execute(LUA_WRAPPER *lw); int pop_code(); }; #endif