Class ISubBlockCacheOperation#
Defined in File libCZI_Compositor.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Derived Type#
public libCZI::ISubBlockCache
(Class ISubBlockCache)
Class Documentation#
-
class ISubBlockCacheOperation#
This interface defines the operations of adding and querying an element to/from the cache.
Subclassed by libCZI::ISubBlockCache
Public Functions
-
virtual CacheItem Get(int subblock_index) = 0#
Gets the bitmap for the specified subblock-index. If the subblock is not in the cache, then an invalid CacheItem is returned.
- Parameters:
subblock_index – The subblock index to get.
- Returns:
If the subblock is in the cache, then a valid CacheItem is returned, otherwise an invalid CacheItem (i.e. CacheItem::IsValid() returns false).
-
virtual void Add(int subblock_index, const CacheItem &cache_item) = 0#
Adds the specified bitmap for the specified subblock_index to the cache. If the subblock is already in the cache, then it is overwritten.
- Parameters:
subblock_index – The subblock index to add.
cache_item – The cache item to be added.
-
virtual ~ISubBlockCacheOperation() = default#
-
ISubBlockCacheOperation() = default#
-
ISubBlockCacheOperation(const ISubBlockCacheOperation&) = delete#
-
ISubBlockCacheOperation &operator=(const ISubBlockCacheOperation&) = delete#
-
ISubBlockCacheOperation(ISubBlockCacheOperation&&) noexcept = delete#
-
ISubBlockCacheOperation &operator=(ISubBlockCacheOperation&&) noexcept = delete#
-
struct CacheItem#
This struct defines the information which we maintain in the cache. It contains the bitmap and optionally a mask. The bitmap is always present, the mask may be a nullptr.
Public Functions
-
CacheItem() = default#
Default constructor.
Constructor taking only the bitmap.
- Parameters:
bitmap – The bitmap.
Constructor taking the bitmap and the mask.
- Parameters:
bitmap – The bitmap.
mask – The mask.
-
inline bool IsValid() const#
Query if this object is valid (i.e. contains a valid bitmap).
- Returns:
True if valid, false if not.
Public Members
-
std::shared_ptr<IBitmapData> bitmap#
The bitmap.
-
std::shared_ptr<IBitonalBitmapData> mask#
The bitonal mask.
-
CacheItem() = default#
-
virtual CacheItem Get(int subblock_index) = 0#