gws.spec.generator.normalizer¶
Normalize parsed types: resolve aliases, evaluate defaults and complete classes.
Source code: gws.spec.generator.normalizer
Module Contents¶
- gws.spec.generator.normalizer.COMMA = ','¶
- gws.spec.generator.normalizer.DOT = '.'¶
- gws.spec.generator.normalizer.normalize(gen: gws.spec.generator.base.Generator)¶
Normalize the parsed types in place.
The steps are:
add aliases
gws.Namefor names defined in the modules listed inGLOBAL_MODULES,expand alias chains and replace alias references with the target uids,
evaluate default expressions (constants and enum members) to values,
create a
VARIANTtype for eachgws.extcategory, e.g.gws.ext.object.layerwith membersqgis,wmsand so on,add a
typeproperty to eachgws.ext.configandgws.ext.propsclass,warn about undefined
gwstypes,collect the own and inherited properties of each class into
tProperties.
- Parameters:
gen – Generator state.
- Raises:
GeneratorError – On circular aliases or circular inheritance.