summaryrefslogtreecommitdiff
path: root/cli/traversal/option.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/traversal/option.hxx')
-rw-r--r--cli/traversal/option.hxx75
1 files changed, 75 insertions, 0 deletions
diff --git a/cli/traversal/option.hxx b/cli/traversal/option.hxx
new file mode 100644
index 0000000..4ff2a58
--- /dev/null
+++ b/cli/traversal/option.hxx
@@ -0,0 +1,75 @@
+// file : cli/traversal/option.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009 Code Synthesis Tools CC
+// license : MIT; see accompanying LICENSE file
+
+#ifndef CLI_TRAVERSAL_OPTION_HXX
+#define CLI_TRAVERSAL_OPTION_HXX
+
+#include <traversal/elements.hxx>
+#include <semantics/option.hxx>
+
+namespace traversal
+{
+ struct belongs: edge<semantics::belongs>
+ {
+ belongs ()
+ {
+ }
+
+ belongs (node_dispatcher& n)
+ {
+ node_traverser (n);
+ }
+
+ virtual void
+ traverse (type&);
+ };
+
+ struct initialized: edge<semantics::initialized>
+ {
+ initialized ()
+ {
+ }
+
+ initialized (node_dispatcher& n)
+ {
+ node_traverser (n);
+ }
+
+ virtual void
+ traverse (type&);
+ };
+
+ struct option: node<semantics::option>
+ {
+ virtual void
+ traverse (type&);
+
+ virtual void
+ pre (type&);
+
+ virtual void
+ belongs (type&);
+
+ virtual void
+ initialized (type&);
+
+ virtual void
+ post (type&);
+
+ void
+ belongs (type& o, edge_dispatcher& d)
+ {
+ d.dispatch (o.belongs ());
+ }
+
+ void
+ initialized (type& o, edge_dispatcher& d)
+ {
+ d.dispatch (o.initialized ());
+ }
+ };
+}
+
+#endif // CLI_TRAVERSAL_OPTION_HXX