Constructors

From ENIGMA

Jump to: navigation, search

In many object oriented languages, including C++, Constructors (often abbreviated c'tors) and Destructors (d'tors) are used to implement code to be executed when a class is instantiated, or to be less precise, declared, and when it is freed, or destroyed.

Constructors and destructors play a large roll in shaping ENIGMA. Since constructors are executed when the current scope begins and destructors are executed whenever the current scope ends (regardless of how it was ended), structures implementing different behaviors can be placed in loops or statements such as with() or in events such as "create" to achieve a desired effect. See the with() implementation for a use case.

This mechanism is deployed in events such as "create" in order to temporarily indicate the current instance for functions such as instance_destroy().

Instance-level methods?

Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox