diff options
Diffstat (limited to 'libxsde/xsde/cxx/serializer/non-validating/normalized-string.cxx')
-rw-r--r-- | libxsde/xsde/cxx/serializer/non-validating/normalized-string.cxx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/serializer/non-validating/normalized-string.cxx b/libxsde/xsde/cxx/serializer/non-validating/normalized-string.cxx new file mode 100644 index 0000000..fd69cec --- /dev/null +++ b/libxsde/xsde/cxx/serializer/non-validating/normalized-string.cxx @@ -0,0 +1,44 @@ +// file : xsde/cxx/serializer/non-validating/normalized-string.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/normalized-string.hxx> + +namespace xsde +{ + namespace cxx + { + namespace serializer + { + namespace non_validating + { + normalized_string_simpl:: + ~normalized_string_simpl () + { + if (free_) + delete[] const_cast<char*> (value_); + } + + void normalized_string_simpl:: + pre (const char* value) + { + value_ = value; + } + + void normalized_string_simpl:: + _serialize_content () + { + _characters (value_); + + if (free_) + { + delete[] const_cast<char*> (value_); + value_ = 0; + } + } + } + } + } +} + |