aboutsummaryrefslogtreecommitdiff
path: root/src/archival.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/archival.h')
-rw-r--r--src/archival.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/archival.h b/src/archival.h
new file mode 100644
index 0000000..e2c803c
--- /dev/null
+++ b/src/archival.h
@@ -0,0 +1,38 @@
1#ifndef ARCHIVAL_H
2#define ARCHIVAL_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 * Archival: "of or pertaining to archives or valuable records; contained
12 * in or comprising such archives or records."
13 */
14 class Archival
15 {
16 public:
17 /**
18 * Does nothing, here for completeness.
19 */
20 Archival();
21
22 /**
23 * Here to ensure the deconstructor is virtual.
24 */
25 virtual ~Archival();
26
27 /**
28 * This is the main workhorse of the archive system, just override and
29 * you've got a archiveable class. A reference to the Archive
30 * used is passed in as your only parameter, query it to discover if
31 * you are loading or saving.
32 * @param ar A reference to the Archive object to use.
33 */
34 virtual void archive( class Archive &ar )=0;
35 };
36}
37
38#endif