parrotcode: Lua abstract base class | |
Contents | Language Implementations | Lua |
pmc/luaany.pmc - Lua abstract base class
LuaAny
provides an abstract base class for some Lua types.
Class Parents
-----------------------------------------------
LuaBoolean LuaAny, Default
LuaClosure Closure, LuaAny, Default
LuaFunction Sub, LuaAny, Default
LuaNil LuaAny, Default
LuaNumber LuaAny, Default
LuaString LuaAny, Default
LuaTable LuaAny, Default
LuaThread LuaAny, Default
LuaUserdata LuaAny, Default
Class Metatable Environment Userdata
accessor get_metatable getfenv get_attr_str (getattribute)
mutator set_metatable setfenv set_attr_str (setattribute)
default value nil nil NULL
------------------------------------------------------------------
LuaBoolean nil - -
LuaClosure nil yes -
LuaFunction nil yes -
LuaNil nil - -
LuaNumber nil - -
LuaString yes (common) - -
LuaTable yes - -
LuaThread nil yes -
LuaUserdata yes yes yes
The metatable supports the OO mecanism.
void morph(INTVAL type)
INTVAL get_bool()
true
.void *get_pointer()
void assign_pmc(PMC *value)
PMC *get_pmc_keyed(PMC *key)
void set_pmc_keyed(PMC *key, PMC *value)
PMC *neg(PMC *dest)
void i_neg()
PMC *logical_not(PMC *dest)
INTVAL defined()
void *invoke(void *next)
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)
INTVAL is_equal(PMC *value)
INTVAL cmp(PMC *value)
PMC *get_metatable()
PMC *len()
PMC *tonumber()
nil
.PMC *tostring()
string
.__tostring
or get_string
).Francois Perrad.
|