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.

Interfaces:

Methods:

Method overview:


class (string/int/any)
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
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
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
threadsafe (fpubclass,[string functionname])
returns: (boolean)
returns true if the class or the function is considered threadsafe. A functions that are threadsafe can be called simultanously by different threads. If a function is not considered threadsafe, the functionpublishing is locked and no other function that is not threadsafe can be called during that time. Threadsafe functions are faster when multiple threads are calling that function since less time is spent waiting on the other thread to finish a certain function.