MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / findMember

Method findMember

Source/Falcor/Core/Program/ProgramReflection.cpp:2082–2094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2080}
2081
2082ref<const ReflectionVar> ReflectionType::findMember(std::string_view name) const
2083{
2084 if (auto pStructType = asStructType())
2085 {
2086 size_t fieldIndex = pStructType->getMemberIndex(name);
2087 if (fieldIndex == ReflectionStructType::kInvalidMemberIndex)
2088 return nullptr;
2089
2090 return pStructType->getMember(fieldIndex);
2091 }
2092
2093 return nullptr;
2094}
2095
2096int32_t ReflectionStructType::getMemberIndex(std::string_view name) const
2097{

Callers 3

operator[]Method · 0.45
getResourceMethod · 0.45
getParameterBlockMethod · 0.45

Calls 1

getMemberIndexMethod · 0.80

Tested by

no test coverage detected