IPluginEngine

The interface of the plugin engine.  The IPluginEngine is responsible for managing all of the plugin objects that contain RuleSets or AI (or both).  It has functions for loading specific RuleSets or AI and for checking to see if certain RuleSets or AI have already been loaded.  It also provides member functions to retrieve BankData and PlayerData out of the currently loaded RuleSets.

When the IPluginEngine loads a RuleSet, it copies all of the component parts of the RuleSet into their respective destinations.  All IRules and ILogic go into the IRuleEngine.  All ImageSets go into the IImageEngine.  And all IDrawObjects go into the IDrawObjectEngine.  The IPluginEngine is accessible through the GameEngine.

Project

RulesCore

Include

IPluginEngine.h

Summary
The interface of the plugin engine.
Determines if a plugin module is loaded.
Determines if a RuleSet within a given module is loaded.
Loads a RuleSet into the GameEngine.
Loads an AI into the GameEngine.
Retrieves BankData from all of the currently loaded RuleSets.
Retreives PlayerData from all of the currently loaded RuleSets.
Retreives BuildData from all of the currently loaded RuleSets.
Fills the given array with all loaded RuleSets.
The IPluginEngine destructor.

Public

Summary
Determines if a plugin module is loaded.
Determines if a RuleSet within a given module is loaded.
Loads a RuleSet into the GameEngine.
Loads an AI into the GameEngine.
Retrieves BankData from all of the currently loaded RuleSets.
Retreives PlayerData from all of the currently loaded RuleSets.
Retreives BuildData from all of the currently loaded RuleSets.
Fills the given array with all loaded RuleSets.

Pure Virtual Functions

IsLoaded

virtual bool IsLoaded(const wxString &module)=0

Determines if a plugin module is loaded.

Parameters

moduleThe name of the plugin module to check.

Returns

A bool stating if the module is loaded.  The value is true if it is, false if not.

IsLoaded

virtual bool IsLoaded(const wxString &module,
const wxString &ruleset)=0

Determines if a RuleSet within a given module is loaded.

Parameters

moduleThe name of the module the RuleSet is in.
rulesetThe name of the RuleSet to check.

Returns

A bool stating if the RuleSet is loaded.  The value is true if both the module and RuleSet or loaded, and false if either the RuleSet, or the module is not loaded.

LoadRuleset

virtual bool LoadRuleset(const wxString &module,
const wxString &ruleset)=0

Loads a RuleSet into the GameEngine.

Parameters

moduleThe name of the module the RuleSet is in.
rulesetThe RuleSet to load.

Returns

A bool indicating the success of the load.  The value is true if the RuleSet was loaded, false if not.

LoadAI

virtual bool LoadAI(const wxString &module,
const wxString &ai)=0

Loads an AI into the GameEngine.

Parameters

moduleThe name of the module the AI is in.
aiThe AI to load.

Returns

A bool indicating the success of the load.  The value is true if the AI was loaded, false if not.

LoadBankData

virtual void LoadBankData(std::vector<BankDataPtr> &array)=0

Retrieves BankData from all of the currently loaded RuleSets.

Parameters

arrayThe outgoing array of BankData that will be filled by the function.

LoadPlayerData

virtual void LoadPlayerData(std::vector<PlayerDataPtr> &array)=0

Retreives PlayerData from all of the currently loaded RuleSets.

Parameters

arrayThe outgoing array of PlayerData that will be filled by the function.

LoadBuildData

virtual void LoadBuildData(std::vector<BuildDataPtr> &array)=0

Retreives BuildData from all of the currently loaded RuleSets.

Parameters

arrayThe outgoing array of BuildData that will be filled by the function.

GetLoadedRuleSets

virtual void GetLoadedRuleSets(StringPairArray &array)=0

Fills the given array with all loaded RuleSets.  The RuleSets are stored in the array in a std::pair where the first element is the name of the module the RuleSet is in, and the second element is the name of the <Ruleset> itself.

Parameters

arrayThe array to fill with loaded RuleSet information.

Protected

Summary
The IPluginEngine destructor.

Destructor

~IPluginEngine

virtual ~IPluginEngine()=0

The IPluginEngine destructor.  It is pure virtual because this class must be derived from in order to be used.

virtual bool IsLoaded(const wxString &module)=0
Determines if a plugin module is loaded.
A repository of all things rules-related.
virtual bool LoadRuleset(const wxString &module,
const wxString &ruleset)=0
Loads a RuleSet into the GameEngine.
The engine that drives the game.
virtual bool LoadAI(const wxString &module,
const wxString &ai)=0
Loads an AI into the GameEngine.
Still volatile.
virtual void LoadBankData(std::vector<BankDataPtr> &array)=0
Retrieves BankData from all of the currently loaded RuleSets.
Describes a stack of cards to be drawn in the BankUI.
virtual void LoadPlayerData(std::vector<PlayerDataPtr> &array)=0
Retreives PlayerData from all of the currently loaded RuleSets.
Describes a piece of information that needs to be displayed in the PlayerUI.
virtual void LoadBuildData(std::vector<BuildDataPtr> &array)=0
Retreives BuildData from all of the currently loaded RuleSets.
RulesCore
virtual void GetLoadedRuleSets(StringPairArray &array)=0
Fills the given array with all loaded RuleSets.
virtual ~IPluginEngine()=0
The IPluginEngine destructor.
The interface for a single game rule.
The interface of a single piece of game logic.
The interface for the rule engine.
A repository of knowledge about a .tex file.
The interface of the image engine.
The interface for objects that are drawn on screen.
The interface of the IDrawObject engine.
The interface of the plugin engine.
RulesCore is the HOSS of Cities3D.