Skip to content

Commit 5e8d600

Browse files
committed
Write the PrettifyNames section
1 parent aaa4605 commit 5e8d600

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/for-contributors/Generator/generator-mods.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,30 @@ benefit `MixKhronosData` provides for those bindings.
493493

494494
Mod categories: Naming, Transformation
495495

496+
This is the mod central to name processing. `PrettifyNames` focuses on the bulk prettification of names and the
497+
processing of name affixes declared by other mods.
498+
499+
Name processing as a whole and information about the high level implementation details of `PrettifyNames` is available
500+
in the [Name Processing](name-processing.md) documentation.
501+
496502
Usage recommendations:
497503

504+
This mod should be positioned late in the mod order to ensure that all mods that introduce new identifiers and
505+
`[NameAffix]` attributes have run.
506+
507+
The placement of this mod can also affect mods that rely on the C# identifiers of types and their members rather than
508+
the names specified by that identifier's `[NativeName]` attribute. One notable mod of this type is `TransformEnums`.
509+
510+
When configuring how name affixes are processed in the `PrettifyNames` configuration, note that the name affix category
511+
configuration is designed to be verbose on purpose. If a category is left unconfigured, it will simply use the default
512+
configuration. Mods cannot provide default affix category configurations. This is to ensure that what you see in the
513+
`PrettifyNames` configuration directly corresponds to the output.
514+
515+
Furthermore, when defining values for the `Order` and `DiscriminatorPriority` properties, prefer to use consecutive
516+
values since there is no need to reserve space for intermediate values when new name affix categories are introduced.
517+
This is because it is easy enough to update the other entries to use a higher/lower value for the set of bindings being
518+
configured. New name affixes are also very unlikely to be introduced after the set of bindings have been created.
519+
498520
### StripAttributes
499521

500522
Mod categories: Metadata

0 commit comments

Comments
 (0)