summaryrefslogtreecommitdiff
path: root/src/archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive.cpp')
-rw-r--r--src/archive.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/archive.cpp b/src/archive.cpp
index 5f5145c..be06c0e 100644
--- a/src/archive.cpp
+++ b/src/archive.cpp
@@ -1,13 +1,36 @@
1#include "archive.h" 1#include "archive.h"
2 2
3Bu::Archive::Archive(bool bLoading): 3Bu::Archive::Archive( Stream &rStream, bool bLoading ) :
4 bLoading(bLoading) 4 bLoading( bLoading ),
5 rStream( rStream )
5{ 6{
6} 7}
8
7Bu::Archive::~Archive() 9Bu::Archive::~Archive()
8{ 10{
9} 11}
10 12
13void Bu::Archive::write( const void *pData, int32_t nSize )
14{
15 if( nSize == 0 || pData == NULL )
16 return;
17
18 rStream.write( (const char *)pData, nSize );
19}
20
21void Bu::Archive::read( void *pData, int32_t nSize )
22{
23 if( nSize == 0 || pData == NULL )
24 return;
25
26 rStream.read( (char *)pData, nSize );
27}
28
29void Bu::Archive::close()
30{
31 rStream.close();
32}
33
11bool Bu::Archive::isLoading() 34bool Bu::Archive::isLoading()
12{ 35{
13 return bLoading; 36 return bLoading;