]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/persistence/persistent_smart_ptr.hpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / persistence / persistent_smart_ptr.hpp
diff --git a/src/stlplus/persistence/persistent_smart_ptr.hpp b/src/stlplus/persistence/persistent_smart_ptr.hpp
new file mode 100644 (file)
index 0000000..5f37725
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef STLPLUS_PERSISTENT_SMART_PTR\r
+#define STLPLUS_PERSISTENT_SMART_PTR\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+//   Author:    Andy Rushton\r
+//   Copyright: (c) Southampton University 1999-2004\r
+//              (c) Andy Rushton           2004-2009\r
+//   License:   BSD License, see ../docs/license.html\r
+\r
+//   Persistence of STLplus smart_ptr\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+#include "persistence_fixes.hpp"\r
+#include "persistent_contexts.hpp"\r
+#include "smart_ptr.hpp"\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+namespace stlplus\r
+{\r
+\r
+  // smart_ptr - uses dump/restore_pointer on the contents\r
+\r
+  template<typename T, typename DE>\r
+  void dump_smart_ptr(dump_context&, const smart_ptr<T>& data, DE dump_element)\r
+    throw(persistent_dump_failed);\r
+\r
+  template<typename T, typename RE>\r
+  void restore_smart_ptr(restore_context&, smart_ptr<T>& data, RE restore_element)\r
+    throw(persistent_restore_failed);\r
+\r
+  // smart_ptr_clone using the polymorphic callback approach - uses dump/restore_callback on the contents\r
+\r
+  template<typename T>\r
+  void dump_smart_ptr_clone_callback(dump_context&, const smart_ptr_clone<T>& data)\r
+    throw(persistent_dump_failed);\r
+\r
+  template<typename T>\r
+  void restore_smart_ptr_clone_callback(restore_context&, smart_ptr_clone<T>& data)\r
+    throw(persistent_restore_failed);\r
+\r
+  // smart_ptr_clone using the interface approach - uses dump/restore_interface on the contents\r
+\r
+  template<typename T>\r
+  void dump_smart_ptr_clone_interface(dump_context&, const smart_ptr_clone<T>& data)\r
+    throw(persistent_dump_failed);\r
+\r
+  template<typename T>\r
+  void restore_smart_ptr_clone_interface(restore_context&, smart_ptr_clone<T>& data)\r
+    throw(persistent_restore_failed);\r
+\r
+  // smart_ptr_nocopy is not made persistent because if it is uncopyable, it must be undumpable\r
+\r
+} // end namespace stlplus\r
+\r
+  ////////////////////////////////////////////////////////////////////////////////\r
+#include "persistent_smart_ptr.tpp"\r
+#endif\r
This page took 0.024018 seconds and 4 git commands to generate.