MADARA
3.4.1
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
11
#include "
madara/expression/ComponentNode.h
"
12
#include "
madara/knowledge/ThreadSafeContext.h
"
13
#include "
madara/knowledge/KnowledgeRecord.h
"
14
15
namespace
madara
16
{
17
namespace
expression
18
{
19
// Forward declarations.
20
class
Visitor;
21
27
class
ListNode
:
public
ComponentNode
28
{
29
public
:
31
ListNode
(
madara::knowledge::ThreadSafeContext
& context);
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
46
virtual
madara::knowledge::KnowledgeRecord
evaluate
(
47
const
madara::knowledge::KnowledgeUpdateSettings
& settings);
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_ */
ComponentNode.h
KnowledgeRecord.h
ThreadSafeContext.h
madara::expression::ComponentNode
An abstract base class defines a simple abstract implementation of an expression tree node.
Definition:
ComponentNode.h:37
madara::expression::ListNode
Defines a terminal node that contains a list.
Definition:
ListNode.h:28
madara::expression::ListNode::evaluate
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the node and its children.
Definition:
ListNode.cpp:49
madara::expression::ListNode::~ListNode
virtual ~ListNode(void)
Dtor.
Definition:
ListNode.cpp:17
madara::expression::ListNode::item
virtual madara::knowledge::KnowledgeRecord item(void) const
Return the item stored in the node.
Definition:
ListNode.cpp:27
madara::expression::ListNode::accept
virtual void accept(Visitor &visitor) const
Define the accept() operation used for the Visitor pattern.
Definition:
ListNode.cpp:22
madara::expression::ListNode::ListNode
ListNode(madara::knowledge::ThreadSafeContext &context)
Ctor.
Definition:
ListNode.cpp:11
madara::expression::ListNode::list_
::std::list< ComponentNode * > list_
list of trees in a parameter list
Definition:
ListNode.h:57
madara::expression::ListNode::prune
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prune the tree of unnecessary nodes.
Definition:
ListNode.cpp:36
madara::expression::Visitor
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition:
Visitor.h:93
madara::knowledge::KnowledgeRecord
This class encapsulates an entry in a KnowledgeBase.
Definition:
KnowledgeRecord.h:88
madara::knowledge::KnowledgeUpdateSettings
Settings for applying knowledge updates.
Definition:
KnowledgeUpdateSettings.h:24
madara::knowledge::ThreadSafeContext
This class stores variables and their values for use by any entity needing state information in a thr...
Definition:
ThreadSafeContext.h:76
madara
Copyright(c) 2020 Galois.
Definition:
AggregateFilter.h:31
include
madara
expression
ListNode.h
Generated on Sat Jan 20 2024 00:40:26 for MADARA by
1.9.1