VTK
vtkXdmf3ArrayKeeper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXdmf3ArrayKeeper.h
5  Language: C++
6 
7  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
29 #ifndef vtkXdmf3ArrayKeeper_h
30 #define vtkXdmf3ArrayKeeper_h
31 
32 #include "vtkIOXdmf3Module.h" // For export macro
33 #include <map>
34 
35 class XdmfArray;
36 
37 class VTKIOXDMF3_EXPORT vtkXdmf3ArrayKeeper
38  : public std::map<XdmfArray *, unsigned int>
39 {
40 public:
43 
46 
48  void BumpGeneration();
49 
51  void Insert(XdmfArray *val);
52 
55  void Release(bool force);
56 
57 private:
58  unsigned int generation;
59 };
60 
61 #endif //vtkXdmf3ArrayKeeper_h
LRU cache of XDMF Arrays.