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

#include <console.h>

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

Public Member Functions

 Console (SonicEngine &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 updateAreas ()
 
void cmdListAreas (const CommandLine &cl)
 
void cmdGotoArea (const CommandLine &cl)
 

Private Attributes

SonicEngine_engine
 
std::set< int32_areas
 All known areas. More...
 

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 40 of file console.h.

Constructor & Destructor Documentation

◆ Console()

Engines::Sonic::Console::Console ( SonicEngine engine)

Definition at line 46 of file console.cpp.

References cmdGotoArea(), cmdListAreas(), and Engines::Console::registerCommand().

Here is the call graph for this function:

◆ ~Console()

Engines::Sonic::Console::~Console ( )
virtual

Reimplemented from Engines::Console.

Definition at line 56 of file console.cpp.

Member Function Documentation

◆ cmdGotoArea()

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

◆ cmdListAreas()

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

Definition at line 83 of file console.cpp.

References _areas, Aurora::GDAFile::getInt(), Engines::Console::printf(), TalkMan, TwoDAReg, and updateAreas().

Referenced by Console().

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

◆ updateAreas()

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

Definition at line 65 of file console.cpp.

References _areas, Common::UString::format(), Aurora::GDAFile::getInt(), Aurora::GDAFile::getRowCount(), Engines::Console::setArguments(), and TwoDAReg.

Referenced by cmdListAreas(), and updateCaches().

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

◆ updateCaches()

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

Reimplemented from Engines::Console.

Definition at line 59 of file console.cpp.

References updateAreas(), and Engines::Console::updateCaches().

Here is the call graph for this function:

Member Data Documentation

◆ _areas

std::set<int32> Engines::Sonic::Console::_areas
private

All known areas.

Definition at line 50 of file console.h.

Referenced by cmdGotoArea(), cmdListAreas(), and updateAreas().

◆ _engine

SonicEngine* Engines::Sonic::Console::_engine
private

Definition at line 47 of file console.h.

Referenced by cmdGotoArea().


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