API Documentation
Static Public Member Functions | List of all members
nkAstraeus::nkScriptsWrap::CompilationResultWrapper Class Referencefinal

Wraps a nkScripts::CompilationResult and offers capabilities to use it in scripts. More...

Static Public Member Functions

static void updateEnvironment (nkScripts::Environment *env)
 
static void * constructor (const nkScripts::DataStack &stack)
 
static void destructor (void *toDestroy)
 
static nkScripts::OutputValue getFailureMessage (void *data)
 
static nkScripts::OutputValue getFailureType (void *data)
 
static nkScripts::OutputValue getSuccess (void *data)
 
static void setFailureMessage (const nkScripts::DataStack &stack)
 
static void setFailureType (const nkScripts::DataStack &stack)
 
static void setSuccess (const nkScripts::DataStack &stack)
 

Detailed Description

Wraps a nkScripts::CompilationResult and offers capabilities to use it in scripts.

Member Function Documentation

◆ updateEnvironment()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::updateEnvironment ( nkScripts::Environment env)
static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters
envThe environment to set up.

◆ constructor()

static void* nkAstraeus::nkScriptsWrap::CompilationResultWrapper::constructor ( const nkScripts::DataStack stack)
static

Wrapper function for the constructor of the user type.

local r = nkScripts.CompilationResult.new() ;
Parameters
stackThe parameter stack.
Returns
An output value with the user type and data allocated.

◆ destructor()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::destructor ( void *  toDestroy)
static

Wrapper function for the destructor of the user type.

Parameters
toDestroyThe data that has to be freed.

◆ getFailureMessage()

static nkScripts::OutputValue nkAstraeus::nkScriptsWrap::CompilationResultWrapper::getFailureMessage ( void *  data)
static

Wrapper function for nkScripts::CompilationResult::_failureMessage, exposed as an attribute getter.

local m = r._failureMessage ;
Parameters
dataThe data from which the attribute will be retrieved.
Returns
The attribute value, as a string.

◆ getFailureType()

static nkScripts::OutputValue nkAstraeus::nkScriptsWrap::CompilationResultWrapper::getFailureType ( void *  data)
static

Wrapper function for nkScripts::CompilationResult::_failureType, exposed as an attribute getter.

local t = r._failureType ;
Parameters
dataThe data from which the attribute will be retrieved.
Returns
The attribute value, as a nkScripts::COMPILATION_FAILURE_TYPE.

◆ getSuccess()

static nkScripts::OutputValue nkAstraeus::nkScriptsWrap::CompilationResultWrapper::getSuccess ( void *  data)
static

Wrapper function for nkScripts::CompilationResult::_success, exposed as an attribute getter.

local m = r._success ;
Parameters
dataThe data from which the attribute will be retrieved.
Returns
The attribute value, as a bool.

◆ setFailureMessage()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::setFailureMessage ( const nkScripts::DataStack stack)
static

Wrapper function for nkScripts::CompilationResult::_failureMessage, exposed as an attribute setter.

r._failureMessage = 'Failed to parse sources' ;
Parameters
stackThe parameter stack.

◆ setFailureType()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::setFailureType ( const nkScripts::DataStack stack)
static

Wrapper function for nkScripts::CompilationResult::_failureType, exposed as an attribute setter.

Parameters
stackThe parameter stack.

◆ setSuccess()

static void nkAstraeus::nkScriptsWrap::CompilationResultWrapper::setSuccess ( const nkScripts::DataStack stack)
static

Wrapper function for nkScripts::CompilationResult::_success, exposed as an attribute setter.

r._success = true ;
Parameters
stackThe parameter stack.

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