aboutsummaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/tree
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-02-08 15:54:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-02-08 15:54:12 +0200
commit65cfe4bb8b504749a4d199b258f5f5254a08ed64 (patch)
treedbb05ed29c955aa8580438ca503d0360df9c9e32 /libxsd/xsd/cxx/tree
parent1381dc5688ce16369c2153ac554b9f75511fe670 (diff)
Add support for default values of anySimpleType type
Diffstat (limited to 'libxsd/xsd/cxx/tree')
-rw-r--r--libxsd/xsd/cxx/tree/elements.hxx13
-rw-r--r--libxsd/xsd/cxx/tree/elements.ixx29
2 files changed, 39 insertions, 3 deletions
diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx
index 7489872..403fdb3 100644
--- a/libxsd/xsd/cxx/tree/elements.hxx
+++ b/libxsd/xsd/cxx/tree/elements.hxx
@@ -982,9 +982,15 @@ namespace xsd
/**
* @brief Default constructor.
*/
- simple_type ()
- {
- }
+ simple_type ();
+
+ /**
+ * @brief Create an instance from a string.
+ *
+ * @param s A string to initialize the instance with.
+ */
+ template <typename C>
+ simple_type (const C* s);
public:
/**
@@ -1478,6 +1484,7 @@ namespace xsd
}
}
+#include <xsd/cxx/tree/elements.ixx>
#include <xsd/cxx/tree/elements.txx>
#endif // XSD_CXX_TREE_ELEMENTS_HXX
diff --git a/libxsd/xsd/cxx/tree/elements.ixx b/libxsd/xsd/cxx/tree/elements.ixx
new file mode 100644
index 0000000..e4dd60a
--- /dev/null
+++ b/libxsd/xsd/cxx/tree/elements.ixx
@@ -0,0 +1,29 @@
+// file : xsd/cxx/tree/elements.ixx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+namespace xsd
+{
+ namespace cxx
+ {
+ namespace tree
+ {
+ // simple_type
+ //
+
+ template <typename B>
+ inline simple_type<B>::
+ simple_type ()
+ {
+ }
+
+ template <typename B>
+ template <typename C>
+ inline simple_type<B>::
+ simple_type (const C*)
+ {
+ }
+ }
+ }
+}