Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a statement that loops while a condition expression is true. More...
#include <omScriptingMirStatements.h>
Public Member Functions | |
WhileStatement (const Shared< Expression > &newCondition, const Shared< Statement > &newLoopStatement, Bool newIsDoWhile=false) | |
Create a new while statement with the specified condition, loop statement, and loop type. More... | |
const Shared< Expression > & | getCondition () const |
Return a pointer to the expression which represents the condition being tested. More... | |
void | setCondition (const Shared< Expression > &newCondition) |
Set a pointer to the expression which represents the condition being tested. More... | |
const Shared< Statement > & | getLoopStatement () const |
Return a pointer to the statement that is executed repeatedly while the condition is true. More... | |
Bool | getIsDoWhile () const |
Return a boolean value indicating if this while statement is actually a do-while statement. More... | |
Public Member Functions inherited from om::scripting::mir::lang::Statement | |
Statement (Type newType) | |
Create a new statement with the specified statement type enum value. More... | |
Type | getType () const |
Return the type of this statement. More... | |
Public Member Functions inherited from om::scripting::mir::lang::ASTNode | |
ASTNode () | |
Create a new AST node with no node position specified. More... | |
ASTNode (const Position &newPosition) | |
Create a new AST node which corresponds to a token starting at the specified source code position. More... | |
virtual | ~ASTNode () |
Destroy this AST node object. More... | |
const Position & | getPosition () const |
Return an object representing the position of this AST node in the source code. More... | |
void | setPosition (const Position &newPosition) |
Set the position of this AST node in the source code. More... | |
Static Public Member Functions | |
static Shared< WhileStatement > | construct (const Shared< Expression > &newCondition, const Shared< Statement > &newLoopStatement, Bool newIsDoWhile=false) |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More... | |
Static Public Member Functions inherited from om::scripting::mir::lang::Statement | |
static Shared< Statement > | construct (Type newType) |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More... | |
Additional Inherited Members | |
Public Types inherited from om::scripting::mir::lang::Statement | |
enum | Type { BLOCK, IF, WHILE, FOR, SWITCH, EXPRESSION, RETURN, BREAK, CONTINUE, THROW, TRY_CATCH } |
An enum that specifies the different types of statements. More... | |
A class that represents a statement that loops while a condition expression is true.
|
inline |
Create a new while statement with the specified condition, loop statement, and loop type.
|
inline |
Return a pointer to the expression which represents the condition being tested.
|
inline |
Set a pointer to the expression which represents the condition being tested.
|
inline |
Return a pointer to the statement that is executed repeatedly while the condition is true.
|
inline |
Return a boolean value indicating if this while statement is actually a do-while statement.
|
inlinestatic |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.