VTK
dox/Infovis/vtkSQLDatabaseGraphSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSQLDatabaseGraphSource.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 -------------------------------------------------------------------------*/
00032 #ifndef __vtkSQLDatabaseGraphSource_h
00033 #define __vtkSQLDatabaseGraphSource_h
00034 
00035 #include "vtkStdString.h"
00036 #include "vtkGraphAlgorithm.h"
00037 
00038 class vtkEventForwarderCommand;
00039 
00040 class VTK_INFOVIS_EXPORT vtkSQLDatabaseGraphSource : public vtkGraphAlgorithm
00041 {
00042 public:
00043   static vtkSQLDatabaseGraphSource* New();
00044   vtkTypeMacro(vtkSQLDatabaseGraphSource, vtkGraphAlgorithm);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00047   vtkStdString GetURL();
00048   void SetURL(const vtkStdString& url);
00049 
00050   void SetPassword(const vtkStdString& password);
00051 
00052   vtkStdString GetEdgeQuery();
00053   void SetEdgeQuery(const vtkStdString& query);
00054 
00055   vtkStdString GetVertexQuery();
00056   void SetVertexQuery(const vtkStdString& query);
00057 
00058   void AddLinkVertex(const char* column, const char* domain = 0, int hidden = 0);
00059   void ClearLinkVertices();
00060   void AddLinkEdge(const char* column1, const char* column2);
00061   void ClearLinkEdges();
00062 
00064 
00066   vtkGetMacro(GenerateEdgePedigreeIds, bool);
00067   vtkSetMacro(GenerateEdgePedigreeIds, bool);
00068   vtkBooleanMacro(GenerateEdgePedigreeIds, bool);
00070 
00072 
00073   vtkSetStringMacro(EdgePedigreeIdArrayName);
00074   vtkGetStringMacro(EdgePedigreeIdArrayName);
00076 
00078 
00080   vtkSetMacro(Directed, bool);
00081   vtkGetMacro(Directed, bool);
00082   vtkBooleanMacro(Directed, bool);
00084  
00085 protected:
00086   vtkSQLDatabaseGraphSource();
00087   ~vtkSQLDatabaseGraphSource();
00088   
00089   int RequestDataObject(
00090     vtkInformation*, 
00091     vtkInformationVector**, 
00092     vtkInformationVector*);
00093 
00094   int RequestData(
00095     vtkInformation*, 
00096     vtkInformationVector**, 
00097     vtkInformationVector*);
00098 
00099   bool GenerateEdgePedigreeIds;
00100   char* EdgePedigreeIdArrayName;
00101   
00102 private:
00103   vtkSQLDatabaseGraphSource(const vtkSQLDatabaseGraphSource&); // Not implemented
00104   void operator=(const vtkSQLDatabaseGraphSource&);   // Not implemented
00105  
00108   vtkEventForwarderCommand *EventForwarder;
00109 
00110 //BTX
00111   class implementation;
00112   implementation* const Implementation;
00113 //ETX
00114 
00115   bool Directed;
00116   
00117 
00118 };
00119 
00120 #endif
00121