VTK
dox/Geovis/vtkGeoTreeNodeCache.h
Go to the documentation of this file.
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 "vtkObject.h"
00034 #include "vtkSmartPointer.h" // For SP ivars
00035 
00036 class vtkGeoTreeNode;
00037 
00038 class VTK_GEOVIS_EXPORT vtkGeoTreeNodeCache : public vtkObject
00039 {
00040 public:
00041   static vtkGeoTreeNodeCache *New();
00042   vtkTypeMacro(vtkGeoTreeNodeCache,vtkObject);
00043   virtual void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046 
00049   vtkSetMacro(CacheMaximumLimit, int);
00050   vtkGetMacro(CacheMaximumLimit, int);
00052 
00054 
00055   vtkSetMacro(CacheMinimumLimit, int);
00056   vtkGetMacro(CacheMinimumLimit, int);
00058 
00062   void SendToFront(vtkGeoTreeNode* node);
00063 
00065   void RemoveNode(vtkGeoTreeNode* node);
00066 
00068 
00069   vtkGetMacro(Size, int);
00071 
00072 protected:
00073   vtkGeoTreeNodeCache();
00074   ~vtkGeoTreeNodeCache();
00075 
00078   void TrimToCacheMinimum();
00079 
00082   void DeleteDataFromSiblings(vtkGeoTreeNode* node);
00083 
00084   int Size;
00085   int CacheMinimumLimit;
00086   int CacheMaximumLimit;
00087   //BTX
00088   vtkSmartPointer<vtkGeoTreeNode> Newest;
00089   vtkSmartPointer<vtkGeoTreeNode> Oldest;
00090   //ETX
00091 
00092 private:
00093   vtkGeoTreeNodeCache(const vtkGeoTreeNodeCache&); // Not implemented
00094   void operator=(const vtkGeoTreeNodeCache&); // Not implemented
00095 };
00096 
00097 #endif