aboutsummaryrefslogtreecommitdiff
path: root/xsd-frontend
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-04-15 11:11:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-04-15 11:11:51 +0200
commit8b5538ed49925aaf9fa22e961bd632bed8458184 (patch)
tree3b7be22e7a09c92d9996265e5f0de2cf37294727 /xsd-frontend
parente02660308f271b843226618485e56cf3f3aa22f2 (diff)
Rename annotated() to annotated_p(), add claer_*() to Arguments
Diffstat (limited to 'xsd-frontend')
-rw-r--r--xsd-frontend/parser.cxx16
-rw-r--r--xsd-frontend/semantic-graph/elements.hxx30
-rw-r--r--xsd-frontend/transformations/restriction.cxx2
3 files changed, 37 insertions, 11 deletions
diff --git a/xsd-frontend/parser.cxx b/xsd-frontend/parser.cxx
index b9c76d2..49ab9c0 100644
--- a/xsd-frontend/parser.cxx
+++ b/xsd-frontend/parser.cxx
@@ -495,7 +495,7 @@ namespace XSDFrontend
// Transfer annotation if we haven't already gotten it.
//
- if (!m.annotated () && ref.annotated ())
+ if (!m.annotated_p () && ref.annotated_p ())
s_.new_edge<Annotates> (ref.annotation (), m);
// Type info.
@@ -994,7 +994,7 @@ namespace XSDFrontend
// Copy annotation.
//
- if (c.annotated ())
+ if (c.annotated_p ())
s_.new_edge<Annotates> (c.annotation (), copy);
for (Compositor::ContainsIterator i (c.contains_begin ());
@@ -1033,7 +1033,7 @@ namespace XSDFrontend
// Transfer annotation.
//
- if (a.annotated ())
+ if (a.annotated_p ())
s_.new_edge<Annotates> (a.annotation (), ac);
// Any has no name so we have to come up with a fake one in
@@ -1097,7 +1097,7 @@ namespace XSDFrontend
// Transfer annotation.
//
- if (e.annotated ())
+ if (e.annotated_p ())
s_.new_edge<Annotates> (e.annotation (), copy);
// Belongs edge.
@@ -1171,7 +1171,7 @@ namespace XSDFrontend
// Transfer annotation.
//
- if (p->annotated ())
+ if (p->annotated_p ())
s_.new_edge<Annotates> (p->annotation (), a);
// Belongs edge.
@@ -1195,7 +1195,7 @@ namespace XSDFrontend
// Transfer annotation.
//
- if (p->annotated ())
+ if (p->annotated_p ())
s_.new_edge<Annotates> (p->annotation (), any);
// AnyAttribute has no name so we have to come up with a fake
@@ -3901,7 +3901,7 @@ namespace XSDFrontend
// Transfer annotation if the ref declaration hasn't defined its own.
//
- if (!node.annotated () && prot.annotated ())
+ if (!node.annotated_p () && prot.annotated_p ())
s_->new_edge<Annotates> (prot.annotation (), node);
// Set type information.
@@ -4231,7 +4231,7 @@ namespace XSDFrontend
// Transfer annotation if the ref declaration hasn't defined its own.
//
- if (!node.annotated () && prot.annotated ())
+ if (!node.annotated_p () && prot.annotated_p ())
s_->new_edge<Annotates> (prot.annotation (), node);
// Set type.
diff --git a/xsd-frontend/semantic-graph/elements.hxx b/xsd-frontend/semantic-graph/elements.hxx
index dd397f2..ec425f6 100644
--- a/xsd-frontend/semantic-graph/elements.hxx
+++ b/xsd-frontend/semantic-graph/elements.hxx
@@ -195,11 +195,17 @@ namespace XSDFrontend
public:
Boolean
- annotated () const
+ annotated_p () const
{
return annotates_ != 0;
}
+ Annotates&
+ annotated () const
+ {
+ return *annotates_;
+ }
+
Annotation&
annotation ();
@@ -269,11 +275,17 @@ namespace XSDFrontend
public:
Boolean
- annotated () const
+ annotated_p () const
{
return annotates_ != 0;
}
+ Annotates&
+ annotated () const
+ {
+ return *annotates_;
+ }
+
Annotation&
annotation ();
@@ -1186,11 +1198,25 @@ namespace XSDFrontend
}
void
+ clear_left_node (Type& n)
+ {
+ assert (type_ == &n);
+ type_ = 0;
+ }
+
+ void
set_right_node (Specialization& s)
{
specialization_ = &s;
}
+ void
+ clear_right_node (Specialization& s)
+ {
+ assert (specialization_ == &s);
+ specialization_ = 0;
+ }
+
private:
Type* type_;
Specialization* specialization_;
diff --git a/xsd-frontend/transformations/restriction.cxx b/xsd-frontend/transformations/restriction.cxx
index 2fc3c7a..a7f224b 100644
--- a/xsd-frontend/transformations/restriction.cxx
+++ b/xsd-frontend/transformations/restriction.cxx
@@ -356,7 +356,7 @@ namespace XSDFrontend
// Transfer annotation.
//
- if (prot->annotated ())
+ if (prot->annotated_p ())
schema_.new_edge<Annotates> (prot->annotation (), *a);
}