Cafu Engine
cf::GameSys::GameInfoI Class Referenceabstract

This interface provides early information about a game. More...

#include "GameInfo.hpp"

Inheritance diagram for cf::GameSys::GameInfoI:

Public Member Functions

virtual std::string GetName () const =0
 Returns the name of this game. More...
 
virtual GameICreateGame () const =0
 Creates and returns an instance of this game. More...
 
virtual ~GameInfoI ()
 The virtual destructor, so that derived classes can safely be deleted via a GameInfoI (base class) pointer. More...
 

Detailed Description

This interface provides early information about a game.

The Cafu Engine can be linked to an arbitrary number of games (MODs), that are independent of each other. Each game must implement the GameInfoI interface, of which the Cafu Engine assembles a global list of known, available games. The list is typically used to let the user choose which game he wishes to play, and to obtain a GameI instance of the chosen game.

Constructor & Destructor Documentation

virtual cf::GameSys::GameInfoI::~GameInfoI ( )
inlinevirtual

The virtual destructor, so that derived classes can safely be deleted via a GameInfoI (base class) pointer.

Member Function Documentation

virtual GameI* cf::GameSys::GameInfoI::CreateGame ( ) const
pure virtual

Creates and returns an instance of this game.

Implemented in DeathMatch::GameInfoT.

virtual std::string cf::GameSys::GameInfoI::GetName ( ) const
pure virtual

Returns the name of this game.

Among other purposes, the returned string is used in the client and server to construct file system paths to game resource files. Consequently, the returned name should only consist of a subset of characters that are valid for use in directory and file names.

Implemented in DeathMatch::GameInfoT.


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