diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-07-27 17:20:22 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-07-27 17:20:22 +0000 |
commit | d0b6b3d1c96e437d12410703a8e530decd0b028f (patch) | |
tree | f3568279aa6c31594f525f061efc6eda08278635 /src/account.h | |
parent | 285b40d1cb768e235aed894f4704e1013cb054ea (diff) | |
download | manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.tar.gz manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.tar.bz2 manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.tar.xz manaserv-d0b6b3d1c96e437d12410703a8e530decd0b028f.zip |
First step toward a restructured class hierarchy for world actors: add
MovingObject and Player classes.
Diffstat (limited to 'src/account.h')
-rw-r--r-- | src/account.h | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/src/account.h b/src/account.h index 2d9da17a..b1ba59d0 100644 --- a/src/account.h +++ b/src/account.h @@ -30,10 +30,6 @@ #include "being.h" -namespace tmwserv -{ - - /** * Notes: * - change from the previous implementation: this class does not encrypt @@ -76,14 +72,13 @@ class Account Account(const std::string& name, const std::string& password, const std::string& email, - const Beings& characters); + const Players& characters); /** * Destructor. */ - ~Account(void) - throw(); + ~Account(); /** @@ -101,7 +96,7 @@ class Account * @return the user name. */ const std::string& - getName(void) const; + getName() const; /** @@ -155,7 +150,7 @@ class Account * @return the account level. */ AccountLevels - getLevel(void) const; + getLevel() const; /** @@ -164,7 +159,7 @@ class Account * @param characters a list of characters. */ void - setCharacters(const Beings& characters); + setCharacters(const Players& characters); /** @@ -173,7 +168,7 @@ class Account * @param character the new character. */ void - addCharacter(BeingPtr character); + addCharacter(PlayerPtr character); /** * Remove a character. @@ -181,7 +176,7 @@ class Account * @param name The character's name to delete. */ bool - delCharacter(std::string name); + delCharacter(std::string const &name); /** @@ -189,44 +184,29 @@ class Account * * @return all the characters. */ - Beings& - getCharacters(void); + Players& + getCharacters(); /** * Get a character by name. * * @return the character if found, NULL otherwise. */ - Being* + PlayerPtr getCharacter(const std::string& name); private: - /** - * Default constructor. - */ - Account(void) - throw(); - - - /** - * Copy constructor. - */ - Account(const Account& rhs); - - - /** - * Assignment operator. - */ - Account& - operator=(const Account& rhs); + Account(); + Account(Account const &rhs); + Account &operator=(Account const &rhs); private: std::string mName; /**< user name */ std::string mPassword; /**< user password (encrypted) */ std::string mEmail; /**< user email address */ - Beings mCharacters; /**< player data */ + Players mCharacters; /**< player data */ AccountLevels mLevel; /**< account level */ }; @@ -237,7 +217,4 @@ class Account typedef utils::CountedPtr<Account> AccountPtr; -} // namespace tmwserv - - #endif // _TMWSERV_ACCOUNT_H_ |