xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::GameInstanceEngine Class Reference
Inheritance diagram for Engines::GameInstanceEngine:
Inheritance graph
[legend]
Collaboration diagram for Engines::GameInstanceEngine:
Collaboration graph
[legend]

Public Member Functions

 GameInstanceEngine (const Common::UString &target)
 
 ~GameInstanceEngine ()
 
Common::UString getGameName (bool platform) const
 
bool probe (const std::list< const EngineProbe *> &probes)
 Find an engine capable of running the game found in the GameInstance's target. More...
 
void reset ()
 Reset the GameInstance to a pre-probe state. More...
 
void run ()
 Run the probed game in the GameInstance's target. More...
 
void listLanguages ()
 List all available languages supported by this GameInstance's target. More...
 
- Public Member Functions inherited from Engines::GameInstance
virtual ~GameInstance ()
 

Private Member Functions

bool probe (const Common::FileList &rootFiles, const std::list< const EngineProbe *> &probes)
 
bool probe (Common::SeekableReadStream &stream, const std::list< const EngineProbe *> &probes)
 
void createEngine ()
 
void destroyEngine ()
 

Private Attributes

Common::UString _target
 
const EngineProbe_probe
 
Common::ScopedPtr< Engine_engine
 

Additional Inherited Members

- Protected Member Functions inherited from Engines::GameInstance
 GameInstance ()
 

Detailed Description

Definition at line 75 of file enginemanager.cpp.

Constructor & Destructor Documentation

◆ GameInstanceEngine()

Engines::GameInstanceEngine::GameInstanceEngine ( const Common::UString target)

Definition at line 106 of file enginemanager.cpp.

◆ ~GameInstanceEngine()

Engines::GameInstanceEngine::~GameInstanceEngine ( )

Definition at line 109 of file enginemanager.cpp.

Member Function Documentation

◆ createEngine()

void Engines::GameInstanceEngine::createEngine ( )
private

Definition at line 180 of file enginemanager.cpp.

References _engine, _probe, Engines::EngineProbe::createEngine(), and destroyEngine().

Referenced by listLanguages(), and run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroyEngine()

void Engines::GameInstanceEngine::destroyEngine ( )
private

Definition at line 188 of file enginemanager.cpp.

References _engine.

Referenced by createEngine(), listLanguages(), reset(), and run().

Here is the caller graph for this function:

◆ getGameName()

Common::UString Engines::GameInstanceEngine::getGameName ( bool  platform) const
virtual

Implements Engines::GameInstance.

Definition at line 169 of file enginemanager.cpp.

References _probe, Engines::EngineProbe::getGameName(), Engines::EngineProbe::getPlatform(), and Aurora::getPlatformDescription().

Here is the call graph for this function:

◆ listLanguages()

void Engines::GameInstanceEngine::listLanguages ( )

List all available languages supported by this GameInstance's target.

Definition at line 192 of file enginemanager.cpp.

References _engine, _probe, _target, createEngine(), destroyEngine(), Engines::EngineProbe::getGameID(), Engines::EngineProbe::getPlatform(), info(), and LangMan.

Referenced by Engines::EngineManager::listLanguages().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ probe() [1/3]

bool Engines::GameInstanceEngine::probe ( const std::list< const EngineProbe *> &  probes)

Find an engine capable of running the game found in the GameInstance's target.

Definition at line 117 of file enginemanager.cpp.

References _target, Common::FileList::addDirectory(), Common::FilePath::isDirectory(), Common::FilePath::isRegularFile(), and Common::ReadFile::open().

Here is the call graph for this function:

◆ probe() [2/3]

bool Engines::GameInstanceEngine::probe ( const Common::FileList rootFiles,
const std::list< const EngineProbe *> &  probes 
)
private

Definition at line 141 of file enginemanager.cpp.

References _probe, and _target.

◆ probe() [3/3]

bool Engines::GameInstanceEngine::probe ( Common::SeekableReadStream stream,
const std::list< const EngineProbe *> &  probes 
)
private

Definition at line 155 of file enginemanager.cpp.

References _probe.

◆ reset()

void Engines::GameInstanceEngine::reset ( )

Reset the GameInstance to a pre-probe state.

Definition at line 112 of file enginemanager.cpp.

References _probe, and destroyEngine().

Here is the call graph for this function:

◆ run()

void Engines::GameInstanceEngine::run ( )

Run the probed game in the GameInstance's target.

Definition at line 222 of file enginemanager.cpp.

References _engine, _probe, _target, createEngine(), destroyEngine(), Engines::EngineProbe::getGameID(), and Engines::EngineProbe::getPlatform().

Referenced by Engines::EngineManager::run().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _engine

Common::ScopedPtr<Engine> Engines::GameInstanceEngine::_engine
private

Definition at line 97 of file enginemanager.cpp.

Referenced by createEngine(), destroyEngine(), listLanguages(), and run().

◆ _probe

const EngineProbe* Engines::GameInstanceEngine::_probe
private

Definition at line 96 of file enginemanager.cpp.

Referenced by createEngine(), getGameName(), listLanguages(), probe(), reset(), and run().

◆ _target

Common::UString Engines::GameInstanceEngine::_target
private

Definition at line 94 of file enginemanager.cpp.

Referenced by listLanguages(), probe(), and run().


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