MADARA  3.2.3
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 
14 
17 {
18  set_logger (logger);
19 }
20 
21 // Dtor
23 {
24 }
25 
28 {
30 }
31 
32 // default left is to return a null pointer
35 {
36  return 0;
37 }
38 
39 // default right is to return a null pointer
42 {
43  return 0;
44 }
45 
46 // accept a visitor
47 void
49 {
50 }
51 
52 void
54 {
55  logger_ = &logger;
56 }
57 
58 #endif // _MADARA_NO_KARL_
59 
60 #endif /* _COMPONENT_NODE_CPP_ */
This class encapsulates an entry in a KnowledgeBase.
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 void accept(Visitor &visitor) const
Accepts a visitor subclassed from the Visitor class.
madara::knowledge::KnowledgeRecord KnowledgeRecord
virtual madara::knowledge::KnowledgeRecord item(void) const
Returns the value of the node.
logger::Logger * logger_
handle the context
Definition: ComponentNode.h:97
virtual ~ComponentNode(void)=0
Destructor.
Provides knowledge logging services to files and terminals.
Definition: GlobalLogger.h:11
ComponentNode(logger::Logger &logger)
Constructor.
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:36
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition: Visitor.h:91
virtual ComponentNode * left(void) const
Returns the left expression.