Skip to content

Latest commit

 

History

History
91 lines (50 loc) · 4.62 KB

File metadata and controls

91 lines (50 loc) · 4.62 KB
graph LR
    Code_Generation_Entry_Point["Code Generation Entry Point"]
    Model_and_Language_Loader["Model and Language Loader"]
    Code_Generation_Orchestrator["Code Generation Orchestrator"]
    Class_Dependency_Orderer["Class Dependency Orderer"]
    Class_Declaration_Generator["Class Declaration Generator"]
    Attribute_Generator["Attribute Generator"]
    Relationship_Generator["Relationship Generator"]
    Code_Generation_Entry_Point -- "calls" --> Model_and_Language_Loader
    Code_Generation_Entry_Point -- "calls" --> Code_Generation_Orchestrator
    Code_Generation_Orchestrator -- "calls" --> Class_Dependency_Orderer
    Code_Generation_Orchestrator -- "calls" --> Class_Declaration_Generator
    Code_Generation_Orchestrator -- "calls" --> Attribute_Generator
    Code_Generation_Orchestrator -- "calls" --> Relationship_Generator
Loading

CodeBoardingDemoContact

Details

The Code Generation subsystem is responsible for translating the abstract Gaphor model into executable code or other textual representations. Its primary boundary is defined by the gaphor.codegen.coder module, specifically the coder.py file.

Code Generation Entry Point

The external entry point for initiating the code generation process. It sets up the environment by loading the model and language configurations before triggering the core generation logic.

Related Classes/Methods:

Model and Language Loader

Responsible for loading the Gaphor model data and configuring the code generation process based on the specific target modeling language's requirements and interpretations.

Related Classes/Methods:

Code Generation Orchestrator

The core orchestrator that drives the generation of code for various model elements. It acts as the central control flow, delegating tasks to specialized generator components.

Related Classes/Methods:

Class Dependency Orderer

Ensures that classes are processed in a dependency-aware order, which is crucial for correct code generation, by analyzing inheritance and other structural relationships.

Related Classes/Methods:

Class Declaration Generator

Generates the foundational code for a class declaration, including its name and inherited base classes, forming the basic structure of each class in the output.

Related Classes/Methods:

Attribute Generator

Handles the generation of code for attributes (variables) within a class, differentiating between primitive and complex types to ensure correct representation.

Related Classes/Methods:

Relationship Generator

Manages the generation of code representing relationships (associations and subsetting) between classes, handling references or collections as appropriate for the target language.

Related Classes/Methods: