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 <vtkstd/string> // STL Header 00026 #include "vtkTableWriter.h" 00027 00028 class vtkSQLDatabase; 00029 class vtkStringArray; 00030 00031 class VTK_IO_EXPORT vtkTableToDatabaseWriter : public vtkTableWriter 00032 { 00033 public: 00034 vtkTypeMacro(vtkTableToDatabaseWriter, vtkTableWriter); 00035 void PrintSelf(ostream& os, vtkIndent indent); 00036 00038 bool SetDatabase(vtkSQLDatabase *db); 00039 00042 bool SetTableName(const char *name); 00043 00045 bool TableNameIsNew(); 00046 00047 vtkSQLDatabase *GetDatabase() { return this->Database; } 00048 00050 00051 vtkTable* GetInput(); 00052 vtkTable* GetInput(int port); 00054 00055 protected: 00056 vtkTableToDatabaseWriter(); 00057 ~vtkTableToDatabaseWriter(); 00058 virtual void WriteData() = 0; 00059 00060 virtual int FillInputPortInformation(int port, vtkInformation *info); 00061 00062 00063 vtkSQLDatabase *Database; 00064 vtkTable *Input; 00065 //BTX 00066 vtkstd::string TableName; 00067 //ETX 00068 00069 private: 00070 vtkTableToDatabaseWriter(const vtkTableToDatabaseWriter&); // Not implemented. 00071 void operator=(const vtkTableToDatabaseWriter&); // Not implemented. 00072 }; 00073 00074 #endif