VTK  9.0.1
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 #ifdef _MSC_VER
38 #pragma warning(push) // save
39 #pragma warning(disable : 4251) // needs to have dll-interface to be used by clients of class
40 #endif
41 class VTKIOXDMF3_EXPORT vtkXdmf3ArrayKeeper : public std::map<XdmfArray*, unsigned int>
42 {
43 public:
48 
53 
57  void BumpGeneration();
58 
62  void Insert(XdmfArray* val);
63 
68  void Release(bool force);
69 
71 
72 private:
73  unsigned int generation;
74 };
75 #ifdef _MSC_VER
76 #pragma warning(pop) // restore
77 #endif
78 
79 #endif // vtkXdmf3ArrayKeeper_h
80 // VTK-HeaderTest-Exclude: vtkXdmf3ArrayKeeper.h
LRU cache of XDMF Arrays.