summaryrefslogtreecommitdiff
path: root/src/archive.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-06-07 06:15:07 +0000
committerMike Buland <eichlan@xagasoft.com>2008-06-07 06:15:07 +0000
commit3ac57795fe8e28915523de6dd95e336a3eaa8064 (patch)
tree5e06f65c451bdef412968c6631bcccfe2b15b2a3 /src/archive.h
parent555ba77568b6faf18ebaed06cd08615deab2d8e3 (diff)
downloadlibbu++-3ac57795fe8e28915523de6dd95e336a3eaa8064.tar.gz
libbu++-3ac57795fe8e28915523de6dd95e336a3eaa8064.tar.bz2
libbu++-3ac57795fe8e28915523de6dd95e336a3eaa8064.tar.xz
libbu++-3ac57795fe8e28915523de6dd95e336a3eaa8064.zip
This seems to have done the trick, on the 32 bit platform, anyway. Turns out
it's a bad idea to rely on the intNN_t typedefs. I enumerated all non-pointer primitives in c++ (except void, you can't store things in a void), and it works great. I also discovered C and C++ actually have unsigned char, signed char, and char, which are all distinct types. It supports all three now. In addition, I got rid of all of the specific && operators, the general one covers it all. Also, the unit tests all pass for now. Now to try it on the 64bit system.
Diffstat (limited to 'src/archive.h')
-rw-r--r--src/archive.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/archive.h b/src/archive.h
index 31683bb..95c8c0c 100644
--- a/src/archive.h
+++ b/src/archive.h
@@ -88,6 +88,33 @@ namespace Bu
88 virtual void write(const void *, int32_t); 88 virtual void write(const void *, int32_t);
89 virtual void read(void *, int32_t); 89 virtual void read(void *, int32_t);
90 90
91 virtual Archive &operator<<(bool p);
92 virtual Archive &operator<<(char p);
93 virtual Archive &operator<<(signed char p);
94 virtual Archive &operator<<(unsigned char p);
95 virtual Archive &operator<<(signed short p);
96 virtual Archive &operator<<(unsigned short p);
97 virtual Archive &operator<<(signed int p);
98 virtual Archive &operator<<(unsigned int p);
99 virtual Archive &operator<<(signed long p);
100 virtual Archive &operator<<(unsigned long p);
101 virtual Archive &operator<<(signed long long p);
102 virtual Archive &operator<<(unsigned long long p);
103
104 virtual Archive &operator>>(bool &p);
105 virtual Archive &operator>>(char &p);
106 virtual Archive &operator>>(signed char &p);
107 virtual Archive &operator>>(unsigned char &p);
108 virtual Archive &operator>>(signed short &p);
109 virtual Archive &operator>>(unsigned short &p);
110 virtual Archive &operator>>(signed int &p);
111 virtual Archive &operator>>(unsigned int &p);
112 virtual Archive &operator>>(signed long &p);
113 virtual Archive &operator>>(unsigned long &p);
114 virtual Archive &operator>>(signed long long &p);
115 virtual Archive &operator>>(unsigned long long &p);
116
117 /*
91 virtual Archive &operator<<(bool); 118 virtual Archive &operator<<(bool);
92 virtual Archive &operator<<(int8_t); 119 virtual Archive &operator<<(int8_t);
93 virtual Archive &operator<<(int16_t); 120 virtual Archive &operator<<(int16_t);
@@ -128,6 +155,7 @@ namespace Bu
128 virtual Archive &operator&&(float &); 155 virtual Archive &operator&&(float &);
129 virtual Archive &operator&&(double &); 156 virtual Archive &operator&&(double &);
130 virtual Archive &operator&&(long double &); 157 virtual Archive &operator&&(long double &);
158 */
131 159
132 /** 160 /**
133 * For storage, get an ID for the pointer to the object you're going to 161 * For storage, get an ID for the pointer to the object you're going to