The interface for a script argument. More...
#include <scriptargument.h>
Public Member Functions | |
virtual | ~iScriptArgument () |
Overidable Deconstructor. | |
virtual Boole | GetBoole () const =0 |
Get the Argument as a Boole. More... | |
virtual Integer | GetInteger () const =0 |
Get the Argument as a Integer. More... | |
virtual iScriptArgument * | GetMostDerived () |
Get a pointer to the most Derived type of this class. More... | |
virtual Real | GetReal () const =0 |
Get the Argument as a Real. More... | |
virtual String | GetString () const =0 |
Get the Argument as a String. More... | |
virtual Integer | GetTypeData () const =0 |
Get data about the underlying specific to the scripting system using the argument. More... | |
virtual Whole | GetWhole () const =0 |
Get the Argument as a Whole. More... | |
virtual Boole | IsNull () const =0 |
Is this value representing a Null/Nil value. More... | |
Public Member Functions inherited from Mezzanine::IntrusiveRefCount | |
IntrusiveRefCount () | |
Constructor for instatiating the Reference Count. | |
virtual | ~IntrusiveRefCount () |
Virtual Deconstructor to prevent issues with deletion with incomplete type information. | |
Whole | DecrementReferenceCount () |
Decrease the reference count by one and return the updated count. More... | |
Whole | GetReferenceCount () const |
Get the current amount of references. More... | |
IntrusiveRefCount * | GetReferenceCountTargetAsPointer () |
Gets the actual pointer to the target. More... | |
Whole | IncrementReferenceCount () |
Increase the reference count by one and return the updated count. More... | |
The interface for a script argument.
These are all the members that all script for all languages must implement. This mandatory functionlity insures that once portion of C++ code has access to a script argument it can always access the data contained.
These are created to provide data to scripts. This is intended to primarily to act as an abstraction layer between game data and data inside scripts, but currently just transports primitives into and out of scripts without needing to care about any underlying types. This limits what operations can be done with, because it is intended to provide an abstraction that can be used to implement specific algorithms for languages that require them.
For example Lua requires calling different functions for passing Strings Numbers, Nils and other types, while Ruby does not require this. These classes will always present Data to C++ class the same way, but will take whatever steps required for the scripting language and optionally the types they represent.
Definition at line 73 of file scriptargument.h.
|
pure virtual |
Get the Argument as a Boole.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.
|
pure virtual |
Get the Argument as a Integer.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.
|
inlinevirtual |
Get a pointer to the most Derived type of this class.
Reimplemented from Mezzanine::IntrusiveRefCount.
Reimplemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, Mezzanine::Scripting::Lua::Lua51NilArgument, Mezzanine::Scripting::Lua::Lua51BoolArgument, Mezzanine::Scripting::ScriptArgumentGeneric< T >, Mezzanine::Scripting::Lua::Lua51StringArgument, Mezzanine::Scripting::Lua::Lua51WholeArgument, Mezzanine::Scripting::Lua::Lua51RealArgument, and Mezzanine::Scripting::Lua::Lua51IntegerArgument.
Definition at line 110 of file scriptargument.h.
|
pure virtual |
Get the Argument as a Real.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.
|
pure virtual |
Get the Argument as a String.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, Mezzanine::Scripting::Lua::Lua51NilArgument, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.
|
pure virtual |
Get data about the underlying specific to the scripting system using the argument.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.
|
pure virtual |
Get the Argument as a Whole.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.
|
pure virtual |
Is this value representing a Null/Nil value.
Implemented in Mezzanine::Scripting::ScriptArgumentGeneric< NullArgument >, Mezzanine::Scripting::ScriptArgumentGeneric< Boole >, Mezzanine::Scripting::ScriptArgumentGeneric< Real >, Mezzanine::Scripting::ScriptArgumentGeneric< String >, Mezzanine::Scripting::ScriptArgumentGeneric< Whole >, Mezzanine::Scripting::ScriptArgumentGeneric< Integer >, and Mezzanine::Scripting::ScriptArgumentGeneric< T >.