aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/hybrid/base.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-10-07 14:48:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-10-07 14:48:13 +0200
commit4f38adc11ab1a3a1ab2dd3f958c917182be7d71f (patch)
treefd4242b2fb5648536a6307a18442abfcaf280573 /libxsde/xsde/cxx/hybrid/base.hxx
parent0baca4b033509b6c4ebfabfb74bf6518c3b1182c (diff)
Implement generation of clone functions
New test: clone.
Diffstat (limited to 'libxsde/xsde/cxx/hybrid/base.hxx')
-rw-r--r--libxsde/xsde/cxx/hybrid/base.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/hybrid/base.hxx b/libxsde/xsde/cxx/hybrid/base.hxx
index 89431a2..a7b1e2a 100644
--- a/libxsde/xsde/cxx/hybrid/base.hxx
+++ b/libxsde/xsde/cxx/hybrid/base.hxx
@@ -10,6 +10,7 @@
#ifndef XSDE_STL
# include <string.h> // strcmp
+# include <xsde/cxx/strdupx.hxx>
#endif
#ifdef XSDE_CUSTOM_ALLOCATOR
@@ -599,6 +600,26 @@ namespace xsde
string_base& operator= (char* x) {base_value (x); return *this;}
+#ifndef XSDE_EXCEPTIONS
+ bool
+#else
+ void
+#endif
+ _copy (string_base& c) const
+ {
+ char* x = strdupx (x_);
+
+#ifndef XSDE_EXCEPTIONS
+ if (x == 0)
+ return false;
+#endif
+ c.base_value (x);
+
+#ifndef XSDE_EXCEPTIONS
+ return true;
+#endif
+ }
+
protected:
char* x_;
};