X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fstlplus%2Fpersistence%2Fpersistent_pair.tpp;fp=src%2Fstlplus%2Fpersistence%2Fpersistent_pair.tpp;h=aa118cf8789f2ccb909761341374393148e533ec;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hp=0000000000000000000000000000000000000000;hpb=85783316365181491a3e3c0c63659972477cebba;p=chaz%2Fyoink diff --git a/src/stlplus/persistence/persistent_pair.tpp b/src/stlplus/persistence/persistent_pair.tpp new file mode 100644 index 0000000..aa118cf --- /dev/null +++ b/src/stlplus/persistence/persistent_pair.tpp @@ -0,0 +1,34 @@ +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +//////////////////////////////////////////////////////////////////////////////// +#include "persistent_pair.hpp" + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + + template + void dump_pair(dump_context& context, const std::pair& data, D1 dump_fn1, D2 dump_fn2) + throw(persistent_dump_failed) + { + dump_fn1(context,data.first); + dump_fn2(context,data.second); + } + + template + void restore_pair(restore_context& context, std::pair& data, R1 restore_fn1, R2 restore_fn2) + throw(persistent_restore_failed) + { + restore_fn1(context,data.first); + restore_fn2(context,data.second); + } + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus