OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | List of all members
MWBase::StateManager Class Referenceabstract

Interface for game state manager (implemented in MWState) More...

#include <statemanager.hpp>

Inheritance diagram for MWBase::StateManager:
Collaboration diagram for MWBase::StateManager:

Public Types

enum  State { State_NoGame, State_Ended, State_Running }
 
typedef std::list
< MWState::Character >
::const_iterator 
CharacterIterator
 

Public Member Functions

 StateManager ()
 
virtual ~StateManager ()
 
virtual void requestQuit ()=0
 
virtual bool hasQuitRequest () const =0
 
virtual void askLoadRecent ()=0
 
virtual State getState () const =0
 
virtual void newGame (bool bypass=false)=0
 
virtual void endGame ()=0
 
virtual void deleteGame (const MWState::Character *character, const MWState::Slot *slot)=0
 
virtual void saveGame (const std::string &description, const MWState::Slot *slot=0)=0
 
virtual void loadGame (const std::string &filepath)=0
 
virtual void loadGame (const MWState::Character *character, const std::string &filepath)=0
 Load a saved game file belonging to the given character. More...
 
virtual void quickSave (std::string="Quicksave")=0
 Simple saver, writes over the file if already existing. More...
 
virtual void quickLoad ()=0
 Simple loader, loads the last saved file. More...
 
virtual MWState::CharactergetCurrentCharacter ()=0
 
virtual CharacterIterator characterBegin ()=0
 
virtual CharacterIterator characterEnd ()=0
 
virtual void update (float duration)=0
 

Private Member Functions

 StateManager (const StateManager &)
 not implemented More...
 
StateManageroperator= (const StateManager &)
 not implemented More...
 

Detailed Description

Interface for game state manager (implemented in MWState)

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
State_NoGame 
State_Ended 
State_Running 

Constructor & Destructor Documentation

MWBase::StateManager::StateManager ( const StateManager )
private

not implemented

MWBase::StateManager::StateManager ( )
inline
virtual MWBase::StateManager::~StateManager ( )
inlinevirtual

Member Function Documentation

virtual void MWBase::StateManager::askLoadRecent ( )
pure virtual

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual CharacterIterator MWBase::StateManager::characterBegin ( )
pure virtual

Any call to SaveGame and getCurrentCharacter can invalidate the returned iterator.

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual CharacterIterator MWBase::StateManager::characterEnd ( )
pure virtual

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::deleteGame ( const MWState::Character character,
const MWState::Slot slot 
)
pure virtual

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::endGame ( )
pure virtual

Implemented in MWState::StateManager.

virtual MWState::Character* MWBase::StateManager::getCurrentCharacter ( )
pure virtual
Note
May return null.

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual State MWBase::StateManager::getState ( ) const
pure virtual

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual bool MWBase::StateManager::hasQuitRequest ( ) const
pure virtual

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::loadGame ( const std::string &  filepath)
pure virtual

Load a saved game directly from the given file path. This will search the CharacterManager for a Character containing this save file, and set this Character current if one was found. Otherwise, a new Character will be created.

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::loadGame ( const MWState::Character character,
const std::string &  filepath 
)
pure virtual

Load a saved game file belonging to the given character.

Implemented in MWState::StateManager.

virtual void MWBase::StateManager::newGame ( bool  bypass = false)
pure virtual

Start a new game.

Parameters
bypassSkip new game mechanics.

Implemented in MWState::StateManager.

Here is the caller graph for this function:

StateManager& MWBase::StateManager::operator= ( const StateManager )
private

not implemented

virtual void MWBase::StateManager::quickLoad ( )
pure virtual

Simple loader, loads the last saved file.

Used for quickload

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::quickSave ( std::string  = "Quicksave")
pure virtual

Simple saver, writes over the file if already existing.

Used for quick save and autosave

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::requestQuit ( )
pure virtual

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::saveGame ( const std::string &  description,
const MWState::Slot slot = 0 
)
pure virtual

Write a saved game to slot or create a new slot if slot == 0.

Note
Slot must belong to the current character.

Implemented in MWState::StateManager.

Here is the caller graph for this function:

virtual void MWBase::StateManager::update ( float  duration)
pure virtual

Implemented in MWState::StateManager.


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