aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libxsd/xsd/cxx/tree/elements.hxx13
-rw-r--r--libxsd/xsd/cxx/tree/elements.ixx16
-rw-r--r--xsd/cxx/tree/default-value.cxx8
-rw-r--r--xsd/cxx/tree/default-value.hxx6
4 files changed, 37 insertions, 6 deletions
diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx
index ab96860..8705c20 100644
--- a/libxsd/xsd/cxx/tree/elements.hxx
+++ b/libxsd/xsd/cxx/tree/elements.hxx
@@ -284,10 +284,15 @@ namespace xsd
/**
* @brief Default constructor.
*/
- _type ()
- : container_ (0)
- {
- }
+ _type ();
+
+ /**
+ * @brief Create an instance from a string.
+ *
+ * @param s A string to initialize the instance with.
+ */
+ template <typename C>
+ _type (const C* s);
public:
/**
diff --git a/libxsd/xsd/cxx/tree/elements.ixx b/libxsd/xsd/cxx/tree/elements.ixx
index f1c4b3d..f86cbcc 100644
--- a/libxsd/xsd/cxx/tree/elements.ixx
+++ b/libxsd/xsd/cxx/tree/elements.ixx
@@ -9,6 +9,22 @@ namespace xsd
{
namespace tree
{
+ // type
+ //
+
+ inline _type::
+ _type ()
+ : container_ (0)
+ {
+ }
+
+ template <typename C>
+ inline _type::
+ _type (const C*)
+ : container_ (0)
+ {
+ }
+
// simple_type
//
diff --git a/xsd/cxx/tree/default-value.cxx b/xsd/cxx/tree/default-value.cxx
index d6e83d8..6ac5f5c 100644
--- a/xsd/cxx/tree/default-value.cxx
+++ b/xsd/cxx/tree/default-value.cxx
@@ -460,9 +460,15 @@ namespace CXX
Traversal::NodeBase::dispatch (ultimate_base (c));
}
- // anySimpleType.
+ // anyType & anySimpleType.
//
Void InitValue::
+ traverse (SemanticGraph::AnyType& t)
+ {
+ os << fq_name (t) << " (" << strlit (value_) << ")";
+ }
+
+ Void InitValue::
traverse (SemanticGraph::AnySimpleType& t)
{
os << fq_name (t) << " (" << strlit (value_) << ")";
diff --git a/xsd/cxx/tree/default-value.hxx b/xsd/cxx/tree/default-value.hxx
index 0384a30..cd3d0f2 100644
--- a/xsd/cxx/tree/default-value.hxx
+++ b/xsd/cxx/tree/default-value.hxx
@@ -178,6 +178,7 @@ namespace CXX
Traversal::Union,
Traversal::Complex,
+ Traversal::AnyType,
Traversal::AnySimpleType,
Traversal::Fundamental::String,
@@ -236,9 +237,12 @@ namespace CXX
virtual Void
traverse (SemanticGraph::Complex&);
- // anySimpleType.
+ // anyType & anySimpleType.
//
virtual Void
+ traverse (SemanticGraph::AnyType&);
+
+ virtual Void
traverse (SemanticGraph::AnySimpleType&);
// Strings.