First prototype of the scheduler dispatcher is ready... It works, but the code was very difficult...

So, when the Scheduler that is passed to the AddScheduler is nillified,
the internal arrays that keep the Scheduler reference are also
nillified. And it does what i need for further utilization in MOOSE
classes. When the Scheduler is nillified, but, a schedule was planned
for that Scheduler, once the scheduler fires off, it will ignore that
call... cool.

Sven
This commit is contained in:
FlightControl
2016-12-12 16:44:56 +01:00
parent 24a6d37500
commit b81b483f0b
17 changed files with 481 additions and 174 deletions

View File

@@ -1,6 +1,19 @@
--- The EVENT class models an efficient event handling process between other classes and its units, weapons.
--- This module contains the EVENT class.
--
-- ===
--
-- Takes care of EVENT dispatching between DCS events and event handling functions defined in MOOSE classes.
--
-- ===
--
-- The above menus classes **are derived** from 2 main **abstract** classes defined within the MOOSE framework (so don't use these):
--
-- ===
--
-- ### Contributions: -
-- ### Authors: FlightControl : Design & Programming
--
-- @module Event
-- @author FlightControl
--- The EVENT structure
-- @type EVENT
@@ -93,7 +106,7 @@ function EVENT:Init( EventID, EventClass )
end
if not self.Events[EventID][EventClass] then
self.Events[EventID][EventClass] = setmetatable( {}, { __mode = "v" } )
self.Events[EventID][EventClass] = setmetatable( {}, { __mode = "k" } )
end
return self.Events[EventID][EventClass]
end