MADARA  3.2.3
ListNode.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef _MADARA_LIST_NODE_H_
3 #define _MADARA_LIST_NODE_H_
4 
5 #ifndef _MADARA_NO_KARL_
6 
7 #include <list>
8 #include <string>
9 #include <vector>
10 
14 
15 namespace madara
16 {
17  namespace expression
18  {
19  // Forward declarations.
20  class Visitor;
21 
27  class ListNode : public ComponentNode
28  {
29  public:
32 
34  virtual ~ListNode (void);
35 
37  virtual madara::knowledge::KnowledgeRecord item (void) const;
38 
42  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change);
43 
48 
50  virtual void accept (Visitor &visitor) const;
51 
52  private:
53  // variables context
54  //madara::knowledge::ThreadSafeContext & context_;
55 
57  ::std::list<ComponentNode *> list_;
58  };
59  }
60 }
61 
62 #endif // _MADARA_NO_KARL_
63 
64 #endif /* _MADARA_LIST_NODE_H_ */
This class encapsulates an entry in a KnowledgeBase.
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prune the tree of unnecessary nodes.
Definition: ListNode.cpp:42
::std::list< ComponentNode * > list_
list of trees in a parameter list
Definition: ListNode.h:57
virtual void accept(Visitor &visitor) const
Define the accept() operation used for the Visitor pattern.
Definition: ListNode.cpp:26
virtual madara::knowledge::KnowledgeRecord item(void) const
Return the item stored in the node.
Definition: ListNode.cpp:32
This class stores variables and their values for use by any entity needing state information in a thr...
ListNode(madara::knowledge::ThreadSafeContext &context)
Ctor.
Definition: ListNode.cpp:12
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the node and its children.
Definition: ListNode.cpp:55
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
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
virtual ~ListNode(void)
Dtor.
Definition: ListNode.cpp:19
Defines a terminal node that contains a list.
Definition: ListNode.h:27