]> jfr.im git - irc/gameservirc.git/blame - gameserv/pouch.h
Almost done the player code
[irc/gameservirc.git] / gameserv / pouch.h
CommitLineData
3662210f 1#ifndef POUCH_H
2#define POUCH_H
3
37ed80a9 4#include <list>
23f22a79 5#include <string>
37ed80a9 6
7class item; // forward declaration
e696687e 8class itemContainer; // forward declaration
37ed80a9 9
10using namespace std;
11
12class pouch
13{
14 public:
15 pouch();
16 pouch(pouch *);
ce97fd48 17 pouch(const pouch &);
37ed80a9 18 ~pouch();
19
20 void sort();
21 void clear();
22 bool isEmpty();
ce97fd48 23 int getCount() {return count; };
37ed80a9 24
e696687e 25 itemContainer *Find(char *);
26 itemContainer *Find(string &);
8a5cec4f 27 itemContainer *Find(int );
37ed80a9 28
e0056fa6 29 itemContainer *addItem(item *);
7b51307d 30 itemContainer *addItem(item *, int);
1ee4a31b 31 itemContainer *addItemNoChecks(item *);
37ed80a9 32 void deleteItem(item *);
e696687e 33 list <itemContainer> *getItems() { return &items; };
37ed80a9 34
35 // operators
36 const pouch &operator = ( const pouch &);
37
38 private:
e696687e 39 list <itemContainer> items;
1ee4a31b 40 long count;
3662210f 41};
42
43#endif