API Documentation
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nkScripts::FunctionParameter Struct Referencefinal

A function parameter, used within the stack of arguments. More...

Public Member Functions

 FunctionParameter () noexcept
 
 FunctionParameter (bool val) noexcept
 
 FunctionParameter (int val) noexcept
 
 FunctionParameter (float val) noexcept
 
 FunctionParameter (double val) noexcept
 
 FunctionParameter (const char *val) noexcept
 
 FunctionParameter (nkMemory::StringView val) noexcept
 
 FunctionParameter (void *val, nkMemory::StringView userTypeName, bool scriptOwner) noexcept
 
 FunctionParameter (const ScriptObjectReference &scriptObjectReference) noexcept
 
 FunctionParameter (const FunctionParameter &other) noexcept
 
 FunctionParameter (FunctionParameter &&other) noexcept
 
 ~FunctionParameter ()
 
void prepareForInternalType ()
 
void prepareForString ()
 
void prepareForUserType ()
 
void prepareForScriptObjectReference ()
 
FunctionParameteroperator= (const FunctionParameter &other) noexcept
 
FunctionParameteroperator= (FunctionParameter &&other) noexcept
 

Public Attributes

union {
   bool   _valBool
 
   int   _valInt
 
   float   _valFloat
 
   double   _valDouble
 
   nkMemory::String   _valString
 
   UserTypeHolder   _valUser
 
   ScriptObjectReference   _valScriptObject
 
}; 
 
FUNCTION_PARAMETER_TYPE _type
 The actual type of the variable held.
 

Static Public Attributes

static FunctionParameter VOID
 

Detailed Description

A function parameter, used within the stack of arguments.

Constructor & Destructor Documentation

◆ FunctionParameter() [1/11]

nkScripts::FunctionParameter::FunctionParameter ( )
noexcept

Default constructor.

◆ FunctionParameter() [2/11]

nkScripts::FunctionParameter::FunctionParameter ( bool  val)
explicitnoexcept

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [3/11]

nkScripts::FunctionParameter::FunctionParameter ( int  val)
explicitnoexcept

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [4/11]

nkScripts::FunctionParameter::FunctionParameter ( float  val)
explicitnoexcept

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [5/11]

nkScripts::FunctionParameter::FunctionParameter ( double  val)
explicitnoexcept

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [6/11]

nkScripts::FunctionParameter::FunctionParameter ( const char *  val)
noexcept

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [7/11]

nkScripts::FunctionParameter::FunctionParameter ( nkMemory::StringView  val)
noexcept

Specific constructor.

Parameters
valThe value to assign.

◆ FunctionParameter() [8/11]

nkScripts::FunctionParameter::FunctionParameter ( void *  val,
nkMemory::StringView  userTypeName,
bool  scriptOwner 
)
noexcept

Specific constructor.

Parameters
valThe value to assign.
userTypeNameThe user type name of the object set.
scriptOwnerWhether the script is the owner of given object and should delete it upon garbage collection.

◆ FunctionParameter() [9/11]

nkScripts::FunctionParameter::FunctionParameter ( const ScriptObjectReference scriptObjectReference)
noexcept

Specific constructor.

Parameters
scriptObjectReferenceThe reference to assign.

◆ FunctionParameter() [10/11]

nkScripts::FunctionParameter::FunctionParameter ( const FunctionParameter other)
noexcept

Copy constructor.

Parameters
otherThe parameter to copy.

◆ FunctionParameter() [11/11]

nkScripts::FunctionParameter::FunctionParameter ( FunctionParameter &&  other)
noexcept

Move constructor.

Parameters
otherThe parameter to move.

◆ ~FunctionParameter()

nkScripts::FunctionParameter::~FunctionParameter ( )

Destructor.

Member Function Documentation

◆ prepareForInternalType()

void nkScripts::FunctionParameter::prepareForInternalType ( )

Prepares internal memory layout for the type given.

◆ prepareForString()

void nkScripts::FunctionParameter::prepareForString ( )

Prepares internal memory layout for the type given.

◆ prepareForUserType()

void nkScripts::FunctionParameter::prepareForUserType ( )

Prepares internal memory layout for the type given.

◆ prepareForScriptObjectReference()

void nkScripts::FunctionParameter::prepareForScriptObjectReference ( )

Prepares internal memory layout for the type given.

◆ operator=() [1/2]

FunctionParameter& nkScripts::FunctionParameter::operator= ( const FunctionParameter other)
noexcept

Copy operator.

Parameters
otherThe parameter to copy.

◆ operator=() [2/2]

FunctionParameter& nkScripts::FunctionParameter::operator= ( FunctionParameter &&  other)
noexcept

Move operator.

Parameters
otherThe parameter to move.

Member Data Documentation

◆ @5

union { ... }

Union of all types possible to have.

◆ VOID

FunctionParameter nkScripts::FunctionParameter::VOID
static

Static parameter enabling a quick void parameter use.


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