]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/persistence/persistent_cstring.hpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / persistence / persistent_cstring.hpp
diff --git a/src/stlplus/persistence/persistent_cstring.hpp b/src/stlplus/persistence/persistent_cstring.hpp
new file mode 100644 (file)
index 0000000..8e3e94a
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef STLPLUS_PERSISTENT_CSTRING\r
+#define STLPLUS_PERSISTENT_CSTRING\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 C-style char* strings\r
+\r
+//   These are handled differently to other pointer types\r
+\r
+//   Warning! This means that pointers to char cannot be supported, since there\r
+//   is no type difference between a pointer to char and a C-style array of char.\r
+\r
+//   Warning! The restore deletes any old value of the data parameter and\r
+//   allocates a new char* which is (just) big enough and assigns it to the data\r
+//   field. This is because there is no way of knowing how long a char* is so\r
+//   the passed parameter is not safe to use. The allocation is done using\r
+//   standard new. If the data field is non-null on entry it will be deleted by\r
+//   standard delete. Best to make it null in the first place.\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+#include "persistence_fixes.hpp"\r
+#include "persistent_contexts.hpp"\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+namespace stlplus\r
+{\r
+\r
+  void dump_cstring(dump_context&, const char* data) throw(persistent_dump_failed);\r
+  void restore_cstring(restore_context&, char*& data) throw(persistent_restore_failed);\r
+\r
+} // end namespace stlplus\r
+\r
+  ////////////////////////////////////////////////////////////////////////////////\r
+#endif\r
This page took 0.021535 seconds and 4 git commands to generate.