aboutsummaryrefslogtreecommitdiff
path: root/src/stable/archivebase.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2022-04-18 21:58:01 -0700
committerMike Buland <eichlan@xagasoft.com>2022-04-18 21:58:01 -0700
commit819ff3d27012b4ec4a0a21c150c112a4dd28b14d (patch)
tree6d38a56cada17155a6d495d50925f91144eff025 /src/stable/archivebase.h
parent48dc740f752bca80ee761df75422aff5f0d6b075 (diff)
downloadlibbu++-819ff3d27012b4ec4a0a21c150c112a4dd28b14d.tar.gz
libbu++-819ff3d27012b4ec4a0a21c150c112a4dd28b14d.tar.bz2
libbu++-819ff3d27012b4ec4a0a21c150c112a4dd28b14d.tar.xz
libbu++-819ff3d27012b4ec4a0a21c150c112a4dd28b14d.zip
ArchiveBase has getProperty and setProperty.
I kind of want to re-engineer the entire archive system...The root should be able to track a stateful stack of containers such as arrays and dictionaries as well as support non-binary reads and writes in a more robust way. It also still bothers me that it's the only thing in the system with base in the base class name. I should just change it...it's going to impact many programs, though.
Diffstat (limited to '')
-rw-r--r--src/stable/archivebase.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/stable/archivebase.h b/src/stable/archivebase.h
index e3d2b60..d846c27 100644
--- a/src/stable/archivebase.h
+++ b/src/stable/archivebase.h
@@ -11,6 +11,9 @@
11#include <stdint.h> 11#include <stdint.h>
12#include <unistd.h> 12#include <unistd.h>
13 13
14#include "bu/variant.h"
15#include "bu/blob.h"
16
14namespace Bu 17namespace Bu
15{ 18{
16 class ArchiveBase 19 class ArchiveBase
@@ -23,6 +26,10 @@ namespace Bu
23 virtual void write( const void *pData, size_t iLength )=0; 26 virtual void write( const void *pData, size_t iLength )=0;
24 virtual void read( void *pData, size_t iLength )=0; 27 virtual void read( void *pData, size_t iLength )=0;
25 virtual bool isLoading()=0; 28 virtual bool isLoading()=0;
29
30 virtual void setProperty( const Bu::Blob &rKey,
31 const Bu::Variant &rValue )=0;
32 virtual Bu::Variant getProperty( const Bu::Blob &rKey ) const=0;
26 }; 33 };
27 34
28 template<typename T> ArchiveBase &operator&&( ArchiveBase &ar, T &dat ) 35 template<typename T> ArchiveBase &operator&&( ArchiveBase &ar, T &dat )
@@ -68,8 +75,6 @@ namespace Bu
68 ArchiveBase &operator>>( ArchiveBase &ar, float &p ); 75 ArchiveBase &operator>>( ArchiveBase &ar, float &p );
69 ArchiveBase &operator>>( ArchiveBase &ar, double &p ); 76 ArchiveBase &operator>>( ArchiveBase &ar, double &p );
70 ArchiveBase &operator>>( ArchiveBase &ar, long double &p ); 77 ArchiveBase &operator>>( ArchiveBase &ar, long double &p );
71
72
73}; 78};
74 79
75#endif 80#endif