Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::Scripting::ScriptArgumentGeneric< Whole > Class Template Reference

A Whole number implementation of a ScriptArgument that is suitable for primitive types in most situations. More...

#include <scriptargument.h>

+ Inheritance diagram for Mezzanine::Scripting::ScriptArgumentGeneric< Whole >:
+ Collaboration diagram for Mezzanine::Scripting::ScriptArgumentGeneric< Whole >:

Public Types

typedef Whole Type
 To make working with this easier.
 

Public Member Functions

 ScriptArgumentGeneric (Whole InitialValue)
 Create an initialized Argument. More...
 
virtual ~ScriptArgumentGeneric ()
 Overloadable Deconstructor.
 
virtual Boole GetBoole () const
 Get the Whole Number as a Boole. More...
 
virtual Integer GetInteger () const
 Get the Whole as a Integer. More...
 
virtual ScriptArgumentGeneric< Whole > * GetMostDerived ()
 Get a pointer to the most Derived type of this class. More...
 
virtual Real GetReal () const
 Get the Whole as a Real. More...
 
virtual String GetString () const
 Get the Whole as a String. More...
 
virtual Integer GetTypeData () const
 Get data about this being a Whol. More...
 
virtual Whole GetValue () const
 Get the raw primitive to value. More...
 
virtual Whole GetWhole () const
 Get the Whole number. More...
 
virtual Boole IsNull () const
 Is this value representing a Null/Nil value. More...
 
virtual void SetValue (Whole NewValue)
 Provide an overload point to change assignment that operators will use. More...
 
- Public Member Functions inherited from Mezzanine::Scripting::iScriptArgument
virtual ~iScriptArgument ()
 Overidable Deconstructor.
 
- 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...
 
IntrusiveRefCountGetReferenceCountTargetAsPointer ()
 Gets the actual pointer to the target. More...
 
Whole IncrementReferenceCount ()
 Increase the reference count by one and return the updated count. More...
 

Protected Attributes

Whole Datum
 The Whole actual data.
 

Detailed Description

template<>
class Mezzanine::Scripting::ScriptArgumentGeneric< Whole >

A Whole number implementation of a ScriptArgument that is suitable for primitive types in most situations.

Scripting Languages that require algorithms specific to Whole number should add required functionality to a type derived from this.

Definition at line 288 of file scriptargument.h.

Constructor & Destructor Documentation

Create an initialized Argument.

Parameters
InitialValueThe value to initialize the Argument Whole value with.
Note
Intentionally not explicit, this allow for passing convertable types directly to functions.

Definition at line 301 of file scriptargument.h.

Member Function Documentation

virtual Boole Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetBoole ( ) const
inlinevirtual

Get the Whole Number as a Boole.

Returns
The argument value lexographically converted as an Boole

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 331 of file scriptargument.h.

virtual Integer Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetInteger ( ) const
inlinevirtual

Get the Whole as a Integer.

Returns
The Whole value lexographically converted as an Integer

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 321 of file scriptargument.h.

virtual ScriptArgumentGeneric<Whole>* Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::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::iScriptArgument.

Reimplemented in Mezzanine::Scripting::Lua::Lua51WholeArgument.

Definition at line 356 of file scriptargument.h.

virtual Real Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetReal ( ) const
inlinevirtual

Get the Whole as a Real.

Returns
The Whole value lexographically converted as an Real

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 326 of file scriptargument.h.

virtual String Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetString ( ) const
inlinevirtual

Get the Whole as a String.

Returns
The Whole value lexographically converted as a String

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 311 of file scriptargument.h.

virtual Integer Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetTypeData ( ) const
inlinevirtual

Get data about this being a Whol.

Returns
This will return an Integer containing GenericWhole.

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 351 of file scriptargument.h.

virtual Whole Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetValue ( ) const
inlinevirtual

Get the raw primitive to value.

Returns
The internal value that meaningful operation can be performed on.

Definition at line 346 of file scriptargument.h.

virtual Whole Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::GetWhole ( ) const
inlinevirtual

Get the Whole number.

Returns
The Whole value lexographically converted as a Whole

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 316 of file scriptargument.h.

virtual Boole Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::IsNull ( ) const
inlinevirtual

Is this value representing a Null/Nil value.

Returns
In most languages 0 is a valid value for Whole Numbers, so any value in this is assumedto not be NULL. This should be overridden if different behavior is required.

Implements Mezzanine::Scripting::iScriptArgument.

Definition at line 336 of file scriptargument.h.

virtual void Mezzanine::Scripting::ScriptArgumentGeneric< Whole >::SetValue ( Whole  NewValue)
inlinevirtual

Provide an overload point to change assignment that operators will use.

Parameters
NewValueThe new value for this.

Definition at line 341 of file scriptargument.h.


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