VTK: IO/SQL/vtkTableToDatabaseWriter.h Source File

| 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:
26 vtkTypeMacro(vtkTableToDatabaseWriter, vtkWriter);
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:
56 vtkTableToDatabaseWriter();
57 ~vtkTableToDatabaseWriter() override;
58 void WriteData() override = 0;
59
60 int FillInputPortInformation(int port, vtkInformation* info) override;
61
62 vtkSQLDatabase* Database;
63 vtkTable* Input;
64
65 std::string TableName;
66
67 private:
68 vtkTableToDatabaseWriter(const vtkTableToDatabaseWriter&) = delete;
69 void operator=(const vtkTableToDatabaseWriter&) = delete;
70 };
71
72 VTK_ABI_NAMESPACE_END
73 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkSQLDatabase
maintain a connection to an sql database
Definition: vtkSQLDatabase.h:76
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:41
vtkTableToDatabaseWriter
in a SQL database.
Definition: vtkTableToDatabaseWriter.h:24
vtkTableToDatabaseWriter::WriteData
void WriteData() override=0
vtkTableToDatabaseWriter::SetTableName
bool SetTableName(const char *name)
Set the name of the new SQL table that you'd this writer to create.
vtkTableToDatabaseWriter::Input
vtkTable * Input
Definition: vtkTableToDatabaseWriter.h:63
vtkTableToDatabaseWriter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTableToDatabaseWriter::vtkTableToDatabaseWriter
vtkTableToDatabaseWriter()
vtkTableToDatabaseWriter::~vtkTableToDatabaseWriter
~vtkTableToDatabaseWriter() override
vtkTableToDatabaseWriter::TableNameIsNew
bool TableNameIsNew()
Check if the currently specified table name exists in the database.
vtkTableToDatabaseWriter::SetDatabase
bool SetDatabase(vtkSQLDatabase *db)
Set the database.
vtkTableToDatabaseWriter::TableName
std::string TableName
Definition: vtkTableToDatabaseWriter.h:65
vtkTableToDatabaseWriter::Database
vtkSQLDatabase * Database
Definition: vtkTableToDatabaseWriter.h:62
vtkTableToDatabaseWriter::GetInput
vtkTable * GetInput()
Get the input to this writer.
vtkTableToDatabaseWriter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTableToDatabaseWriter::GetDatabase
vtkSQLDatabase * GetDatabase()
Definition: vtkTableToDatabaseWriter.h:45
vtkTableToDatabaseWriter::GetInput
vtkTable * GetInput(int port)
Get the input to this writer.
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkWriter
abstract class to write data to file(s)
Definition: vtkWriter.h:35
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkWriter.h