Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents the declaration of local variables of the same type. More...
#include <omScriptingMirVariableDeclaration.h>
Public Member Functions | |
VariableDeclaration (const Shared< lang::Type > &newType, const Shared< Identifier > &newName) | |
Create a new parameter declaration object with the specified type and identifier name. More... | |
VariableDeclaration (const Shared< lang::Type > &newType, const Shared< Identifier > &newName, const Shared< Expression > &newInitializer) | |
Create a new parameter declaration object with the specified type and identifier name. More... | |
const Shared< Type > & | getType () const |
Return a pointer to the type of the variable that is declared. More... | |
void | setType (const Shared< Type > &newType) |
Set a pointer to the type of the variable that is declared. More... | |
const Shared< Identifier > & | getName () const |
Return a pointer to an identifier representing the name of this variable. More... | |
const Shared< Expression > & | getInitializer () const |
Return a pointer to an expression that is used as the initializer for this variable declaration. More... | |
void | setInitializer (const Shared< Expression > &newInitializer) |
Set a pointer to an expression that is used as the initializer for this variable declaration. More... | |
Public Member Functions inherited from om::scripting::mir::lang::Declaration | |
DeclarationType | getDeclarationType () const |
Return the type of this declaration. 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< VariableDeclaration > | construct (const Shared< lang::Type > &newType, const Shared< Identifier > &newName) |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More... | |
static Shared< VariableDeclaration > | construct (const Shared< lang::Type > &newType, const Shared< Identifier > &newName, const Shared< Expression > &newInitializer) |
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::Declaration | |
enum | DeclarationType { NAMESPACE, TYPE, ALIAS, CLASS, INTERFACE, FIELD, METHOD, OPERATOR, CONSTRUCTOR, DESTRUCTOR, VARIABLE } |
An enum that specifies the different types of type declarations. More... | |
Protected Member Functions inherited from om::scripting::mir::lang::Declaration | |
Declaration (DeclarationType newType) | |
Create a new declaration with the specified declaration type enum value. More... | |
A class that represents the declaration of local variables of the same type.
|
inline |
Create a new parameter declaration object with the specified type and identifier name.
|
inline |
Create a new parameter declaration object with the specified type and identifier name.
Return a pointer to the type of the variable that is declared.
|
inline |
Set a pointer to the type of the variable that is declared.
|
inline |
Return a pointer to an identifier representing the name of this variable.
|
inline |
Return a pointer to an expression that is used as the initializer for this variable declaration.
|
inline |
Set a pointer to an expression that is used as the initializer for this variable declaration.
|
inlinestatic |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.
|
inlinestatic |
Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.