Basically AGX consists of transformation processing components and a crafty I/O concept. Latter could be used apart from tree transformation tasks as well to read and write data.
The transform components treat all input/output data as tree, which makes it possible to use the chain for several usecases, like:
- code generation
- data exchange
- data conversion
- [fill in your use-case here]
The major use-case and main goal of AGX is to generate Python code from an source, such as UML.
The framework is based on the Zope Component Architecture (ZCA), thus pluggable and highly customizable.
We tried to make extension work for developers as easy and as less code expensive as possible at the same time.
Thus its easy to write own generators and hook them in existing transformation chains. Extending i.e. UML models by profiles with stereotypes and tagged values and providing additional generators enables new behavior in your generated code.
There exist several namespaces which contain core components and logical groups of components. Please follow the naming conventions when providing your own modules.
The AGX transformation chain provided by agx.core consists out several components. These are decoupled by ZCA.
It walks recursivly through the whole source tree. For each node found it
Looks up all Handler instances registered for the current transform and generator. For each Handler it
AGX core provides a generic pipelined multi pass tree transformation. It is based on source tree traversal and dispatching to handlers. The core itself provides the basic toolset and logic for such a transform. Setup, configuration and handlers must be provided by the application using AGX.
The overall process is described by the following diagram: