MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
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_ */
madara::knowledge::KnowledgeRecord
This class encapsulates an entry in a KnowledgeBase.
Definition:
KnowledgeRecord.h:60
madara::expression::ListNode::context_
madara::knowledge::ThreadSafeContext & context_
Definition:
ListNode.h:54
madara::expression::ListNode::prune
virtual madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prune the tree of unnecessary nodes.
Definition:
ListNode.cpp:42
KnowledgeRecord.h
madara::expression::ListNode::list_
::std::list< ComponentNode * > list_
list of trees in a parameter list
Definition:
ListNode.h:57
madara::expression::ListNode::accept
virtual void accept(Visitor &visitor) const
Define the accept() operation used for the Visitor pattern.
Definition:
ListNode.cpp:26
madara::expression::ListNode::item
virtual madara::knowledge::KnowledgeRecord item(void) const
Return the item stored in the node.
Definition:
ListNode.cpp:32
ThreadSafeContext.h
madara::knowledge::ThreadSafeContext
This class stores variables and their values for use by any entity needing state information in a thr...
Definition:
ThreadSafeContext.h:82
madara::expression::ListNode::ListNode
ListNode(madara::knowledge::ThreadSafeContext &context)
Ctor.
Definition:
ListNode.cpp:12
madara::expression::ListNode::evaluate
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the node and its children.
Definition:
ListNode.cpp:55
madara::expression::ComponentNode
An abstract base class defines a simple abstract implementation of an expression tree node...
Definition:
ComponentNode.h:35
madara::expression::Visitor
Abstract base class for all visitors to all classes that derive from ComponentNode.
Definition:
Visitor.h:90
madara::knowledge::KnowledgeUpdateSettings
Settings for applying knowledge updates.
Definition:
KnowledgeUpdateSettings.h:23
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::expression::ListNode::~ListNode
virtual ~ListNode(void)
Dtor.
Definition:
ListNode.cpp:19
ComponentNode.h
madara::expression::ListNode
Defines a terminal node that contains a list.
Definition:
ListNode.h:27
include
madara
expression
ListNode.h
Generated on Wed May 9 2018 18:17:14 for MADARA by
1.8.11