From 5a0d7856dc265580cebaa833e0367d03ef21bbc3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 10 Apr 2007 13:53:18 +0000 Subject: Woo, changed the name of Achable to Archival, I dig that, and added the ground- work for the SSocket, that should be cool. --- src/archival.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/archival.h (limited to 'src/archival.h') 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 @@ +#ifndef ARCHIVAL_H +#define ARCHIVAL_H + +namespace Bu +{ + /** + * The base class for any class you want to archive. Simply include this as + * a base class, implement the purely virtual archive function and you've + * got an easily archiveable class. + * + * Archival: "of or pertaining to archives or valuable records; contained + * in or comprising such archives or records." + */ + class Archival + { + public: + /** + * Does nothing, here for completeness. + */ + Archival(); + + /** + * Here to ensure the deconstructor is virtual. + */ + virtual ~Archival(); + + /** + * This is the main workhorse of the archive system, just override and + * you've got a archiveable class. A reference to the Archive + * used is passed in as your only parameter, query it to discover if + * you are loading or saving. + * @param ar A reference to the Archive object to use. + */ + virtual void archive( class Archive &ar )=0; + }; +} + +#endif -- cgit v1.2.3