VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Infovis/Parallel/vtkPBGLGraphSQLReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPBGLGraphSQLReader.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 (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00043 #ifndef vtkPBGLGraphSQLReader_h
00044 #define vtkPBGLGraphSQLReader_h
00045 
00046 #include "vtkInfovisParallelModule.h" // For export macro
00047 #include "vtkGraphAlgorithm.h"
00048 
00049 class vtkSQLDatabase;
00050 
00051 #if !defined(VTK_LEGACY_REMOVE)
00052 class VTKINFOVISPARALLEL_EXPORT vtkPBGLGraphSQLReader : public vtkGraphAlgorithm
00053 {
00054 public:
00055   static vtkPBGLGraphSQLReader* New();
00056   vtkTypeMacro(vtkPBGLGraphSQLReader,vtkGraphAlgorithm);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00062   vtkSetMacro(Directed, bool);
00063   vtkGetMacro(Directed, bool);
00064   vtkBooleanMacro(Directed, bool);
00066 
00068 
00069   virtual void SetDatabase(vtkSQLDatabase* db);
00070   vtkGetObjectMacro(Database, vtkSQLDatabase);
00072 
00074 
00075   vtkSetStringMacro(VertexTable);
00076   vtkGetStringMacro(VertexTable);
00078 
00080 
00081   vtkSetStringMacro(EdgeTable);
00082   vtkGetStringMacro(EdgeTable);
00084 
00086 
00088   vtkSetStringMacro(SourceField);
00089   vtkGetStringMacro(SourceField);
00091 
00093 
00095   vtkSetStringMacro(TargetField);
00096   vtkGetStringMacro(TargetField);
00098 
00100 
00101   vtkSetStringMacro(VertexIdField);
00102   vtkGetStringMacro(VertexIdField);
00104 
00106 
00107   static void GetRange(int rank, int total,
00108     vtkIdType size, vtkIdType& offset, vtkIdType& limit);
00110 
00112 
00113   void SetDistributionUserData(int procs, vtkIdType verts)
00114     { this->DistributionUserData[0] = procs;
00115       this->DistributionUserData[1] = verts; }
00117 
00119 
00121   vtkIdType* GetDistributionUserData()
00122     { return this->DistributionUserData; }
00124 
00125 protected:
00126   vtkPBGLGraphSQLReader();
00127   ~vtkPBGLGraphSQLReader();
00128 
00129   bool Directed;
00130   vtkSQLDatabase* Database;
00131   char* VertexTable;
00132   char* EdgeTable;
00133   char* SourceField;
00134   char* TargetField;
00135   char* VertexIdField;
00136   vtkIdType DistributionUserData[2];
00137 
00138   virtual int RequestData(
00139     vtkInformation*,
00140     vtkInformationVector**,
00141     vtkInformationVector*);
00142 
00143   virtual int RequestDataObject(
00144     vtkInformation*,
00145     vtkInformationVector**,
00146     vtkInformationVector*);
00147 
00148 private:
00149   vtkPBGLGraphSQLReader(const vtkPBGLGraphSQLReader&); // Not implemented
00150   void operator=(const vtkPBGLGraphSQLReader&);   // Not implemented
00151 };
00152 
00153 #endif //VTK_LEGACY_REMOVE
00154 #endif
00155