VTK
dox/Geovis/vtkGeoSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGeoSource.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 -------------------------------------------------------------------------*/
00043 #ifndef __vtkGeoSource_h
00044 #define __vtkGeoSource_h
00045 
00046 #include "vtkObject.h"
00047 
00048 class vtkAbstractTransform;
00049 class vtkCollection;
00050 class vtkConditionVariable;
00051 class vtkGeoTreeNode;
00052 class vtkMultiThreader;
00053 class vtkMutexLock;
00054 
00055 class VTK_GEOVIS_EXPORT vtkGeoSource : public vtkObject
00056 {
00057 public:
00058   vtkTypeMacro(vtkGeoSource,vtkObject);
00059 
00060   vtkGeoSource();
00061   ~vtkGeoSource();
00062 
00064 
00065   virtual bool FetchRoot(vtkGeoTreeNode* root) = 0;
00066   virtual bool FetchChild(vtkGeoTreeNode* node, int index, vtkGeoTreeNode* child) = 0;
00068 
00070 
00077   virtual void RequestChildren(vtkGeoTreeNode* node);
00078   virtual vtkCollection* GetRequestedNodes(vtkGeoTreeNode* node);
00080 
00082   void Initialize(int numThreads = 1);
00083 
00085   void ShutDown();
00086 
00087   void WorkerThread();
00088 
00090   virtual vtkAbstractTransform* GetTransform() { return NULL; }
00091 
00092 protected:
00093 
00094   vtkCollection* InputSet;
00095   vtkCollection* ProcessingSet;
00096 
00098 
00099   vtkMutexLock* InputSetLock;
00100   vtkMutexLock* ProcessingSetLock;
00101   vtkMutexLock* OutputSetLock;
00103 
00104   vtkMutexLock* Lock;
00105 
00106   vtkConditionVariable* Condition;
00107 
00108   vtkMultiThreader* Threader;
00109   bool StopThread;
00110   bool Initialized;
00111 
00112   //BTX
00113   class implementation;
00114   implementation* Implementation;
00115   //ETX
00116 
00117 private:
00118   vtkGeoSource(const vtkGeoSource&); // Not implemented
00119   void operator=(const vtkGeoSource&); // Not implemented
00120 };
00121 
00122 #endif // __vtkGeoSource_h