X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fpersistence%2Fpersistent_string.hpp;fp=src%2Fstlplus%2Fpersistence%2Fpersistent_string.hpp;h=ff065c711554ef948bd9135a0fdcf9c9cb98255a;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hp=0000000000000000000000000000000000000000;hpb=85783316365181491a3e3c0c63659972477cebba;p=chaz%2Fyoink diff --git a/src/stlplus/persistence/persistent_string.hpp b/src/stlplus/persistence/persistent_string.hpp new file mode 100644 index 0000000..ff065c7 --- /dev/null +++ b/src/stlplus/persistence/persistent_string.hpp @@ -0,0 +1,48 @@ +#ifndef STLPLUS_PERSISTENT_STRING +#define STLPLUS_PERSISTENT_STRING +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +// Persistence for STL strings + +//////////////////////////////////////////////////////////////////////////////// +#include "persistence_fixes.hpp" +#include "persistent_contexts.hpp" +#include + +//////////////////////////////////////////////////////////////////////////////// + +namespace stlplus +{ + + // basic_string + + template + void dump_basic_string(dump_context&, const std::basic_string& data, D dump_fn) + throw(persistent_dump_failed); + + template + void restore_basic_string(restore_context&, std::basic_string& data, R restore_fn) + throw(persistent_restore_failed); + + // string + + void dump_string(dump_context&, const std::string& data) + throw(persistent_dump_failed); + + void restore_string(restore_context&, std::string& data) + throw(persistent_restore_failed); + + + // Note: persistence of wstring not supported because it is too weakly defined and messy + // decide on a byte-wide encoding of wide strings (e.g. UTF8) and use the string persistence on that + +} // end namespace stlplus + + //////////////////////////////////////////////////////////////////////////////// +#include "persistent_string.tpp" +#endif