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

Method WriteRowDataInline

IO/XML/vtkXMLTableWriter.cxx:597–638  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

595
596//------------------------------------------------------------------------------
597void vtkXMLTableWriter::WriteRowDataInline(vtkDataSetAttributes* ds, vtkIndent indent)
598{
599 ostream& os = *(this->Stream);
600 int numberOfArrays = ds->GetNumberOfArrays();
601 char** names = this->CreateStringArray(numberOfArrays);
602
603 os << indent << "<RowData";
604 this->WriteAttributeIndices(ds, names);
605
606 if (this->ErrorCode != vtkErrorCode::NoError)
607 {
608 this->DestroyStringArray(numberOfArrays, names);
609 return;
610 }
611
612 os << ">\n";
613
614 float progressRange[2] = { 0.f, 1.f };
615 this->GetProgressRange(progressRange);
616 for (int i = 0; i < numberOfArrays; ++i)
617 {
618 this->SetProgressRange(progressRange, i, numberOfArrays);
619 vtkAbstractArray* currentAbstractArray = ds->GetAbstractArray(i);
620 this->WriteArrayInline(currentAbstractArray, indent.GetNextIndent(), names[i]);
621 if (this->ErrorCode != vtkErrorCode::NoError)
622 {
623 this->DestroyStringArray(numberOfArrays, names);
624 return;
625 }
626 }
627
628 os << indent << "</RowData>\n";
629 os.flush();
630 if (os.fail())
631 {
632 this->SetErrorCode(vtkErrorCode::GetLastSystemError());
633 this->DestroyStringArray(numberOfArrays, names);
634 return;
635 }
636
637 this->DestroyStringArray(numberOfArrays, names);
638}
639
640//------------------------------------------------------------------------------
641void vtkXMLTableWriter::SetInputUpdateExtent(int piece, int numPieces)

Callers 1

WriteInlinePieceMethod · 0.95

Calls 10

WriteAttributeIndicesMethod · 0.80
GetAbstractArrayMethod · 0.80
WriteArrayInlineMethod · 0.80
GetNextIndentMethod · 0.80
GetNumberOfArraysMethod · 0.45
CreateStringArrayMethod · 0.45
DestroyStringArrayMethod · 0.45
GetProgressRangeMethod · 0.45
SetProgressRangeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected