3#ifndef vtkExodusIICache_h
4#define vtkExodusIICache_h
28#include "vtkIOExodusModule.h"
34VTK_ABI_NAMESPACE_BEGIN
66 if (pattern.
Time && this->Time != other.
Time)
78 if (this->Time < other.
Time)
80 else if (this->Time > other.
Time)
88 else if (this->ObjectId > other.
ObjectId)
90 if (this->ArrayId < other.
ArrayId)
abstract superclass for arrays of numeric data
vtkExodusIICacheEntry(vtkDataArray *arr)
vtkDataArray * GetValue()
vtkExodusIICacheLRURef LRUEntry
vtkExodusIICacheEntry(const vtkExodusIICacheEntry &other)
bool operator<(const vtkExodusIICacheKey &other) const
bool match(const vtkExodusIICacheKey &other, const vtkExodusIICacheKey &pattern) const
vtkExodusIICacheKey(int time, int objType, int objId, int arrId)
vtkExodusIICacheKey(const vtkExodusIICacheKey &src)
vtkExodusIICacheKey & operator=(const vtkExodusIICacheKey &src)=default
static vtkExodusIICache * New()
void Clear()
Empty the cache.
void SetCacheCapacity(double sizeInMiB)
Set the maximum allowable cache size.
vtkExodusIICacheLRU LRU
The actual LRU list (indices into the cache ordered least to most recently used).
double Size
The current size of the cache (i.e., the size of the all the arrays it currently contains) in MiB.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataArray *& Find(const vtkExodusIICacheKey &)
Determine whether a cache entry exists.
vtkExodusIICache()
Default constructor.
double Capacity
The capacity of the cache (i.e., the maximum size of all arrays it contains) in MiB.
int Invalidate(const vtkExodusIICacheKey &key)
Invalidate a cache entry (drop it from the cache) if the key exists.
int ReduceToSize(double newSize)
Remove cache entries until the size of the cache is at or below the given size.
~vtkExodusIICache() override
Destructor.
void RecomputeSize()
Avoid (some) FP problems.
double GetSpaceLeft()
See how much cache space is left.
void Insert(vtkExodusIICacheKey &key, vtkDataArray *value)
Insert an entry into the cache (this can remove other cache entries to make space).
vtkExodusIICacheSet Cache
A least-recently-used (LRU) cache to hold arrays.
int Invalidate(const vtkExodusIICacheKey &key, const vtkExodusIICacheKey &pattern)
Invalidate all cache entries matching a specified pattern, dropping all matches from the cache.
a simple class to control print indentation
abstract base class for most VTK objects
std::list< vtkExodusIICacheRef > vtkExodusIICacheLRU
std::map< vtkExodusIICacheKey, vtkExodusIICacheEntry * >::iterator vtkExodusIICacheRef
std::map< vtkExodusIICacheKey, vtkExodusIICacheEntry * > vtkExodusIICacheSet
std::list< vtkExodusIICacheRef >::iterator vtkExodusIICacheLRURef