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

A class that represents the base class for all function-like declarations. More...

#include <omScriptingMirMethods.h>

Inheritance diagram for om::scripting::mir::lang::FunctionDeclaration:
om::scripting::mir::lang::Declaration om::scripting::mir::lang::ASTNode om::scripting::mir::lang::ConstructorDeclaration om::scripting::mir::lang::MethodDeclaration om::scripting::mir::lang::OperatorDeclaration

Public Member Functions

Visibility getVisibility () const
 Return an object representing the visibility type of this function declaration. More...
 
void setVisibility (Visibility newVisibility)
 Set the visibility of this function declaration to the specified type. More...
 
const Shared< TemplateDeclaration > & getTemplateDeclaration () const
 Return an optionally NULL pointer to the template declaration of this function. More...
 
Bool getIsTemplate () const
 Return whether or not this function declaration is a template. More...
 
Bool getIsStatic () const
 Return whether or not this function is a static member of its enclosing class. More...
 
void setIsStatic (Bool newIsStatic)
 Set whether or not this function is a static member of its enclosing class. More...
 
Bool getIsVirtual () const
 Return whether or not this function is virtual and can be overridden. More...
 
Bool getIsConst () const
 Return whether or not this function is a constant function in its enclosing class. More...
 
void setIsConst (Bool newIsConst)
 Set whether or not this function is a constant function in its enclosing class. More...
 
Size getParameterCount () const
 Return the number of parameters that this function declaration has. More...
 
const Shared< VariableDeclaration > & getParameter (Index parameterIndex) const
 Return a pointer to the parameter declaration at the specified index in this function's parameter list. More...
 
Bool addParameter (const Shared< VariableDeclaration > &newParameter)
 Add a new parameter to the end of this function declaration's signature. 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...
 

Protected Member Functions

 FunctionDeclaration (Declaration::DeclarationType type, Visibility newVisibility, const Shared< TemplateDeclaration > &newTemplateDeclaration, Bool newIsStatic, Bool newIsVirtual, Bool newIsConst)
 Create a new function declaration object with the specified attributes. 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...
 

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...
 

Detailed Description

A class that represents the base class for all function-like declarations.

Constructor & Destructor Documentation

om::scripting::mir::lang::FunctionDeclaration::FunctionDeclaration ( Declaration::DeclarationType  type,
Visibility  newVisibility,
const Shared< TemplateDeclaration > &  newTemplateDeclaration,
Bool  newIsStatic,
Bool  newIsVirtual,
Bool  newIsConst 
)
inlineprotected

Create a new function declaration object with the specified attributes.

Member Function Documentation

Visibility om::scripting::mir::lang::FunctionDeclaration::getVisibility ( ) const
inline

Return an object representing the visibility type of this function declaration.

void om::scripting::mir::lang::FunctionDeclaration::setVisibility ( Visibility  newVisibility)
inline

Set the visibility of this function declaration to the specified type.

const Shared<TemplateDeclaration>& om::scripting::mir::lang::FunctionDeclaration::getTemplateDeclaration ( ) const
inline

Return an optionally NULL pointer to the template declaration of this function.

Bool om::scripting::mir::lang::FunctionDeclaration::getIsTemplate ( ) const
inline

Return whether or not this function declaration is a template.

Bool om::scripting::mir::lang::FunctionDeclaration::getIsStatic ( ) const
inline

Return whether or not this function is a static member of its enclosing class.

void om::scripting::mir::lang::FunctionDeclaration::setIsStatic ( Bool  newIsStatic)
inline

Set whether or not this function is a static member of its enclosing class.

Bool om::scripting::mir::lang::FunctionDeclaration::getIsVirtual ( ) const
inline

Return whether or not this function is virtual and can be overridden.

Bool om::scripting::mir::lang::FunctionDeclaration::getIsConst ( ) const
inline

Return whether or not this function is a constant function in its enclosing class.

void om::scripting::mir::lang::FunctionDeclaration::setIsConst ( Bool  newIsConst)
inline

Set whether or not this function is a constant function in its enclosing class.

Size om::scripting::mir::lang::FunctionDeclaration::getParameterCount ( ) const
inline

Return the number of parameters that this function declaration has.

const Shared<VariableDeclaration>& om::scripting::mir::lang::FunctionDeclaration::getParameter ( Index  parameterIndex) const
inline

Return a pointer to the parameter declaration at the specified index in this function's parameter list.

Bool om::scripting::mir::lang::FunctionDeclaration::addParameter ( const Shared< VariableDeclaration > &  newParameter)
inline

Add a new parameter to the end of this function declaration's signature.


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