aboutsummaryrefslogtreecommitdiff
path: root/src/object.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/object.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/object.h b/src/object.h
new file mode 100644
index 0000000..10bdc47
--- /dev/null
+++ b/src/object.h
@@ -0,0 +1,39 @@
1#ifndef GATS_OBJECT_H
2#define GATS_OBJECT_H
3
4namespace Bu
5{
6 class Stream;
7};
8
9namespace Gats
10{
11 enum Type
12 {
13 typeDictionary,
14 typeList,
15 typeString,
16 typeInteger,
17 typeFloat,
18 typeBoolean
19 };
20
21 /**
22 * The baseclass for every type that can be stored in a packet.
23 */
24 class Object
25 {
26 public:
27 Object();
28 virtual ~Object();
29
30 virtual Type getType() const =0;
31
32 virtual void write( Bu::Stream &rOut ) const=0;
33 virtual void read( Bu::Stream &rIn, char cType )=0;
34
35 static Object *read( Bu::Stream &rIn );
36 };
37};
38
39#endif