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

Function parseStructMember

generator/VkXMLParser.cpp:2028–2176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2026}
2027
2028StructMember parseStructMember( tinyxml2::XMLElement const * element )
2029{
2030 int const line = element->GetLineNum();
2031 std::map<std::string, std::string> attributes = getAttributes( element );
2032 checkAttributes( "vk.xml",
2033 line,
2034 attributes,
2035 {},
2036 { { "altlen", {} },
2037 { "api", { "vulkan", "vulkanbase", "vulkansc" } },
2038 { "deprecated", { "ignored", "unused" } },
2039 { "externsync", { "maybe", "true" } },
2040 { "featurelink", {} },
2041 { "flagsextend", {} },
2042 { "flagsextendmember", {} },
2043 { "len", {} },
2044 { "limittype", { "bitmask", "bits", "exact", "max", "min", "mul", "noauto", "not", "pot", "range", "struct" } },
2045 { "noautovalidity", { "true" } },
2046 { "objecttype", { "objectType" } },
2047 { "optional", { "false", "true" } },
2048 { "selector", {} },
2049 { "values", {} } } );
2050 std::vector<tinyxml2::XMLElement const *> children = getChildElements( element );
2051 checkElements( "vk.xml",
2052 line,
2053 children,
2054 { { "name", MultipleAllowed::No }, { "type", MultipleAllowed::No } },
2055 { { "comment", MultipleAllowed::No }, { "enum", MultipleAllowed::No } } );
2056
2057 StructMember member{ .xmlLine = line };
2058 for ( auto const & attribute : attributes )
2059 {
2060 if ( attribute.first == "altlen" )
2061 {
2062 checkNoList( attribute.second, line );
2063 member.altLen = attribute.second;
2064 }
2065 else if ( attribute.first == "api" )
2066 {
2067 member.api = tokenize( attribute.second, "," );
2068 }
2069 else if ( attribute.first == "deprecated" )
2070 {
2071 checkNoList( attribute.second, line );
2072 member.deprecated = attribute.second;
2073 }
2074 else if ( attribute.first == "externsync" )
2075 {
2076 checkNoList( attribute.second, line );
2077 member.externSync = attribute.second;
2078 }
2079 else if ( attribute.first == "featurelink" )
2080 {
2081 checkNoList( attribute.second, line );
2082 member.featureLink = attribute.second;
2083 }
2084 else if ( attribute.first == "flagsextend" )
2085 {

Callers 1

parseStructFunction · 0.85

Calls 12

getAttributesFunction · 0.85
checkAttributesFunction · 0.85
getChildElementsFunction · 0.85
checkElementsFunction · 0.85
checkNoListFunction · 0.85
tokenizeFunction · 0.85
checkForErrorFunction · 0.85
parseTextFunction · 0.85
parseNameWithAliasFunction · 0.85
readModifiersFunction · 0.85
parseTypeFunction · 0.85
isPointerMethod · 0.80

Tested by

no test coverage detected