amath  1.8.5
Simple command line calculator
InsVariableNode Class Reference

Use of last result in a syntax tree. More...

#include <values.h>

Inheritance diagram for InsVariableNode:
Collaboration diagram for InsVariableNode:

Public Member Functions

 InsVariableNode ()
 
char * GetText ()
 
NumberEvaluate ()
 
- Public Member Functions inherited from VariableNode
 VariableNode (Variable *variable)
 
void AssignValue (Number *value) const
 
int GetPrecedence ()
 
SyntaxNodeGetNext ()
 
void Attach (SyntaxNode *node)
 
void Detach (SyntaxNode *node)
 
void Replace (SyntaxNode *n, SyntaxNode *x)
 
- Public Member Functions inherited from ExpressionNode
 ExpressionNode ()
 
 ExpressionNode (Number *value)
 
virtual ~ExpressionNode ()
 
NodeType GetNodeType ()
 
virtual bool IsSilent ()
 
char * GetTextCode ()
 
char * Execute ()
 
- Public Member Functions inherited from SyntaxNode
 SyntaxNode ()
 
virtual ~SyntaxNode ()
 
void SetFirstNode ()
 
bool GetFirstNode () const
 
SyntaxNodeGetParent () const
 
void SetParent (SyntaxNode *node)
 
virtual ReductionType GetReductionType ()
 
virtual void ResetIterator ()
 

Protected Member Functions

char * GetNodeText ()
 

Additional Inherited Members

- Protected Attributes inherited from ExpressionNode
Numberresult
 
- Protected Attributes inherited from SyntaxNode
CharBufferoutput
 
SyntaxNodeparent
 
SyntaxNodeiterator
 
bool leftBottom
 

Detailed Description

Use of last result in a syntax tree.

Definition at line 135 of file values.h.

Constructor & Destructor Documentation

◆ InsVariableNode()

InsVariableNode::InsVariableNode ( )

Definition at line 345 of file values.cpp.

References VariableNode::VariableNode().

Referenced by Parser::ParseAtomic().

345  :
346  VariableNode(nullptr)
347 {
348 }
VariableNode(Variable *variable)
Definition: values.cpp:293
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ Evaluate()

Number * InsVariableNode::Evaluate ( )
virtual

Reimplemented from VariableNode.

Definition at line 350 of file values.cpp.

References Program::GetLastResult().

351 {
352  return Program->GetLastResult();
353 }
Master control class.
Definition: program.h:55
struct Number * GetLastResult() const
Definition: program.cpp:122
Here is the call graph for this function:

◆ GetNodeText()

char * InsVariableNode::GetNodeText ( )
protectedvirtual

Reimplemented from VariableNode.

Definition at line 361 of file values.cpp.

362 {
363  static char* ret = (char*)"ins";
364  return ret;
365 }

◆ GetText()

char * InsVariableNode::GetText ( )
virtual

Reimplemented from VariableNode.

Definition at line 355 of file values.cpp.

356 {
357  static char* ret = (char*)"ins";
358  return ret;
359 }

The documentation for this class was generated from the following files: