Tramway SDK
Classes | Functions
tram::Script Namespace Reference

Scripting API. More...

Classes

class  Interface
 

Functions

void SetGlobal (name_t name, value_t value)
 
value_t GetGlobal (name_t name)
 
void SetFunction (name_t name, std::vector< Type > parameters, value_t(*function)(valuearray_t))
 
value_t CallFunction (name_t name, std::vector< Value > parameters)
 
value_t Evaluate (const char *code)
 
void SetInterface (Interface *new_language)
 
void LoadScript (const char *path)
 
void Init ()
 

Detailed Description

Scripting API.

Allows calling scripting language functions and allows them to call into framework functions.

See also
https://racenis.github.io/tram-sdk/documentation/framework/script.html

Function Documentation

◆ CallFunction()

value_t tram::Script::CallFunction ( name_t  name,
std::vector< Value parameters 
)

◆ Evaluate()

value_t tram::Script::Evaluate ( const char *  code)

◆ GetGlobal()

value_t tram::Script::GetGlobal ( name_t  name)

◆ Init()

void tram::Script::Init ( )

◆ LoadScript()

void tram::Script::LoadScript ( const char *  path)

◆ SetFunction()

void tram::Script::SetFunction ( name_t  name,
std::vector< Type parameters,
value_t(*)(valuearray_t function 
)

◆ SetGlobal()

void tram::Script::SetGlobal ( name_t  name,
value_t  value 
)

◆ SetInterface()

void tram::Script::SetInterface ( Interface new_language)