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 
vtkGraphAlgorithm
Superclass for algorithms that produce only graph as output.
Definition: vtkGraphAlgorithm.h:54
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkSQLGraphReader::YField
char * YField
Definition: vtkSQLGraphReader.h:172
vtkSQLGraphReader::VertexIdField
char * VertexIdField
Definition: vtkSQLGraphReader.h:170
vtkSQLGraphReader::TargetField
char * TargetField
Definition: vtkSQLGraphReader.h:169
vtkSQLGraphReader
read a vtkGraph from a database
Definition: vtkSQLGraphReader.h:67
vtkSQLGraphReader::ZField
char * ZField
Definition: vtkSQLGraphReader.h:173
vtkGraphAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphAlgorithm.h
vtkGraphAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkSQLGraphReader::CollapseEdges
bool CollapseEdges
Definition: vtkSQLGraphReader.h:165
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSQLGraphReader::SourceField
char * SourceField
Definition: vtkSQLGraphReader.h:168
vtkSQLGraphReader::EdgeQuery
vtkSQLQuery * EdgeQuery
Definition: vtkSQLGraphReader.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkGraphAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkSQLGraphReader::Directed
bool Directed
Definition: vtkSQLGraphReader.h:164
vtkSQLQuery
executes an sql query and retrieves results
Definition: vtkSQLQuery.h:74
vtkSQLGraphReader::VertexQuery
vtkSQLQuery * VertexQuery
Definition: vtkSQLGraphReader.h:167
vtkSQLGraphReader::XField
char * XField
Definition: vtkSQLGraphReader.h:171
vtkGraphAlgorithm::New
static vtkGraphAlgorithm * New()