1 #ifndef STLPLUS_PERSISTENT_STRING
2 #define STLPLUS_PERSISTENT_STRING
3 ////////////////////////////////////////////////////////////////////////////////
5 // Author: Andy Rushton
6 // Copyright: (c) Southampton University 1999-2004
7 // (c) Andy Rushton 2004-2009
8 // License: BSD License, see ../docs/license.html
10 // Persistence for STL strings
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "persistence_fixes.hpp"
14 #include "persistent_contexts.hpp"
17 ////////////////////////////////////////////////////////////////////////////////
24 template<typename charT
, typename traits
, typename allocator
, typename D
>
25 void dump_basic_string(dump_context
&, const std::basic_string
<charT
,traits
,allocator
>& data
, D dump_fn
)
26 throw(persistent_dump_failed
);
28 template<typename charT
, typename traits
, typename allocator
, typename R
>
29 void restore_basic_string(restore_context
&, std::basic_string
<charT
,traits
,allocator
>& data
, R restore_fn
)
30 throw(persistent_restore_failed
);
34 void dump_string(dump_context
&, const std::string
& data
)
35 throw(persistent_dump_failed
);
37 void restore_string(restore_context
&, std::string
& data
)
38 throw(persistent_restore_failed
);
41 // Note: persistence of wstring not supported because it is too weakly defined and messy
42 // decide on a byte-wide encoding of wide strings (e.g. UTF8) and use the string persistence on that
44 } // end namespace stlplus
46 ////////////////////////////////////////////////////////////////////////////////
47 #include "persistent_string.tpp"