aboutsummaryrefslogtreecommitdiff
path: root/src/tests/cachedel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/cachedel.cpp')
-rw-r--r--src/tests/cachedel.cpp28
1 files changed, 14 insertions, 14 deletions
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 @@
6 6
7class Something : public Bu::CacheObject<Bu::Uuid, Something> 7class Something : public Bu::CacheObject<Bu::Uuid, Something>
8{ 8{
9friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Something &s ); 9friend Bu::Archive &operator>>( Bu::Archive &ar, Something &s );
10friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Something &s ); 10friend Bu::Archive &operator<<( Bu::Archive &ar, const Something &s );
11public: 11public:
12 Something() 12 Something()
13 { 13 {
@@ -48,8 +48,8 @@ private:
48 48
49class SubSomethingA : public Something 49class SubSomethingA : public Something
50{ 50{
51friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingA &s ); 51friend Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingA &s );
52friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingA &s ); 52friend Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingA &s );
53public: 53public:
54 SubSomethingA() 54 SubSomethingA()
55 { 55 {
@@ -72,8 +72,8 @@ private:
72 72
73class SubSomethingB : public Something 73class SubSomethingB : public Something
74{ 74{
75friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingB &s ); 75friend Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingB &s );
76friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingB &s ); 76friend Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingB &s );
77public: 77public:
78 SubSomethingB() 78 SubSomethingB()
79 { 79 {
@@ -94,32 +94,32 @@ private:
94 Bu::String sString; 94 Bu::String sString;
95}; 95};
96 96
97Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, Something &s ) 97Bu::Archive &operator>>( Bu::Archive &ar, Something &s )
98{ 98{
99 return ar >> s.uId >> s.sName; 99 return ar >> s.uId >> s.sName;
100} 100}
101 101
102Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const Something &s ) 102Bu::Archive &operator<<( Bu::Archive &ar, const Something &s )
103{ 103{
104 return ar << s.uId << s.sName; 104 return ar << s.uId << s.sName;
105} 105}
106 106
107Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingA &s ) 107Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingA &s )
108{ 108{
109 return ar >> (Something &)s >> s.iNumber; 109 return ar >> (Something &)s >> s.iNumber;
110} 110}
111 111
112Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingA &s ) 112Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingA &s )
113{ 113{
114 return ar << (Something &)s << s.iNumber; 114 return ar << (Something &)s << s.iNumber;
115} 115}
116 116
117Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, SubSomethingB &s ) 117Bu::Archive &operator>>( Bu::Archive &ar, SubSomethingB &s )
118{ 118{
119 return ar >> (Something &)s >> s.sString; 119 return ar >> (Something &)s >> s.sString;
120} 120}
121 121
122Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const SubSomethingB &s ) 122Bu::Archive &operator<<( Bu::Archive &ar, const SubSomethingB &s )
123{ 123{
124 return ar << (Something &)s << s.sString; 124 return ar << (Something &)s << s.sString;
125} 125}
@@ -129,7 +129,7 @@ namespace Bu
129 template<> 129 template<>
130 void _cacheObjectSave<const Something>( Bu::Stream &s, const Something *pObject ) 130 void _cacheObjectSave<const Something>( Bu::Stream &s, const Something *pObject )
131 { 131 {
132 Bu::Archive ar( s, Bu::Archive::save ); 132 Bu::ArchiveBinary ar( s, Bu::ArchiveBinary::save );
133 if( typeid(*pObject) == typeid(SubSomethingA) ) 133 if( typeid(*pObject) == typeid(SubSomethingA) )
134 { 134 {
135 ar << (uint8_t)1 << (SubSomethingA &)*pObject; 135 ar << (uint8_t)1 << (SubSomethingA &)*pObject;
@@ -148,7 +148,7 @@ namespace Bu
148 template<> 148 template<>
149 Something *_cacheObjectLoad<Bu::Uuid, Something>( Bu::CacheObject<Bu::Uuid, Something>::Initializer &initObj, const Bu::Uuid &rKey, Bu::Stream &s ) 149 Something *_cacheObjectLoad<Bu::Uuid, Something>( Bu::CacheObject<Bu::Uuid, Something>::Initializer &initObj, const Bu::Uuid &rKey, Bu::Stream &s )
150 { 150 {
151 Bu::Archive ar( s, Bu::Archive::load ); 151 Bu::ArchiveBinary ar( s, Bu::ArchiveBinary::load );
152 uint8_t uType; 152 uint8_t uType;
153 ar >> uType; 153 ar >> uType;
154 switch( uType ) 154 switch( uType )