1 ////////////////////////////////////////////////////////////////////////////////
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
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "persistent_pair.hpp"
14 ////////////////////////////////////////////////////////////////////////////////
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)
20 dump_fn1(context,data.first);
21 dump_fn2(context,data.second);
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)
28 restore_fn1(context,data.first);
29 restore_fn2(context,data.second);
32 ////////////////////////////////////////////////////////////////////////////////
34 } // end namespace stlplus