MCPcopy Create free account
hub / github.com/Kitware/VTK / GetNumberOfObjectAttributes

Method GetNumberOfObjectAttributes

IO/Exodus/vtkExodusIIReader.cxx:5072–5092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5070}
5071
5072int vtkExodusIIReaderPrivate::GetNumberOfObjectAttributes(int otyp, int oi)
5073{
5074 std::map<int, std::vector<BlockInfoType>>::iterator it = this->BlockInfo.find(otyp);
5075 if (it != this->BlockInfo.end())
5076 {
5077 int N = (int)it->second.size();
5078 if (oi < 0 || oi >= N)
5079 {
5080 int otypIdx = this->GetObjectTypeIndexFromObjectType(otyp);
5081 const char* btname = otypIdx >= 0 ? objtype_names[otypIdx] : "block";
5082 static_cast<void>(btname); // not referenced warning
5083 vtkDebugMacro(
5084 "You requested " << btname << " " << oi << " in a collection of only " << N << " blocks.");
5085 return 0;
5086 }
5087 oi = this->SortedObjectIndices[otyp][oi]; // index into sorted list of objects (block order, not
5088 // file order)
5089 return (int)it->second[oi].AttributeNames.size();
5090 }
5091 return 0;
5092}
5093
5094const char* vtkExodusIIReaderPrivate::GetObjectAttributeName(int otyp, int oi, int ai)
5095{

Callers 2

SetUpEmptyGridMethod · 0.95
RequestDataMethod · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected