aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/archive.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/archive.h b/src/archive.h
index a2d4c8f..2d652ec 100644
--- a/src/archive.h
+++ b/src/archive.h
@@ -207,6 +207,35 @@ namespace Bu
207 207
208 return ar; 208 return ar;
209 } 209 }
210
211 template<typename value>
212 Archive &operator<<( Archive &ar, List<value> &h )
213 {
214 ar << h.getSize();
215 for( typename List<value>::iterator i = h.begin(); i != h.end(); i++ )
216 {
217 ar << (*i);
218 }
219
220 return ar;
221 }
222
223 template<typename value>
224 Archive &operator>>( Archive &ar, List<value> &h )
225 {
226 h.clear();
227 uint32_t nSize;
228 ar >> nSize;
229
230 for( uint32_t j = 0; j < nSize; j++ )
231 {
232 value v;
233 ar >> v;
234 h.append( v );
235 }
236
237 return ar;
238 }
210} 239}
211 240
212#endif 241#endif