X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fpersistence%2Fpersistent_foursome.tpp;fp=src%2Fstlplus%2Fpersistence%2Fpersistent_foursome.tpp;h=cfcf6ae38aa38cdb1dc88ab4cde47c8f7ec287de;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hp=0000000000000000000000000000000000000000;hpb=85783316365181491a3e3c0c63659972477cebba;p=chaz%2Fyoink diff --git a/src/stlplus/persistence/persistent_foursome.tpp b/src/stlplus/persistence/persistent_foursome.tpp new file mode 100644 index 0000000..cfcf6ae --- /dev/null +++ b/src/stlplus/persistence/persistent_foursome.tpp @@ -0,0 +1,39 @@ +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +//////////////////////////////////////////////////////////////////////////////// + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + + template + void dump_foursome(dump_context& context, const foursome& data, + D1 dump_fn1, D2 dump_fn2, D3 dump_fn3, D4 dump_fn4) + throw(persistent_dump_failed) + { + dump_fn1(context,data.first); + dump_fn2(context,data.second); + dump_fn3(context,data.third); + dump_fn4(context,data.fourth); + } + + template + void restore_foursome(restore_context& context, foursome& data, + R1 restore_fn1, R2 restore_fn2, R3 restore_fn3, R4 restore_fn4) + throw(persistent_restore_failed) + { + restore_fn1(context,data.first); + restore_fn2(context,data.second); + restore_fn3(context,data.third); + restore_fn4(context,data.fourth); + } + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus