1 #ifndef STLPLUS_PERSISTENT_SIMPLE_PTR
2 #define STLPLUS_PERSISTENT_SIMPLE_PTR
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 of STLplus simple_ptr
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "persistence_fixes.hpp"
14 #include "persistent_contexts.hpp"
15 #include "simple_ptr.hpp"
17 ////////////////////////////////////////////////////////////////////////////////
22 // simple_ptr - uses dump/restore_pointer on the contents
24 template<typename T
, typename DE
>
25 void dump_simple_ptr(dump_context
&, const simple_ptr
<T
>& data
, DE dump_element
)
26 throw(persistent_dump_failed
);
28 template<typename T
, typename RE
>
29 void restore_simple_ptr(restore_context
&, simple_ptr
<T
>& data
, RE restore_element
)
30 throw(persistent_restore_failed
);
32 // simple_ptr_clone using the polymorphic callback approach - uses dump/restore_callback on the contents
35 void dump_simple_ptr_clone_callback(dump_context
&, const simple_ptr_clone
<T
>& data
)
36 throw(persistent_dump_failed
);
39 void restore_simple_ptr_clone_callback(restore_context
&, simple_ptr_clone
<T
>& data
)
40 throw(persistent_restore_failed
);
42 // simple_ptr_clone using the interface approach - uses dump/restore_interface on the contents
45 void dump_simple_ptr_clone_interface(dump_context
&, const simple_ptr_clone
<T
>& data
)
46 throw(persistent_dump_failed
);
49 void restore_simple_ptr_clone_interface(restore_context
&, simple_ptr_clone
<T
>& data
)
50 throw(persistent_restore_failed
);
52 // simple_ptr_nocopy is not made persistent because if it is uncopyable, it must be undumpable
54 } // end namespace stlplus
56 ////////////////////////////////////////////////////////////////////////////////
57 #include "persistent_simple_ptr.tpp"