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 -------------------------------------------------------------------------*/
58 #ifndef __vtkSQLGraphReader_h
59 #define __vtkSQLGraphReader_h
60 
61 #include "vtkGraphAlgorithm.h"
62 
63 class vtkSQLQuery;
64 
66 {
67 public:
68  static vtkSQLGraphReader* New();
70  void PrintSelf(ostream& os, vtkIndent indent);
71 
73 
75  vtkSetMacro(Directed, bool);
76  vtkGetMacro(Directed, bool);
77  vtkBooleanMacro(Directed, bool);
79 
81 
82  virtual void SetVertexQuery(vtkSQLQuery* q);
83  vtkGetObjectMacro(VertexQuery, vtkSQLQuery);
85 
87 
88  virtual void SetEdgeQuery(vtkSQLQuery* q);
89  vtkGetObjectMacro(EdgeQuery, vtkSQLQuery);
91 
93 
95  vtkSetStringMacro(SourceField);
96  vtkGetStringMacro(SourceField);
98 
100 
102  vtkSetStringMacro(TargetField);
103  vtkGetStringMacro(TargetField);
105 
107 
108  vtkSetStringMacro(VertexIdField);
109  vtkGetStringMacro(VertexIdField);
111 
113 
114  vtkSetStringMacro(XField);
115  vtkGetStringMacro(XField);
117 
119 
120  vtkSetStringMacro(YField);
121  vtkGetStringMacro(YField);
123 
125 
126  vtkSetStringMacro(ZField);
127  vtkGetStringMacro(ZField);
129 
131 
136  vtkSetMacro(CollapseEdges, bool);
137  vtkGetMacro(CollapseEdges, bool);
138  vtkBooleanMacro(CollapseEdges, bool);
140 
141 protected:
144 
145  bool Directed;
149  char* SourceField;
150  char* TargetField;
152  char* XField;
153  char* YField;
154  char* ZField;
155 
156  virtual int RequestData(
157  vtkInformation*,
160 
161  virtual int RequestDataObject(
162  vtkInformation*,
165 
166 private:
167  vtkSQLGraphReader(const vtkSQLGraphReader&); // Not implemented
168  void operator=(const vtkSQLGraphReader&); // Not implemented
169 };
170 
171 #endif
172 
static vtkGraphAlgorithm * New()
read a vtkGraph from a database
Store vtkAlgorithm input/output information.
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Superclass for algorithms that produce only graph as output.
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_INFOVIS_EXPORT
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
executes an sql query and retrieves results
Definition: vtkSQLQuery.h:72
Store zero or more vtkInformation instances.
vtkSQLQuery * EdgeQuery
vtkSQLQuery * VertexQuery