| 135 | |
| 136 | template <typename ValueT> |
| 137 | bool WriteDenseArrayBinary(const std::string& type_name, vtkArray* array, ostream& stream) |
| 138 | { |
| 139 | vtkDenseArray<ValueT>* const concrete_array = vtkDenseArray<ValueT>::SafeDownCast(array); |
| 140 | if (!concrete_array) |
| 141 | return false; |
| 142 | |
| 143 | // Write the array header ... |
| 144 | WriteHeader("vtk-dense-array", type_name, array, stream, true); |
| 145 | WriteEndianOrderMark(stream); |
| 146 | |
| 147 | // Serialize the array values ... |
| 148 | stream.write(reinterpret_cast<char*>(concrete_array->GetStorage()), |
| 149 | concrete_array->GetNonNullSize() * sizeof(ValueT)); |
| 150 | |
| 151 | return true; |
| 152 | } |
| 153 | |
| 154 | template <> |
| 155 | bool WriteDenseArrayBinary<vtkStdString>( |
nothing calls this directly
no test coverage detected