| 10909 | } |
| 10910 | |
| 10911 | std::string VulkanHppGenerator::generateStructConstructorArgument( MemberData const & memberData, bool withDefault ) const |
| 10912 | { |
| 10913 | // skip members 'pNext' and members with a specified value, as they are never explicitly set |
| 10914 | std::string str; |
| 10915 | if ( ( memberData.name != "pNext" ) && memberData.value.empty() ) |
| 10916 | { |
| 10917 | if ( memberData.type.name.starts_with( "PFN_vk" ) ) |
| 10918 | { |
| 10919 | str += "PFN_" + stripPrefix( memberData.type.name, "PFN_vk" ) + " "; |
| 10920 | } |
| 10921 | else if ( memberData.arraySizes.empty() ) |
| 10922 | { |
| 10923 | str += memberData.type.compose( "Vk" ) + " "; |
| 10924 | } |
| 10925 | else |
| 10926 | { |
| 10927 | str += generateStandardArray( memberData.type.compose( "Vk" ), memberData.arraySizes ) + " const & "; |
| 10928 | } |
| 10929 | str += memberData.name + "_"; |
| 10930 | |
| 10931 | if ( withDefault ) |
| 10932 | { |
| 10933 | str += " = "; |
| 10934 | auto enumIt = m_enums.find( memberData.type.name ); |
| 10935 | if ( enumIt != m_enums.end() && memberData.type.postfix.empty() ) |
| 10936 | { |
| 10937 | str += generateEnumInitializer( memberData.type, memberData.arraySizes, enumIt->second.values, enumIt->second.isBitmask ); |
| 10938 | } |
| 10939 | else if ( memberData.defaultValue.empty() ) |
| 10940 | { |
| 10941 | // if there's no default value, it can be initialized with just {} |
| 10942 | str += "{}"; |
| 10943 | } |
| 10944 | else |
| 10945 | { |
| 10946 | str += generateTaggedCamelCase( memberData.defaultValue ); |
| 10947 | } |
| 10948 | } |
| 10949 | } |
| 10950 | return str; |
| 10951 | } |
| 10952 | |
| 10953 | std::string VulkanHppGenerator::generateStructHashStructure( std::pair<std::string, StructData> const & structure, std::set<std::string> & listedStructs ) const |
| 10954 | { |
nothing calls this directly
no test coverage detected