pmc/luabase.pmc - Lua abstract base class


LuaBase provides an abstract base class for some Lua types.

Methods ^

void morph(INTVAL type)

Morphs the scalar to the specified type.

PMC *clone()

Creates and returns a clone of the scalar.

INTVAL get_bool()

Returns true.

PMC *get_pmc_keyed (PMC *key)

Throws an exception.

void set_bool(INTVAL value)

void set_pmc_keyed (PMC *key, PMC *value)

Throws an exception.

PMC *neg (PMC *dest)

void i_neg()

Throws an exception.

PMC *logical_not(PMC *dest)

Common implementation (use get_bool & set_bool)

INTVAL defined()

Always returns true.

void *invoke(void *next)

Throws an exception.

non-Vtable Methods ^

void add(PMC *value, PMC *dest)

void i_add (PMC *value)

void subtract(PMC *value, PMC *dest)

void i_substract (PMC *value)

void multiply(PMC *value, PMC *dest)

void i_multiply (PMC *value)

void divide(PMC *value, PMC *dest)

void i_divide (PMC *value)

PMC *modulus (PMC *value, PMC *dest)

void i_modulus (PMC *value)

PMC *pow (PMC *value, PMC *dest)

void i_pow (PMC *value)

PMC *concatenate (PMC *value, PMC *dest)

void i_concatenate (PMC *value)

Throws an exception.

Specific Methods ^

PMC *len()

PMC *tonumber()

Returns nil.

PMC *tostring()

Return a Lua string.

Common implementation (use __tostring or get_string).

PMC *find_metamethod(STRING *method_name)

Looks up the method for *method_name.

PMC *get_metatable()


Francois Perrad.