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

Function Serialize_Blob

Common/Core/vtkDataArraySerDesHelper.cxx:221–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219TEMPLATED_ARRAY_NAMES_DEMANGLE_MACRO(vtkConstantArray);
220
221void Serialize_Blob(vtkTypeUInt8Array* blob, nlohmann::json& state, vtkSerializer* serializer)
222{
223 auto context = serializer->GetContext();
224 std::string hash;
225 if (context->RegisterBlob(blob, hash))
226 {
227 state["Hash"] = hash;
228 }
229 else
230 {
231 vtkErrorWithObjectMacro(context, << serializer->GetObjectDescription() << " failed to add blob "
232 << blob->GetObjectDescription());
233 return;
234 }
235}
236
237bool Deserialize_Blob(
238 nlohmann::json& blob, const nlohmann::json& state, vtkDeserializer* deserializer)

Callers 1

operator()Method · 0.85

Calls 3

GetContextMethod · 0.45
RegisterBlobMethod · 0.45
GetObjectDescriptionMethod · 0.45

Tested by

no test coverage detected