-
Notifications
You must be signed in to change notification settings - Fork 0
Universes Libraries System
The notion of 'universe' is not the same since the advent of 'ecf' files. The understanding of those terms diverged from the one appeared with xace files.
A universe is set of classes in an ECF library or an 'assembly'. In an ECF or an assembly, each class has a unique name.
A system is defined with an ECF. A system assembles clusters and other ECF libraries.
A system is thus a universe that recursively references other universes (libraries or assemblies).
A 'group' is a physical location where a class resides.
This is either a cluster (directory) or a .NET assembly.
In a universe, classes come from
- a group that is locally defined in this universe
- another library (embedded universe). In that case, the classes are 'imported' from the embedded universe.
A class (ET_CLASS) corresponds to a physical class (a file with its textual representation).
For incremental compilation purpose, there is a supplementary indirection. In a universe, each class name is associated with a master class (ET_MASTER_CLASS). The master class is resolved at compile time to a class that is declared locally in the universe, or imported from another universe (or library).
{ET_MASTER_CLASS}.actual_class gives access to the 'resolved' class.
Dependencies between universes are recursive. If you want to browse things, you have to use the *_do_recurse features from ET_SYSTEM to browse an entire universe.
For example, calling an action for every class in a system is done like this:
my_system.classes_do_recursive (agent action)
To feed a list with all classes in a system :
my_list: DS_LINKED_LIST[ET_CLASS]
...
my_system.classes_do_recursive (agent my_list.put_last)
From my experience at this time (PGC, November 19, 2012) I can say that you have to use a system straight from a system parser.
The original eDoc code did the following:
- Parse a system/library
- Append the clusters to a list of clusters
- Create a system from scratch, setting the list of clusters obtained in (2)
Unfortunately, in that case, the *_do_recursive
functions do not work on this newly created universe.