VTK
vtkSQLGraphReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSQLGraphReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
59 #ifndef vtkSQLGraphReader_h
60 #define vtkSQLGraphReader_h
61 
62 #include "vtkIOSQLModule.h" // For export macro
63 #include "vtkGraphAlgorithm.h"
64 
65 class vtkSQLQuery;
66 
67 class VTKIOSQL_EXPORT vtkSQLGraphReader : public vtkGraphAlgorithm
68 {
69 public:
70  static vtkSQLGraphReader* New();
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
78  vtkSetMacro(Directed, bool);
79  vtkGetMacro(Directed, bool);
80  vtkBooleanMacro(Directed, bool);
82 
84 
87  virtual void SetVertexQuery(vtkSQLQuery* q);
88  vtkGetObjectMacro(VertexQuery, vtkSQLQuery);
90 
92 
95  virtual void SetEdgeQuery(vtkSQLQuery* q);
96  vtkGetObjectMacro(EdgeQuery, vtkSQLQuery);
98 
100 
103  vtkSetStringMacro(SourceField);
104  vtkGetStringMacro(SourceField);
106 
108 
111  vtkSetStringMacro(TargetField);
112  vtkGetStringMacro(TargetField);
114 
116 
119  vtkSetStringMacro(VertexIdField);
120  vtkGetStringMacro(VertexIdField);
122 
124 
127  vtkSetStringMacro(XField);
128  vtkGetStringMacro(XField);
130 
132 
135  vtkSetStringMacro(YField);
136  vtkGetStringMacro(YField);
138 
140 
143  vtkSetStringMacro(ZField);
144  vtkGetStringMacro(ZField);
146 
148 
155  vtkSetMacro(CollapseEdges, bool);
156  vtkGetMacro(CollapseEdges, bool);
157  vtkBooleanMacro(CollapseEdges, bool);
159 
160 protected:
163 
164  bool Directed;
168  char* SourceField;
169  char* TargetField;
171  char* XField;
172  char* YField;
173  char* ZField;
174 
175  virtual int RequestData(
179 
180  virtual int RequestDataObject(
184 
185 private:
186  vtkSQLGraphReader(const vtkSQLGraphReader&) = delete;
187  void operator=(const vtkSQLGraphReader&) = delete;
188 };
189 
190 #endif
191 
static vtkGraphAlgorithm * New()
read a vtkGraph from a database
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
executes an sql query and retrieves results
Definition: vtkSQLQuery.h:74
Store zero or more vtkInformation instances.
vtkSQLQuery * EdgeQuery
vtkSQLQuery * VertexQuery