xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::Witcher::Console Class Reference

#include <console.h>

Inheritance diagram for Engines::Witcher::Console:
Inheritance graph
[legend]
Collaboration diagram for Engines::Witcher::Console:
Collaboration graph
[legend]

Public Member Functions

 Console (WitcherEngine &engine)
 
 ~Console ()
 
- Public Member Functions inherited from Engines::Console
 Console (Engine &engine, const Common::UString &font, int fontHeight=0)
 
void show ()
 
void hide ()
 
bool isVisible () const
 
float getWidth () const
 
float getHeight () const
 
size_t getLines () const
 
size_t getColumns () const
 
bool processEvent (const Events::Event &event)
 
void disableCommand (const Common::UString &cmd, const Common::UString &reason="")
 
void enableCommand (const Common::UString &cmd)
 
void clear ()
 
void print (const Common::UString &line)
 
void printf (const char *s,...) GCC_PRINTF(2
 

Private Member Functions

void updateCaches ()
 
void updateMusic ()
 
void updateCampaigns ()
 
void updateModules ()
 
void updateAreas ()
 
void cmdListMusic (const CommandLine &cl)
 
void cmdStopMusic (const CommandLine &cl)
 
void cmdPlayMusic (const CommandLine &cl)
 
void cmdMove (const CommandLine &cl)
 
void cmdListAreas (const CommandLine &cl)
 
void cmdGotoArea (const CommandLine &cl)
 
void cmdListCampaigns (const CommandLine &cl)
 
void cmdLoadCampaign (const CommandLine &cl)
 
void cmdListModules (const CommandLine &cl)
 
void cmdLoadModule (const CommandLine &cl)
 

Private Attributes

WitcherEngine_engine
 
std::vector< Common::UString_music
 All known music resources. More...
 
std::vector< Common::UString_campaigns
 All known campaigns. More...
 
std::vector< Common::UString_modules
 All known modules. More...
 
std::vector< Common::UString_areas
 All known areas in the current module. More...
 
size_t _maxSizeMusic
 

Additional Inherited Members

- Protected Types inherited from Engines::Console
typedef boost::function< void(const CommandLine &cl)> CommandCallback
 
- Protected Member Functions inherited from Engines::Console
void printException (Common::Exception &e, const Common::UString &prefix="ERROR: ")
 
bool registerCommand (const Common::UString &cmd, const CommandCallback &callback, const Common::UString &help)
 
void printCommandHelp (const Common::UString &cmd)
 
void printList (const std::vector< Common::UString > &list, size_t maxSize=0)
 
void setArguments (const Common::UString &cmd, const std::vector< Common::UString > &args)
 
void setArguments (const Common::UString &cmd)
 
virtual void showCallback ()
 
- Static Protected Member Functions inherited from Engines::Console
static void splitArguments (Common::UString argLine, std::vector< Common::UString > &args)
 

Detailed Description

Definition at line 41 of file console.h.

Constructor & Destructor Documentation

◆ Console()

Engines::Witcher::Console::Console ( WitcherEngine engine)

◆ ~Console()

Engines::Witcher::Console::~Console ( )
virtual

Reimplemented from Engines::Console.

Definition at line 81 of file console.cpp.

Member Function Documentation

◆ cmdGotoArea()

void Engines::Witcher::Console::cmdGotoArea ( const CommandLine cl)
private

◆ cmdListAreas()

void Engines::Witcher::Console::cmdListAreas ( const CommandLine cl)
private

◆ cmdListCampaigns()

void Engines::Witcher::Console::cmdListCampaigns ( const CommandLine cl)
private

Definition at line 192 of file console.cpp.

References _campaigns, Engines::Witcher::Campaign::getName(), Engines::Console::printf(), and updateCampaigns().

Referenced by Console().

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

◆ cmdListModules()

void Engines::Witcher::Console::cmdListModules ( const CommandLine cl)
private

Definition at line 217 of file console.cpp.

References _modules, Common::UString::c_str(), Common::UString::empty(), Engines::Witcher::Module::getName(), Engines::Console::printf(), and updateModules().

Referenced by Console().

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

◆ cmdListMusic()

void Engines::Witcher::Console::cmdListMusic ( const CommandLine cl)
private

Definition at line 137 of file console.cpp.

References _maxSizeMusic, _music, Engines::Console::printList(), and updateMusic().

Referenced by Console().

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

◆ cmdLoadCampaign()

void Engines::Witcher::Console::cmdLoadCampaign ( const CommandLine cl)
private

◆ cmdLoadModule()

void Engines::Witcher::Console::cmdLoadModule ( const CommandLine cl)
private

◆ cmdMove()

void Engines::Witcher::Console::cmdMove ( const CommandLine cl)
private

◆ cmdPlayMusic()

void Engines::Witcher::Console::cmdPlayMusic ( const CommandLine cl)
private

Definition at line 146 of file console.cpp.

References _engine, Engines::Console::CommandLine::args, Engines::Witcher::WitcherEngine::getGame(), and Engines::Witcher::Game::playMusic().

Referenced by Console().

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

◆ cmdStopMusic()

void Engines::Witcher::Console::cmdStopMusic ( const CommandLine cl)
private

Definition at line 142 of file console.cpp.

References _engine, Engines::Witcher::WitcherEngine::getGame(), and Engines::Witcher::Game::stopMusic().

Referenced by Console().

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

◆ updateAreas()

void Engines::Witcher::Console::updateAreas ( )
private

Definition at line 133 of file console.cpp.

References _engine, Aurora::IFOFile::getAreas(), Engines::Witcher::WitcherEngine::getGame(), Engines::Witcher::Module::getIFO(), Engines::Witcher::Game::getModule(), and Engines::Console::setArguments().

Referenced by cmdListAreas(), and updateCaches().

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

◆ updateCaches()

void Engines::Witcher::Console::updateCaches ( )
privatevirtual

Reimplemented from Engines::Console.

Definition at line 84 of file console.cpp.

References updateAreas(), Engines::Console::updateCaches(), updateCampaigns(), updateModules(), and updateMusic().

Here is the call graph for this function:

◆ updateCampaigns()

void Engines::Witcher::Console::updateCampaigns ( )
private

Definition at line 121 of file console.cpp.

References _campaigns, Engines::Witcher::Game::getCampaigns(), and Engines::Console::setArguments().

Referenced by cmdListCampaigns(), cmdLoadCampaign(), and updateCaches().

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

◆ updateModules()

void Engines::Witcher::Console::updateModules ( )
private

Definition at line 127 of file console.cpp.

References _modules, Engines::Witcher::Game::getModules(), and Engines::Console::setArguments().

Referenced by cmdListModules(), cmdLoadModule(), and updateCaches().

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

◆ updateMusic()

void Engines::Witcher::Console::updateMusic ( )
private

Member Data Documentation

◆ _areas

std::vector<Common::UString> Engines::Witcher::Console::_areas
private

All known areas in the current module.

Definition at line 54 of file console.h.

◆ _campaigns

std::vector<Common::UString> Engines::Witcher::Console::_campaigns
private

All known campaigns.

Definition at line 52 of file console.h.

Referenced by cmdListCampaigns(), cmdLoadCampaign(), and updateCampaigns().

◆ _engine

WitcherEngine* Engines::Witcher::Console::_engine
private

◆ _maxSizeMusic

size_t Engines::Witcher::Console::_maxSizeMusic
private

Definition at line 56 of file console.h.

Referenced by cmdListMusic(), and updateMusic().

◆ _modules

std::vector<Common::UString> Engines::Witcher::Console::_modules
private

All known modules.

Definition at line 53 of file console.h.

Referenced by cmdListModules(), cmdLoadModule(), and updateModules().

◆ _music

std::vector<Common::UString> Engines::Witcher::Console::_music
private

All known music resources.

Definition at line 51 of file console.h.

Referenced by cmdListMusic(), and updateMusic().


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