rails.game
Interface ConfigurableComponentI

All Known Subinterfaces:
CompanyI, CompanyManagerI, CompanyTypeI, GameManagerI, PhaseI, PrivateCompanyI, PublicCompanyI, SpecialPropertyI, StockMarketI, TrainTypeI
All Known Implementing Classes:
Bank, BonusToken, Company, CompanyManager, CompanyType, ExchangeForShare, GameManager, GameManager_1835, GameManager_1856, GameManager_18EU, Investor_1880, LocatedBonus, MapHex, MapManager, NamedTrainRevenueModifier, NamedTrainToken, NameTrains, Phase, PhaseManager, PlayerManager, PrivateCompany, PublicCompany, PublicCompany_1825, PublicCompany_1856, PublicCompany_1880, PublicCompany_CGR, RevenueBonusTemplate, RevenueManager, RuhrRevenueModifier, SellBonusToken, SpecialProperty, SpecialTileLay, SpecialTokenLay, SpecialTrainBuy, StockMarket, TileManager, TrainManager, TrainType

public interface ConfigurableComponentI

Interface for rails.game components which can be configured from an XML element.


Method Summary
 void configureFromXML(Tag tag)
          Instructs the component to configure itself from the provided XML element.
 void finishConfiguration(GameManagerI parent)
          This method is intended to be called for each configurable component, to perforn any initialisation activities that require any other components to be initialised first.
 

Method Detail

configureFromXML

void configureFromXML(Tag tag)
                      throws ConfigurationException
Instructs the component to configure itself from the provided XML element.

Parameters:
element - the XML element containing the configuration
Throws:
ConfigurationException

finishConfiguration

void finishConfiguration(GameManagerI parent)
                         throws ConfigurationException
This method is intended to be called for each configurable component, to perforn any initialisation activities that require any other components to be initialised first. This includes creating any required relationships to other configured components and objects.

This method should be called where necessary after all XML file parsing has completed, so that all objects that need to be related to do exist.

Parameters:
parent - The 'parent' configurable component is passed to allow the 'child' to access any other object without the need to resort to static calls where possible.
Throws:
ConfigurationException