From 707cc94fe52463870a9c6c8e2e66eaaa389e601d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 24 Feb 2009 15:16:26 +0200 Subject: Start tracking XSD/e with git after version 3.0.0 --- .../xsde/cxx/parser/validating/unsigned-short.hxx | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 libxsde/xsde/cxx/parser/validating/unsigned-short.hxx (limited to 'libxsde/xsde/cxx/parser/validating/unsigned-short.hxx') diff --git a/libxsde/xsde/cxx/parser/validating/unsigned-short.hxx b/libxsde/xsde/cxx/parser/validating/unsigned-short.hxx new file mode 100644 index 0000000..be7228a --- /dev/null +++ b/libxsde/xsde/cxx/parser/validating/unsigned-short.hxx @@ -0,0 +1,52 @@ +// file : xsde/cxx/parser/validating/unsigned-short.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSDE_CXX_PARSER_VALIDATING_UNSIGNED_SHORT_HXX +#define XSDE_CXX_PARSER_VALIDATING_UNSIGNED_SHORT_HXX + +#include +#include + +namespace xsde +{ + namespace cxx + { + namespace parser + { + namespace validating + { + // 16-bit unsigned integer + // +#ifdef XSDE_REUSE_STYLE_MIXIN + struct unsigned_short_pimpl: virtual unsigned_short_pskel, number +#else + struct unsigned_short_pimpl: unsigned_short_pskel, number +#endif + { + virtual void + _pre (); + + virtual void + _characters (const ro_string&); + + virtual void + _post (); + + virtual unsigned short + post_unsigned_short (); + + protected: + // We only need strlen("065535") + 1 characters to hold all valid + // and trimmed string representations of unsigned short. + // + char str_[7]; + unsigned short value_; + }; + } + } + } +} + +#endif // XSDE_CXX_PARSER_VALIDATING_UNSIGNED_SHORT_HXX -- cgit v1.1