VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkGeoTreeNodeCache.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoTreeNodeCache.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
30 #ifndef __vtkGeoTreeNodeCache_h
31 #define __vtkGeoTreeNodeCache_h
32 
33 #include "vtkGeovisCoreModule.h" // For export macro
34 #include "vtkObject.h"
35 #include "vtkSmartPointer.h" // For SP ivars
36 
37 class vtkGeoTreeNode;
38 
39 class VTKGEOVISCORE_EXPORT vtkGeoTreeNodeCache : public vtkObject
40 {
41 public:
42  static vtkGeoTreeNodeCache *New();
43  vtkTypeMacro(vtkGeoTreeNodeCache,vtkObject);
44  virtual void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
50  vtkSetMacro(CacheMaximumLimit, int);
51  vtkGetMacro(CacheMaximumLimit, int);
53 
55 
56  vtkSetMacro(CacheMinimumLimit, int);
57  vtkGetMacro(CacheMinimumLimit, int);
59 
63  void SendToFront(vtkGeoTreeNode* node);
64 
66  void RemoveNode(vtkGeoTreeNode* node);
67 
69 
70  vtkGetMacro(Size, int);
72 
73 protected:
76 
79  void TrimToCacheMinimum();
80 
83  void DeleteDataFromSiblings(vtkGeoTreeNode* node);
84 
85  int Size;
88  //BTX
89  vtkSmartPointer<vtkGeoTreeNode> Newest;
90  vtkSmartPointer<vtkGeoTreeNode> Oldest;
91  //ETX
92 
93 private:
94  vtkGeoTreeNodeCache(const vtkGeoTreeNodeCache&); // Not implemented
95  void operator=(const vtkGeoTreeNodeCache&); // Not implemented
96 };
97 
98 #endif
vtkSmartPointer< vtkGeoTreeNode > Newest
vtkSmartPointer< vtkGeoTreeNode > Oldest
Stores data for a patch of the globe.
Manages a list of vtkGeoTreeNodes.