MADARA  3.4.1
ComponentNode.cpp
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 #ifndef _COMPONENT_NODE_CPP_
4 #define _COMPONENT_NODE_CPP_
5 
6 #ifndef _MADARA_NO_KARL_
7 
8 #include <stdexcept>
9 
13 
15 {
17 }
18 
19 // Dtor
21 
23  void) const
24 {
26 }
27 
28 // default left is to return a null pointer
30  void) const
31 {
32  return 0;
33 }
34 
35 // default right is to return a null pointer
37  void) const
38 {
39  return 0;
40 }
41 
42 // accept a visitor
45 {
46 }
47 
49 {
50  logger_ = &logger;
51 }
52 
53 #endif // _MADARA_NO_KARL_
54 
55 #endif /* _COMPONENT_NODE_CPP_ */
madara::knowledge::KnowledgeRecord KnowledgeRecord
An abstract base class defines a simple abstract implementation of an expression tree node.
Definition: ComponentNode.h:37
ComponentNode(logger::Logger &logger)
Constructor.
virtual void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
virtual ComponentNode * right(void) const
Returns the right expression.
void set_logger(logger::Logger &logger)
Sets the logger for printing errors and debugging info.
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.
virtual ComponentNode * left(void) const
Returns the left expression.
virtual ~ComponentNode(void)=0
Destructor.
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition: Visitor.h:93
This class encapsulates an entry in a KnowledgeBase.
A multi-threaded logger for logging to one or more destinations.
Definition: Logger.h:165
Provides knowledge logging services to files and terminals.
Definition: GlobalLogger.h:12