aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/serializer/non-validating/float.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsde/xsde/cxx/serializer/non-validating/float.hxx')
-rw-r--r--libxsde/xsde/cxx/serializer/non-validating/float.hxx60
1 files changed, 60 insertions, 0 deletions
diff --git a/libxsde/xsde/cxx/serializer/non-validating/float.hxx b/libxsde/xsde/cxx/serializer/non-validating/float.hxx
new file mode 100644
index 0000000..d3da48f
--- /dev/null
+++ b/libxsde/xsde/cxx/serializer/non-validating/float.hxx
@@ -0,0 +1,60 @@
+// file : xsde/cxx/serializer/non-validating/float.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_SERIALIZER_NON_VALIDATING_FLOAT_HXX
+#define XSDE_CXX_SERIALIZER_NON_VALIDATING_FLOAT_HXX
+
+#include <float.h>
+
+#include <xsde/cxx/serializer/non-validating/xml-schema-sskel.hxx>
+
+namespace xsde
+{
+ namespace cxx
+ {
+ namespace serializer
+ {
+ namespace non_validating
+ {
+#ifdef XSDE_REUSE_STYLE_MIXIN
+ struct float_simpl: virtual float_sskel
+#else
+ struct float_simpl: float_sskel
+#endif
+ {
+ enum notation
+ {
+ notation_auto,
+ notation_fixed,
+ notation_scientific
+ };
+
+#ifdef FLT_DIG
+ float_simpl (notation = notation_auto,
+ unsigned int precision = FLT_DIG);
+#else
+ float_simpl (notation = notation_auto,
+ unsigned int precision = 6)
+#endif
+
+ virtual void
+ pre (float);
+
+ virtual void
+ _serialize_content ();
+
+ protected:
+ notation notation_;
+ unsigned int precision_;
+ float value_;
+ };
+ }
+ }
+ }
+}
+
+#include <xsde/cxx/serializer/non-validating/float.ixx>
+
+#endif // XSDE_CXX_SERIALIZER_NON_VALIDATING_FLOAT_HXX