1#ifndef vtkExodusIICache_h
2#define vtkExodusIICache_h
26#include "vtkIOExodusModule.h"
70 if ( pattern.
Time && this->Time != other.
Time )
82 if ( this->Time < other.
Time )
84 else if ( this->Time > other.
Time )
88 else if ( this->ObjectType > other.
ObjectType )
90 if ( this->ObjectId < other.
ObjectId )
92 else if ( this->ObjectId > other.
ObjectId )
94 if ( this->ArrayId < other.
ArrayId )
145 {
return this->Capacity - this->Size; }
abstract superclass for arrays of numeric data
vtkExodusIICacheEntry(vtkDataArray *arr)
vtkDataArray * GetValue()
vtkExodusIICacheLRURef LRUEntry
vtkExodusIICacheEntry(const vtkExodusIICacheEntry &other)
bool match(const vtkExodusIICacheKey &other, const vtkExodusIICacheKey &pattern) const
vtkExodusIICacheKey(int time, int objType, int objId, int arrId)
vtkExodusIICacheKey(const vtkExodusIICacheKey &src)
static vtkExodusIICache * New()
void Clear()
Empty the cache.
void SetCacheCapacity(double sizeInMiB)
Set the maximum allowable cache size. This will remove cache entries if the capacity is reduced below...
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.
vtkExodusIICache()
Default constructor.
vtkDataArray *& Find(vtkExodusIICacheKey)
Determine whether a cache entry exists.
double Capacity
The capacity of the cache (i.e., the maximum size of all arrays it contains) in MiB.
~vtkExodusIICache()
Destructor.
int ReduceToSize(double newSize)
Remove cache entries until the size of the cache is at or below the given size.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void RecomputeSize()
Avoid (some) FP problems.
double GetSpaceLeft()
See how much cache space is left.
int Invalidate(vtkExodusIICacheKey key, vtkExodusIICacheKey pattern)
Invalidate all cache entries matching a specified pattern, dropping all matches from the cache.
void Insert(vtkExodusIICacheKey &key, vtkDataArray *value)
Insert an entry into the cache (this can remove other cache entries to make space).
int Invalidate(vtkExodusIICacheKey key)
Invalidate a cache entry (drop it from the cache) if the key exists.
vtkExodusIICacheSet Cache
A least-recently-used (LRU) cache to hold arrays.
a simple class to control print indentation
abstract base class for most VTK objects
std::list< vtkExodusIICacheRef > vtkExodusIICacheLRU
std::map< vtkExodusIICacheKey, vtkExodusIICacheEntry * > vtkExodusIICacheSet
std::map< vtkExodusIICacheKey, vtkExodusIICacheEntry * >::iterator vtkExodusIICacheRef
std::list< vtkExodusIICacheRef >::iterator vtkExodusIICacheLRURef
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)