VTK  9.3.20240329
vtkSQLGraphReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
43 #ifndef vtkSQLGraphReader_h
44 #define vtkSQLGraphReader_h
45 
46 #include "vtkGraphAlgorithm.h"
47 #include "vtkIOSQLModule.h" // For export macro
48 
49 VTK_ABI_NAMESPACE_BEGIN
50 class vtkSQLQuery;
51 
52 class VTKIOSQL_EXPORT vtkSQLGraphReader : public vtkGraphAlgorithm
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
63  vtkSetMacro(Directed, bool);
64  vtkGetMacro(Directed, bool);
65  vtkBooleanMacro(Directed, bool);
67 
69 
72  virtual void SetVertexQuery(vtkSQLQuery* q);
73  vtkGetObjectMacro(VertexQuery, vtkSQLQuery);
75 
77 
80  virtual void SetEdgeQuery(vtkSQLQuery* q);
81  vtkGetObjectMacro(EdgeQuery, vtkSQLQuery);
83 
85 
88  vtkSetStringMacro(SourceField);
89  vtkGetStringMacro(SourceField);
91 
93 
96  vtkSetStringMacro(TargetField);
97  vtkGetStringMacro(TargetField);
99 
101 
104  vtkSetStringMacro(VertexIdField);
105  vtkGetStringMacro(VertexIdField);
107 
109 
112  vtkSetStringMacro(XField);
113  vtkGetStringMacro(XField);
115 
117 
120  vtkSetStringMacro(YField);
121  vtkGetStringMacro(YField);
123 
125 
128  vtkSetStringMacro(ZField);
129  vtkGetStringMacro(ZField);
131 
133 
140  vtkSetMacro(CollapseEdges, bool);
141  vtkGetMacro(CollapseEdges, bool);
142  vtkBooleanMacro(CollapseEdges, bool);
144 
145 protected:
147  ~vtkSQLGraphReader() override;
148 
149  bool Directed;
153  char* SourceField;
154  char* TargetField;
156  char* XField;
157  char* YField;
158  char* ZField;
159 
161 
163 
164 private:
165  vtkSQLGraphReader(const vtkSQLGraphReader&) = delete;
166  void operator=(const vtkSQLGraphReader&) = delete;
167 };
168 
169 VTK_ABI_NAMESPACE_END
170 #endif
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
read a vtkGraph from a database
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkSQLQuery * VertexQuery
virtual void SetEdgeQuery(vtkSQLQuery *q)
The query that retrieves the arc information.
virtual void SetVertexQuery(vtkSQLQuery *q)
The query that retrieves the node information.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkSQLQuery * EdgeQuery
~vtkSQLGraphReader() override
static vtkSQLGraphReader * New()
executes an sql query and retrieves results
Definition: vtkSQLQuery.h:60