VTK
|
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 ----------------------------------------------------------------------------*/ 00041 #ifndef __vtkPBGLGraphSQLReader_h 00042 #define __vtkPBGLGraphSQLReader_h 00043 00044 #include "vtkInfovisParallelModule.h" // For export macro 00045 #include "vtkGraphAlgorithm.h" 00046 00047 class vtkSQLDatabase; 00048 00049 class VTKINFOVISPARALLEL_EXPORT vtkPBGLGraphSQLReader : public vtkGraphAlgorithm 00050 { 00051 public: 00052 static vtkPBGLGraphSQLReader* New(); 00053 vtkTypeMacro(vtkPBGLGraphSQLReader,vtkGraphAlgorithm); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00057 00059 vtkSetMacro(Directed, bool); 00060 vtkGetMacro(Directed, bool); 00061 vtkBooleanMacro(Directed, bool); 00063 00065 00066 virtual void SetDatabase(vtkSQLDatabase* db); 00067 vtkGetObjectMacro(Database, vtkSQLDatabase); 00069 00071 00072 vtkSetStringMacro(VertexTable); 00073 vtkGetStringMacro(VertexTable); 00075 00077 00078 vtkSetStringMacro(EdgeTable); 00079 vtkGetStringMacro(EdgeTable); 00081 00083 00085 vtkSetStringMacro(SourceField); 00086 vtkGetStringMacro(SourceField); 00088 00090 00092 vtkSetStringMacro(TargetField); 00093 vtkGetStringMacro(TargetField); 00095 00097 00098 vtkSetStringMacro(VertexIdField); 00099 vtkGetStringMacro(VertexIdField); 00101 00103 00104 static void GetRange(int rank, int total, 00105 vtkIdType size, vtkIdType& offset, vtkIdType& limit); 00107 00109 00110 void SetDistributionUserData(int procs, vtkIdType verts) 00111 { this->DistributionUserData[0] = procs; 00112 this->DistributionUserData[1] = verts; } 00114 00116 00118 vtkIdType* GetDistributionUserData() 00119 { return this->DistributionUserData; } 00121 00122 protected: 00123 vtkPBGLGraphSQLReader(); 00124 ~vtkPBGLGraphSQLReader(); 00125 00126 bool Directed; 00127 vtkSQLDatabase* Database; 00128 char* VertexTable; 00129 char* EdgeTable; 00130 char* SourceField; 00131 char* TargetField; 00132 char* VertexIdField; 00133 vtkIdType DistributionUserData[2]; 00134 00135 virtual int RequestData( 00136 vtkInformation*, 00137 vtkInformationVector**, 00138 vtkInformationVector*); 00139 00140 virtual int RequestDataObject( 00141 vtkInformation*, 00142 vtkInformationVector**, 00143 vtkInformationVector*); 00144 00145 private: 00146 vtkPBGLGraphSQLReader(const vtkPBGLGraphSQLReader&); // Not implemented 00147 void operator=(const vtkPBGLGraphSQLReader&); // Not implemented 00148 }; 00149 00150 #endif 00151