ModuleExecObject class | _main.t[314]

Module Execution Object. This is an abstract base class for various classes that provide modular execution hooks. This class and its subclasses are mix-in classes - they can be multiply inherited by any object (as long as it's not already some other kind of module execution object).

The point of the Module Execution Object and its subclasses is to allow libraries and user code to define execution hooks, without having to worry about what other libraries and user code bits are defining the same hook. When we need to execute a hook defined via this object, we iterate over all of the instances of the appropriate subclass and invoke its execute() method.

By default, the order of execution is arbitrary. In some cases, though, dependencies will exist, so that one object cannot be invoked until another object has already been invoked. In these cases, you must set the execBeforeMe property to contain a list of the objects whose execute() methods must be invoked before this object's execute() method is invoked. The library will check this list before calling execute() on this object, and ensure that each object in the list has been invoked before calling this object's execute().

`class ModuleExecObject : object`

Superclass Tree (in declaration order)

`ModuleExecObject`
`object`

Subclass Tree

`ModuleExecObject`
`InitObject`
`PostRestoreObject`
`PostUndoObject`
`PreinitObject`
`GlobalRemapping`
`MessageBuilder`
`MetadataModuleID`
`GameInfoModuleID`
`GameID`
`OutputStream`
`BannerOutputStream`
`LogConsole`
`WebWinOutputStream`
`StringPreParser`
`TopHintMenu`
`PreRestartObject`
`PreSaveObject`

Global Objects

(none)

Summary of Properties

`execAfterMe execBeforeMe hasInitialized_ isDoingExec_ isExecuted_`

Summary of Methods

`_execute classExec execute`

Properties

`execAfterMe` | `_main.t[327]`

List of objects that must be executed after me - this is analogous to execBeforeMe, but we make sure we run before these.

`execBeforeMe` | `_main.t[321]`

List of objects that must be executed before me - by default, the order doesn't matter, so we'll set this to an empty list. Instances can override this if it is necessary to execute other objects before this object can be executed.

`hasInitialized_` | `_main.t[422]`

flag to indicate that this is the first time running classExec

`isDoingExec_` | `_main.t[345]`

flag - true if we're in the process of executing

`isExecuted_` | `_main.t[342]`

flag - true if we've been executed on this round

Methods

`_execute ( )` | `_main.t[348]`

execute - internal method: checks dependency order

`classExec ( )` | `_main.t[429]`

Class execution. Call this method on the particular class of modules to execute. We'll iterate over all instances of that class and invoke each instance's _execute() method.

`execute ( )` | `_main.t[333]`

Subclass-specific execution method. Each subclass should override this method to provide its execution code.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3