aboutsummaryrefslogtreecommitdiff
path: root/libxsd-frontend/traversal/enumeration.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd-frontend/traversal/enumeration.cxx')
-rw-r--r--libxsd-frontend/traversal/enumeration.cxx89
1 files changed, 89 insertions, 0 deletions
diff --git a/libxsd-frontend/traversal/enumeration.cxx b/libxsd-frontend/traversal/enumeration.cxx
new file mode 100644
index 0000000..c11d8a7
--- /dev/null
+++ b/libxsd-frontend/traversal/enumeration.cxx
@@ -0,0 +1,89 @@
+// file : libxsd-frontend/traversal/enumeration.cxx
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#include <libxsd-frontend/traversal/enumeration.hxx>
+
+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&)
+ {
+ }
+ }
+}