TadsObjectclasssystype.h[242], debug.t[337], signals.t[150]

The "TADS Object" intrinsic class. All objects that the program defines with the "class" or "object" statements descend from this class.

Modified in debug.t[337]:
Provide TadsObject with an objToString() method so that the EVALUATE command can display some kind of name of the object via the toString() function

Modified in signals.t[150]:
MODIFICATIONS TO TadsObject for SIGNALS EXTENSION

Add handling for emiting, handling and dispatching signals.

intrinsic class TadsObject :   Object

Superclass Tree   (in declaration order)

TadsObject
        Object

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

(none)

Summary of Methods  

createClone  createInstance  createTransientInstance  dispatchSignal  emit  getMethod  handle  objToString  setMethod  setSuperclassList 

Inherited from Object :
callInherited  createIterator  createLiveIterator  forEach  getPropList  getPropParams  getSuperclassList  isClass  isTransient  mapAll  ofKind  propDefined  propInherited  propType  valToSymbol 

Properties  

(none)

Methods  

createClone ( )systype.h[260]

Create a clone of this object. This creates an exact copy, with the same property values, as the original. This does not call any constructors; it merely instantiates an exact copy of the original.

Note that the clone is a "shallow" copy, which means that any objects it references are not themselves cloned.

createInstance (...)systype.h[250]
Create an instance of this object: in other words, create a new object whose superclass is this object. The arguments provided are passed to the new object's constructor. This method returns a reference to the new object.

createTransientInstance (...)systype.h[267]
Create a transient instance of this object. This works just like createInstance(), but creates a transient instance instead of an ordinary (persistent) instance.

dispatchSignal (sender, signal)signals.t[177]
Dispatch a signal to the appropriate handler method on this object. We look up the property pointer to use on the signal's dispatchTab LookupTable. If we find one and the property is defined on this object then we use that property to handle the signal. Otherwise, we simply use our catch-all generic handle(sender, signal) method.

[SIGNALS EXTENSION]

emit (signal, [args])signals.t[152]
Emit a signal [SIGNALS EXTENSION]

getMethod (prop)systype.h[330]
Get a method value. If the property is a method, this returns a function pointer to the method; this does NOT evaluate the method. If the property is not a method, this returns nil.

The returned function pointer can be called like an ordinary function, but such a call will have no 'self' value, so the disembodied method won't be able to refer to properties or methods of 'self'. The main use of this method is to get a method of one object to assign as a method of another object using setMethod().

handle (sender, signal)signals.t[164]
Handle a signal from sender; game code will need to override particular instances. Note that this is a catch-all handler for signals we don't recognize or for which more specific handlers haven't been defined. [SIGNALS EXTENSION]

objToString ( )debug.t[338]
no description available

setMethod (prop, func)systype.h[341]
Set a method value. Assigns the given function (which must be a function pointer value) to the given property of 'self'. This effectively adds a new method to the object.

The function can be an ordinary named function, or a method pointer retrieved from this object or from another object with getMethod(). Anonymous functions are NOT allowed here.

setSuperclassList (scList)systype.h[317]
Set the superclass list. scList is a list giving the new superclasses. The superclasses must all be TadsObject objects, with one exception: the list [TadsObject] may be passed to create an object based directly on TadsObject. No other intrinsic classes can be used in the list, and objects of other types cannot be used in the list.

Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0