From d10e6a5ca0905f0ef2836cd98aebfb48e7f1e8a3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 20 Apr 2022 11:14:47 -0700 Subject: ArchiveBase/Archive renamed. More to come. --- src/tests/cache.cpp | 28 ++++++++++++++-------------- src/tests/cachedel.cpp | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src/tests') diff --git a/src/tests/cache.cpp b/src/tests/cache.cpp index 4751559..3b32daf 100644 --- a/src/tests/cache.cpp +++ b/src/tests/cache.cpp @@ -5,8 +5,8 @@ class Something : public Bu::CacheObject { -friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Something &s ); -friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Something &s ); +friend Bu::Archive &operator>>( Bu::Archive &ar, Something &s ); +friend Bu::Archive &operator<<( Bu::Archive &ar, const Something &s ); public: Something() { @@ -47,8 +47,8 @@ private: class SubSomethingA : public Something { -friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingA &s ); -friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingA &s ); +friend Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingA &s ); +friend Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingA &s ); public: SubSomethingA() { @@ -71,8 +71,8 @@ private: class SubSomethingB : public Something { -friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingB &s ); -friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingB &s ); +friend Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingB &s ); +friend Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingB &s ); public: SubSomethingB() { @@ -93,32 +93,32 @@ private: Bu::String sString; }; -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Something &s ) +Bu::Archive &operator>>( Bu::Archive &ar, Something &s ) { return ar >> s.uId >> s.sName; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Something &s ) +Bu::Archive &operator<<( Bu::Archive &ar, const Something &s ) { return ar << s.uId << s.sName; } -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingA &s ) +Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingA &s ) { return ar >> (Something &)s >> s.iNumber; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingA &s ) +Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingA &s ) { return ar << (Something &)s << s.iNumber; } -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingB &s ) +Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingB &s ) { return ar >> (Something &)s >> s.sString; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingB &s ) +Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingB &s ) { return ar << (Something &)s << s.sString; } @@ -128,7 +128,7 @@ namespace Bu template<> void _cacheObjectSave( Bu::Stream &s, const Something *pObject ) { - Bu::Archive ar( s, Bu::Archive::save ); + Bu::ArchiveBinary ar( s, Bu::ArchiveBinary::save ); if( typeid(*pObject) == typeid(SubSomethingA) ) { ar << (uint8_t)1 << (SubSomethingA &)*pObject; @@ -147,7 +147,7 @@ namespace Bu template<> Something *_cacheObjectLoad( Bu::CacheObject::Initializer &initObj, const Bu::Uuid &rKey, Bu::Stream &s ) { - Bu::Archive ar( s, Bu::Archive::load ); + Bu::ArchiveBinary ar( s, Bu::ArchiveBinary::load ); uint8_t uType; ar >> uType; switch( uType ) diff --git a/src/tests/cachedel.cpp b/src/tests/cachedel.cpp index 817757c..fd40994 100644 --- a/src/tests/cachedel.cpp +++ b/src/tests/cachedel.cpp @@ -6,8 +6,8 @@ class Something : public Bu::CacheObject { -friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Something &s ); -friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Something &s ); +friend Bu::Archive &operator>>( Bu::Archive &ar, Something &s ); +friend Bu::Archive &operator<<( Bu::Archive &ar, const Something &s ); public: Something() { @@ -48,8 +48,8 @@ private: class SubSomethingA : public Something { -friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingA &s ); -friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingA &s ); +friend Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingA &s ); +friend Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingA &s ); public: SubSomethingA() { @@ -72,8 +72,8 @@ private: class SubSomethingB : public Something { -friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingB &s ); -friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingB &s ); +friend Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingB &s ); +friend Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingB &s ); public: SubSomethingB() { @@ -94,32 +94,32 @@ private: Bu::String sString; }; -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Something &s ) +Bu::Archive &operator>>( Bu::Archive &ar, Something &s ) { return ar >> s.uId >> s.sName; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Something &s ) +Bu::Archive &operator<<( Bu::Archive &ar, const Something &s ) { return ar << s.uId << s.sName; } -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingA &s ) +Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingA &s ) { return ar >> (Something &)s >> s.iNumber; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingA &s ) +Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingA &s ) { return ar << (Something &)s << s.iNumber; } -Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingB &s ) +Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingB &s ) { return ar >> (Something &)s >> s.sString; } -Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingB &s ) +Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingB &s ) { return ar << (Something &)s << s.sString; } @@ -129,7 +129,7 @@ namespace Bu template<> void _cacheObjectSave( Bu::Stream &s, const Something *pObject ) { - Bu::Archive ar( s, Bu::Archive::save ); + Bu::ArchiveBinary ar( s, Bu::ArchiveBinary::save ); if( typeid(*pObject) == typeid(SubSomethingA) ) { ar << (uint8_t)1 << (SubSomethingA &)*pObject; @@ -148,7 +148,7 @@ namespace Bu template<> Something *_cacheObjectLoad( Bu::CacheObject::Initializer &initObj, const Bu::Uuid &rKey, Bu::Stream &s ) { - Bu::Archive ar( s, Bu::Archive::load ); + Bu::ArchiveBinary ar( s, Bu::ArchiveBinary::load ); uint8_t uType; ar >> uType; switch( uType ) -- cgit v1.2.3