| 1079 | } |
| 1080 | |
| 1081 | std::tuple<std::string, Type, std::vector<std::string>, std::string> parseNameAndTypeModified( tinyxml2::XMLElement const * element ) |
| 1082 | { |
| 1083 | int const line = element->GetLineNum(); |
| 1084 | |
| 1085 | std::vector<tinyxml2::XMLElement const *> children = getChildElements( element ); |
| 1086 | checkElements( "vk.xml", |
| 1087 | line, |
| 1088 | children, |
| 1089 | { { "name", MultipleAllowed::No } }, |
| 1090 | { { "comment", MultipleAllowed::No }, { "enum", MultipleAllowed::No }, { "type", MultipleAllowed::No } } ); |
| 1091 | |
| 1092 | std::string name; |
| 1093 | Type type; |
| 1094 | std::vector<std::string> arraySizes; |
| 1095 | std::string bitCount; |
| 1096 | for ( auto child : children ) |
| 1097 | { |
| 1098 | std::string const value = child->Value(); |
| 1099 | if ( value == "enum" ) |
| 1100 | { |
| 1101 | arraySizes.push_back( child->GetText() ); |
| 1102 | checkForError( "vk.xml", |
| 1103 | child->PreviousSibling() && ( strcmp( child->PreviousSibling()->Value(), "[" ) == 0 ) && child->NextSibling() && |
| 1104 | ( strcmp( child->NextSibling()->Value(), "]" ) == 0 ), |
| 1105 | line, |
| 1106 | std::string( "array specifiation is ill-formatted: <" ) + arraySizes.back() + ">" ); |
| 1107 | } |
| 1108 | else if ( value == "name" ) |
| 1109 | { |
| 1110 | name = parseText( child ); |
| 1111 | std::tie( arraySizes, bitCount ) = readModifiers( "vk.xml", child->NextSibling() ); |
| 1112 | } |
| 1113 | else if ( value == "type" ) |
| 1114 | { |
| 1115 | type = parseType( child ); |
| 1116 | } |
| 1117 | } |
| 1118 | return { name, type, arraySizes, bitCount }; |
| 1119 | } |
| 1120 | |
| 1121 | NameElement parseNameElement( tinyxml2::XMLElement const * element ) |
| 1122 | { |
no test coverage detected