Binaries Class Reference

List of all members.

Public Member Functions

 Binaries (const EnginePlugin *plugin)
virtual QString clientBinary (Message &message) const
 Returns the path to the client binary.
virtual QString clientWorkingDirectory (Message &message) const
virtual QString configKeyClientBinary () const
virtual QString configKeyOfflineBinary () const
virtual QString configKeyServerBinary () const
virtual QString offlineGameBinary (Message &message) const
 Returns the path to the binary for offline play.
virtual QString offlineGameWorkingDirectory (Message &message) const
 Working directory for offline play.
const EnginePluginplugin () const
virtual QString serverBinary (Message &message) const
 Returns the path to the server binary.
virtual QString serverWorkingDirectory (Message &message) const
 Working directory for server.

Protected Types

enum  BinaryType { Client, Offline, TServer }
typedef QHash< BinaryType,
QString > 
BinaryNamesDictionary
 A dictionary containing enum to string translations of words that would fit into "No <dictionary_word> executable specified [...]" sentence.

Protected Member Functions

QString obtainBinary (const QString &configKey, BinaryType binaryType, Message &message) const

Protected Attributes

const EnginePluginenginePlugin

Static Protected Attributes

static BinaryNamesDictionary binaryNames

Member Typedef Documentation

typedef QHash<BinaryType, QString> Binaries::BinaryNamesDictionary [protected]

A dictionary containing enum to string translations of words that would fit into "No <dictionary_word> executable specified [...]" sentence.

Initialized when Binaries is first constructed.


Member Function Documentation

virtual QString Binaries::clientBinary ( Message message  )  const [inline, virtual]

Returns the path to the client binary.

Parameters:
[out] message - information message, if any.
Returns:
Empty if error is not empty.
QString Binaries::clientWorkingDirectory ( Message message  )  const [virtual]

Default behavior returns directory of clientBinary(), but you can override this to provide different working directory for Skulltag's testing binaries.

Parameters:
[out] error - type of error
virtual QString Binaries::offlineGameBinary ( Message message  )  const [inline, virtual]

Returns the path to the binary for offline play.

Parameters:
[out] message - information message, if any.
Returns:
Empty string if error is not empty.
QString Binaries::offlineGameWorkingDirectory ( Message message  )  const [virtual]

Working directory for offline play.

Default behavior prompts Doomseeker to use a path to the directory where the executable selected for the offline game resides. This executable is always selected directly in Create Server dialog.

Note:
This method should be overriden ONLY IF it is ABSOLUTELY required to return a non-standard path to make the game run correctly.
Returns:
Path to the working directory for the server binary. Default behavior returns an empty string.
const EnginePlugin* Binaries::plugin (  )  const [inline]

This is supposed to return the plugin this Binaries belongs to. New instances of EnginePlugin shouldn't be created here. Instead each plugin should keep a global instance of EnginePlugin (singleton?) and a pointer to this instance should be returned.

QString Binaries::serverBinary ( Message message  )  const [virtual]

Returns the path to the server binary.

Parameters:
[out] message - information message, if any.
Returns:
Empty if error is not empty.
QString Binaries::serverWorkingDirectory ( Message message  )  const [virtual]

Working directory for server.

Default behavior prompts Doomseeker to use a path to the directory where the executable selected for the server launch resides. This executable is always selected directly in Create Server dialog.

Note:
This method should be overriden ONLY IF it is ABSOLUTELY required to return a non-standard path to make the game run correctly.
Returns:
Path to the working directory for the server binary. Default behavior returns an empty string.

The documentation for this class was generated from the following files: