MADARA  3.4.1
CompiledExpression.cpp
Go to the documentation of this file.
4 
5 #ifndef _MADARA_NO_KARL_
6 
8  : expression(*logger::global_logger.get())
9 {
10 }
11 
13  const CompiledExpression& ce)
14  : logic(ce.logic), expression(ce.expression)
15 {
16 }
17 
19 
25 {
26  return expression.get_root();
27 }
28 
30  const CompiledExpression& ce)
31 {
32  if (this != &ce)
33  {
34  logic = ce.logic;
35  expression = ce.expression;
36  }
37 }
38 
39 #endif // _MADARA_NO_KARL_
An abstract base class defines a simple abstract implementation of an expression tree node.
Definition: ComponentNode.h:37
Compiled, optimized KaRL logic.
expression::ComponentNode * get_root(void)
Gets the root of the compiled expression.
void operator=(const CompiledExpression &ce)
Assignment operator.
std::string logic
the logic that was compiled
madara::expression::ExpressionTree expression
the expression tree
T get(const KnowledgeRecord &kr)
Get the value of a KnowlegeRecord.
Definition: GetRecord.h:121
Provides knowledge logging services to files and terminals.
Definition: GlobalLogger.h:12
MADARA_EXPORT utility::Refcounter< logger::Logger > global_logger