diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-05-29 12:06:58 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-05-29 12:06:58 +0000 |
commit | 7a8b2b11e989e474dceb30330852174d877b1601 (patch) | |
tree | dc0e63111c2633bcd9a787f359eb4222fc806225 /src/storage.h | |
parent | 6d34ea19c35627c1705b81f4c89d8557e13bf4da (diff) | |
download | manaserv-7a8b2b11e989e474dceb30330852174d877b1601.tar.gz manaserv-7a8b2b11e989e474dceb30330852174d877b1601.tar.bz2 manaserv-7a8b2b11e989e474dceb30330852174d877b1601.tar.xz manaserv-7a8b2b11e989e474dceb30330852174d877b1601.zip |
Added getAccount & getCharacter to storage class. Cleaned up storage code.
Added test in main.cpp.
Diffstat (limited to 'src/storage.h')
-rw-r--r-- | src/storage.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/storage.h b/src/storage.h index e6fec7b4..5cf96eb4 100644 --- a/src/storage.h +++ b/src/storage.h @@ -35,9 +35,15 @@ * Storage is the resource manager */ class Storage { - private: //make storage singleton Storage(const Storage &n) { } + +#ifdef SQLITE_SUPPORT + SQLiteWrapper sqlite; /**< Database */ +#endif + std::vector<Account*> accounts; /**< Loaded account data */ + std::vector<Being*> characters; /**< Loaded account data */ + public: /** * Constructor. @@ -67,12 +73,12 @@ class Storage { /** * Get account & associated data */ - //Account& getAccount(const std::string &username); + Account* getAccount(const std::string &username); - private: -#ifdef SQLITE_SUPPORT - SQLiteWrapper sqlite; /**< Database */ -#endif + /** + * Get character of username + */ + Being* getCharacter(const std::string &username); }; #endif /* STORAGE_H */ |