diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-08-14 07:12:29 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-08-14 07:12:29 +0000 |
commit | 1b797548dff7e2475826ba29a71c3f496008988f (patch) | |
tree | 2a81ee2e8fa2f17fd95410aabbf44533d35a727a /src/object.h | |
download | libgats-1b797548dff7e2475826ba29a71c3f496008988f.tar.gz libgats-1b797548dff7e2475826ba29a71c3f496008988f.tar.bz2 libgats-1b797548dff7e2475826ba29a71c3f496008988f.tar.xz libgats-1b797548dff7e2475826ba29a71c3f496008988f.zip |
libgats gets it's own repo. The rest of the history is in my misc repo.
Diffstat (limited to 'src/object.h')
-rw-r--r-- | src/object.h | 39 |
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 | |||
4 | namespace Bu | ||
5 | { | ||
6 | class Stream; | ||
7 | }; | ||
8 | |||
9 | namespace 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 | ||