supertux
Public Member Functions | List of all members
SquirrelVM Class Reference

Basic wrapper around HSQUIRRELVM with some utility functions, not to be confused with SquirrelVirtualMachine. More...

#include <squirrel_vm.hpp>

Public Member Functions

HSQUIRRELVM get_vm () const
 
void begin_table (const char *name)
 
void end_table (const char *name)
 
void create_empty_table (const char *name)
 Creates an empty table with given name. More...
 
bool has_property (const char *name)
 
void store_bool (const char *name, bool val)
 
void store_int (const char *name, int val)
 
void store_float (const char *name, float val)
 
void store_string (const char *name, const std::string &val)
 
void store_object (const char *name, const HSQOBJECT &val)
 
bool get_bool (const char *name, bool &val)
 
bool get_int (const char *name, int &val)
 
bool get_float (const char *name, float &val)
 
bool get_string (const char *name, std::string &val)
 
bool read_bool (const char *name)
 
int read_int (const char *name)
 
float read_float (const char *name)
 
std::string read_string (const char *name)
 
void get_table_entry (const std::string &name)
 
void get_or_create_table_entry (const std::string &name)
 
void delete_table_entry (const char *name)
 
void rename_table_entry (const char *oldname, const char *newname)
 
std::vector< std::string > get_table_keys ()
 
HSQOBJECT create_thread ()
 

Detailed Description

Basic wrapper around HSQUIRRELVM with some utility functions, not to be confused with SquirrelVirtualMachine.

The classes might be merged in the future.

Member Function Documentation

§ create_empty_table()

void SquirrelVM::create_empty_table ( const char *  name)

Creates an empty table with given name.

Parameters
vmVM to create table on
nameName of the table to create

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