File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 11#pragma once
22
3- #include < iostream>
4-
53namespace attwoodn ::expression_tree {
64
75 namespace op {
@@ -28,7 +26,21 @@ namespace attwoodn::expression_tree {
2826
2927 }
3028
31- static inline void say_hello () {
32- std::cout << " hello world!" << std::endl;
29+ namespace tree {
30+
31+ /* *
32+ * The base class representing expression tree nodes
33+ */
34+ template <typename Obj>
35+ class expression_tree_node_base {
36+ public:
37+ virtual ~expression_tree_node_base () {};
38+ virtual bool evaluate (const Obj& obj) = 0;
39+ };
40+
41+ class expression_tree_op_node ;
42+ class expression_tree_leaf_node ;
43+
44+
3345 }
3446}
Original file line number Diff line number Diff line change 1- #include < attwoodn/expression_tree.hpp >
1+ #include < iostream >
22
33int main (int argc, char ** argv) {
4- attwoodn::expression_tree::say_hello () ;
4+ std::cout << " hello world! " << std::endl ;
55
66 return EXIT_SUCCESS;
77}
You can’t perform that action at this time.
0 commit comments