aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/serializer/non-validating/token.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsde/xsde/cxx/serializer/non-validating/token.cxx')
-rw-r--r--libxsde/xsde/cxx/serializer/non-validating/token.cxx43
1 files changed, 43 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/serializer/non-validating/token.cxx b/libxsde/xsde/cxx/serializer/non-validating/token.cxx
new file mode 100644
index 0000000..e2bfd0e
--- /dev/null
+++ b/libxsde/xsde/cxx/serializer/non-validating/token.cxx
@@ -0,0 +1,43 @@
+// file : xsde/cxx/serializer/non-validating/token.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <xsde/cxx/serializer/non-validating/token.hxx>
+
+namespace xsde
+{
+ namespace cxx
+ {
+ namespace serializer
+ {
+ namespace non_validating
+ {
+ token_simpl::
+ ~token_simpl ()
+ {
+ if (free_)
+ delete[] const_cast<char*> (value_);
+ }
+
+ void token_simpl::
+ pre (const char* value)
+ {
+ value_ = value;
+ }
+
+ void token_simpl::
+ _serialize_content ()
+ {
+ _characters (value_);
+
+ if (free_)
+ {
+ delete[] const_cast<char*> (value_);
+ value_ = 0;
+ }
+ }
+ }
+ }
+ }
+}