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 #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
42  : public std::map<XdmfArray *, unsigned int>
43 {
44 public:
49 
54 
58  void BumpGeneration();
59 
63  void Insert(XdmfArray *val);
64 
69  void Release(bool force);
70 
71 private:
72  unsigned int generation;
73 };
74 #ifdef _MSC_VER
75 #pragma warning (pop) //restore
76 #endif
77 
78 #endif //vtkXdmf3ArrayKeeper_h
79 // VTK-HeaderTest-Exclude: vtkXdmf3ArrayKeeper.h
LRU cache of XDMF Arrays.