#include <model.h>
List of all members.
Detailed Description
A model is a facade for everything in the model.
Definition at line 53 of file model.h.
Constructor & Destructor Documentation
Member Function Documentation
| void FIFE::Model::adoptCellGrid |
( |
CellGrid * |
grid |
) |
|
Adds cellgrid to model. Moves ownership to model
Definition at line 91 of file model.cpp.
| void FIFE::Model::adoptPather |
( |
IPather * |
pather |
) |
|
Adds pather to model. Moves ownership to model
Definition at line 76 of file model.cpp.
| Map * FIFE::Model::createMap |
( |
const std::string & |
identifier |
) |
|
Add a map this model, and get a pointer to it. The returned pointer is owned by the Model, so don't delete it!
Definition at line 63 of file model.cpp.
| Object * FIFE::Model::createObject |
( |
const std::string & |
identifier, |
|
|
const std::string & |
name_space, |
|
|
Object * |
parent = 0 | |
|
) |
| | |
Add an object to the metamodel.
- Parameters:
-
| identifier | A string for identifying this object; must be unique for its namespace. |
| parent | Objects may optionally inherit values from a parent object. |
- Note:
- This object belongs to the model, so don't delete the returned pointer
Definition at line 148 of file model.cpp.
| void FIFE::Model::deleteMap |
( |
Map * |
map |
) |
|
Remove a map from this model
Definition at line 119 of file model.cpp.
| void FIFE::Model::deleteMaps |
( |
|
) |
|
Removes all maps from this model
Definition at line 134 of file model.cpp.
| bool FIFE::Model::deleteObject |
( |
Object * |
object |
) |
|
Attempt to remove an object from the model Fails and returns false if the object is referenced by an instance.
Definition at line 168 of file model.cpp.
| bool FIFE::Model::deleteObjects |
( |
|
) |
|
Attempt to remove all objects from the model Fails and returns false if any maps with instances are present.
Definition at line 200 of file model.cpp.
| CellGrid * FIFE::Model::getCellGrid |
( |
const std::string & |
gridtype |
) |
|
Returns new copy of cellgrid corresponding given name. If none found, returns NULL
Definition at line 95 of file model.cpp.
| Map * FIFE::Model::getMap |
( |
const std::string & |
identifier |
) |
const |
Get a map.
- Parameters:
-
| identifier | the id of the map to be found. |
Definition at line 109 of file model.cpp.
| uint32_t FIFE::Model::getMapCount |
( |
|
) |
const |
Return the number of maps in this model
Definition at line 130 of file model.cpp.
| const std::list<Map*>& FIFE::Model::getMaps |
( |
|
) |
const [inline] |
Get all the maps in the model.
Definition at line 77 of file model.h.
| std::list< std::string > FIFE::Model::getNamespaces |
( |
|
) |
const |
Get a list of namespaces currently referenced by objects in the metamodel.
Definition at line 139 of file model.cpp.
| Object * FIFE::Model::getObject |
( |
const std::string & |
id, |
|
|
const std::string & |
name_space | |
|
) |
| | |
Get an object by its id. Returns 0 if object is not found.
Definition at line 223 of file model.cpp.
| std::list< Object * > FIFE::Model::getObjects |
( |
const std::string & |
name_space |
) |
const |
Get all the objects in the given namespace.
Definition at line 235 of file model.cpp.
| IPather * FIFE::Model::getPather |
( |
const std::string & |
pathername |
) |
|
Returns pather corresponding given name. If none found, returns NULL
Definition at line 80 of file model.cpp.
| double FIFE::Model::getTimeMultiplier |
( |
|
) |
const [inline] |
| void FIFE::Model::setTimeMultiplier |
( |
float |
multip |
) |
[inline] |
Sets speed for the model. With speed 1.0, everything runs with normal speed. With speed 2.0, clock is ticking twice as fast. With 0, everything gets paused. Negavtive values are not supported (throws NotSupported exception).
Definition at line 147 of file model.h.
References FIFE::TimeProvider::setMultiplier().
| void FIFE::Model::update |
( |
|
) |
|
Called periodically to update events on model
Definition at line 274 of file model.cpp.
The documentation for this class was generated from the following files: