VTK
dox/Geovis/Core/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 "vtkGeovisCoreModule.h" // For export macro
00047 #include "vtkObject.h"
00048 
00049 class vtkAbstractTransform;
00050 class vtkCollection;
00051 class vtkConditionVariable;
00052 class vtkGeoTreeNode;
00053 class vtkMultiThreader;
00054 class vtkMutexLock;
00055 
00056 class VTKGEOVISCORE_EXPORT vtkGeoSource : public vtkObject
00057 {
00058 public:
00059   vtkTypeMacro(vtkGeoSource,vtkObject);
00060 
00061   vtkGeoSource();
00062   ~vtkGeoSource();
00063 
00065 
00066   virtual bool FetchRoot(vtkGeoTreeNode* root) = 0;
00067   virtual bool FetchChild(vtkGeoTreeNode* node, int index, vtkGeoTreeNode* child) = 0;
00069 
00071 
00078   virtual void RequestChildren(vtkGeoTreeNode* node);
00079   virtual vtkCollection* GetRequestedNodes(vtkGeoTreeNode* node);
00081 
00083   void Initialize(int numThreads = 1);
00084 
00086   void ShutDown();
00087 
00088   void WorkerThread();
00089 
00091   virtual vtkAbstractTransform* GetTransform() { return NULL; }
00092 
00093 protected:
00094 
00095   vtkCollection* InputSet;
00096   vtkCollection* ProcessingSet;
00097 
00099 
00100   vtkMutexLock* InputSetLock;
00101   vtkMutexLock* ProcessingSetLock;
00102   vtkMutexLock* OutputSetLock;
00104 
00105   vtkMutexLock* Lock;
00106 
00107   vtkConditionVariable* Condition;
00108 
00109   vtkMultiThreader* Threader;
00110   bool StopThread;
00111   bool Initialized;
00112 
00113   //BTX
00114   class implementation;
00115   implementation* Implementation;
00116   //ETX
00117 
00118 private:
00119   vtkGeoSource(const vtkGeoSource&); // Not implemented
00120   void operator=(const vtkGeoSource&); // Not implemented
00121 };
00122 
00123 #endif // __vtkGeoSource_h