00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkGraphLayout.h,v $ 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 -------------------------------------------------------------------------*/ 00039 #ifndef __vtkGraphLayout_h 00040 #define __vtkGraphLayout_h 00041 00042 #include "vtkGraphAlgorithm.h" 00043 00044 class vtkGraphLayoutStrategy; 00045 class vtkEventForwarderCommand; 00046 00047 class VTK_INFOVIS_EXPORT vtkGraphLayout : public vtkGraphAlgorithm 00048 { 00049 public: 00050 static vtkGraphLayout *New(); 00051 vtkTypeRevisionMacro(vtkGraphLayout, vtkGraphAlgorithm); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00056 void SetLayoutStrategy(vtkGraphLayoutStrategy *strategy); 00057 vtkGetObjectMacro(LayoutStrategy, vtkGraphLayoutStrategy); 00059 00061 virtual int IsLayoutComplete(); 00062 00064 virtual unsigned long GetMTime(); 00065 00066 protected: 00067 vtkGraphLayout(); 00068 ~vtkGraphLayout(); 00069 00070 vtkGraphLayoutStrategy* LayoutStrategy; 00071 00073 00075 vtkEventForwarderCommand *EventForwarder; 00076 unsigned long ObserverTag; 00078 00079 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00080 00081 private: 00082 00083 vtkGraph *LastInput; 00084 unsigned long LastInputMTime; 00085 vtkGraph *InternalGraph; 00086 bool StrategyChanged; 00087 00088 vtkGraphLayout(const vtkGraphLayout&); // Not implemented. 00089 void operator=(const vtkGraphLayout&); // Not implemented. 00090 }; 00091 00092 #endif