VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGeoTreeNodeCache.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 -------------------------------------------------------------------------*/ 00030 #ifndef vtkGeoTreeNodeCache_h 00031 #define vtkGeoTreeNodeCache_h 00032 00033 #include "vtkGeovisCoreModule.h" // For export macro 00034 #include "vtkObject.h" 00035 #include "vtkSmartPointer.h" // For SP ivars 00036 00037 class vtkGeoTreeNode; 00038 00039 class VTKGEOVISCORE_EXPORT vtkGeoTreeNodeCache : public vtkObject 00040 { 00041 public: 00042 static vtkGeoTreeNodeCache *New(); 00043 vtkTypeMacro(vtkGeoTreeNodeCache,vtkObject); 00044 virtual void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00050 vtkSetMacro(CacheMaximumLimit, int); 00051 vtkGetMacro(CacheMaximumLimit, int); 00053 00055 00056 vtkSetMacro(CacheMinimumLimit, int); 00057 vtkGetMacro(CacheMinimumLimit, int); 00059 00063 void SendToFront(vtkGeoTreeNode* node); 00064 00066 void RemoveNode(vtkGeoTreeNode* node); 00067 00069 00070 vtkGetMacro(Size, int); 00072 00073 protected: 00074 vtkGeoTreeNodeCache(); 00075 ~vtkGeoTreeNodeCache(); 00076 00079 void TrimToCacheMinimum(); 00080 00083 void DeleteDataFromSiblings(vtkGeoTreeNode* node); 00084 00085 int Size; 00086 int CacheMinimumLimit; 00087 int CacheMaximumLimit; 00088 //BTX 00089 vtkSmartPointer<vtkGeoTreeNode> Newest; 00090 vtkSmartPointer<vtkGeoTreeNode> Oldest; 00091 //ETX 00092 00093 private: 00094 vtkGeoTreeNodeCache(const vtkGeoTreeNodeCache&); // Not implemented 00095 void operator=(const vtkGeoTreeNodeCache&); // Not implemented 00096 }; 00097 00098 #endif