Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | List of all members
Mezzanine::Scripting::iScriptMultipleReturn Class Referenceabstract

This script can return simple group of values. More...

#include <script.h>

+ Inheritance diagram for Mezzanine::Scripting::iScriptMultipleReturn:
+ Collaboration diagram for Mezzanine::Scripting::iScriptMultipleReturn:

Public Member Functions

virtual void AddReturn (CountedPtr< iScriptArgument > ReturnArg)=0
 Add another value to be returned. More...
 
virtual bool CanReturnMultples () const
 Does this script support multiple return values. More...
 
virtual ArgumentGroup GetAllReturns () const =0
 Get the returns from the last exection of the script. More...
 
virtual iScriptMultipleReturnGetAsiScriptMultipleReturn ()
 If your only handle to this is a pointer of type iScript this can be called to get a pointer to an iScriptMultipleReturn if it would be valid. More...
 
virtual iScriptMultipleReturnGetMostDerived ()
 Get a pointer to the most Derived type of this class. More...
 
virtual CountedPtr< iScriptArgumentGetReturn (Whole ReturnNumber) const =0
 Retrieve a value returned from a script. More...
 
virtual Whole GetReturnCount () const =0
 How many values are being returned. More...
 
- Public Member Functions inherited from Mezzanine::Scripting::iScript
 iScript ()
 default constructor More...
 
virtual void AddArgument (CountedPtr< iScriptArgument > Arg)=0
 This adds an argument to be passed to the script. More...
 
virtual bool CanReturnMultples ()
 Does this script support multiple return values. More...
 
virtual void ClearArguments ()=0
 Remove all the ARGs!!! http://imgur.com/DJhw7. More...
 
Whole DecrementReferenceCount ()
 Decrease the reference count by one and return the updated count. More...
 
virtual CountedPtr< iScriptArgumentGetArgument (Whole ArgNumber) const =0
 Retrieve a argument previously passed in. More...
 
virtual Whole GetArgumentCount () const =0
 How many arguments have been attached to this script? More...
 
virtual iScriptCompilableGetAsScriptCompilable ()
 If your only handle to this is a pointer of type iScript this can be called to get a pointer to an iScriptCompilable if it would be valid. More...
 
virtual iScriptCompilableGetAsScriptCompilable () const
 If your only handle to this is a pointer of type iScript this can be called to get a pointer to an iScriptCompilable if it would be valid. More...
 
Whole GetReferenceCount ()
 Get the current amount of references. More...
 
virtual iScriptGetReferenceCountTargetAsPointer ()
 Gets the actual pointer to the target. More...
 
virtual String GetSourceCode () const =0
 If present this returns the code of script. More...
 
Whole IncrementReferenceCount ()
 Increase the reference count by one and return the updated count. More...
 
virtual bool IsCompilable () const
 Used to check if this Script supports compilation bytecode. More...
 
virtual bool IsCompiled () const
 Used to check if there is a bytecode version of the script available. More...
 
virtual void RemoveArgument (CountedPtr< iScriptArgument > Arg)=0
 Remove an argument based on a CountedPtr to the script. More...
 
virtual void RemoveArgument (Whole ArgNumber)=0
 Remove a Script argument based on the order it will be passed into the Script at Execution. More...
 
virtual void SetSourceCode (const String &Code)=0
 Sets the string version of the script. More...
 

Additional Inherited Members

- Protected Attributes inherited from Mezzanine::Scripting::iScript
Whole RefCount
 This is the Counter that stores how many references exist.
 

Detailed Description

This script can return simple group of values.

This loosely correlates to a tuple like the simple returns in Lua or any return in Python. This cannot handle returns that include tuples that contain tuples in a graceful way.

Definition at line 301 of file script.h.

Member Function Documentation

virtual void Mezzanine::Scripting::iScriptMultipleReturn::AddReturn ( CountedPtr< iScriptArgument ReturnArg)
pure virtual

Add another value to be returned.

Parameters
ReturnArgA copy assignable script argument that conveys type information to the specific language runtime

Some scripting languages (Lua51) require knowledge of the return types of the scripts in order to extract them from the language runtime. Pointers to classes derived from iScriptArgument should convey that typing information to such language runtimes.

Implemented in Mezzanine::Scripting::Lua::Lua51Script.

virtual bool Mezzanine::Scripting::iScriptMultipleReturn::CanReturnMultples ( ) const
inlinevirtual

Does this script support multiple return values.

Returns
Any implementation of this returns true.

Definition at line 306 of file script.h.

virtual ArgumentGroup Mezzanine::Scripting::iScriptMultipleReturn::GetAllReturns ( ) const
pure virtual

Get the returns from the last exection of the script.

Returns
An ArgumentSet that can be iterated over to get all the values returned.

Implemented in Mezzanine::Scripting::Lua::Lua51Script.

virtual iScriptMultipleReturn* Mezzanine::Scripting::iScriptMultipleReturn::GetAsiScriptMultipleReturn ( )
inlinevirtual

If your only handle to this is a pointer of type iScript this can be called to get a pointer to an iScriptMultipleReturn if it would be valid.

Returns
A null pointer if this conversion is invalid or a valid pointer to this as an iScriptMultipleReturn if it is valid.

Reimplemented from Mezzanine::Scripting::iScript.

Definition at line 309 of file script.h.

virtual iScriptMultipleReturn* Mezzanine::Scripting::iScriptMultipleReturn::GetMostDerived ( )
inlinevirtual

Get a pointer to the most Derived type of this class.

Returns
A pointer of the most derived pointing to this.

Reimplemented from Mezzanine::Scripting::iScript.

Reimplemented in Mezzanine::Scripting::Lua::Lua51Script.

Definition at line 336 of file script.h.

virtual CountedPtr<iScriptArgument> Mezzanine::Scripting::iScriptMultipleReturn::GetReturn ( Whole  ReturnNumber) const
pure virtual

Retrieve a value returned from a script.

Parameters
ReturnNumberThe index of the return to return.
Returns
A reference counted pointer to a ScriptArgument.

Implemented in Mezzanine::Scripting::Lua::Lua51Script.

virtual Whole Mezzanine::Scripting::iScriptMultipleReturn::GetReturnCount ( ) const
pure virtual

How many values are being returned.

Returns
A Whole with the amount of items available to be returned now(from the last script call).

Implemented in Mezzanine::Scripting::Lua::Lua51Script.


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