VTK
dox/IO/SQL/vtkDatabaseToTableReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDatabaseToTableReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00022 #ifndef __vtkDatabaseToTableReader_h
00023 #define __vtkDatabaseToTableReader_h
00024 
00025 #include "vtkIOSQLModule.h" // For export macro
00026 #include <string> // STL Header
00027 #include "vtkTableAlgorithm.h"
00028 
00029 class vtkSQLDatabase;
00030 class vtkStringArray;
00031 
00032 class VTKIOSQL_EXPORT vtkDatabaseToTableReader : public vtkTableAlgorithm
00033 {
00034 public:
00035   vtkTypeMacro(vtkDatabaseToTableReader,vtkTableAlgorithm);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00039   bool SetDatabase(vtkSQLDatabase *db);
00040 
00043   bool SetTableName(const char *name);
00044 
00046   bool CheckIfTableExists();
00047 
00048   vtkSQLDatabase *GetDatabase() { return this->Database; }
00049 
00050 protected:
00051    vtkDatabaseToTableReader();
00052   ~vtkDatabaseToTableReader();
00053   int RequestData(vtkInformation *, vtkInformationVector **,
00054                           vtkInformationVector *) = 0;
00055   vtkSQLDatabase *Database;
00056   //BTX
00057   std::string TableName;
00058   //ETX
00059 private:
00060   vtkDatabaseToTableReader(const vtkDatabaseToTableReader&);  // Not implemented.
00061   void operator=(const vtkDatabaseToTableReader&);  // Not implemented.
00062 };
00063 
00064 #endif