OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
charactermanager.hpp
Go to the documentation of this file.
1 #ifndef GAME_STATE_CHARACTERMANAGER_H
2 #define GAME_STATE_CHARACTERMANAGER_H
3 
4 #include <boost/filesystem/path.hpp>
5 
6 #include "character.hpp"
7 
8 namespace MWState
9 {
11  {
12  boost::filesystem::path mPath;
13 
14  // Uses std::list, so that mCurrent stays valid when characters are deleted
15  std::list<Character> mCharacters;
16 
18  std::string mGame;
19 
20  private:
21 
24 
27 
28  std::list<Character>::iterator findCharacter(const MWState::Character* character);
29 
30  public:
31 
32  CharacterManager (const boost::filesystem::path& saves, const std::string& game);
33 
36 
37  void deleteSlot(const MWState::Character *character, const MWState::Slot *slot);
38 
39  Character* createCharacter(const std::string& name);
42 
43  void setCurrentCharacter (const Character *character);
44 
45  std::list<Character>::const_iterator begin() const;
46 
47  std::list<Character>::const_iterator end() const;
48  };
49 }
50 
51 #endif
void deleteSlot(const MWState::Character *character, const MWState::Slot *slot)
Definition: charactermanager.cpp:40
Definition: character.hpp:19
CharacterManager & operator=(const CharacterManager &)
Not implemented.
Character * createCharacter(const std::string &name)
Definition: charactermanager.cpp:56
std::string mGame
Definition: charactermanager.hpp:18
std::list< Character >::const_iterator end() const
Definition: charactermanager.cpp:116
std::list< Character > mCharacters
Definition: charactermanager.hpp:15
Character * mCurrent
Definition: charactermanager.hpp:17
std::list< Character >::iterator findCharacter(const MWState::Character *character)
Definition: charactermanager.cpp:85
std::list< Character >::const_iterator begin() const
Definition: charactermanager.cpp:111
boost::filesystem::path mPath
Definition: charactermanager.hpp:12
Character * getCurrentCharacter()
Definition: charactermanager.cpp:35
void setCurrentCharacter(const Character *character)
Definition: charactermanager.cpp:98
CharacterManager(const CharacterManager &)
Not implemented.
Definition: charactermanager.hpp:10
Definition: character.hpp:10
const char * name
Definition: crashcatcher.cpp:59