Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
GameRunner Class Reference

List of all members.

Public Types

enum  HostMode { HOST, OFFLINE, DEMO }

Public Member Functions

 GameRunner (const Server *server)
virtual bool connectParameters (QStringList &args, PathFinder &pf, bool &iwadFound, const QString &connectPassword, const QString &wadTargetDirectory)
Message createHostCommandLine (const HostInfo &hostInfo, CommandLineInfo &cmdLine, HostMode mode)
JoinError createJoinCommandLine (CommandLineInfo &cli, const QString &connectPassword)
Message host (const HostInfo &hostInfo, HostMode mode)
Message runExecutable (const CommandLineInfo &cli, bool bWrapWithStandardServerConsole)

Protected Member Functions

virtual QString argForConnect () const
 Command line parameter that specifies the target server's IP and port.
virtual QString argForConnectPassword () const
 Command line parameter that is used to specify connection password.
virtual QString argForIwadLoading () const
 Command line parameter that is used to set IWAD.
virtual QString argForPort () const
 Command line parameter that is used to set internet port for the game.
virtual QString argForPwadLoading () const
 Command line parameter that is used to load a PWAD.
virtual QString argForDemoPlayback () const
 Command line parameter for playing back a demo.
virtual QString argForDemoRecord () const
 Command line parameter for recording a demo.
virtual QString argForServerLaunch () const
 Command line parameter used to launch a server.
virtual Message hostAppendIwad ()
virtual Message hostAppendPwads ()
virtual Message hostGetBinary (bool bOfflinePlay)
virtual Message hostGetWorkingDirectory (bool bOfflinePlay)
virtual void hostDMFlags (QStringList &args, const DMFlags &dmFlags) const
virtual void hostProperties (QStringList &args) const

Protected Attributes

CommandLineInfocurrentCmdLine
const HostInfocurrentHostInfo
const Serverserver

Member Function Documentation

virtual QString GameRunner::argForConnectPassword ( ) const [inline, protected, virtual]

Command line parameter that is used to specify connection password.

There is no common value here so the default behavior returns a "null" string.

bool GameRunner::connectParameters ( QStringList &  args,
PathFinder pf,
bool &  iwadFound,
const QString &  connectPassword,
const QString &  wadTargetDirectory 
) [virtual]
Returns:
false to terminate the join process.
Message GameRunner::createHostCommandLine ( const HostInfo hostInfo,
CommandLineInfo cmdLine,
HostMode  mode 
)
Parameters:
[out]cli- after successful call this will contain required command line information.
[out]error- if return == false, error text will be put here
bOfflinePlay- if not HOST a command line for single player game will be launched
Returns:
MessageResult::isError == false if command line was successfully created.
JoinError GameRunner::createJoinCommandLine ( CommandLineInfo cli,
const QString &  connectPassword 
)
Parameters:
[out]cli- after successful call this will contain required command line information.
Returns:
JoinError::type == NoError if all ok.
Message GameRunner::host ( const HostInfo hostInfo,
HostMode  mode 
)
virtual void GameRunner::hostDMFlags ( QStringList &  args,
const DMFlags dmFlags 
) const [inline, protected, virtual]

Creates engine specific command line parameters out of passed dmFlags list. Default behavior does nothing.

virtual void GameRunner::hostProperties ( QStringList &  args) const [inline, protected, virtual]

Creates engine specific command line parameters out of Server class fields.

Please note that port, and some other stuff, is already set by createHostCommandLine().

See also:
createHostCommandLine() - cvars parameter.
Message GameRunner::runExecutable ( const CommandLineInfo cli,
bool  bWrapWithStandardServerConsole 
)

Executes predefined command line.

Parameters:
cli- command line that will be executed
bWrapWithStandardServerConsole- if true Doomseeker will attempt to wrap the input/output of the program with it's own console

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator