------------------------------------------------------------------------------
| 63 | |
| 64 | //------------------------------------------------------------------------------ |
| 65 | bool vtkDatabaseToTableReader::CheckIfTableExists() |
| 66 | { |
| 67 | if (!this->Database->IsOpen()) |
| 68 | { |
| 69 | vtkErrorMacro(<< "CheckIfTableExists() called with no open database!"); |
| 70 | return false; |
| 71 | } |
| 72 | if (this->TableName.empty()) |
| 73 | { |
| 74 | vtkErrorMacro(<< "CheckIfTableExists() called but no table name specified."); |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | if (this->Database->GetTables()->LookupValue(this->TableName) == -1) |
| 79 | { |
| 80 | vtkErrorMacro(<< "Table " << this->TableName << " does not exist in the database!"); |
| 81 | this->TableName = ""; |
| 82 | return false; |
| 83 | } |
| 84 | |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | //------------------------------------------------------------------------------ |
| 89 | void vtkDatabaseToTableReader::PrintSelf(ostream& os, vtkIndent indent) |
no test coverage detected