| 25 | } |
| 26 | |
| 27 | static nlohmann::json Serialize_vtkCellArray(vtkObjectBase* object, vtkSerializer* serializer) |
| 28 | { |
| 29 | using json = nlohmann::json; |
| 30 | if (auto* cellArray = vtkCellArray::SafeDownCast(object)) |
| 31 | { |
| 32 | json state; |
| 33 | if (auto superSerializer = serializer->GetHandler(typeid(vtkCellArray::Superclass))) |
| 34 | { |
| 35 | state = superSerializer(object, serializer); |
| 36 | } |
| 37 | state["NumberOfCells"] = 0; |
| 38 | if (cellArray->GetNumberOfCells() > 0) |
| 39 | { |
| 40 | state["Offsets"] = serializer->SerializeJSON(cellArray->GetOffsetsArray()); |
| 41 | state["Connectivity"] = serializer->SerializeJSON(cellArray->GetConnectivityArray()); |
| 42 | state["NumberOfCells"] = cellArray->GetNumberOfCells(); |
| 43 | } |
| 44 | return state; |
| 45 | } |
| 46 | else |
| 47 | { |
| 48 | return {}; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | static void Deserialize_vtkCellArray( |
| 53 | const nlohmann::json& state, vtkObjectBase* object, vtkDeserializer* deserializer) |
nothing calls this directly
no test coverage detected