Class: fpubclass

The luxinia API is provided by a system that we call functionpublishing. The functionpublishing is standalone and not bound to a certain scripting language. It also provides basic descriptions (like this text) and implements an objectoriented system of inheritance, even though Luxinia is written in pure C (which isn't an objectoriented programminglanguage). Every object that is created in the Luxinia C core is wrapped in a fpubclass which provides information about the class functions, parent classes and interface classes.

Methods:

Method overview:


class (string/int/any handle)
returns: ([fpubclass/int])
returns the maximum number of classes that are registered in the functionpublishing (not all the numbers are registered classes) if no argument is given. If an int is applied, the class with this classid is returned. If a string is given, a class with that name is searched, and if an object is given, the class of the given object is returned. If a class was not found, nil is returned.
classid (fpubclass c)
returns: (int)
returns the internal ID number of the class
datapointer (any handle)
returns: (pointer)
converts a luxinia core-class userdata to a pointer.This is useful for threading and custom dll extenders, BUT be aware that you loose all garbage collection tracking.Because that is solely based on the lua userdata in the main lua thread.
description (fpubclass)
returns: ([string])
returns description string for the class
functioninfo (fpubclass, [int n/string name])
returns: (int/[string name,string description])
returns the number of functions within this class (not within it's parents or interfaces). If n is provided, it returns the name and the description of the n'th function, where n is >= 0 and < the number of functions. If a string is passed, the return is the same as for n if the functinname is known.
hasinterface (fpubclass c, fpubclass interface)
returns: (boolean)
checks if the class c implements the given interface class
inherited (fpubclass,string functionname)
returns: (boolean)
returns true if the given function is inherited to child classes
interface (fpubclass,[int index])
returns: ([int/fpubclass])
returns the number of implemented interfaces. If an index is provided (>=0, <interfacecount) it returns the interface of the class
ischildof (fpubclass child,fpubclass parent)
returns: (boolean)
checks if the child is derived from parent
isinterface (fpubclass)
returns: (boolean)
returns true if the given class is an interface class
isluxnative (fpubclass c)
returns: (boolean)
returns whether the class is part of the base luxinia.
name (fpubclass)
returns: (string)
returns the name of the given class
parent (fpubclass)
returns: ([fpubclass])
returns the parent of the class if it has a parent