|
Wildmeshing Toolkit
|
Base class for boolean expression tree nodes used to evaluate cell tags. More...
#include <Expression.hpp>
Public Member Functions | |
| virtual bool | eval (const CellTag &tags) const =0 |
| Evaluates the expression against a given set of tags. | |
| virtual std::string | to_string () const =0 |
| Converts the expression to its string representation. Mainly for debugging purposes. | |
| virtual bool | contains_not () const |
| Checks if the expression contains a logical NOT operation. | |
| virtual bool | contains_and () const |
| Checks if the expression contains a logical AND operation. | |
| virtual bool | contains_or () const |
| Checks if the expression contains a logical OR operation. | |
| bool | contains_only_and () const |
| Checks if the expression contains only logical AND operations or none. | |
| bool | contains_only_or () const |
| Checks if the expression contains only logical OR operations or none. | |
| bool | contains_only_not () const |
| Checks if the expression contains only logical NOT operations or none. | |
| virtual CellTag | tags_involved () const =0 |
| Returns the set of tags involved in this expression. | |
| virtual std::set< std::string > | tag_names_involved () const =0 |
Base class for boolean expression tree nodes used to evaluate cell tags.
|
inlinevirtual |
Checks if the expression contains a logical AND operation.
Reimplemented in wmtk::components::image_simulation::expression_parser::NotExpr, wmtk::components::image_simulation::expression_parser::AndExpr, and wmtk::components::image_simulation::expression_parser::OrExpr.
|
inlinevirtual |
Checks if the expression contains a logical NOT operation.
Reimplemented in wmtk::components::image_simulation::expression_parser::NotExpr, wmtk::components::image_simulation::expression_parser::AndExpr, and wmtk::components::image_simulation::expression_parser::OrExpr.
|
inlinevirtual |
Checks if the expression contains a logical OR operation.
Reimplemented in wmtk::components::image_simulation::expression_parser::NotExpr, wmtk::components::image_simulation::expression_parser::AndExpr, and wmtk::components::image_simulation::expression_parser::OrExpr.
|
pure virtual |
Evaluates the expression against a given set of tags.
| tags | The tags evaluated against the boolean expression. |
Implemented in wmtk::components::image_simulation::expression_parser::TagExpr, wmtk::components::image_simulation::expression_parser::EmptyExpr, wmtk::components::image_simulation::expression_parser::NotExpr, wmtk::components::image_simulation::expression_parser::AndExpr, and wmtk::components::image_simulation::expression_parser::OrExpr.
|
pure virtual |
Returns the set of tags involved in this expression.
This is useful for intent operations to determine which tags are relevant for the operation.
Implemented in wmtk::components::image_simulation::expression_parser::TagExpr, wmtk::components::image_simulation::expression_parser::EmptyExpr, wmtk::components::image_simulation::expression_parser::NotExpr, wmtk::components::image_simulation::expression_parser::AndExpr, and wmtk::components::image_simulation::expression_parser::OrExpr.
|
pure virtual |
Converts the expression to its string representation. Mainly for debugging purposes.
Implemented in wmtk::components::image_simulation::expression_parser::TagExpr, wmtk::components::image_simulation::expression_parser::EmptyExpr, wmtk::components::image_simulation::expression_parser::NotExpr, wmtk::components::image_simulation::expression_parser::AndExpr, and wmtk::components::image_simulation::expression_parser::OrExpr.