VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/SQL/vtkTableToDatabaseWriter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTableToDatabaseWriter.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 vtkTableToDatabaseWriter_h
00023 #define vtkTableToDatabaseWriter_h
00024 
00025 #include "vtkIOSQLModule.h" // For export macro
00026 #include <string> // STL Header
00027 #include "vtkWriter.h"
00028 
00029 class vtkSQLDatabase;
00030 class vtkStringArray;
00031 class vtkTable;
00032 
00033 class VTKIOSQL_EXPORT vtkTableToDatabaseWriter : public vtkWriter
00034 {
00035 public:
00036   vtkTypeMacro(vtkTableToDatabaseWriter, vtkWriter);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00040   bool SetDatabase(vtkSQLDatabase *db);
00041 
00044   bool SetTableName(const char *name);
00045 
00047   bool TableNameIsNew();
00048 
00049   vtkSQLDatabase *GetDatabase() { return this->Database; }
00050 
00052 
00053   vtkTable* GetInput();
00054   vtkTable* GetInput(int port);
00056 
00057 protected:
00058    vtkTableToDatabaseWriter();
00059   ~vtkTableToDatabaseWriter();
00060   virtual void WriteData() = 0;
00061 
00062   virtual int FillInputPortInformation(int port, vtkInformation *info);
00063 
00064 
00065   vtkSQLDatabase *Database;
00066   vtkTable *Input;
00067   //BTX
00068   std::string TableName;
00069   //ETX
00070 
00071 private:
00072   vtkTableToDatabaseWriter(const vtkTableToDatabaseWriter&);  // Not implemented.
00073   void operator=(const vtkTableToDatabaseWriter&);  // Not implemented.
00074 };
00075 
00076 #endif