OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MWState::QuickSaveManager Class Reference

#include <quicksavemanager.hpp>

Collaboration diagram for MWState::QuickSaveManager:

Public Member Functions

 QuickSaveManager (std::string &saveName, unsigned int maxSaves)
 
void visitSave (const Slot *saveSlot)
 Visits the given slot . More...
 
const SlotgetNextQuickSaveSlot ()
 

Private Member Functions

bool shouldCreateNewSlot ()
 
bool isOldestSave (const Slot *compare)
 

Private Attributes

std::string mSaveName
 
unsigned int mMaxSaves
 
unsigned int mSlotsVisited
 
const SlotmOldestSlotVisited
 

Constructor & Destructor Documentation

MWState::QuickSaveManager::QuickSaveManager ( std::string &  saveName,
unsigned int  maxSaves 
)

A utility class to manage multiple quicksave slots

Parameters
saveNameThe name of the save ("QuickSave", "AutoSave", etc)
maxSavesThe maximum number of save slots to create before recycling old ones

Member Function Documentation

const MWState::Slot * MWState::QuickSaveManager::getNextQuickSaveSlot ( )

Get the slot that the next quicksave should use.

Returns
Either the oldest quicksave slot visited, or NULL if a new slot can be made

Here is the caller graph for this function:

bool MWState::QuickSaveManager::isOldestSave ( const Slot compare)
private
bool MWState::QuickSaveManager::shouldCreateNewSlot ( )
private
void MWState::QuickSaveManager::visitSave ( const Slot saveSlot)

Visits the given slot .

Here is the caller graph for this function:

Member Data Documentation

unsigned int MWState::QuickSaveManager::mMaxSaves
private
const Slot* MWState::QuickSaveManager::mOldestSlotVisited
private
std::string MWState::QuickSaveManager::mSaveName
private
unsigned int MWState::QuickSaveManager::mSlotsVisited
private

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