]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/persistence/persistent_pair.tpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / persistence / persistent_pair.tpp
diff --git a/src/stlplus/persistence/persistent_pair.tpp b/src/stlplus/persistence/persistent_pair.tpp
new file mode 100644 (file)
index 0000000..aa118cf
--- /dev/null
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+//   Author:    Andy Rushton\r
+//   Copyright: (c) Southampton University 1999-2004\r
+//              (c) Andy Rushton           2004-2009\r
+//   License:   BSD License, see ../docs/license.html\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+#include "persistent_pair.hpp"\r
+\r
+namespace stlplus\r
+{\r
+\r
+  ////////////////////////////////////////////////////////////////////////////////\r
+\r
+  template<typename K, typename T, typename D1, typename D2>\r
+  void dump_pair(dump_context& context, const std::pair<K,T>& data, D1 dump_fn1, D2 dump_fn2)\r
+    throw(persistent_dump_failed)\r
+  {\r
+    dump_fn1(context,data.first);\r
+    dump_fn2(context,data.second);\r
+  }\r
+\r
+  template<typename K, typename T, typename R1, typename R2>\r
+  void restore_pair(restore_context& context, std::pair<K,T>& data, R1 restore_fn1, R2 restore_fn2)\r
+    throw(persistent_restore_failed)\r
+  {\r
+    restore_fn1(context,data.first);\r
+    restore_fn2(context,data.second);\r
+  }\r
+\r
+  ////////////////////////////////////////////////////////////////////////////////\r
+\r
+} // end namespace stlplus\r
This page took 0.017579 seconds and 4 git commands to generate.