aboutsummaryrefslogtreecommitdiff
path: root/xsd-frontend/semantic-graph
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-frontend/semantic-graph')
-rw-r--r--xsd-frontend/semantic-graph/elements.hxx55
-rw-r--r--xsd-frontend/semantic-graph/union.cxx2
-rw-r--r--xsd-frontend/semantic-graph/union.hxx2
3 files changed, 52 insertions, 7 deletions
diff --git a/xsd-frontend/semantic-graph/elements.hxx b/xsd-frontend/semantic-graph/elements.hxx
index 58779fa..3d8991e 100644
--- a/xsd-frontend/semantic-graph/elements.hxx
+++ b/xsd-frontend/semantic-graph/elements.hxx
@@ -1081,26 +1081,71 @@ namespace XSDFrontend
class Specialization: public virtual Type
{
+ typedef
+ Cult::Containers::Vector<Arguments*>
+ Argumented;
+
public:
+ typedef
+ Bits::PointerIterator<Argumented::Iterator>
+ ArgumentedIterator;
+
+ typedef
+ Bits::PointerIterator<Argumented::ConstIterator>
+ ArgumentedConstIterator;
+
+ ArgumentedIterator
+ argumented_begin ()
+ {
+ return argumented_.begin ();
+ }
+
+ ArgumentedConstIterator
+ argumented_begin () const
+ {
+ return argumented_.begin ();
+ }
+
+ ArgumentedIterator
+ argumented_end ()
+ {
+ return argumented_.end ();
+ }
+
+ ArgumentedConstIterator
+ argumented_end () const
+ {
+ return argumented_.end ();
+ }
+
+ // Shortcut for one-argument specializations.
+ //
Arguments&
argumented () const
{
- return *argumented_;
+ return *argumented_[0];
}
protected:
friend class Bits::Graph<Node, Edge>;
- void
+ using Type::add_edge_right;
+
+ Void
add_edge_right (Arguments& a)
{
- argumented_ = &a;
+ argumented_.push_back (&a);
}
- using Type::add_edge_right;
+ public:
+ Void
+ add_edge_right (Arguments& a, ArgumentedIterator const& pos)
+ {
+ argumented_.insert (pos.base (), &a);
+ }
private:
- Arguments* argumented_;
+ Argumented argumented_;
};
diff --git a/xsd-frontend/semantic-graph/union.cxx b/xsd-frontend/semantic-graph/union.cxx
index 44f2ed3..b4b4cf0 100644
--- a/xsd-frontend/semantic-graph/union.cxx
+++ b/xsd-frontend/semantic-graph/union.cxx
@@ -21,7 +21,7 @@ namespace XSDFrontend
UnionInit ()
{
TypeInfo ti (typeid (Union));
- ti.add_base (Access::public_, true, typeid (Type));
+ ti.add_base (Access::public_, true, typeid (Specialization));
RTTI::insert (ti);
}
diff --git a/xsd-frontend/semantic-graph/union.hxx b/xsd-frontend/semantic-graph/union.hxx
index 42115d6..62df730 100644
--- a/xsd-frontend/semantic-graph/union.hxx
+++ b/xsd-frontend/semantic-graph/union.hxx
@@ -12,7 +12,7 @@ namespace XSDFrontend
{
namespace SemanticGraph
{
- class Union: public virtual Type
+ class Union: public virtual Specialization
{
protected:
friend class Bits::Graph<Node, Edge>;