QgsAbstractContentCacheEntry class
Base class for entries in a QgsAbstractContentCache.
Contents
Subclasses must take care to correctly implement the isEqual() method, applying their own logic for testing extra cache properties (e.g. image size for an image-based cache).
Constructors, destructors, conversion operators
- QgsAbstractContentCacheEntry(const QString& path)
- Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified path.
- QgsAbstractContentCacheEntry(const QgsAbstractContentCacheEntry& rh) deleted
- QgsAbstractContentCacheEntry cannot be copied.
Public functions
- auto dataSize() const -> int pure virtual
- Returns the memory usage in bytes for the entry.
- void dump() const pure virtual
- Dumps debugging strings containing the item's properties.
- auto operator=(const QgsAbstractContentCacheEntry& rh) -> QgsAbstractContentCacheEntry& deleted
- QgsAbstractContentCacheEntry cannot be copied.
Public variables
- QDateTime fileModified
- Timestamp when file was last modified.
- QElapsedTimer fileModifiedLastCheckTimer
- Time since last check of file modified date.
- int mFileModifiedCheckTimeout
- Timeout before re-checking whether the file modified date has changed.
- QgsAbstractContentCacheEntry* nextEntry
- Entries are kept on a linked list, sorted by last access.
- QString path
- Represents the absolute path to a file, a remote URL, or a base64 encoded string.
- QgsAbstractContentCacheEntry* previousEntry
- Entries are kept on a linked list, sorted by last access.
Protected functions
- auto isEqual(const QgsAbstractContentCacheEntry* other) const -> bool pure virtual
- Tests whether this entry matches another entry.
Function documentation
void QgsAbstractContentCacheEntry:: dump() const pure virtual
Dumps debugging strings containing the item's properties.
For testing purposes only.
bool QgsAbstractContentCacheEntry:: isEqual(const QgsAbstractContentCacheEntry* other) const pure virtual protected
Tests whether this entry matches another entry.
Subclasses must take care to check that the type of other is of a matching class, and then test extra cache-specific properties, such as image size.
Variable documentation
QgsAbstractContentCacheEntry* QgsAbstractContentCacheEntry:: nextEntry
Entries are kept on a linked list, sorted by last access.
This point refers to the next entry in the cache.
QgsAbstractContentCacheEntry* QgsAbstractContentCacheEntry:: previousEntry
Entries are kept on a linked list, sorted by last access.
This point refers to the previous entry in the cache.