From 949a9f572341b6cd07690f0b78b1b1941d320055 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 15 Dec 2020 22:23:46 +0300 Subject: Switch to build2 --- xsd-frontend/traversal/any-attribute.hxx | 20 -- xsd-frontend/traversal/any.hxx | 20 -- xsd-frontend/traversal/attribute-group.cxx | 28 -- xsd-frontend/traversal/attribute-group.hxx | 28 -- xsd-frontend/traversal/attribute.cxx | 46 ---- xsd-frontend/traversal/attribute.hxx | 39 --- xsd-frontend/traversal/complex.cxx | 62 ----- xsd-frontend/traversal/complex.hxx | 43 --- xsd-frontend/traversal/compositors.cxx | 163 ------------ xsd-frontend/traversal/compositors.hxx | 134 ---------- xsd-frontend/traversal/element-group.cxx | 41 --- xsd-frontend/traversal/element-group.hxx | 34 --- xsd-frontend/traversal/element.cxx | 46 ---- xsd-frontend/traversal/element.hxx | 37 --- xsd-frontend/traversal/elements.cxx | 75 ------ xsd-frontend/traversal/elements.hxx | 410 ----------------------------- xsd-frontend/traversal/elements.txx | 9 - xsd-frontend/traversal/enumeration.cxx | 89 ------- xsd-frontend/traversal/enumeration.hxx | 58 ---- xsd-frontend/traversal/fundamental.cxx | 11 - xsd-frontend/traversal/fundamental.hxx | 232 ---------------- xsd-frontend/traversal/list.cxx | 46 ---- xsd-frontend/traversal/list.hxx | 37 --- xsd-frontend/traversal/namespace.cxx | 11 - xsd-frontend/traversal/namespace.hxx | 43 --- xsd-frontend/traversal/particle.cxx | 29 -- xsd-frontend/traversal/particle.hxx | 28 -- xsd-frontend/traversal/schema.cxx | 11 - xsd-frontend/traversal/schema.hxx | 148 ----------- xsd-frontend/traversal/union.cxx | 46 ---- xsd-frontend/traversal/union.hxx | 37 --- 31 files changed, 2061 deletions(-) delete mode 100644 xsd-frontend/traversal/any-attribute.hxx delete mode 100644 xsd-frontend/traversal/any.hxx delete mode 100644 xsd-frontend/traversal/attribute-group.cxx delete mode 100644 xsd-frontend/traversal/attribute-group.hxx delete mode 100644 xsd-frontend/traversal/attribute.cxx delete mode 100644 xsd-frontend/traversal/attribute.hxx delete mode 100644 xsd-frontend/traversal/complex.cxx delete mode 100644 xsd-frontend/traversal/complex.hxx delete mode 100644 xsd-frontend/traversal/compositors.cxx delete mode 100644 xsd-frontend/traversal/compositors.hxx delete mode 100644 xsd-frontend/traversal/element-group.cxx delete mode 100644 xsd-frontend/traversal/element-group.hxx delete mode 100644 xsd-frontend/traversal/element.cxx delete mode 100644 xsd-frontend/traversal/element.hxx delete mode 100644 xsd-frontend/traversal/elements.cxx delete mode 100644 xsd-frontend/traversal/elements.hxx delete mode 100644 xsd-frontend/traversal/elements.txx delete mode 100644 xsd-frontend/traversal/enumeration.cxx delete mode 100644 xsd-frontend/traversal/enumeration.hxx delete mode 100644 xsd-frontend/traversal/fundamental.cxx delete mode 100644 xsd-frontend/traversal/fundamental.hxx delete mode 100644 xsd-frontend/traversal/list.cxx delete mode 100644 xsd-frontend/traversal/list.hxx delete mode 100644 xsd-frontend/traversal/namespace.cxx delete mode 100644 xsd-frontend/traversal/namespace.hxx delete mode 100644 xsd-frontend/traversal/particle.cxx delete mode 100644 xsd-frontend/traversal/particle.hxx delete mode 100644 xsd-frontend/traversal/schema.cxx delete mode 100644 xsd-frontend/traversal/schema.hxx delete mode 100644 xsd-frontend/traversal/union.cxx delete mode 100644 xsd-frontend/traversal/union.hxx (limited to 'xsd-frontend/traversal') diff --git a/xsd-frontend/traversal/any-attribute.hxx b/xsd-frontend/traversal/any-attribute.hxx deleted file mode 100644 index 86bc965..0000000 --- a/xsd-frontend/traversal/any-attribute.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// file : xsd-frontend/traversal/any-attribute.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ANY_ATTRIBUTE_HXX -#define XSD_FRONTEND_TRAVERSAL_ANY_ATTRIBUTE_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - typedef - Node - AnyAttribute; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ANY_ATTRIBUTE_HXX diff --git a/xsd-frontend/traversal/any.hxx b/xsd-frontend/traversal/any.hxx deleted file mode 100644 index cd14971..0000000 --- a/xsd-frontend/traversal/any.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// file : xsd-frontend/traversal/any.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ANY_HXX -#define XSD_FRONTEND_TRAVERSAL_ANY_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - typedef - Node - Any; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ANY_HXX diff --git a/xsd-frontend/traversal/attribute-group.cxx b/xsd-frontend/traversal/attribute-group.cxx deleted file mode 100644 index 8d362c2..0000000 --- a/xsd-frontend/traversal/attribute-group.cxx +++ /dev/null @@ -1,28 +0,0 @@ -// file : xsd-frontend/traversal/attribute-group.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void AttributeGroup:: - traverse (Type& g) - { - pre (g); - names (g); - post (g); - } - - void AttributeGroup:: - pre (Type&) - { - } - - void AttributeGroup:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/attribute-group.hxx b/xsd-frontend/traversal/attribute-group.hxx deleted file mode 100644 index f18856c..0000000 --- a/xsd-frontend/traversal/attribute-group.hxx +++ /dev/null @@ -1,28 +0,0 @@ -// file : xsd-frontend/traversal/attribute-group.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ATTRIBUTE_GROUP_HXX -#define XSD_FRONTEND_TRAVERSAL_ATTRIBUTE_GROUP_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct AttributeGroup: ScopeTemplate - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ATTRIBUTE_GROUP_HXX diff --git a/xsd-frontend/traversal/attribute.cxx b/xsd-frontend/traversal/attribute.cxx deleted file mode 100644 index 238f471..0000000 --- a/xsd-frontend/traversal/attribute.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// file : xsd-frontend/traversal/attribute.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void Attribute:: - traverse (Type& a) - { - pre (a); - belongs (a); - name (a); - post (a); - } - - void Attribute:: - pre (Type&) - { - } - - void Attribute:: - belongs (Type& a, EdgeDispatcher& d) - { - d.dispatch (a.belongs ()); - } - - void Attribute:: - belongs (Type& a) - { - belongs (a, *this); - } - - void Attribute:: - name (Type&) - { - } - - void Attribute:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/attribute.hxx b/xsd-frontend/traversal/attribute.hxx deleted file mode 100644 index 23a866f..0000000 --- a/xsd-frontend/traversal/attribute.hxx +++ /dev/null @@ -1,39 +0,0 @@ -// file : xsd-frontend/traversal/attribute.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ATTRIBUTE_HXX -#define XSD_FRONTEND_TRAVERSAL_ATTRIBUTE_HXX - -#include - -#include - - -namespace XSDFrontend -{ - namespace Traversal - { - struct Attribute : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - belongs (Type&, EdgeDispatcher&); - - virtual void - belongs (Type&); - - virtual void - name (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ATTRIBUTE_HXX diff --git a/xsd-frontend/traversal/complex.cxx b/xsd-frontend/traversal/complex.cxx deleted file mode 100644 index 93c145c..0000000 --- a/xsd-frontend/traversal/complex.cxx +++ /dev/null @@ -1,62 +0,0 @@ -// file : xsd-frontend/traversal/complex.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void Complex:: - traverse (Type& c) - { - pre (c); - name (c); - inherits (c); - names (c); - contains_compositor (c); - post (c); - } - - void Complex:: - pre (Type&) - { - } - - void Complex:: - name (Type&) - { - } - - void Complex:: - inherits (Type& c) - { - inherits (c, *this); - } - - void Complex:: - inherits (Type& c, EdgeDispatcher& d) - { - if (c.inherits_p ()) - d.dispatch (c.inherits ()); - } - - void Complex:: - contains_compositor (Type& c) - { - contains_compositor (c, *this); - } - - void Complex:: - contains_compositor (Type& c, EdgeDispatcher& d) - { - if (c.contains_compositor_p ()) - d.dispatch (c.contains_compositor ()); - } - - void Complex:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/complex.hxx b/xsd-frontend/traversal/complex.hxx deleted file mode 100644 index 6a23342..0000000 --- a/xsd-frontend/traversal/complex.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// file : xsd-frontend/traversal/complex.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_COMPLEX_HXX -#define XSD_FRONTEND_TRAVERSAL_COMPLEX_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct Complex : ScopeTemplate - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - name (Type&); - - virtual void - inherits (Type&); - - void - inherits (Type&, EdgeDispatcher&); - - virtual void - contains_compositor (Type&); - - void - contains_compositor (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_COMPLEX_HXX diff --git a/xsd-frontend/traversal/compositors.cxx b/xsd-frontend/traversal/compositors.cxx deleted file mode 100644 index 01566c1..0000000 --- a/xsd-frontend/traversal/compositors.cxx +++ /dev/null @@ -1,163 +0,0 @@ -// file : xsd-frontend/traversal/compositors.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - // ContainsParticle - // - void ContainsParticle:: - traverse (Type& c) - { - dispatch (c.particle ()); - } - - - // ContainsCompositor - // - void ContainsCompositor:: - traverse (Type& c) - { - dispatch (c.compositor ()); - } - - - // Compositor - // - void Compositor:: - traverse (Type& c) - { - pre (c); - contains (c); - post (c); - } - - void Compositor:: - pre (Type&) - { - } - - void Compositor:: - contains (Type& c) - { - iterate_and_dispatch ( - c.contains_begin (), c.contains_end (), edge_traverser ()); - } - - void Compositor:: - contains (Type& c, EdgeDispatcher& d) - { - iterate_and_dispatch (c.contains_begin (), c.contains_end (), d); - } - - void Compositor:: - post (Type&) - { - } - - - // All - // - void All:: - traverse (Type& c) - { - pre (c); - contains (c); - post (c); - } - - void All:: - pre (Type&) - { - } - - void All:: - contains (Type& c) - { - iterate_and_dispatch ( - c.contains_begin (), c.contains_end (), edge_traverser ()); - } - - void All:: - contains (Type& c, EdgeDispatcher& d) - { - iterate_and_dispatch (c.contains_begin (), c.contains_end (), d); - } - - void All:: - post (Type&) - { - } - - - // Choice - // - void Choice:: - traverse (Type& c) - { - pre (c); - contains (c); - post (c); - } - - void Choice:: - pre (Type&) - { - } - - void Choice:: - contains (Type& c) - { - iterate_and_dispatch ( - c.contains_begin (), c.contains_end (), edge_traverser ()); - } - - void Choice:: - contains (Type& c, EdgeDispatcher& d) - { - iterate_and_dispatch (c.contains_begin (), c.contains_end (), d); - } - - void Choice:: - post (Type&) - { - } - - - // Sequence - // - void Sequence:: - traverse (Type& c) - { - pre (c); - contains (c); - post (c); - } - - void Sequence:: - pre (Type&) - { - } - - void Sequence:: - contains (Type& c) - { - iterate_and_dispatch ( - c.contains_begin (), c.contains_end (), edge_traverser ()); - } - - void Sequence:: - contains (Type& c, EdgeDispatcher& d) - { - iterate_and_dispatch (c.contains_begin (), c.contains_end (), d); - } - - void Sequence:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/compositors.hxx b/xsd-frontend/traversal/compositors.hxx deleted file mode 100644 index 16d1632..0000000 --- a/xsd-frontend/traversal/compositors.hxx +++ /dev/null @@ -1,134 +0,0 @@ -// file : xsd-frontend/traversal/compositors.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_COMPOSITORS_HXX -#define XSD_FRONTEND_TRAVERSAL_COMPOSITORS_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - // - // - struct ContainsParticle: Edge - { - ContainsParticle () - { - } - - ContainsParticle (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type&); - }; - - - // - // - struct ContainsCompositor: Edge - { - ContainsCompositor () - { - } - - ContainsCompositor (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type&); - }; - - // - // - struct Compositor : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - contains (Type&); - - virtual void - contains (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - - - // - // - struct All : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - contains (Type&); - - virtual void - contains (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - - - // - // - struct Choice : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - contains (Type&); - - virtual void - contains (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - - - // - // - struct Sequence : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - contains (Type&); - - virtual void - contains (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_COMPOSITORS_HXX diff --git a/xsd-frontend/traversal/element-group.cxx b/xsd-frontend/traversal/element-group.cxx deleted file mode 100644 index c53c097..0000000 --- a/xsd-frontend/traversal/element-group.cxx +++ /dev/null @@ -1,41 +0,0 @@ -// file : xsd-frontend/traversal/element-group.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void ElementGroup:: - traverse (Type& g) - { - pre (g); - names (g); - contains_compositor (g); - post (g); - } - - void ElementGroup:: - pre (Type&) - { - } - - void ElementGroup:: - contains_compositor (Type& g, EdgeDispatcher& d) - { - d.dispatch (g.contains_compositor ()); - } - - void ElementGroup:: - contains_compositor (Type& g) - { - contains_compositor (g, *this); - } - - void ElementGroup:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/element-group.hxx b/xsd-frontend/traversal/element-group.hxx deleted file mode 100644 index 55d6fec..0000000 --- a/xsd-frontend/traversal/element-group.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// file : xsd-frontend/traversal/element-group.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ELEMENT_GROUP_HXX -#define XSD_FRONTEND_TRAVERSAL_ELEMENT_GROUP_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct ElementGroup: ScopeTemplate - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - contains_compositor (Type&); - - virtual void - contains_compositor (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ELEMENT_GROUP_HXX diff --git a/xsd-frontend/traversal/element.cxx b/xsd-frontend/traversal/element.cxx deleted file mode 100644 index d3ac7dd..0000000 --- a/xsd-frontend/traversal/element.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// file : xsd-frontend/traversal/element.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void Element:: - traverse (Type& m) - { - pre (m); - belongs (m); - name (m); - post (m); - } - - void Element:: - pre (Type&) - { - } - - void Element:: - belongs (Type& m, EdgeDispatcher& d) - { - d.dispatch (m.belongs ()); - } - - void Element:: - belongs (Type& m) - { - belongs (m, edge_traverser ()); - } - - void Element:: - name (Type&) - { - } - - void Element:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/element.hxx b/xsd-frontend/traversal/element.hxx deleted file mode 100644 index 4d00e3b..0000000 --- a/xsd-frontend/traversal/element.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// file : xsd-frontend/traversal/element.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ELEMENT_HXX -#define XSD_FRONTEND_TRAVERSAL_ELEMENT_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct Element : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - belongs (Type&, EdgeDispatcher&); - - virtual void - belongs (Type&); - - virtual void - name (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ELEMENT_HXX diff --git a/xsd-frontend/traversal/elements.cxx b/xsd-frontend/traversal/elements.cxx deleted file mode 100644 index b6905d5..0000000 --- a/xsd-frontend/traversal/elements.cxx +++ /dev/null @@ -1,75 +0,0 @@ -// file : xsd-frontend/traversal/elements.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - // Instance - // - void Instance:: - traverse (Type& a) - { - pre (a); - belongs (a); - post (a); - } - - void Instance:: - pre (Type&) - { - } - - void Instance:: - belongs (Type& a, EdgeDispatcher& d) - { - d.dispatch (a.belongs ()); - } - - void Instance:: - belongs (Type& a) - { - belongs (a, edge_traverser ()); - } - - void Instance:: - post (Type&) - { - } - - - // Member - // - void Member:: - traverse (Type& a) - { - pre (a); - belongs (a); - post (a); - } - - void Member:: - pre (Type&) - { - } - - void Member:: - belongs (Type& a, EdgeDispatcher& d) - { - d.dispatch (a.belongs ()); - } - - void Member:: - belongs (Type& a) - { - belongs (a, edge_traverser ()); - } - - void Member:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/elements.hxx b/xsd-frontend/traversal/elements.hxx deleted file mode 100644 index 25cb2f0..0000000 --- a/xsd-frontend/traversal/elements.hxx +++ /dev/null @@ -1,410 +0,0 @@ -// file : xsd-frontend/traversal/elements.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ELEMENTS_HXX -#define XSD_FRONTEND_TRAVERSAL_ELEMENTS_HXX - -#include - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - using namespace cutl; - - typedef compiler::dispatcher NodeDispatcher; - typedef compiler::dispatcher EdgeDispatcher; - - // - // - struct NodeBase: NodeDispatcher, EdgeDispatcher - { - void - edge_traverser (EdgeDispatcher& d) - { - EdgeDispatcher::traverser (d); - } - - EdgeDispatcher& - edge_traverser () - { - return *this; - } - - using NodeDispatcher::dispatch; - using EdgeDispatcher::dispatch; - - using EdgeDispatcher::iterate_and_dispatch; - }; - - struct EdgeBase: EdgeDispatcher, NodeDispatcher - { - void - node_traverser (NodeDispatcher& d) - { - NodeDispatcher::traverser (d); - } - - NodeDispatcher& - node_traverser () - { - return *this; - } - - using EdgeDispatcher::dispatch; - using NodeDispatcher::dispatch; - - using NodeDispatcher::iterate_and_dispatch; - }; - - inline EdgeBase& - operator>> (NodeBase& n, EdgeBase& e) - { - n.edge_traverser (e); - return e; - } - - inline NodeBase& - operator>> (EdgeBase& e, NodeBase& n) - { - e.node_traverser (n); - return n; - } - - // - // - template - struct Node: compiler::traverser_impl, - virtual NodeBase - { - typedef T Type; - }; - - template - struct Edge: compiler::traverser_impl, - virtual EdgeBase - { - typedef T Type; - }; - - // - // Edges - // - - // - // - struct Names : Edge - { - Names () - { - } - - Names (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.named ()); - } - }; - - - // - // - struct Belongs : Edge - { - Belongs () - { - } - - Belongs (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.type ()); - } - }; - - // - // Nodes - // - - // - // - struct Nameable : Node - { - }; - - - // - // - template - struct ScopeTemplate : Node - { - public: - virtual void - traverse (T& s) - { - names (s); - } - - template - void - names (T& s, - EdgeDispatcher& d, - void (X::*pre_) (T&) = (void (ScopeTemplate::*)(T&)) (0), - void (X::*post_) (T&) = (void (ScopeTemplate::*)(T&)) (0), - void (X::*none_) (T&) = (void (ScopeTemplate::*)(T&)) (0), - void (X::*next_) (T&) = (void (ScopeTemplate::*)(T&)) (0)) - { - X* this_ (dynamic_cast (this)); - - typename T::NamesIterator b (s.names_begin ()), e (s.names_end ()); - - if (b != e) - { - if (pre_) - (this_->*pre_) (s); - - //iterate_and_dispatch (b, e, d, *this_, next_, s); - - for (; b != s.names_end ();) - { - d.dispatch (*b); - - if (++b != s.names_end () && next_ != 0) - (this_->*next_) (s); - } - - if (post_) - (this_->*post_) (s); - } - else - { - if (none_) - (this_->*none_) (s); - } - } - - virtual void - names (T& s, EdgeDispatcher& d) - { - names > (s, d); - } - - virtual void - names (T& s) - { - names (s, - *this, - &ScopeTemplate::names_pre, - &ScopeTemplate::names_post, - &ScopeTemplate::names_none, - &ScopeTemplate::names_next); - } - - virtual void - names_pre (T&) - { - } - - virtual void - names_next (T&) - { - } - - virtual void - names_post (T&) - { - } - - virtual void - names_none (T&) - { - } - }; - - - // - // - typedef - ScopeTemplate - Scope; - - - // - // - struct Type : Node - { - virtual void - traverse (SemanticGraph::Type&) = 0; - }; - - - // - // - struct Instance : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - belongs (Type&, EdgeDispatcher&); - - virtual void - belongs (Type&); - - virtual void - post (Type&); - }; - - - // - // - struct Member : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - belongs (Type&, EdgeDispatcher&); - - virtual void - belongs (Type&); - - virtual void - post (Type&); - }; - - - // - // - struct Inherits : Edge - { - Inherits () - { - } - - Inherits (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.base ()); - } - }; - - - // - // - struct Extends : Edge - { - Extends () - { - } - - Extends (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.base ()); - } - }; - - - // - // - struct Restricts : Edge - { - Restricts () - { - } - - Restricts (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.base ()); - } - }; - - - // - // - struct Argumented : Edge - { - Argumented () - { - } - - Argumented (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& a) - { - dispatch (a.type ()); - } - }; - - - /* - // - // - struct Contains : Edge - { - virtual void - traverse (Type& e) - { - dispatch (e.element ()); - } - }; - */ - - // - // - typedef - Node - AnyType; - - - // - // - typedef - Node - AnySimpleType; - } -} - -#include - -#endif // XSD_FRONTEND_TRAVERSAL_ELEMENTS_HXX diff --git a/xsd-frontend/traversal/elements.txx b/xsd-frontend/traversal/elements.txx deleted file mode 100644 index 7d78c6c..0000000 --- a/xsd-frontend/traversal/elements.txx +++ /dev/null @@ -1,9 +0,0 @@ -// file : xsd-frontend/traversal/elements.txx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -namespace XSDFrontend -{ - namespace Traversal - { - } -} diff --git a/xsd-frontend/traversal/enumeration.cxx b/xsd-frontend/traversal/enumeration.cxx deleted file mode 100644 index b7fb398..0000000 --- a/xsd-frontend/traversal/enumeration.cxx +++ /dev/null @@ -1,89 +0,0 @@ -// file : xsd-frontend/traversal/enumeration.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - // Enumeration - // - void Enumeration:: - traverse (Type& e) - { - pre (e); - name (e); - inherits (e); - names (e); - post (e); - } - - void Enumeration:: - pre (Type&) - { - } - - void Enumeration:: - name (Type&) - { - } - - void Enumeration:: - inherits (Type& e) - { - inherits (e, *this); - } - - void Enumeration:: - inherits (Type& e, EdgeDispatcher& d) - { - if (e.inherits_p ()) - d.dispatch (e.inherits ()); - } - - void Enumeration:: - post (Type&) - { - } - - - // Enumerator - // - void Enumerator:: - traverse (Type& e) - { - pre (e); - belongs (e); - name (e); - post (e); - } - - void Enumerator:: - pre (Type&) - { - } - - void Enumerator:: - belongs (Type& e, EdgeDispatcher& d) - { - d.dispatch (e.belongs ()); - } - - void Enumerator:: - belongs (Type& e) - { - belongs (e, edge_traverser ()); - } - - void Enumerator:: - name (Type&) - { - } - - void Enumerator:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/enumeration.hxx b/xsd-frontend/traversal/enumeration.hxx deleted file mode 100644 index 8f1e58b..0000000 --- a/xsd-frontend/traversal/enumeration.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// file : xsd-frontend/traversal/enumeration.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_ENUMERATION_HXX -#define XSD_FRONTEND_TRAVERSAL_ENUMERATION_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct Enumeration : ScopeTemplate - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - name (Type&); - - virtual void - inherits (Type&); - - void - inherits (Type&, EdgeDispatcher&); - - virtual void - post (Type&); - }; - - struct Enumerator : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - belongs (Type&, EdgeDispatcher&); - - virtual void - belongs (Type&); - - virtual void - name (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_ENUMERATION_HXX diff --git a/xsd-frontend/traversal/fundamental.cxx b/xsd-frontend/traversal/fundamental.cxx deleted file mode 100644 index d3e7e3e..0000000 --- a/xsd-frontend/traversal/fundamental.cxx +++ /dev/null @@ -1,11 +0,0 @@ -// file : xsd-frontend/traversal/fundamental.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - } -} diff --git a/xsd-frontend/traversal/fundamental.hxx b/xsd-frontend/traversal/fundamental.hxx deleted file mode 100644 index 9d9f98a..0000000 --- a/xsd-frontend/traversal/fundamental.hxx +++ /dev/null @@ -1,232 +0,0 @@ -// file : xsd-frontend/traversal/fundamental.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_FUNDAMENTAL_HXX -#define XSD_FRONTEND_TRAVERSAL_FUNDAMENTAL_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - namespace Fundamental - { - typedef - Node - Type; - - // Integers. - // - typedef - Node - Byte; - - typedef - Node - UnsignedByte; - - typedef - Node - Short; - - typedef - Node - UnsignedShort; - - typedef - Node - Int; - - typedef - Node - UnsignedInt; - - typedef - Node - Long; - - typedef - Node - UnsignedLong; - - typedef - Node - Integer; - - typedef - Node - NonPositiveInteger; - - typedef - Node - NonNegativeInteger; - - typedef - Node - PositiveInteger; - - typedef - Node - NegativeInteger; - - - // Boolean. - // - typedef - Node - Boolean; - - - // Floats. - // - typedef - Node - Float; - - typedef - Node - Double; - - typedef - Node - Decimal; - - - // Strings. - // - typedef - Node - String; - - typedef - Node - NormalizedString; - - typedef - Node - Token; - - typedef - Node - Name; - - typedef - Node - NameToken; - - typedef - Node - NameTokens; - - typedef - Node - NCName; - - typedef - Node - Language; - - - // Qualified name. - // - typedef - Node - QName; - - - // ID/IDREF. - // - typedef - Node - Id; - - typedef - Node - IdRef; - - typedef - Node - IdRefs; - - - // URI. - // - typedef - Node - AnyURI; - - - // Binary. - // - typedef - Node - Base64Binary; - - typedef - Node - HexBinary; - - - // Date/time. - // - typedef - Node - Date; - - typedef - Node - DateTime; - - typedef - Node - Duration; - - typedef - Node - Day; - - typedef - Node - Month; - - typedef - Node - MonthDay; - - typedef - Node - Year; - - typedef - Node - YearMonth; - - typedef - Node - Time; - - - // Entity. - // - typedef - Node - Entity; - - typedef - Node - Entities; - - - // Notation. - // - typedef - Node - Notation; - } - } -} - - -#endif // XSD_FRONTEND_TRAVERSAL_FUNDAMENTAL_HXX diff --git a/xsd-frontend/traversal/list.cxx b/xsd-frontend/traversal/list.cxx deleted file mode 100644 index 908d0cb..0000000 --- a/xsd-frontend/traversal/list.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// file : xsd-frontend/traversal/list.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void List:: - traverse (Type& l) - { - pre (l); - argumented (l); - name (l); - post (l); - } - - void List:: - pre (Type&) - { - } - - void List:: - argumented (Type& l) - { - argumented (l, *this); - } - - void List:: - argumented (Type& l, EdgeDispatcher& d) - { - d.dispatch (l.argumented ()); - } - - void List:: - name (Type&) - { - } - - void List:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/list.hxx b/xsd-frontend/traversal/list.hxx deleted file mode 100644 index 02bcf5b..0000000 --- a/xsd-frontend/traversal/list.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// file : xsd-frontend/traversal/list.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_LIST_HXX -#define XSD_FRONTEND_TRAVERSAL_LIST_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct List: Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - argumented (Type&); - - virtual void - argumented (Type&, EdgeDispatcher& d); - - virtual void - name (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_LIST_HXX diff --git a/xsd-frontend/traversal/namespace.cxx b/xsd-frontend/traversal/namespace.cxx deleted file mode 100644 index 2eafb93..0000000 --- a/xsd-frontend/traversal/namespace.cxx +++ /dev/null @@ -1,11 +0,0 @@ -// file : xsd-frontend/traversal/namespace.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - } -} diff --git a/xsd-frontend/traversal/namespace.hxx b/xsd-frontend/traversal/namespace.hxx deleted file mode 100644 index 5c1a54f..0000000 --- a/xsd-frontend/traversal/namespace.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// file : xsd-frontend/traversal/namespace.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_NAMESPACE_HXX -#define XSD_FRONTEND_TRAVERSAL_NAMESPACE_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct Namespace: ScopeTemplate - { - virtual void - traverse (Type& m) - { - pre (m); - name (m); - names (m); - post (m); - } - - virtual void - pre (Type&) - { - } - - virtual void - name (Type&) - { - } - - virtual void - post (Type&) - { - } - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_NAMESPACE_HXX diff --git a/xsd-frontend/traversal/particle.cxx b/xsd-frontend/traversal/particle.cxx deleted file mode 100644 index 97784b4..0000000 --- a/xsd-frontend/traversal/particle.cxx +++ /dev/null @@ -1,29 +0,0 @@ -// file : xsd-frontend/traversal/particle.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - // Particle - // - void Particle:: - traverse (Type& c) - { - pre (c); - post (c); - } - - void Particle:: - pre (Type&) - { - } - - void Particle:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/particle.hxx b/xsd-frontend/traversal/particle.hxx deleted file mode 100644 index 0f97d6e..0000000 --- a/xsd-frontend/traversal/particle.hxx +++ /dev/null @@ -1,28 +0,0 @@ -// file : xsd-frontend/traversal/particle.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_PARTICLE_HXX -#define XSD_FRONTEND_TRAVERSAL_PARTICLE_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct Particle : Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_PARTICLE_HXX diff --git a/xsd-frontend/traversal/schema.cxx b/xsd-frontend/traversal/schema.cxx deleted file mode 100644 index a43009b..0000000 --- a/xsd-frontend/traversal/schema.cxx +++ /dev/null @@ -1,11 +0,0 @@ -// file : xsd-frontend/traversal/schema.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - } -} diff --git a/xsd-frontend/traversal/schema.hxx b/xsd-frontend/traversal/schema.hxx deleted file mode 100644 index 79505fe..0000000 --- a/xsd-frontend/traversal/schema.hxx +++ /dev/null @@ -1,148 +0,0 @@ -// file : xsd-frontend/traversal/schema.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_SCHEMA_HXX -#define XSD_FRONTEND_TRAVERSAL_SCHEMA_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - // - // - struct Uses: Edge - { - Uses () - { - } - - Uses (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.schema ()); - } - }; - - // - // - struct Implies: Edge - { - Implies () - { - } - - Implies (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.schema ()); - } - }; - - - // - // - struct Sources: Edge - { - Sources () - { - } - - Sources (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.schema ()); - } - }; - - - // - // - struct Includes: Edge - { - Includes () - { - } - - Includes (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.schema ()); - } - }; - - - // - // - struct Imports: Edge - { - Imports () - { - } - - Imports (NodeBase& n) - { - node_traverser (n); - } - - virtual void - traverse (Type& e) - { - dispatch (e.schema ()); - } - }; - - - // - // - struct Schema: ScopeTemplate - { - virtual void - traverse (Type& s) - { - pre (s); - - iterate_and_dispatch ( - s.uses_begin (), s.uses_end (), edge_traverser ()); - - names (s); - - post (s); - } - - virtual void - pre (Type&) - { - } - - virtual void - post (Type&) - { - } - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_SCHEMA_HXX diff --git a/xsd-frontend/traversal/union.cxx b/xsd-frontend/traversal/union.cxx deleted file mode 100644 index 9656746..0000000 --- a/xsd-frontend/traversal/union.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// file : xsd-frontend/traversal/union.cxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -namespace XSDFrontend -{ - namespace Traversal - { - void Union:: - traverse (Type& u) - { - pre (u); - argumented (u); - name (u); - post (u); - } - - void Union:: - pre (Type&) - { - } - - void Union:: - argumented (Type& u) - { - argumented (u, *this); - } - - void Union:: - argumented (Type& u, EdgeDispatcher& d) - { - iterate_and_dispatch (u.argumented_begin (), u.argumented_end (), d); - } - - void Union:: - name (Type&) - { - } - - void Union:: - post (Type&) - { - } - } -} diff --git a/xsd-frontend/traversal/union.hxx b/xsd-frontend/traversal/union.hxx deleted file mode 100644 index 766ddd5..0000000 --- a/xsd-frontend/traversal/union.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// file : xsd-frontend/traversal/union.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_FRONTEND_TRAVERSAL_UNION_HXX -#define XSD_FRONTEND_TRAVERSAL_UNION_HXX - -#include -#include - -namespace XSDFrontend -{ - namespace Traversal - { - struct Union: Node - { - virtual void - traverse (Type&); - - virtual void - pre (Type&); - - virtual void - argumented (Type&); - - virtual void - argumented (Type&, EdgeDispatcher& d); - - virtual void - name (Type&); - - virtual void - post (Type&); - }; - } -} - -#endif // XSD_FRONTEND_TRAVERSAL_UNION_HXX -- cgit v1.1