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

Function parseExternalType

generator/VkXMLParser.cpp:722–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720}
721
722std::pair<std::string, ExternalType> parseExternalType( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes )
723{
724 int const line = element->GetLineNum();
725 checkAttributes( "vk.xml", line, attributes, { { "name", {} }, { "requires", {} } }, {} );
726 checkElements( "vk.xml", line, getChildElements( element ), {} );
727
728 std::string name, require;
729 for ( auto const & attribute : attributes )
730 {
731 if ( attribute.first == "name" )
732 {
733 checkNoList( attribute.second, line );
734 name = attribute.second;
735 }
736 else if ( attribute.first == "requires" )
737 {
738 checkNoList( attribute.second, line );
739 require = attribute.second;
740 }
741 }
742
743 return { name, { .includedBy = require, .xmlLine = line } };
744}
745
746Feature parseFeature( tinyxml2::XMLElement const * element )
747{

Callers 1

parseTypesTypeFunction · 0.85

Calls 4

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

Tested by

no test coverage detected