MADARA  3.2.3
VariableDecrementNode.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef _MADARA_VARIABLE_DECREMENT_NODE_H_
3 #define _MADARA_VARIABLE_DECREMENT_NODE_H_
4 
5 #ifndef _MADARA_NO_KARL_
6 
7 #include <string>
8 #include <vector>
9 
15 
16 namespace madara
17 {
18  namespace expression
19  {
20  // Forward declarations.
21  class Visitor;
22 
29  {
30  public:
34  ComponentNode * rhs,
36 
38  virtual ~VariableDecrementNode (void);
39 
41  virtual madara::knowledge::KnowledgeRecord item (void) const;
42 
46  virtual madara::knowledge::KnowledgeRecord prune (bool & can_change);
47 
52 
54  virtual void accept (Visitor &visitor) const;
55 
56  private:
59 
62 
65 
68 
69  //madara::knowledge::ThreadSafeContext & context_;
70  };
71  }
72 }
73 
74 #endif // _MADARA_NO_KARL_
75 
76 #endif /* _MADARA_VARIABLE_DECREMENT_NODE_H_ */
This class encapsulates an entry in a KnowledgeBase.
Defines a terminal node of that references the current value stored in a variable.
Definition: VariableNode.h:28
ComponentNode * rhs_
holds a right hand side argument if it is not value_
Composite node that subtracts a variable by some right hand side.
This class stores variables and their values for use by any entity needing state information in a thr...
virtual madara::knowledge::KnowledgeRecord evaluate(const madara::knowledge::KnowledgeUpdateSettings &settings)
Evaluates the node and its children.
madara::knowledge::KnowledgeRecord value_
amount to increment by. Note that this can also do decrement.
virtual madara::knowledge::KnowledgeRecord item(void) const
Return the item stored in the node.
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 madara::knowledge::KnowledgeRecord prune(bool &can_change)
Prune the tree of unnecessary nodes.
CompositeArrayReference * array_
variable index holder
virtual void accept(Visitor &visitor) const
Define the accept() operation used for the Visitor pattern.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
VariableDecrementNode(ComponentNode *lhs, madara::knowledge::KnowledgeRecord value, ComponentNode *rhs, madara::knowledge::ThreadSafeContext &context)
Ctor.
Defines a terminal node of that references the current value stored in a variable.