1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "persistent_int.hpp"
14 ////////////////////////////////////////////////////////////////////////////////
17 template<typename charT, typename traits, typename allocator, typename D>
18 void dump_basic_string(dump_context& context, const std::basic_string<charT,traits,allocator>& data, D dump_fn)
19 throw(persistent_dump_failed)
21 unsigned size = data.size();
22 dump_unsigned(context, size);
23 for (unsigned i = 0; i < size; i++)
30 template<typename charT, typename traits, typename allocator, typename R>
31 void restore_basic_string(restore_context& context, std::basic_string<charT,traits,allocator>& data, R restore_fn)
32 throw(persistent_restore_failed)
36 restore_unsigned(context, size);
37 for (unsigned i = 0; i < size; i++)
40 restore_fn(context,ch);
45 ////////////////////////////////////////////////////////////////////////////////
47 } // end namespace stlplus