Domain Model

The domain model resembles the structure of our system as objects. It is build by the parser and is the input into the generator.

It is important to understand the domain model as it is the main input for the template generation.

The IDL is converted into an in memory domain model (see qface/idl/

- System
    - Module
        - Import
        - Interface
            - Property
            - Operation
            - Signal
        - Enum
        - Flag
        - Struct

The domain model is the base for the code generation. You traverse the domain tree and trigger your own code generation.

from qface.generator import FileSystem

system = FileSystem.parse('./interfaces')

for module in sytem.modules:

    for interfaces in module.interfaces:

    for struct in module.structs:


At any time you can place a debug breakpoint:

import ipdb; ipd.set_trace()


To see the object members just use:

dir(module) # list all members of module
help(module) # prints the documentation