aboutsummaryrefslogtreecommitdiff
path: root/src/serializerbinary.cpp
diff options
context:
space:
mode:
authorDavid <david@xagasoft.com>2006-05-13 00:19:58 +0000
committerDavid <david@xagasoft.com>2006-05-13 00:19:58 +0000
commit632e1d1dbe6ac35eba93523dd144129af1122ca2 (patch)
tree22f5ea2a8577c4e0a8d8e3febae9b05a8e744e37 /src/serializerbinary.cpp
parentde1aa6d66e11232edf2d7bbc729425003f6c3db5 (diff)
downloadlibbu++-632e1d1dbe6ac35eba93523dd144129af1122ca2.tar.gz
libbu++-632e1d1dbe6ac35eba93523dd144129af1122ca2.tar.bz2
libbu++-632e1d1dbe6ac35eba93523dd144129af1122ca2.tar.xz
libbu++-632e1d1dbe6ac35eba93523dd144129af1122ca2.zip
david - umm... yeah, made the generic write and read functions...
Diffstat (limited to '')
-rw-r--r--src/serializerbinary.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/serializerbinary.cpp b/src/serializerbinary.cpp
index 1ea9f36..53e469f 100644
--- a/src/serializerbinary.cpp
+++ b/src/serializerbinary.cpp
@@ -35,6 +35,16 @@ void SerializerBinary::close()
35 } 35 }
36} 36}
37 37
38void SerializerBinary::write(void * pData, int32_t nSize)
39{
40 fwrite(pData, nSize, 1, fhFile);
41}
42
43void SerializerBinary::read(void * pData, int32_t nSize)
44{
45 fread(pData, nSize, 1, fhFile);
46}
47
38Serializer &SerializerBinary::operator<<(bool p) 48Serializer &SerializerBinary::operator<<(bool p)
39{ 49{
40 fwrite(&p, sizeof(p), 1, fhFile); 50 fwrite(&p, sizeof(p), 1, fhFile);