------------------------------------------------------------------------------
| 2252 | |
| 2253 | //------------------------------------------------------------------------------ |
| 2254 | void vtkXMLWriter::WritePointDataInline(vtkPointData* pd, vtkIndent indent) |
| 2255 | { |
| 2256 | ostream& os = *(this->Stream); |
| 2257 | char** names = this->CreateStringArray(pd->GetNumberOfArrays()); |
| 2258 | |
| 2259 | os << indent << "<PointData"; |
| 2260 | this->WriteAttributeIndices(pd, names); |
| 2261 | |
| 2262 | if (this->ErrorCode != vtkErrorCode::NoError) |
| 2263 | { |
| 2264 | this->DestroyStringArray(pd->GetNumberOfArrays(), names); |
| 2265 | return; |
| 2266 | } |
| 2267 | |
| 2268 | os << ">\n"; |
| 2269 | |
| 2270 | float progressRange[2] = { 0.f, 0.f }; |
| 2271 | this->GetProgressRange(progressRange); |
| 2272 | for (int i = 0; i < pd->GetNumberOfArrays(); ++i) |
| 2273 | { |
| 2274 | this->SetProgressRange(progressRange, i, pd->GetNumberOfArrays()); |
| 2275 | vtkAbstractArray* a = pd->GetAbstractArray(i); |
| 2276 | this->WriteArrayInline(a, indent.GetNextIndent(), names[i]); |
| 2277 | if (this->ErrorCode != vtkErrorCode::NoError) |
| 2278 | { |
| 2279 | this->DestroyStringArray(pd->GetNumberOfArrays(), names); |
| 2280 | return; |
| 2281 | } |
| 2282 | } |
| 2283 | |
| 2284 | os << indent << "</PointData>\n"; |
| 2285 | os.flush(); |
| 2286 | if (os.fail()) |
| 2287 | { |
| 2288 | this->SetErrorCode(vtkErrorCode::GetLastSystemError()); |
| 2289 | this->DestroyStringArray(pd->GetNumberOfArrays(), names); |
| 2290 | return; |
| 2291 | } |
| 2292 | |
| 2293 | this->DestroyStringArray(pd->GetNumberOfArrays(), names); |
| 2294 | } |
| 2295 | |
| 2296 | //------------------------------------------------------------------------------ |
| 2297 | void vtkXMLWriter::WriteCellDataInline(vtkCellData* cd, vtkIndent indent) |
no test coverage detected