MCPcopy Index your code
hub / github.com/KhronosGroup/Vulkan-Docs / apiNameMatch

Function apiNameMatch

scripts/reg.py:20–33  ·  view source on GitHub ↗

Return whether a required api name matches a pattern specified for an XML 'api' attribute or 'supported' attribute. - str - API name such as 'vulkan' or 'openxr'. May be None, in which case it never matches (this should not happen). - supported - comma-sepa

(str, supported)

Source from the content-addressed store, hash-verified

18from pyparsing import ParseException
19
20def apiNameMatch(str, supported):
21 """Return whether a required api name matches a pattern specified for an
22 XML <feature> 'api' attribute or <extension> 'supported' attribute.
23
24 - str - API name such as 'vulkan' or 'openxr'. May be None, in which
25 case it never matches (this should not happen).
26 - supported - comma-separated list of XML API names. May be None, in
27 which case str always matches (this is the usual case)."""
28
29 if str is not None:
30 return supported is None or str in supported.split(',')
31
32 # Fallthrough case - either str is None or the test failed
33 return False
34
35def matchAPIProfile(api, profile, elem):
36 """Return whether an API and profile

Callers 2

stripNonmatchingAPIsFunction · 0.85
apiGenMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected