------------------------------------------------------------------------------
| 485 | |
| 486 | //------------------------------------------------------------------------------ |
| 487 | std::vector<std::string> vtkObjectManager::GetBlobHashes(const std::vector<vtkTypeUInt32>& ids) |
| 488 | { |
| 489 | std::vector<std::string> hashes; |
| 490 | const auto& states = this->Context->States(); |
| 491 | if (states.empty()) |
| 492 | { |
| 493 | return {}; |
| 494 | } |
| 495 | for (const auto& id : ids) |
| 496 | { |
| 497 | auto stateIter = states.find(vtk::to_string(id)); |
| 498 | if (stateIter != states.end()) |
| 499 | { |
| 500 | const auto iter = stateIter.value().find("Hash"); |
| 501 | if (iter != stateIter.value().end()) |
| 502 | { |
| 503 | hashes.emplace_back(iter->get<std::string>()); |
| 504 | } |
| 505 | else |
| 506 | { |
| 507 | // not uncommon for some objects to have any blobs. |
| 508 | vtkVLog(this->GetObjectManagerLogVerbosity(), << "Failed to get hash at id=" << id << "."); |
| 509 | } |
| 510 | } |
| 511 | else |
| 512 | { |
| 513 | vtkWarningMacro(<< "There is no state at id=" << id << "."); |
| 514 | } |
| 515 | } |
| 516 | return hashes; |
| 517 | } |
| 518 | |
| 519 | //------------------------------------------------------------------------------ |
| 520 | vtkSmartPointer<vtkTypeUInt8Array> vtkObjectManager::GetBlob( |