aboutsummaryrefslogtreecommitdiff
path: root/xsd/cxx/tree/elements.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-01-08 14:49:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-01-08 14:49:11 +0200
commit3f8c237b1abe02df8147170f2fc037edc3f384db (patch)
tree2531f2fddd4cadaab27cd37eb37ebcac3481acec /xsd/cxx/tree/elements.cxx
parent0153d99ab976ac88f432099ddfe840e15d4f6a8e (diff)
Add support for default/fixed values of QName type
Diffstat (limited to 'xsd/cxx/tree/elements.cxx')
-rw-r--r--xsd/cxx/tree/elements.cxx29
1 files changed, 5 insertions, 24 deletions
diff --git a/xsd/cxx/tree/elements.cxx b/xsd/cxx/tree/elements.cxx
index 599fc27..d9615ac 100644
--- a/xsd/cxx/tree/elements.cxx
+++ b/xsd/cxx/tree/elements.cxx
@@ -471,25 +471,6 @@ namespace CXX
return false;
}
- Boolean Context::
- is_qname (SemanticGraph::Type& t)
- {
- using SemanticGraph::Complex;
- using SemanticGraph::Fundamental::QName;
-
- if (t.is_a<QName> ())
- return true;
-
- if (Complex* c = dynamic_cast<Complex*> (&t))
- {
- if (c->inherits_p () && ultimate_base (*c).is_a<QName> ())
- return true;
- }
-
- return false;
- }
-
-
Void Context::
write_annotation (SemanticGraph::Annotation& a)
{
@@ -658,7 +639,7 @@ namespace CXX
Void GenerateDefaultCtor::
traverse (SemanticGraph::Attribute& a)
{
- if (min (a) == 1 && !(a.fixed () && !is_qname (a.type ())))
+ if (min (a) == 1 && !a.fixed ())
generate_ = true;
}
@@ -713,7 +694,7 @@ namespace CXX
Void GenerateFromBaseCtor::Traverser::
traverse (SemanticGraph::Attribute& a)
{
- if (min (a) == 1 && !(a.fixed () && !is_qname (a.type ())))
+ if (min (a) == 1 && !a.fixed ())
generate_ = true;
}
@@ -857,7 +838,7 @@ namespace CXX
// default or required fixed values here. Instead we are
// going to default-initialize them.
//
- if (min (a) == 1 && !(a.fixed () && !is_qname (a.type ())))
+ if (min (a) == 1 && !a.fixed ())
{
String const& name (ename (a));
@@ -993,7 +974,7 @@ namespace CXX
// default or required fixed values here. Instead we are
// going to default-initialize them.
//
- if (min (a) == 1 && !(a.fixed () && !is_qname (a.type ())))
+ if (min (a) == 1 && !a.fixed ())
{
os << comma () << "const " << etype (a) << "&";
@@ -1085,7 +1066,7 @@ namespace CXX
// default or required fixed values here. Instead we are
// going to default-initialize them.
//
- if (min (a) == 1 && !(a.fixed () && !is_qname (a.type ())))
+ if (min (a) == 1 && !a.fixed ())
{
os << comma () << "const " << etype (a) << "&";