VTK
dox/IO/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 <string> // STL Header
00026 #include "vtkTableReader.h"
00027 
00028 class vtkSQLDatabase;
00029 class vtkStringArray;
00030 
00031 class VTK_IO_EXPORT vtkDatabaseToTableReader : public vtkTableReader
00032 {
00033 public:
00034   vtkTypeMacro(vtkDatabaseToTableReader,vtkTableReader);
00035   void PrintSelf(ostream& os, vtkIndent indent);
00036 
00038   bool SetDatabase(vtkSQLDatabase *db);
00039 
00042   bool SetTableName(const char *name);
00043 
00045   bool CheckIfTableExists();
00046 
00047   vtkSQLDatabase *GetDatabase() { return this->Database; }
00048 
00049 protected:
00050    vtkDatabaseToTableReader();
00051   ~vtkDatabaseToTableReader();
00052   int RequestData(vtkInformation *, vtkInformationVector **,
00053                           vtkInformationVector *) = 0;
00054   vtkSQLDatabase *Database;
00055   //BTX
00056   std::string TableName;
00057   //ETX
00058 private:
00059   vtkDatabaseToTableReader(const vtkDatabaseToTableReader&);  // Not implemented.
00060   void operator=(const vtkDatabaseToTableReader&);  // Not implemented.
00061 };
00062 
00063 #endif