VTK  9.4.20241222
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
18VTK_ABI_NAMESPACE_BEGIN
19class vtkSQLDatabase;
20class vtkStringArray;
21class vtkTable;
22
23class VTKIOSQL_EXPORT vtkTableToDatabaseWriter : public vtkWriter
24{
25public:
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
52 vtkTable* GetInput(int port);
54
55protected:
58 void WriteData() override = 0;
59
60 int FillInputPortInformation(int port, vtkInformation* info) override;
61
64
65 std::string TableName;
66
67private:
69 void operator=(const vtkTableToDatabaseWriter&) = delete;
70};
71
72VTK_ABI_NAMESPACE_END
73#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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.
vtkTable * GetInput()
Get the input to this writer.
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(int port)
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.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
abstract class to write data to file(s)
Definition vtkWriter.h:35