MADARA  3.1.8
ComponentNode.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef _MADARA_COMPONENT_NODE_H_
3 #define _MADARA_COMPONENT_NODE_H_
4 
5 #ifndef _MADARA_NO_KARL_
6 
7 #include <string>
8 #include <deque>
9 #include <stdexcept>
12 #include "madara/utility/stdint.h"
13 #include "madara/logger/Logger.h"
14 
15 namespace madara
16 {
17  namespace knowledge
18  {
19  class ThreadSafeContext;
20  }
21 
22  namespace expression
23  {
24  // Forward declaration.
25  class Visitor;
26 
36  {
37  public:
43 
47  virtual ~ComponentNode (void) = 0;
48 
53  virtual madara::knowledge::KnowledgeRecord item (void) const;
54 
59  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change) = 0;
60 
66  virtual madara::knowledge::KnowledgeRecord evaluate (
68  = 0;
69 
74  virtual ComponentNode *left (void) const;
75 
80  virtual ComponentNode *right (void) const;
81 
86  virtual void accept (Visitor &visitor) const;
87 
92  void set_logger (logger::Logger & logger);
93 
94  protected:
97  };
98 
100  typedef std::deque <ComponentNode *> ComponentNodes;
101  }
102 }
103 
104 #endif // _MADARA_NO_KARL_
105 
106 #endif /* _MADARA_COMPONENT_NODE_H_ */
This class encapsulates an entry in a KnowledgeBase.
std::deque< ComponentNode * > ComponentNodes
a vector of Component Nodes
logger::Logger * logger_
handle the context
Definition: ComponentNode.h:96
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
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
Provides functions and classes for the distributed knowledge base.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.