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 =========================================================================*/
32 #ifndef vtkXdmf3ArrayKeeper_h
33 #define vtkXdmf3ArrayKeeper_h
34 
35 #include "vtkIOXdmf3Module.h" // For export macro
36 #include <map>
37 
38 class XdmfArray;
39 
40 class VTKIOXDMF3_EXPORT vtkXdmf3ArrayKeeper
41  : public std::map<XdmfArray *, unsigned int>
42 {
43 public:
46 
49 
51  void BumpGeneration();
52 
54  void Insert(XdmfArray *val);
55 
58  void Release(bool force);
59 
60 private:
61  unsigned int generation;
62 };
63 
64 #endif //vtkXdmf3ArrayKeeper_h
LRU cache of XDMF Arrays.