aboutsummaryrefslogtreecommitdiff
path: root/src/archable.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/archable.h35
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
4namespace 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