X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fpersistence%2Fpersistent_shortcuts.hpp;fp=src%2Fstlplus%2Fpersistence%2Fpersistent_shortcuts.hpp;h=0000000000000000000000000000000000000000;hb=5846afb00833cc72fe72422ca896d2387c712cb4;hp=beb54d0c6902cbca6d1f2fa0a1f5bed0a0504b68;hpb=a97500609dc3c1b11f9786d32bc458eb00de4c36;p=chaz%2Fyoink diff --git a/src/stlplus/persistence/persistent_shortcuts.hpp b/src/stlplus/persistence/persistent_shortcuts.hpp deleted file mode 100644 index beb54d0..0000000 --- a/src/stlplus/persistence/persistent_shortcuts.hpp +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef STLPLUS_PERSISTENT_SHORTCUTS -#define STLPLUS_PERSISTENT_SHORTCUTS -//////////////////////////////////////////////////////////////////////////////// - -// Author: Andy Rushton -// Copyright: (c) Southampton University 1999-2004 -// (c) Andy Rushton 2004-2009 -// License: BSD License, see ../docs/license.html - -// Short-cut functions for dumping and restoring to common targets. These do -// the whole dump operation in a single function call. - -// They take as their second template argument a dump or restore functor which -// is then called to perform the dump/restore operation. - -// They use an installer callback function to install any polymorphic type -// handlers required prior to performing the dump/restore. If there are no -// polymorphic types used in the data structure, then the callback can be set -// to null (i.e. 0). - -//////////////////////////////////////////////////////////////////////////////// -#include "persistence_fixes.hpp" -#include "persistent_contexts.hpp" - -//////////////////////////////////////////////////////////////////////////////// - -namespace stlplus -{ - - //////////////////////////////////////////////////////////////////////////////// - // arbitrary IOStream device - // must be in binary mode - - template - void dump_to_device(const T& source, std::ostream& result, D dump_fn, dump_context::installer installer) - throw(persistent_dump_failed); - - template - void restore_from_device(std::istream& source, T& result, R restore_fn, restore_context::installer installer) - throw(persistent_restore_failed); - - //////////////////////////////////////////////////////////////////////////////// - // string IO device - - template - void dump_to_string(const T& source, std::string& result, D dump_fn, dump_context::installer installer) - throw(persistent_dump_failed); - - template - void restore_from_string(const std::string& source, T& result, R restore_fn, restore_context::installer installer) - throw(persistent_restore_failed); - - //////////////////////////////////////////////////////////////////////////////// - // file IO device - - template - void dump_to_file(const T& source, const std::string& filename, D dump_fn, dump_context::installer installer) - throw(persistent_dump_failed); - - template - void restore_from_file(const std::string& filename, T& result, R restore_fn, restore_context::installer installer) - throw(persistent_restore_failed); - - //////////////////////////////////////////////////////////////////////////////// - -} // end namespace stlplus - - //////////////////////////////////////////////////////////////////////////////// -#include "persistent_shortcuts.tpp" -#endif