i6engine
1.0
|
Interface for the game developer. More...
#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/api/Application.h>
Public Member Functions | |
Application () | |
virtual | ~Application () |
virtual void | Initialize ()=0 |
called on EngineStart More... | |
virtual void | AfterInitialize ()=0 |
called after finishing initialization More... | |
virtual void | Tick ()=0 |
called in every loop step More... | |
virtual bool | ShutdownRequest ()=0 |
called on EngineShutdown More... | |
virtual void | Finalize ()=0 |
called after everything is completely shutdown More... | |
std::string | getName () const |
returns the name of the Application More... | |
void | setName (const std::string &name) |
sets the name of the Application More... | |
virtual void | disconnectCallback (const core::IPKey &) |
called when a player had a disconnect More... | |
virtual void | connectionFailed (const core::IPKey &) |
called when connecting to server failes More... | |
virtual void | bindFailure () |
called when address or port is already in use while connecting to m2etis More... | |
virtual void | connected (const core::IPKey &) |
called when connection request was handled More... | |
void | ShutDown () |
called from engine to signal shutdown More... | |
Public Member Functions inherited from i6e::core::ModuleController | |
ModuleController (Subsystem sub) | |
Constructs a new ModuleController with the given subsystem type. More... | |
virtual | ~ModuleController () |
Destructor. More... | |
void | startThreadTicking (const uint32_t lngFrameTime) |
Starts the thread synchronously of the subsystem and tells the SubSystemController about completion. More... | |
void | startThreadWaiting (const std::set< Subsystem > &waitingFor) |
Starts the thread synchronously of the subsystem and tells the SubSystemController about completion. More... | |
uint32_t | getFrameTime () const |
Gets the frametime of this Subsystem. More... | |
void | setController (SubSystemController *ssc, EngineCoreController *ecc, MessagingController *mc) |
registers necessary controllers for this Subsystem More... | |
Subsystem | getSubsystem () const |
Public Member Functions inherited from i6e::core::MessageSubscriber | |
MessageSubscriber () | |
Standard constructor. More... | |
virtual | ~MessageSubscriber () |
Destructor. More... | |
void | receiveMessage (const Message::Ptr &msg) |
This method is called from the MessagingController. It stores incoming messages in a local buffer. More... | |
void | notifyNewID (const int64_t id) |
This method notifies the MessagingController that Messages waiting for this id can now be delivered. More... | |
void | buffer (const ReceivedMessagePtr &msg) |
Calls deliverMessageInternal if the message should be delivered now, buffers it if not. More... | |
void | reset () |
todo More... | |
void | addMethod (uint16_t msgType, const boost::function< void(const Message::Ptr &)> &ptrMessageMethod) |
adds a method for given message type where messages shall be delivered More... | |
void | removeMethod (uint16_t msgType) |
removes method for given message type More... | |
Additional Inherited Members | |
Protected Member Functions inherited from i6e::core::ModuleController | |
void | processMessages () override |
override of processMessages of MessageSubscriber for waiting subsystems More... | |
Protected Member Functions inherited from i6e::core::MessageSubscriber | |
void | swapMessageBuffer () |
This method will swap the double message buffer. For synchronization reasons. More... | |
bool | updateBuffer () |
This method delivers all waiting Messages that can now be delivered. More... | |
Protected Attributes inherited from i6e::core::ModuleController | |
Subsystem | _subsystem |
the Subsystem More... | |
uint32_t | _frameTime |
the frame time of the Subsystem More... | |
MessagingController * | _messagingController |
pointer to MessagingController More... | |
Protected Attributes inherited from i6e::core::MessageSubscriber | |
boost::mutex | _objMessageVectorMutex |
MessageVector | _objMessageVectorA |
MessageVector | _objMessageVectorB |
MessageVector * | _objActiveMessageVector |
MessageVector * | _objInActiveMessageVector |
std::map< uint16_t, boost::function< void(const Message::Ptr &)> > | _ptrMessageMethod |
Interface for the game developer.
these functions are callbacks that are called by the Engine in appropriate situations derive from this class to get your main application Override all pure virtual methods and all virtual methods you need. You can safely assume, simply overriding won't cause problems, as the functions don't do anything by default.
Definition at line 50 of file Application.h.
|
inline |
Definition at line 52 of file Application.h.
|
inlinevirtual |
Definition at line 54 of file Application.h.
|
pure virtual |
called after finishing initialization
Now everthing is loaded, initialised and ready to be run You can do what ever you want now.
|
inlinevirtual |
called when address or port is already in use while connecting to m2etis
Definition at line 127 of file Application.h.
|
inlinevirtual |
called when connection request was handled
[in] | key | identifying the user who joined |
Definition at line 133 of file Application.h.
|
inlinevirtual |
called when connecting to server failes
Definition at line 122 of file Application.h.
|
inlinevirtual |
called when a player had a disconnect
[in] | key | key identifying the player |
Definition at line 117 of file Application.h.
|
pure virtual |
called after everything is completely shutdown
after returning from this function, the engine just returns.
here you can free all ressources before the game object is destroyed.
|
inline |
returns the name of the Application
Definition at line 101 of file Application.h.
|
pure virtual |
called on EngineStart
In the current state, only the very basic objects are initialised. You probably don't want to do anything here
|
inline |
sets the name of the Application
[in] | name | name that will be used as the window title |
Definition at line 109 of file Application.h.
|
inlinevirtual |
called from engine to signal shutdown
Implements i6e::core::ModuleController.
Definition at line 138 of file Application.h.
|
pure virtual |
called on EngineShutdown
This function is called just before the Engine starts shutting down.
In this state, the game is still entirely present, but frozen. Thus you have atomic access to the whole game. This function can be used for saving e.g., but keep in mind, the engine is paused. Messages, Timers etc. won't be processed.
|
pure virtual |
called in every loop step
This function is called whenever the mainLoop starts from the beginning.
After returning from this function the world is updated and afterwards rendered.
Implements i6e::core::ModuleController.