MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Hpp / parseFeatureElement

Function parseFeatureElement

generator/VkXMLParser.cpp:919–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919FeatureElement parseFeatureElement( tinyxml2::XMLElement const * element )
920{
921 int const line = element->GetLineNum();
922 std::map<std::string, std::string> attributes = getAttributes( element );
923 checkAttributes( "vk.xml", line, attributes, { { "name", {} }, { "struct", {} } }, {} );
924 checkElements( "vk.xml", line, getChildElements( element ), {} );
925
926 FeatureElement feature{ .xmlLine = line };
927 for ( auto const & attribute : attributes )
928 {
929 if ( attribute.first == "name" )
930 {
931 checkNoList( attribute.second, line );
932 feature.name = attribute.second;
933 }
934 else if ( attribute.first == "struct" )
935 {
936 checkNoList( attribute.second, line );
937 feature.structure = attribute.second;
938 }
939 }
940
941 return feature;
942}
943
944std::pair<std::string, FuncPointer> parseFuncPointer( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes )
945{

Callers 2

parseRemoveFunction · 0.85
parseRequireFunction · 0.85

Calls 5

getAttributesFunction · 0.85
checkAttributesFunction · 0.85
checkElementsFunction · 0.85
getChildElementsFunction · 0.85
checkNoListFunction · 0.85

Tested by

no test coverage detected