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

Method GetOptionTextFromHandle

IO/SQL/vtkSQLDatabaseSchema.cxx:638–655  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

636
637//------------------------------------------------------------------------------
638const char* vtkSQLDatabaseSchema::GetOptionTextFromHandle(int tblHandle, int optHandle)
639{
640 if (tblHandle < 0 || tblHandle >= this->GetNumberOfTables())
641 {
642 vtkErrorMacro("Cannot get text of an option in non-existent table " << tblHandle);
643 return nullptr;
644 }
645
646 if (optHandle < 0 ||
647 optHandle >= static_cast<int>(this->Internals->Tables[tblHandle].Options.size()))
648 {
649 vtkErrorMacro(
650 "Cannot get text of non-existent option " << optHandle << " in table " << tblHandle);
651 return nullptr;
652 }
653
654 return this->Internals->Tables[tblHandle].Options[optHandle].Text.c_str();
655}
656
657//------------------------------------------------------------------------------
658const char* vtkSQLDatabaseSchema::GetOptionBackendFromHandle(int tblHandle, int optHandle)

Callers 1

EffectSchemaMethod · 0.80

Calls 3

GetNumberOfTablesMethod · 0.95
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected