Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | List of all members
om::scripting::mir::lang::VariableDeclaration Class Reference

A class that represents the declaration of local variables of the same type. More...

#include <omScriptingMirVariableDeclaration.h>

Inheritance diagram for om::scripting::mir::lang::VariableDeclaration:
om::scripting::mir::lang::Declaration om::scripting::mir::lang::ASTNode

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 PositiongetPosition () 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< VariableDeclarationconstruct (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< VariableDeclarationconstruct (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...
 

Detailed Description

A class that represents the declaration of local variables of the same type.

Constructor & Destructor Documentation

om::scripting::mir::lang::VariableDeclaration::VariableDeclaration ( const Shared< lang::Type > &  newType,
const Shared< Identifier > &  newName 
)
inline

Create a new parameter declaration object with the specified type and identifier name.

om::scripting::mir::lang::VariableDeclaration::VariableDeclaration ( const Shared< lang::Type > &  newType,
const Shared< Identifier > &  newName,
const Shared< Expression > &  newInitializer 
)
inline

Create a new parameter declaration object with the specified type and identifier name.

Member Function Documentation

const Shared<Type>& om::scripting::mir::lang::VariableDeclaration::getType ( ) const
inline

Return a pointer to the type of the variable that is declared.

void om::scripting::mir::lang::VariableDeclaration::setType ( const Shared< Type > &  newType)
inline

Set a pointer to the type of the variable that is declared.

const Shared<Identifier>& om::scripting::mir::lang::VariableDeclaration::getName ( ) const
inline

Return a pointer to an identifier representing the name of this variable.

const Shared<Expression>& om::scripting::mir::lang::VariableDeclaration::getInitializer ( ) const
inline

Return a pointer to an expression that is used as the initializer for this variable declaration.

void om::scripting::mir::lang::VariableDeclaration::setInitializer ( const Shared< Expression > &  newInitializer)
inline

Set a pointer to an expression that is used as the initializer for this variable declaration.

static Shared<VariableDeclaration> om::scripting::mir::lang::VariableDeclaration::construct ( const Shared< lang::Type > &  newType,
const Shared< Identifier > &  newName 
)
inlinestatic

Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.

static Shared<VariableDeclaration> om::scripting::mir::lang::VariableDeclaration::construct ( const Shared< lang::Type > &  newType,
const Shared< Identifier > &  newName,
const Shared< Expression > &  newInitializer 
)
inlinestatic

Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.


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