VTK  9.1.0
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
35class 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
41class VTKIOXDMF3_EXPORT vtkXdmf3ArrayKeeper : public std::map<XdmfArray*, unsigned int>
42{
43public:
48
53
58
62 void Insert(XdmfArray* val);
63
68 void Release(bool force);
69
71
72private:
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.
~vtkXdmf3ArrayKeeper()
Destructor.
void Insert(XdmfArray *val)
Call whenever you a new XDMF array is accessed.
void Release(bool force)
Call to free all open arrays that are currently open but not in use.
void BumpGeneration()
Call to mark arrays that will be accessed with a new timestamp.
vtkXdmf3ArrayKeeper(const vtkXdmf3ArrayKeeper &)=delete
vtkXdmf3ArrayKeeper()
Constructor.