GameObjectEngine

The default implementation of the IGameObjectEngine interface.  GameObjectEngine stores all of the IGameObjects provided by the loaded RuleSets internally in a hash map container.  The functions required by the IGameObjectEngine interface are implemented by taking the hash map and performing the necessary operations.  See the function documentation below for more details.

Derived From

IGameObjectEngine

Project

RulesCore

Include

GameObjectEngine.h

Summary
The default implementation of the IGameObjectEngine interface.
Stops the GameObjectEngine.
Creates a new IGameObject that matches the given name.
The hash of IGameObjects available to the game.

Public

Summary
Stops the GameObjectEngine.
Creates a new IGameObject that matches the given name.

Functions

Stop

void Stop()

Stops the GameObjectEngine.  Clears the hash of IGameObjects.

Virtual Functions

CreateGameObject

virtual IGameObject *CreateGameObject(const wxString &name) const

Creates a new IGameObject that matches the given name.  Searches the hash for an entry at the given name.  If an object exists there, clones the object and returns the clone.  Otherwise, returns an empty object.

Parameters

nameThe name of the IGameObject to create.

Returns

A newly cloned IGameObject.  May be NULL if no object was found to match the name.

Private

Summary
The hash of IGameObjects available to the game.

Variables

mObjectHash

RuleSet::GameObjectHash mObjectHash

The hash of IGameObjects available to the game.

The interface of the IGameObject engine.
void Stop()
Stops the GameObjectEngine.
virtual IGameObject *CreateGameObject(const wxString &name) const
Creates a new IGameObject that matches the given name.
An interface for all game objects.
RuleSet::GameObjectHash mObjectHash
The hash of IGameObjects available to the game.
A repository of all things rules-related.
RulesCore is the HOSS of Cities3D.