graph LR
Code_Generation_Core["Code Generation Core"]
Enumeration_Generator["Enumeration Generator"]
Enumeration_Generator -- "uses" --> Code_Generation_Core
Enumeration_Generator -- "depends on" --> Code_Generation_Core
This subsystem encompasses the core Python modules responsible for generating C/C++ source code. Its boundaries are defined by: pysrc.codegen (File: /mnt/e/StartUp/xed/pysrc/codegen.py) and pysrc.enumer (File: /mnt/e/StartUp/xed/pysrc/enumer.py).
This component serves as the foundational, general-purpose utility for emitting C/C++ source code. It provides low-level primitives for file output, managing standard headers, adding arbitrary code lines, declaring variables, and generating common C functions (e.g., for lookup tables). It acts as the primary engine for transforming Python data structures into C/C++ code.
Related Classes/Methods:
pysrc.codegenpysrc.codegen.start:245-261pysrc.codegen.emit_header:360-363pysrc.codegen.add_code:306-310pysrc.codegen.add_var:730-759pysrc.codegen.gen_lookup_function:913-957pysrc.codegen.close:146-156pysrc.codegen.emit_file:158-162pysrc.codegen.function_object_t:265-387pysrc.codegen.xed_file_emitter_t:233-261
This specialized component focuses on the management and generation of C/C++ enumeration types. It processes enumeration definitions and translates them into corresponding C/C++ header and source file code. It leverages the capabilities of the pysrc.codegen module for the actual code emission, acting as a higher-level abstraction for a specific code generation task.
Related Classes/Methods: