]> Dogcows Code - chaz/yoink/blob - src/stlplus/persistence/persistent_pair.tpp
archiving support for releases
[chaz/yoink] / src / stlplus / persistence / persistent_pair.tpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "persistent_pair.hpp"
10
11 namespace stlplus
12 {
13
14 ////////////////////////////////////////////////////////////////////////////////
15
16 template<typename K, typename T, typename D1, typename D2>
17 void dump_pair(dump_context& context, const std::pair<K,T>& data, D1 dump_fn1, D2 dump_fn2)
18 throw(persistent_dump_failed)
19 {
20 dump_fn1(context,data.first);
21 dump_fn2(context,data.second);
22 }
23
24 template<typename K, typename T, typename R1, typename R2>
25 void restore_pair(restore_context& context, std::pair<K,T>& data, R1 restore_fn1, R2 restore_fn2)
26 throw(persistent_restore_failed)
27 {
28 restore_fn1(context,data.first);
29 restore_fn2(context,data.second);
30 }
31
32 ////////////////////////////////////////////////////////////////////////////////
33
34 } // end namespace stlplus
This page took 0.030294 seconds and 4 git commands to generate.