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

Function WriteDenseArrayBinary

IO/Core/vtkArrayWriter.cxx:137–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136template <typename ValueT>
137bool 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
154template <>
155bool WriteDenseArrayBinary<vtkStdString>(

Callers

nothing calls this directly

Calls 3

WriteEndianOrderMarkFunction · 0.85
WriteHeaderFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected