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

Method GetBlobHashes

Serialization/Manager/vtkObjectManager.cxx:487–517  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

485
486//------------------------------------------------------------------------------
487std::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//------------------------------------------------------------------------------
520vtkSmartPointer<vtkTypeUInt8Array> vtkObjectManager::GetBlob(

Callers 15

serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80

Calls 7

to_stringFunction · 0.50
emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
valueMethod · 0.45
emplace_backMethod · 0.45

Tested by 15

serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64
serializeMethod · 0.64