------------------------------------------------------------------------------
| 68 | |
| 69 | //------------------------------------------------------------------------------ |
| 70 | bool vtkJavaScriptDataWriter::OpenFile() |
| 71 | { |
| 72 | if (!this->FileName) |
| 73 | { |
| 74 | vtkErrorMacro(<< "No FileName specified! Can't write!"); |
| 75 | this->SetErrorCode(vtkErrorCode::NoFileNameError); |
| 76 | return false; |
| 77 | } |
| 78 | |
| 79 | this->CloseFile(); |
| 80 | vtkDebugMacro(<< "Opening file for writing..."); |
| 81 | |
| 82 | this->OutputFile = new vtksys::ofstream(this->FileName, ios::out); |
| 83 | if (this->OutputFile->fail()) |
| 84 | { |
| 85 | vtkErrorMacro(<< "Unable to open file: " << this->FileName); |
| 86 | this->SetErrorCode(vtkErrorCode::CannotOpenFileError); |
| 87 | this->CloseFile(); |
| 88 | return false; |
| 89 | } |
| 90 | |
| 91 | return true; |
| 92 | } |
| 93 | |
| 94 | //------------------------------------------------------------------------------ |
| 95 | void vtkJavaScriptDataWriter::WriteData() |
no test coverage detected