diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 04:50:36 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 04:50:36 +0000 |
commit | da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666 (patch) | |
tree | 0c8d31d13521011dc52a3fbadbf9e7e27929308f /src/archable.h | |
parent | f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 (diff) | |
download | libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.tar.gz libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.tar.bz2 libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.tar.xz libbu++-da89e6d30e57bd6dbb10b4d36b093ce9bbf5c666.zip |
The first batch seem to have made it alright. Unfortunately the Archive class
isn't done yet, I'm going to make it rely on streams, so those will be next,
then we can make it work all sortsa' well.
Diffstat (limited to 'src/archable.h')
-rw-r--r-- | src/archable.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/archable.h b/src/archable.h new file mode 100644 index 0000000..ed05a78 --- /dev/null +++ b/src/archable.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef ARCHABLE_H | ||
2 | #define ARCHABLE_H | ||
3 | |||
4 | namespace Bu | ||
5 | { | ||
6 | /** | ||
7 | * The base class for any class you want to archive. Simply include this as | ||
8 | * a base class, implement the purely virtual archive function and you've | ||
9 | * got an easily archiveable class. | ||
10 | */ | ||
11 | class Archable | ||
12 | { | ||
13 | public: | ||
14 | /** | ||
15 | * Does nothing, here for completeness. | ||
16 | */ | ||
17 | Archable(); | ||
18 | |||
19 | /** | ||
20 | * Here to ensure the deconstructor is virtual. | ||
21 | */ | ||
22 | virtual ~Archable(); | ||
23 | |||
24 | /** | ||
25 | * This is the main workhorse of the archive system, just override and | ||
26 | * you've got a archiveable class. A reference to the Archive | ||
27 | * used is passed in as your only parameter, query it to discover if | ||
28 | * you are loading or saving. | ||
29 | * @param ar A reference to the Archive object to use. | ||
30 | */ | ||
31 | virtual void archive( class Archive &ar )=0; | ||
32 | }; | ||
33 | } | ||
34 | |||
35 | #endif | ||