File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -51,21 +51,42 @@ namespace attwoodn::expression_tree {
5151 }
5252 }
5353
54- namespace tree {
54+ namespace node {
5555
5656 /* *
57- * The base class representing expression tree nodes
57+ * @brief The base class representing all expression tree nodes.
5858 */
5959 template <typename Obj>
6060 class expression_tree_node_base {
6161 public:
6262 virtual ~expression_tree_node_base () {};
63+
64+ /* *
65+ * @brief Evaluates the given object to determine if it satisfies the expressions defined in this node and all child nodes.
66+ *
67+ * @returns True if the given object satisfied the expression in this node and all the expressions of all nodes
68+ * under this node in the expression tree;
69+ *
70+ * False if the given object did not satisfy the epression in this node and all the expressions of all
71+ * nodes under this node in the expression tree.
72+ */
6373 virtual bool evaluate (const Obj& obj) = 0;
6474 };
6575
66- class expression_tree_op_node ;
67- class expression_tree_leaf_node ;
76+ /* *
77+ *
78+ */
79+ template <typename Obj, typename LeftChild, typename RightChild>
80+ class expression_tree_op_node : public expression_tree_node_base <Obj> {
81+
82+ };
6883
84+ template <typename Obj, typename Op, typename CompValue>
85+ class expression_tree_leaf_node : public expression_tree_node_base <Obj> {
86+
87+ };
6988
7089 }
90+
91+
7192}
You can’t perform that action at this time.
0 commit comments