------------------------------------------------------------------------------
| 93 | |
| 94 | //------------------------------------------------------------------------------ |
| 95 | void vtkJavaScriptDataWriter::WriteData() |
| 96 | { |
| 97 | vtkTable* input_table = vtkTable::SafeDownCast(this->GetInput()); |
| 98 | |
| 99 | // Check for valid input |
| 100 | if (!input_table) |
| 101 | { |
| 102 | vtkErrorMacro(<< "vtkJavaScriptDataWriter can only write vtkTable."); |
| 103 | return; |
| 104 | } |
| 105 | |
| 106 | // Check for filename |
| 107 | if (this->FileName) |
| 108 | { |
| 109 | if (this->OpenFile()) |
| 110 | { |
| 111 | this->WriteTable(input_table, this->OutputFile); |
| 112 | this->CloseFile(); |
| 113 | } |
| 114 | } |
| 115 | else |
| 116 | { |
| 117 | this->WriteTable(input_table, this->OutputStream); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | //------------------------------------------------------------------------------ |
| 122 | void vtkJavaScriptDataWriter::WriteTable(vtkTable* table, ostream* stream_ptr) |
nothing calls this directly
no test coverage detected