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

Method CheckIfTableExists

IO/SQL/vtkDatabaseToTableReader.cxx:65–86  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

63
64//------------------------------------------------------------------------------
65bool 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//------------------------------------------------------------------------------
89void vtkDatabaseToTableReader::PrintSelf(ostream& os, vtkIndent indent)

Callers 2

SetDatabaseMethod · 0.95
SetTableNameMethod · 0.95

Calls 4

IsOpenMethod · 0.45
emptyMethod · 0.45
LookupValueMethod · 0.45
GetTablesMethod · 0.45

Tested by

no test coverage detected