NAME ^

pmc/luaany.pmc - Lua abstract base class

DESCRIPTION ^

LuaAny provides an abstract base class for some Lua types.

PMC Inheritance Summary ^

 Class                  Parents
 -----------------------------------------------
 LuaBoolean             LuaAny, Default
 LuaFunction            Sub, LuaAny, Default
 LuaNil                 LuaAny, Default
 LuaNumber              LuaAny, Default
 LuaString              LuaAny, Default
 LuaTable               LuaAny, Default
 LuaThread              LuaAny, Default
 LuaUserdata            LuaAny, Default

PMC "Attribute" Summary ^

 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             -               -
 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.

Methods ^

void morph(INTVAL type)

Changes the PMC to a PMC of a new type

INTVAL get_bool()

Returns true.

void *get_pointer()

Returns the address of the PMC.

void assign_pmc(PMC *value)

PMC *get_pmc_keyed(PMC *key)

Throws an exception.

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

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.

INTVAL is_equal(PMC *value)

INTVAL cmp(PMC *value)

Performs a multiple dispatch call for 'cmp'. Without shortcut like in Default PMC.

Specific Methods ^

PMC *get_metatable()

PMC *len()

PMC *tonumber()

Returns nil.

PMC *tostring()

Return a Lua string.

Common implementation (use __tostring or get_string).

AUTHORS ^

Francois Perrad.


parrot