Public Member Functions | |
IRoot () | |
Constructor. | |
virtual | ~IRoot () |
Destructor. | |
virtual void | addObject (IObject *o)=0 |
Adds an object to the root. | |
virtual void | removeObject (IObject *o)=0 |
Remove an object from the root. | |
virtual void | removeObject (unsigned int id)=0 |
Remove an object from the root. | |
virtual IObject * | getObject (unsigned int id)=0 |
Get an object by id. | |
virtual IObject * | getObject (enum EManagerType id)=0 |
Get an object by enumeration. | |
virtual std::vector< IObject * > | getObjects (std::string name)=0 |
Get a group of objects. | |
template<class T> | |
T * | getObjectCast (unsigned int id) |
Get a recast object. | |
template<class T> | |
T * | getObjectCast (enum EManagerType id) |
Get a recast object. | |
virtual unsigned int | newID ()=0 |
Register and reserve a new ID. | |
virtual void | returnID (unsigned int id)=0 |
Return a reserved ID to the pool. | |
virtual void | shutdown ()=0 |
Shutdown the engine. | |
virtual bool | run ()=0 |
Runs the engine and checks if it wants to continue. | |
virtual bool | isRunning ()=0 |
Checks if the engine is running. | |
virtual std::string | getVersion ()=0 |
Returns the Mortic Version Number. | |
IConfigManager * | getConfigManager () |
Gets the Configuration Manager. | |
IFileManager * | getFileManager () |
Gets the File Manager. | |
ILogManager * | getLogManager () |
Gets the Log Manager. | |
ISceneManager * | getSceneManager () |
Gets the Scene Manager. | |
IVideoManager * | getVideoManager () |
Gets the Video Manager. | |
IEventManager * | getEventManager () |
Gets the Event Manager. | |
IScriptManager * | getScriptManager () |
Gets the Script Manager. |
This is what keeps track of all of the mortic objects that are instanced. With this class, you can get any one of those objects by ID, or a group of them by name. The root class is what you create in the beginning, run in the middle, and destroy in the end. All programs need one. This class also allows easy access to special objects that manage certain aspects of a game, like IVideoManager or IScriptManager.
Definition at line 98 of file IRoot.h.
|
Constructor.
|
|
Destructor.
|
|
Adds an object to the root. This function is only used internally. Every object is automatically added to the root.
|
|
Gets the Configuration Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 263 of file IRoot.h. References mortic::EMT_CONFIGMANAGER. |
|
Gets the Event Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 318 of file IRoot.h. References mortic::EMT_EVENTMANAGER. |
|
Gets the File Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 274 of file IRoot.h. References mortic::EMT_FILEMANAGER. |
|
Gets the Log Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 285 of file IRoot.h. References mortic::EMT_LOGMANAGER. |
|
Get an object by enumeration. This function gets an object based on an EManagerType value. This is preferred for any object that is listed in this enumeration, because it is more portable.
|
|
Get an object by id. This function retreives an object by id. If the id is not assigned returns NULL.
Referenced by getObjectCast(). |
|
Get a recast object. This function is exactly the same as getObject, except it casts the object for you based on the template using static_cast.
Definition at line 170 of file IRoot.h. References getObject(). |
|
Get a recast object. This function is exactly the same as getObject, except it casts the object for you based on the template using static_cast.
Definition at line 160 of file IRoot.h. References getObject(). |
|
Get a group of objects. This function returns a list of all objects with the given name. Names are not unique, so expect multiple results.
|
|
Gets the Scene Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 296 of file IRoot.h. References mortic::EMT_SCENEMANAGER. |
|
Gets the Script Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 329 of file IRoot.h. References mortic::EMT_SCRIPTMANAGER. |
|
Returns the Mortic Version Number. The code of this function has a solid explanation of what a MVN is: Some info on Mortic Revision Numbers: Each number contains Mortic, a revision number, and the release name. The Revision number is in the form a.b.c, where a is the rewrite number, b is the major release number, and c is the bugfix release number. The name is specific to the major release number, except in the 0.b phase (development). When mortic is branched to be made specific to a game, a branch ID is added. So, an example is this: Mortic 1.2.1 [Necropolis] EXN 1.2 This tells us: This is mortic This is version 1.2.1 The version name is Necropolis This has been branched The three-letter branch code is EXN (for Expanses of Naryan) The EXN-specific version number is 1.2 Branch-specific versions can be numbered whatever way suits you. After a branch, the Mortic version is not to be changed unless you rewrite with a newer version. Note: Odd major release numbers are usually development.
|
|
Gets the Video Manager. This is a convenience function, it just calls getObject() with an appropriate value.
Definition at line 307 of file IRoot.h. References mortic::EMT_VIDEOMANAGER. |
|
Checks if the engine is running. Returns whether or not the engine is running. This is basically a run() that doesn't update anything.
|
|
Register and reserve a new ID. This function is only used internally, and should be used otherwise with extreme caution. This function reserves an ID for use. Return it to the pool with returnID().
|
|
Remove an object from the root. This function is only used internally. Every object is automatically removed from the root when it is destroyed.
|
|
Remove an object from the root. This function is only used internally. Every object is automatically removed from the root when it is destroyed.
|
|
Return a reserved ID to the pool. This function returns an ID reserved with newID() and lets other objects use it. Once again, internal use only, use with extreme caution.
|
|
Runs the engine and checks if it wants to continue. This function runs through one frame of the engine. It also returns true while the engine is running. It is meant to be used in a while loop, like so: while (root->run());
|
|
Shutdown the engine. This function shuts down the engine. However, do not use this because it does not let scenes clean up properly. Only use if you must exit at this very moment. In most cases use SceneEnd and the Scene Manager.
|