summaryrefslogtreecommitdiff
path: root/src/archive.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-04-13 22:00:29 +0000
committerMike Buland <eichlan@xagasoft.com>2009-04-13 22:00:29 +0000
commit900bf84c403caf83e18928b066544f402aae1122 (patch)
tree209fb2b1afe59f1aabadddbb145bf7fddfa16a03 /src/archive.cpp
parentbad1c7623d82fe231ed7033669aec554f193a6fa (diff)
downloadlibbu++-900bf84c403caf83e18928b066544f402aae1122.tar.gz
libbu++-900bf84c403caf83e18928b066544f402aae1122.tar.bz2
libbu++-900bf84c403caf83e18928b066544f402aae1122.tar.xz
libbu++-900bf84c403caf83e18928b066544f402aae1122.zip
Ok, that was strange, somehow the archive class didn't actually supoprt float,
double, or long double...now it does.
Diffstat (limited to 'src/archive.cpp')
-rw-r--r--src/archive.cpp31
1 files changed, 31 insertions, 0 deletions
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)
106 write( &p, sizeof(p) ); 106 write( &p, sizeof(p) );
107 return *this; 107 return *this;
108} 108}
109Bu::Archive &Bu::Archive::operator<<(float p)
110{
111 write( &p, sizeof(p) );
112 return *this;
113}
114Bu::Archive &Bu::Archive::operator<<(double p)
115{
116 write( &p, sizeof(p) );
117 return *this;
118}
119Bu::Archive &Bu::Archive::operator<<(long double p)
120{
121 write( &p, sizeof(p) );
122 return *this;
123}
109 124
110Bu::Archive &Bu::Archive::operator>>(bool &p) 125Bu::Archive &Bu::Archive::operator>>(bool &p)
111{ 126{
@@ -167,6 +182,22 @@ Bu::Archive &Bu::Archive::operator>>(unsigned long long &p)
167 read( &p, sizeof(p) ); 182 read( &p, sizeof(p) );
168 return *this; 183 return *this;
169} 184}
185Bu::Archive &Bu::Archive::operator>>(float &p)
186{
187 read( &p, sizeof(p) );
188 return *this;
189}
190Bu::Archive &Bu::Archive::operator>>(double &p)
191{
192 read( &p, sizeof(p) );
193 return *this;
194}
195Bu::Archive &Bu::Archive::operator>>(long double &p)
196{
197 read( &p, sizeof(p) );
198 return *this;
199}
200
170/* 201/*
171Bu::Archive &Bu::Archive::operator<<(bool p) 202Bu::Archive &Bu::Archive::operator<<(bool p)
172{ 203{