From 900bf84c403caf83e18928b066544f402aae1122 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 13 Apr 2009 22:00:29 +0000 Subject: Ok, that was strange, somehow the archive class didn't actually supoprt float, double, or long double...now it does. --- src/archive.cpp | 31 +++++++++++++++++++++++++++++++ src/archive.h | 6 ++++++ 2 files changed, 37 insertions(+) (limited to 'src') diff --git a/src/archive.cpp b/src/archive.cpp index 0efa145..6bad44c 100644 --- a/src/archive.cpp +++ b/src/archive.cpp @@ -106,6 +106,21 @@ Bu::Archive &Bu::Archive::operator<<(unsigned long long p) write( &p, sizeof(p) ); return *this; } +Bu::Archive &Bu::Archive::operator<<(float p) +{ + write( &p, sizeof(p) ); + return *this; +} +Bu::Archive &Bu::Archive::operator<<(double p) +{ + write( &p, sizeof(p) ); + return *this; +} +Bu::Archive &Bu::Archive::operator<<(long double p) +{ + write( &p, sizeof(p) ); + return *this; +} Bu::Archive &Bu::Archive::operator>>(bool &p) { @@ -167,6 +182,22 @@ Bu::Archive &Bu::Archive::operator>>(unsigned long long &p) read( &p, sizeof(p) ); return *this; } +Bu::Archive &Bu::Archive::operator>>(float &p) +{ + read( &p, sizeof(p) ); + return *this; +} +Bu::Archive &Bu::Archive::operator>>(double &p) +{ + read( &p, sizeof(p) ); + return *this; +} +Bu::Archive &Bu::Archive::operator>>(long double &p) +{ + read( &p, sizeof(p) ); + return *this; +} + /* Bu::Archive &Bu::Archive::operator<<(bool p) { diff --git a/src/archive.h b/src/archive.h index 519b2a7..dcbd219 100644 --- a/src/archive.h +++ b/src/archive.h @@ -100,6 +100,9 @@ namespace Bu virtual Archive &operator<<(unsigned long p); virtual Archive &operator<<(signed long long p); virtual Archive &operator<<(unsigned long long p); + virtual Archive &operator<<(float p); + virtual Archive &operator<<(double p); + virtual Archive &operator<<(long double p); virtual Archive &operator>>(bool &p); virtual Archive &operator>>(char &p); @@ -113,6 +116,9 @@ namespace Bu virtual Archive &operator>>(unsigned long &p); virtual Archive &operator>>(signed long long &p); virtual Archive &operator>>(unsigned long long &p); + virtual Archive &operator>>(float &p); + virtual Archive &operator>>(double &p); + virtual Archive &operator>>(long double &p); /* virtual Archive &operator<<(bool); -- cgit v1.2.3