summaryrefslogtreecommitdiff
path: root/cli/cli/traversal/class.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-04-08 14:51:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-04-27 11:38:53 +0300
commit720c5a33b6a49cf328fdd7611f49153cf8f60247 (patch)
tree9725f3d1f42ec90fde84520f49647edea013ce5e /cli/cli/traversal/class.cxx
parent3183f3bb927a90783ae0aeaf190a0919377aabe4 (diff)
Separate tests and examples into individual packages
Also make cli module to be explicitly enabled via the config.cli configuration variable.
Diffstat (limited to 'cli/cli/traversal/class.cxx')
-rw-r--r--cli/cli/traversal/class.cxx49
1 files changed, 49 insertions, 0 deletions
diff --git a/cli/cli/traversal/class.cxx b/cli/cli/traversal/class.cxx
new file mode 100644
index 0000000..b920f1f
--- /dev/null
+++ b/cli/cli/traversal/class.cxx
@@ -0,0 +1,49 @@
+// file : cli/traversal/class.cxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// license : MIT; see accompanying LICENSE file
+
+#include <cli/traversal/class.hxx>
+
+namespace traversal
+{
+ // inherits
+ //
+ void inherits::
+ traverse (type& i)
+ {
+ dispatch (i.base ());
+ }
+
+ // class_
+ //
+ void class_::
+ traverse (type& c)
+ {
+ pre (c);
+ inherits (c);
+ names (c);
+ post (c);
+ }
+
+ void class_::
+ inherits (type& c)
+ {
+ inherits (c, *this);
+ }
+
+ void class_::
+ inherits (type& c, edge_dispatcher& d)
+ {
+ iterate_and_dispatch (c.inherits_begin (), c.inherits_end (), d);
+ }
+
+ void class_::
+ pre (type&)
+ {
+ }
+
+ void class_::
+ post (type&)
+ {
+ }
+}