libCZI
Reading and Writing CZI documents made easy
Loading...
Searching...
No Matches
libCZI::ISubBlockCache Class Reference

#include <libCZI_Compositor.h>

Inheritance diagram for libCZI::ISubBlockCache:
libCZI::ISubBlockCacheStatistics libCZI::ISubBlockCacheControl libCZI::ISubBlockCacheOperation

Public Member Functions

 ISubBlockCache (const ISubBlockCache &)=delete
 
ISubBlockCacheoperator= (const ISubBlockCache &)=delete
 
 ISubBlockCache (ISubBlockCache &&) noexcept=delete
 
ISubBlockCacheoperator= (ISubBlockCache &&) noexcept=delete
 
- Public Member Functions inherited from libCZI::ISubBlockCacheStatistics
virtual Statistics GetStatistics (std::uint8_t mask) const =0
 
 ISubBlockCacheStatistics (const ISubBlockCacheStatistics &)=delete
 
ISubBlockCacheStatisticsoperator= (const ISubBlockCacheStatistics &)=delete
 
 ISubBlockCacheStatistics (ISubBlockCacheStatistics &&) noexcept=delete
 
ISubBlockCacheStatisticsoperator= (ISubBlockCacheStatistics &&) noexcept=delete
 
- Public Member Functions inherited from libCZI::ISubBlockCacheControl
virtual void Prune (const PruneOptions &options)=0
 
 ISubBlockCacheControl (const ISubBlockCacheControl &)=delete
 
ISubBlockCacheControloperator= (const ISubBlockCacheControl &)=delete
 
 ISubBlockCacheControl (ISubBlockCacheControl &&) noexcept=delete
 
ISubBlockCacheControloperator= (ISubBlockCacheControl &&) noexcept=delete
 
- Public Member Functions inherited from libCZI::ISubBlockCacheOperation
virtual std::shared_ptr< IBitmapDataGet (int subblock_index)=0
 
virtual void Add (int subblock_index, std::shared_ptr< IBitmapData > pBitmap)=0
 
 ISubBlockCacheOperation (const ISubBlockCacheOperation &)=delete
 
ISubBlockCacheOperationoperator= (const ISubBlockCacheOperation &)=delete
 
 ISubBlockCacheOperation (ISubBlockCacheOperation &&) noexcept=delete
 
ISubBlockCacheOperationoperator= (ISubBlockCacheOperation &&) noexcept=delete
 

Additional Inherited Members

- Static Public Attributes inherited from libCZI::ISubBlockCacheStatistics
static constexpr std::uint8_t kMemoryUsage = 1
 Bit-mask identifying the memory-usage field in the statistics struct.
 
static constexpr std::uint8_t kElementsCount = 2
 Bit-mask identifying the elements-count field in the statistics struct.
 

Detailed Description

Interface for a caching component (which can be used with the compositors). The intended use is as follows:

  • Whenever the bitmap corresponding to a subblock (c.f. ISubBlock::CreateBitmap) is accessed, the bitmap may be added
    to a cache object, where the subblock-index is the key.
  • Whenever a bitmap is needed (for a given subblock-index), the cache object is first queried whether it contains the bitmap. If yes, then the bitmap
    returned may be used instead of executing the subblock-read-and-decode operation. In order to control the memory usage of the cache, the cache object must be pruned (i.e. subblocks are removed from the cache). Currently this means, that the Prune-method must be called manually. The cache object does not do any pruning automatically. The operations of Adding, Querying and Pruning the cache object are thread-safe.

The documentation for this class was generated from the following file: