aboutsummaryrefslogtreecommitdiff
path: root/src/stable/archival.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
commit469bbcf0701e1eb8a6670c23145b0da87357e178 (patch)
treeb5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/stable/archival.h
parentee1b79396076edc4e30aefb285fada03bb45e80d (diff)
downloadlibbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/stable/archival.h')
-rw-r--r--src/stable/archival.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/stable/archival.h b/src/stable/archival.h
new file mode 100644
index 0000000..946167a
--- /dev/null
+++ b/src/stable/archival.h
@@ -0,0 +1,52 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef BU_ARCHIVAL_H
9#define BU_ARCHIVAL_H
10
11#include "bu/archivebase.h"
12
13namespace Bu
14{
15 /**
16 * The base class for any class you want to archive. Simply include this as
17 * a base class, implement the purely virtual archive function and you've
18 * got an easily archiveable class.
19 *
20 * Archival: "of or pertaining to archives or valuable records; contained
21 * in or comprising such archives or records."
22 */
23 class Archival
24 {
25 public:
26 /**
27 * Does nothing, here for completeness.
28 */
29 Archival();
30
31 /**
32 * Here to ensure the deconstructor is virtual.
33 */
34 virtual ~Archival();
35
36 /**
37 * This is the main workhorse of the archive system, just override and
38 * you've got a archiveable class. A reference to the Archive
39 * used is passed in as your only parameter, query it to discover if
40 * you are loading or saving.
41 * @param ar A reference to the Archive object to use.
42 */
43 virtual void archive( class ArchiveBase &ar )=0;
44 };
45
46 ArchiveBase &operator<<(ArchiveBase &, const class Bu::Archival &);
47 ArchiveBase &operator<<(ArchiveBase &, class Bu::Archival &);
48 ArchiveBase &operator>>(ArchiveBase &, class Bu::Archival &);
49
50}
51
52#endif