TorqueScript  0.2
Public Member Functions | List of all members
TorqueScript::Function Class Reference

A function is callable subroutine from anywhere in the language, defined by a script. A NativeFunction is a specialization of this that allows native C++ programming to be called from within the interpreter. More...

#include <function.hpp>

Inheritance diagram for TorqueScript::Function:
Inheritance graph
[legend]

Public Member Functions

 Function (const std::string &package, const std::string &space, const std::string &name)
 
 Function (const std::string &package, const std::string &space, const std::string &name, const std::vector< std::string > &parameterNames)
 
void addInstructions (const InstructionSequence &instructions)
 
virtual void execute (std::shared_ptr< ConsoleObject > thisObject, std::shared_ptr< ExecutionState > state, const std::size_t argumentCount)
 Default implementation will execute virtual instructions but can be overriden to implement native functions.
 
const std::string & getDeclaredName ()
 Retrieves the declared name of this function. More...
 
const std::string & getDeclaredNameSpace ()
 Retrieves the declared namespace of this function. More...
 
const std::string & getDeclaredPackage ()
 Retrieves the declared package of this function. More...
 

Detailed Description

A function is callable subroutine from anywhere in the language, defined by a script. A NativeFunction is a specialization of this that allows native C++ programming to be called from within the interpreter.

Member Function Documentation

◆ getDeclaredName()

const std::string& TorqueScript::Function::getDeclaredName ( )

Retrieves the declared name of this function.

Returns
The name that this function was declared with.

◆ getDeclaredNameSpace()

const std::string& TorqueScript::Function::getDeclaredNameSpace ( )

Retrieves the declared namespace of this function.

Returns
The namespace that this function was declared with.

◆ getDeclaredPackage()

const std::string& TorqueScript::Function::getDeclaredPackage ( )

Retrieves the declared package of this function.

Returns
The package that this function was declared in.

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