2013-11-19 15:38:26 +01:00
|
|
|
#ifndef GAME_STATE_CHARACTERMANAGER_H
|
|
|
|
#define GAME_STATE_CHARACTERMANAGER_H
|
|
|
|
|
|
|
|
#include <boost/filesystem/path.hpp>
|
|
|
|
|
|
|
|
#include "character.hpp"
|
|
|
|
|
|
|
|
namespace MWState
|
|
|
|
{
|
|
|
|
class CharacterManager
|
|
|
|
{
|
|
|
|
boost::filesystem::path mPath;
|
|
|
|
int mNext;
|
|
|
|
std::vector<Character> mCharacters;
|
|
|
|
Character *mCurrent;
|
2013-11-25 13:00:05 +01:00
|
|
|
std::string mGame;
|
2013-11-19 15:38:26 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
CharacterManager (const CharacterManager&);
|
|
|
|
///< Not implemented
|
|
|
|
|
|
|
|
CharacterManager& operator= (const CharacterManager&);
|
|
|
|
///< Not implemented
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2013-11-25 13:00:05 +01:00
|
|
|
CharacterManager (const boost::filesystem::path& saves, const std::string& game);
|
2013-11-19 15:38:26 +01:00
|
|
|
|
2013-11-24 16:58:41 +01:00
|
|
|
Character *getCurrentCharacter (bool create = true);
|
|
|
|
///< \param create Create a new character, if there is no current character.
|
2013-11-19 15:38:26 +01:00
|
|
|
|
|
|
|
void createCharacter();
|
|
|
|
///< Create new character within saved game management
|
2013-11-21 10:20:50 +01:00
|
|
|
|
2013-11-21 12:24:24 +01:00
|
|
|
void setCurrentCharacter (const Character *character);
|
|
|
|
|
2013-11-21 10:20:50 +01:00
|
|
|
void clearCurrentCharacter();
|
2013-11-21 11:10:18 +01:00
|
|
|
|
|
|
|
std::vector<Character>::const_iterator begin() const;
|
|
|
|
|
|
|
|
std::vector<Character>::const_iterator end() const;
|
2013-11-19 15:38:26 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|