VTK
dox/Infovis/vtkSQLGraphReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSQLGraphReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00058 #ifndef __vtkSQLGraphReader_h
00059 #define __vtkSQLGraphReader_h
00060 
00061 #include "vtkGraphAlgorithm.h"
00062 
00063 class vtkSQLQuery;
00064 
00065 class VTK_INFOVIS_EXPORT vtkSQLGraphReader : public vtkGraphAlgorithm
00066 {
00067 public:
00068   static vtkSQLGraphReader* New();
00069   vtkTypeMacro(vtkSQLGraphReader,vtkGraphAlgorithm);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00073 
00075   vtkSetMacro(Directed, bool);
00076   vtkGetMacro(Directed, bool);
00077   vtkBooleanMacro(Directed, bool);
00079 
00081 
00082   virtual void SetVertexQuery(vtkSQLQuery* q);
00083   vtkGetObjectMacro(VertexQuery, vtkSQLQuery);
00085 
00087 
00088   virtual void SetEdgeQuery(vtkSQLQuery* q);
00089   vtkGetObjectMacro(EdgeQuery, vtkSQLQuery);
00091 
00093 
00095   vtkSetStringMacro(SourceField);
00096   vtkGetStringMacro(SourceField);
00098 
00100 
00102   vtkSetStringMacro(TargetField);
00103   vtkGetStringMacro(TargetField);
00105 
00107 
00108   vtkSetStringMacro(VertexIdField);
00109   vtkGetStringMacro(VertexIdField);
00111 
00113 
00114   vtkSetStringMacro(XField);
00115   vtkGetStringMacro(XField);
00117 
00119 
00120   vtkSetStringMacro(YField);
00121   vtkGetStringMacro(YField);
00123 
00125 
00126   vtkSetStringMacro(ZField);
00127   vtkGetStringMacro(ZField);
00129 
00131 
00136   vtkSetMacro(CollapseEdges, bool);
00137   vtkGetMacro(CollapseEdges, bool);
00138   vtkBooleanMacro(CollapseEdges, bool);
00140 
00141 protected:
00142   vtkSQLGraphReader();
00143   ~vtkSQLGraphReader();
00144 
00145   bool Directed;
00146   bool CollapseEdges;
00147   vtkSQLQuery* EdgeQuery;
00148   vtkSQLQuery* VertexQuery;
00149   char* SourceField;
00150   char* TargetField;
00151   char* VertexIdField;
00152   char* XField;
00153   char* YField;
00154   char* ZField;
00155 
00156   virtual int RequestData(
00157     vtkInformation*, 
00158     vtkInformationVector**, 
00159     vtkInformationVector*);
00160 
00161   virtual int RequestDataObject(
00162     vtkInformation*, 
00163     vtkInformationVector**, 
00164     vtkInformationVector*);
00165 
00166 private:
00167   vtkSQLGraphReader(const vtkSQLGraphReader&); // Not implemented
00168   void operator=(const vtkSQLGraphReader&);   // Not implemented
00169 };
00170 
00171 #endif
00172