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

Method UpdateStateFromObject

Serialization/Manager/vtkObjectManager.cxx:885–909  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

883
884//------------------------------------------------------------------------------
885void vtkObjectManager::UpdateStateFromObject(vtkTypeUInt32 identifier)
886{
887 if (auto object = this->Context->GetObjectAtId(identifier))
888 {
889 // clear dependency tree for this object.
890 // This lets the serializer see that the object is not processed
891 // in the marshalling context.
892 this->Context->ResetDirectDependenciesForNode(identifier);
893 const auto id = this->Serializer->SerializeJSON(object);
894 if (id.empty())
895 {
896 vtkErrorMacro(<< "Failed to update state for object at id=" << identifier);
897 }
898 else
899 {
900 vtkVLog(
901 this->GetObjectManagerLogVerbosity(), << "Updated state for object at id=" << identifier);
902 }
903 }
904 else
905 {
906 vtkErrorMacro(<< "Cannot update state for object at id=" << identifier
907 << " because there is no such object!");
908 }
909}
910
911//------------------------------------------------------------------------------
912void vtkObjectManager::SetObjectManagerLogVerbosity(vtkLogger::Verbosity verbosity)

Callers 5

InvokeMethod · 0.95
test1Method · 0.45
test2Method · 0.45
testMethod · 0.45

Calls 5

SerializeJSONMethod · 0.80
GetObjectAtIdMethod · 0.45
emptyMethod · 0.45

Tested by 3

test1Method · 0.36
test2Method · 0.36
testMethod · 0.36