aboutsummaryrefslogtreecommitdiff
path: root/src
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
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 '')
-rw-r--r--src/archive.cpp31
-rw-r--r--src/archive.h6
2 files changed, 37 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{
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
100 virtual Archive &operator<<(unsigned long p); 100 virtual Archive &operator<<(unsigned long p);
101 virtual Archive &operator<<(signed long long p); 101 virtual Archive &operator<<(signed long long p);
102 virtual Archive &operator<<(unsigned long long p); 102 virtual Archive &operator<<(unsigned long long p);
103 virtual Archive &operator<<(float p);
104 virtual Archive &operator<<(double p);
105 virtual Archive &operator<<(long double p);
103 106
104 virtual Archive &operator>>(bool &p); 107 virtual Archive &operator>>(bool &p);
105 virtual Archive &operator>>(char &p); 108 virtual Archive &operator>>(char &p);
@@ -113,6 +116,9 @@ namespace Bu
113 virtual Archive &operator>>(unsigned long &p); 116 virtual Archive &operator>>(unsigned long &p);
114 virtual Archive &operator>>(signed long long &p); 117 virtual Archive &operator>>(signed long long &p);
115 virtual Archive &operator>>(unsigned long long &p); 118 virtual Archive &operator>>(unsigned long long &p);
119 virtual Archive &operator>>(float &p);
120 virtual Archive &operator>>(double &p);
121 virtual Archive &operator>>(long double &p);
116 122
117 /* 123 /*
118 virtual Archive &operator<<(bool); 124 virtual Archive &operator<<(bool);