aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/parser/non-validating/number.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-02-24 15:16:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-02-24 15:16:26 +0200
commit707cc94fe52463870a9c6c8e2e66eaaa389e601d (patch)
tree13e10ff28bf4455d915f9d59b401bdbb62a393cb /libxsde/xsde/cxx/parser/non-validating/number.hxx
Start tracking XSD/e with git after version 3.0.03.0.0
Diffstat (limited to 'libxsde/xsde/cxx/parser/non-validating/number.hxx')
-rw-r--r--libxsde/xsde/cxx/parser/non-validating/number.hxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/parser/non-validating/number.hxx b/libxsde/xsde/cxx/parser/non-validating/number.hxx
new file mode 100644
index 0000000..793f9b9
--- /dev/null
+++ b/libxsde/xsde/cxx/parser/non-validating/number.hxx
@@ -0,0 +1,37 @@
+// file : xsde/cxx/parser/non-validating/number.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef XSDE_CXX_PARSER_NON_VALIDATING_NUMBER_HXX
+#define XSDE_CXX_PARSER_NON_VALIDATING_NUMBER_HXX
+
+#include <stddef.h> // size_t
+
+#include <xsde/cxx/ro-string.hxx>
+
+namespace xsde
+{
+ namespace cxx
+ {
+ namespace parser
+ {
+ namespace non_validating
+ {
+ class number
+ {
+ protected:
+ void
+ parse (const ro_string&, char* str, size_t max);
+
+ protected:
+ size_t size_;
+ enum {leading_ws, sign, leading_zeros, literal, trailing_ws} state_;
+ enum {none, plus, minus} sign_;
+ };
+ }
+ }
+ }
+}
+
+#endif // XSDE_CXX_PARSER_NON_VALIDATING_NUMBER_HXX