MADARA  3.1.8
CompositeImpliesNode.h
Go to the documentation of this file.
1 #ifndef _MADARA_COMPOSITE_IMPLIES_NODE_H_
2 #define _MADARA_COMPOSITE_IMPLIES_NODE_H_
3 
4 #ifndef _MADARA_NO_KARL_
5 
6 
9 
10 namespace madara
11 {
12  namespace expression
13  {
14  // Forward declaration.
15  class ComponentNode;
16  class Visitor;
17 
23  {
24  public:
34 
39  virtual madara::knowledge::KnowledgeRecord item (void) const;
40 
46  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change);
47 
57 
62  virtual void accept (Visitor &visitor) const;
63  };
64  }
65 }
66 
67 #endif // _MADARA_NO_KARL_
68 
69 
70 #endif // _MADARA_COMPOSITE_IMPLIES_NODE_H_
This class encapsulates an entry in a KnowledgeBase.
A composite node that performs an implication (inference rule)
Defines a left and right node (via inheritance from CompositeUnaryNode).
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prunes the expression tree of unnecessary nodes.
Provides knowledge logging services to files and terminals.
Definition: GlobalLogger.h:11
A multi-threaded logger for logging to one or more destinations.
Definition: Logger.h:88
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the expression tree.
An abstract base class defines a simple abstract implementation of an expression tree node...
Definition: ComponentNode.h:35
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition: Visitor.h:90
Settings for applying knowledge updates.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
Copyright (c) 2015 Carnegie Mellon University.
virtual ComponentNode * left(void) const
Returns the left expression.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the printable character of the node.
virtual ComponentNode * right(void) const
Returns the right expression.
CompositeImpliesNode(logger::Logger &logger, ComponentNode *left, ComponentNode *right)
Constructor.