Base class for options used during header/documentation production. These options are target language independent, and used by Registry.apiGen() and by base OutputGenerator objects.
| 166 | |
| 167 | |
| 168 | class GeneratorOptions: |
| 169 | """Base class for options used during header/documentation production. |
| 170 | |
| 171 | These options are target language independent, and used by |
| 172 | Registry.apiGen() and by base OutputGenerator objects.""" |
| 173 | |
| 174 | def __init__(self, |
| 175 | conventions=None, |
| 176 | filename=None, |
| 177 | directory='.', |
| 178 | genpath=None, |
| 179 | apiname=None, |
| 180 | mergeApiNames=None, |
| 181 | mergeInternalApis=True, |
| 182 | profile=None, |
| 183 | versions='.*', |
| 184 | emitversions='.*', |
| 185 | defaultExtensions=None, |
| 186 | addExtensions=None, |
| 187 | removeExtensions=None, |
| 188 | emitExtensions=None, |
| 189 | emitSpirv=None, |
| 190 | emitFormats=None, |
| 191 | reparentEnums=True, |
| 192 | sortProcedure=regSortFeatures, |
| 193 | requireCommandAliases=False, |
| 194 | requireDepends=True, |
| 195 | ): |
| 196 | """Constructor. |
| 197 | |
| 198 | Arguments: |
| 199 | |
| 200 | - conventions - may be mandatory for some generators: |
| 201 | an object that implements ConventionsBase |
| 202 | - filename - basename of file to generate, or None to write to stdout. |
| 203 | - directory - directory in which to generate filename |
| 204 | - genpath - path to previously generated files, such as apimap.py |
| 205 | - apiname - string matching `<api>` 'apiname' attribute, e.g. 'gl'. |
| 206 | - mergeApiNames - If not None, a comma separated list of API names |
| 207 | to merge into the API specified by 'apiname' |
| 208 | - mergeInternalApis - whether to merge internal APIs into public APIs |
| 209 | - profile - string specifying API profile , e.g. 'core', or None. |
| 210 | - versions - regex matching API versions to process interfaces for. |
| 211 | Normally `'.*'` or `'[0-9][.][0-9]'` to match all defined versions. |
| 212 | - emitversions - regex matching API versions to actually emit |
| 213 | interfaces for (though all requested versions are considered |
| 214 | when deciding which interfaces to generate). For GL 4.3 glext.h, |
| 215 | this might be `'1[.][2-5]|[2-4][.][0-9]'`. |
| 216 | - defaultExtensions - If not None, a string which must in its |
| 217 | entirety match the pattern in the "supported" attribute of |
| 218 | the `<extension>`. Defaults to None. Usually the same as apiname. |
| 219 | - addExtensions - regex matching names of additional extensions |
| 220 | to include. Defaults to None. |
| 221 | - removeExtensions - regex matching names of extensions to |
| 222 | remove (after defaultExtensions and addExtensions). Defaults |
| 223 | to None. |
| 224 | - emitExtensions - regex matching names of extensions to actually emit |
| 225 | interfaces for (though all requested versions are considered when |