Aztec® Programming Language
Version 1.1 Alpha 2

Copyright © 2010-2017, Aztec Development Group, All Rights Reserved

Download Aztec

Search        Contact Us

Seagull you must have known for a long time...

The shape of things to come.

- Paul Rodgers and Mick Ralphs


An Aztec class can be defined in more than one place, with the 'class' statement used for each definition. Each Aztec class can consist of one "primary" class definition statement, and any number of 'satellite' class definition statements. This allows the definition of a class to be spread across multiple modules. The "primary" class definition statement must be marked as "dynamic" in order to support satellite classes.

There can only be one primary definition of a class, and that class statement must not use the ‘satellite’ keyword. And as mentioned above, that primary class statement must use the 'dynamic' keyword, indicating that satellite classes are permitted for the class. If the class is marked as dynamic, any number of separate 'satellite' class definition statements are allowed for the same class. The data items and methods contained in a "satellite" class statement are a valid part of the class just like the data items and methods contained in the "primary" defiinition of the statement, with one or two rules as described below.

♦ You can add instance methods (including new constructors), shared methods and shared data to a 'dynamic' class by defining them in a satellite class statement block.

♦ A 'satellite' class can be defined in a completely separate module.

♦ You can not add a new instance data item to a dynamic class. Only shared data can be added to a dynamic class.

♦ Primitive data types currently do not support instance methods in satellite classes, but they do allow shared methods and shared data. This restriction may be removed in the future.

♦ There are several benefits to using a satellite class

♦ It allows new functionality to be added to a class without having to create a new class

♦ All classes in the Aztec Framework are defined as dynamic, so their functionality can be "extended" by simply adding new instance methods or shared data contained in a satellite block.

♦ Provides flexibility in controlling access to certain data and methods within a class when satellites are used together with visibility options such as ‘module’, ‘family’, ‘space’ and ‘unit’.

♦ When using dynamic code generation, a satellite class can be dynamically compiled at run-time (using Script.LoadModule()), and new methods and shared data are integrated into the existing class hierarchy, including Metadata changes. This allows the class to be dynamically modified at run-time. If a virtual method is added, the virtual method hierarchy table is modified immediately and existing code using the method call will dynamically update to execute the new virtual method, if appropriate.


Page UpPage DownCopyright © 2010-2017
Aztec Development Group
All Rights Reserved

Download Aztec