MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / refPageHead

Function refPageHead

scripts/genRef.py:334–361  ·  view source on GitHub ↗

Generate header of a reference page. - pageName - string name of the page - pageDesc - string short description of the page - pageAliases - set of aliases of this page - specType - string containing 'spec' field from refpage open block, or None. Used to determine containing sp

(pageName, pageDesc, pageAliases, specText, fieldName, fieldText, descText, fp)

Source from the content-addressed store, hash-verified

332
333
334def refPageHead(pageName, pageDesc, pageAliases, specText, fieldName, fieldText, descText, fp):
335 """Generate header of a reference page.
336
337 - pageName - string name of the page
338 - pageDesc - string short description of the page
339 - pageAliases - set of aliases of this page
340 - specType - string containing 'spec' field from refpage open block, or None.
341 Used to determine containing spec name and URL.
342 - specText - string that goes in the "C Specification" section
343 - fieldName - string heading an additional section following specText, if not None
344 - fieldText - string that goes in the additional section
345 - descText - string that goes in the "Description" section
346 - fp - file to write to"""
347 sections = OrderedDict()
348
349 if specText is not None:
350 sections['C Specification'] = specText
351
352 if fieldName is not None:
353 sections[fieldName] = fieldText
354
355 if descText is None or descText.strip() == '':
356 logWarn('refPageHead: no description provided for', pageName)
357
358 if descText is not None:
359 sections['Description'] = descText
360
361 refPageShell(pageName, pageDesc, pageAliases, fp, head_content=None, sections=sections)
362
363
364def refPageTail(pageName,

Callers 4

emitPageFunction · 0.85
autoGenEnumsPageFunction · 0.85
autoGenFlagsPageFunction · 0.85
autoGenHandlePageFunction · 0.85

Calls 2

logWarnFunction · 0.90
refPageShellFunction · 0.85

Tested by

no test coverage detected