From c884da672645231b5ec47706c886381dab1b391a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 05:09:12 +0000 Subject: The file stream is imported and works, as does our first test, and the new tweaks to archive. The && operator is now a template function, and as such requires no special handling. It could be worth it to check this out for other types, yet dangerous, since it would let you archive anything, even a class, without writing the proper functions for it...we shall see what happens... --- src/archive.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/archive.h') diff --git a/src/archive.h b/src/archive.h index 7de9220..26e430b 100644 --- a/src/archive.h +++ b/src/archive.h @@ -4,6 +4,7 @@ #include #include #include "archable.h" +#include "stream.h" namespace Bu { @@ -20,12 +21,12 @@ namespace Bu save = false }; - Archive( bool bLoading ); + Archive( Stream &rStream, bool bLoading ); virtual ~Archive(); - virtual void close()=0; + virtual void close(); - virtual void write(const void *, int32_t)=0; - virtual void read(void *, int32_t)=0; + virtual void write(const void *, int32_t); + virtual void read(void *, int32_t); virtual Archive &operator<<(bool); virtual Archive &operator<<(int8_t); @@ -67,6 +68,9 @@ namespace Bu virtual Archive &operator&&(float &); virtual Archive &operator&&(double &); virtual Archive &operator&&(long double &); + + private: + Stream &rStream; }; Archive &operator<<(Archive &, class Bu::Archable &); -- cgit v1.2.3