amath  1.8.5
Simple command line calculator
ExitStatement Class Reference

Exit program. More...

#include <exit.h>

Inheritance diagram for ExitStatement:
Collaboration diagram for ExitStatement:

Public Member Functions

 ExitStatement ()
 
 ~ExitStatement ()
 
char * Execute ()
 
- Public Member Functions inherited from StatementNode
 StatementNode ()
 
 StatementNode (const char *text)
 
virtual ~StatementNode ()
 
NodeType GetNodeType ()
 
virtual SyntaxNodeGetNext ()
 
virtual char * GetTextCode ()
 
void Attach (SyntaxNode *node)
 
void Detach (SyntaxNode *node)
 
void Replace (SyntaxNode *n, SyntaxNode *x)
 
- 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from StatementNode
char * statementText
 
- Protected Attributes inherited from SyntaxNode
CharBufferoutput
 
SyntaxNodeparent
 
SyntaxNodeiterator
 
bool leftBottom
 

Detailed Description

Exit program.

Definition at line 39 of file exit.h.

Constructor & Destructor Documentation

◆ ExitStatement()

ExitStatement::ExitStatement ( )

Definition at line 33 of file exit.cpp.

References StatementNode::StatementNode().

Referenced by Parser::ParseStatement().

33  :
35 {
36 }
StatementNode()
Definition: node.cpp:34
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~ExitStatement()

ExitStatement::~ExitStatement ( )

Definition at line 38 of file exit.cpp.

39 {
40 }

Member Function Documentation

◆ Execute()

char * ExitStatement::Execute ( )
virtual

Implements StatementNode.

Definition at line 42 of file exit.cpp.

References Program::Exit(), and StatementNode::statementText.

43 {
44  Program->Exit();
45  return statementText;
46 }
Master control class.
Definition: program.h:55
char * statementText
Definition: node.h:55
virtual void Exit()
Definition: program.cpp:168
Here is the call graph for this function:

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