VTK  9.3.1
vtkTableToDatabaseWriter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkTableToDatabaseWriter_h
12 #define vtkTableToDatabaseWriter_h
13 
14 #include "vtkIOSQLModule.h" // For export macro
15 #include "vtkWriter.h"
16 #include <string> // STL Header
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class vtkSQLDatabase;
20 class vtkStringArray;
21 class vtkTable;
22 
23 class VTKIOSQL_EXPORT vtkTableToDatabaseWriter : public vtkWriter
24 {
25 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
32  bool SetDatabase(vtkSQLDatabase* db);
33 
38  bool SetTableName(const char* name);
39 
43  bool TableNameIsNew();
44 
45  vtkSQLDatabase* GetDatabase() { return this->Database; }
46 
48 
51  vtkTable* GetInput();
52  vtkTable* GetInput(int port);
54 
55 protected:
57  ~vtkTableToDatabaseWriter() override;
58  void WriteData() override = 0;
59 
61 
64 
66 
67 private:
69  void operator=(const vtkTableToDatabaseWriter&) = delete;
70 };
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
Store vtkAlgorithm input/output information.
a vtkAbstractArray subclass for strings
abstract class to write data to file(s)
Definition: vtkWriter.h:34
maintain a connection to an sql database
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkDataObject * GetInput()
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
virtual void WriteData()=0