| 112 | } |
| 113 | |
| 114 | class ExtensionContainer |
| 115 | { |
| 116 | public $extensions = []; |
| 117 | |
| 118 | function __construct($xml, $typecontainer) |
| 119 | { |
| 120 | foreach ($xml->extensions->extension as $ext_node) { |
| 121 | // Skip Vulkan SC only and disabled extensions |
| 122 | if (($ext_node['supported'] == 'vulkansc') || ($ext_node['supported'] == 'disabled')) { |
| 123 | continue; |
| 124 | } |
| 125 | $features2_node = null; |
| 126 | $properties2_node = null; |
| 127 | // We're only interested in extensions with property or feature types |
| 128 | foreach ($ext_node->require as $require) { |
| 129 | foreach ($require as $requirement) { |
| 130 | if (strcasecmp($requirement->getName(), 'type') !== false) { |
| 131 | $ft2 = $typecontainer->getFeatures2Type((string)$requirement['name']); |
| 132 | if (!$features2_node && $ft2) { |
| 133 | $features2_node = $ft2; |
| 134 | } |
| 135 | $prop2 = $typecontainer->getProperties2Type((string)$requirement['name']); |
| 136 | if (!$properties2_node && $prop2) { |
| 137 | $properties2_node = $prop2; |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | if ($features2_node || $properties2_node) { |
| 143 | $ext = new Extension(); |
| 144 | $ext->name = (string)$ext_node['name']; |
| 145 | $ext->group = substr($ext->name, 3, strpos($ext->name, '_', 3) - 3); |
| 146 | $ext->features2 = $features2_node; |
| 147 | $ext->properties2 = $properties2_node; |
| 148 | $this->extensions[] = $ext; |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | class CppBuilder |
| 155 | { |
nothing calls this directly
no outgoing calls
no test coverage detected