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