i6engine
1.0
|
Namespaces | |
i6e | |
i6e::core | |
boost | |
boost::serialization | |
Classes | |
struct | i6e::core::Scheduler< ClockUpdater >::Job |
this struct represents a single timer event More... | |
class | i6e::core::Scheduler< ClockUpdater > |
class | i6e::core::Timer |
This class provides gametime-synchronized Timers. They are controlled by the Scheduler. More... | |
class | i6e::core::EngineCoreController |
this class is used as an abstraction layer More... | |
class | i6e::core::IPKey::Hash |
class | i6e::core::IPKey |
class | i6e::core::Message |
Class representing a message to be sent. More... | |
struct | i6e::core::MessageStruct |
struct | i6e::core::ReceivedMessage |
a received message within a MessageSubscriber More... | |
class | i6e::core::MessageSubscriber |
Interface for every class that wants to subscribe to the messaging system. More... | |
class | i6e::core::MessagingController |
Central controller for messaging between subsystems and subsystems of different clients. More... | |
class | i6e::core::ModuleController |
Part of the Subsystem that keeps the whole module running. More... | |
struct | i6e::core::QueuedModule |
class | i6e::core::SubSystemController |
This class is used as an abstraction layer. More... | |
The core is the part of the engine that controlles the whole enginge.
a thread creates a Message and specifies a type for this Message
the thread can add several variables to that Message
than the thread sends the message to the MessageProcessor
Whenever the Tick() method of the MessageProcessor is executed, it takes all arrived Messages, determinds all MessageSubscribers that registered for this kind of Message and delivers the Message.
The MessageSubscriber again buffers all Messages until the method processMessages() is called by the underlying thread.
Than it loops over all stored Messages and calls the methods, that are specified for that type of Message.
All components in the GameEngine communicate via Messages. A message must derive from the class Message defined in Message.h Each Message has a Typ and a list of Pairs (Key, Value), where Key must be unique and Value can be a any primitive type or a std::string
The MessageSubscriber manages all incoming Messages for a certain SubSystem. It is registered at the MessageProcessor for a certain type of Message. Whenever processMessages() is called, for every arrived Message, the method specified for this type of Message is called.
The MessageProcessor buffers all incoming Messages and whenever Tick() is called, it delivers the Messages to all registered MessageSubscribers.
To register for such a Messagetyp, use the macro
The SubSystemController manages all SubSystems and notifies them of any possible operations like Initialize, Start or Shutdown. To create a SubSystem just derive it from this class. As the SubSystemController is a subclass of the MessagingController, all SubSystems automatically are able to send Messages. The functions OnThreadStart(), Tick() and Shutdown() have to be implemented by all SubSystems. The RunLoop() is executed until the SubSystemController notified a shutdown. Otherwise, within the loop, all incoming Messages need to be processed and afterwards the System can do its own work. Finally the Thread sleeps until it gets another Timer-Interupt.
For the future, all SubSystems should have this structure:
|
strong |
Status of an ID.
Enumerator | |
---|---|
NONE | |
CREATED |
unknown (most likely not created yet) |
DELETED |
created deleted (but it already existed) |
Definition at line 44 of file MessageSubscriber.h.
Definition at line 31 of file JobPriorities.h.
Enumerator | |
---|---|
SubsystemMessageType | |
MessageTypesCount |
Definition at line 32 of file MessageTypes.h.
|
strong |
|
strong |
Enumerator | |
---|---|
Unknown | |
Application | |
Audio | |
Graphic | |
GUI | |
Input | |
Network | |
Object | |
Physic | |
Scripting |
Definition at line 31 of file SubsystemConfig.h.
Enumerator | |
---|---|
SubsystemReset | |
SubsystemFinish |
Definition at line 37 of file MessageTypes.h.
|
strong |
Enumerator | |
---|---|
Ticking | |
Waiting |
Definition at line 51 of file ModuleController.h.