4#ifndef vtkDataObjectMeshCache_h
5#define vtkDataObjectMeshCache_h
7#include "vtkCommonCacheModule.h"
17VTK_ABI_NAMESPACE_BEGIN
119 return this->OriginalDataDefined && this->ConsumerDefined && this->CacheDefined &&
120 this->ConsumerUnmodified && this->OriginalMeshUnmodified && this->AttributesIdsExists;
308 const std::string& name);
330 std::set<vtkMTimeType> GetOriginalMeshTimes()
const;
346 bool CacheHasRequestedIds()
const;
357 bool HasConsumerNoInputPort()
const;
372 std::map<int, std::string> OriginalIdsName;
373 std::set<int> PreservedInputAttributes;
374 std::set<std::string> PreservedCachedArrays;
383 std::map<unsigned int, vtkMTimeType> CachedOriginalLeavesTime;
abstract superclass for composite (multi-block or AMR) datasets
~vtkDataObjectMeshCache() override=default
void ForwardAttribute(int attribute)
Add attribute in the forward list.
void PreservedInputAllAttributes()
Original Ids.
std::set< std::string > GetPreservedCachedArrays()
Keep cached arrayName array when copying cache to output.
static vtkMTimeType GetDataObjectMeshMTime(vtkDataObject *object)
Return the mesh MTime for the given dataobject, as used for the Cache.
void ClearPreservedInputAttributes()
Original Ids.
void CopyCacheToDataObject(vtkDataObject *output)
Fill given dataset with cached data.
void RemoveOriginalIds(int attribute)
Remove ids array name for attribute type.
static void CreateTemporaryOriginalIdsArrays(vtkDataObject *object)
Add an ids array on underlying PointData and CellData.
void ForwardAttributesToDataSet(vtkDataSet *input, vtkDataSet *cache, vtkDataSet *output)
Forward dataset attributes from OriginalDataObject to output.
void ForwardAttributes(vtkDataSet *input, vtkDataSet *cache, vtkDataSet *output, int attribute, const std::string &name)
Forward dataset attributes from OriginalDataObject to output.
void UpdateCache(vtkDataObject *newObject)
Set given dataset as the new Cache.
vtkDataObjectMeshCache()=default
void AddPreservedCachedArray(const std::string &arrayName)
Keep cached arrayName array when copying cache to output.
static void CleanupTemporaryOriginalIds(vtkDataObject *object)
Cleanup the temporary array, as we do not want it to exists outside of this filter.
void SetOriginalDataObject(vtkDataObject *original)
Set the original dataobject.
void InvalidateCache()
Invalidate cache.
void ForwardAttributesToComposite(vtkCompositeDataSet *input, vtkCompositeDataSet *output)
Forward dataset attributes from OriginalDataObject to output.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ClearOriginalIds()
Clear all original ids.
void AddPreservedInputAttributes(int)
Preserve input attribute, i.e.
void AddOriginalIds(int attribute, const std::string &name)
Original Ids.
static std::string GetDefaultIdsName()
Return a default name for original ids.
static vtkDataObjectMeshCache * New()
std::set< int > GetPreservedInputAttributes()
Original Ids.
void SetConsumer(vtkAlgorithm *consumer)
Set the consumer of this cache.
void ClearPreservedCachedArray()
Keep cached arrayName array when copying cache to output.
Status GetStatus() const
Compute and returns the current cache status.
static std::map< unsigned int, vtkMTimeType > GetDataObjectMeshMTimes(vtkDataObject *object)
Return a map of MeshMTime stored by composite flat index.
bool IsSupportedData(vtkDataObject *dataobject) const
Return true if dataobject is of a supported type.
general representation of visualization data
abstract class to specify dataset behavior
a simple class to control print indentation
Hold a reference to a vtkObjectBase instance.
a weak reference to a vtkObject.
Structure to handle the current cache status.
bool OriginalMeshUnmodified
True if OriginalDataSet mesh was not modified since last cache update.
void PrintSelf(ostream &os, vtkIndent indent)
Print members.
bool OriginalDataDefined
True if OriginalDataObject is set.
bool operator==(const Status &other) const
Return true if and only if every members are equals.
bool CacheDefined
True if Cache with initialized.
bool ConsumerDefined
True if Consumer is set.
bool operator!=(const Status &other) const
Return true if both object are not equals.
bool ConsumerUnmodified
True if Consumer was not modified since last cache update.
bool AttributesIdsExists
True if attributes ids exists.
bool enabled()
Return true if the cache can safely and meaningfully be used.
vtkTypeUInt32 vtkMTimeType