VTK  9.3.0
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 
33 
38  bool SetTableName(const char* name);
39 
44 
45  vtkSQLDatabase* GetDatabase() { return this->Database; }
46 
48 
54 
55 protected:
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
a simple class to control print indentation
Definition: vtkIndent.h:38
Store vtkAlgorithm input/output information.
maintain a connection to an sql database
a vtkAbstractArray subclass for strings
void WriteData() override=0
bool SetTableName(const char *name)
Set the name of the new SQL table that you'd this writer to create.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
~vtkTableToDatabaseWriter() override
bool TableNameIsNew()
Check if the currently specified table name exists in the database.
bool SetDatabase(vtkSQLDatabase *db)
Set the database.
vtkTable * GetInput()
Get the input to this writer.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTable * GetInput(int port)
Get the input to this writer.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
abstract class to write data to file(s)
Definition: vtkWriter.h:35
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ name
Definition: vtkX3D.h:219
@ string
Definition: vtkX3D.h:490