QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
QgsAbstractContentCacheEntry Class Referenceabstract

Base class for entries in a QgsAbstractContentCache. More...

#include <qgsabstractcontentcache.h>

Public Member Functions

 QgsAbstractContentCacheEntry (const QgsAbstractContentCacheEntry &rh)=delete
 QgsAbstractContentCacheEntry cannot be copied. More...
 
 QgsAbstractContentCacheEntry (const QString &path)
 Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified path. More...
 
virtual ~QgsAbstractContentCacheEntry ()=default
 
virtual int dataSize () const =0
 Returns the memory usage in bytes for the entry. More...
 
virtual void dump () const =0
 Dumps debugging strings containing the item's properties. More...
 
QgsAbstractContentCacheEntryoperator= (const QgsAbstractContentCacheEntry &rh)=delete
 QgsAbstractContentCacheEntry cannot be copied. More...
 
bool operator== (const QgsAbstractContentCacheEntry &other) const
 

Public Attributes

QDateTime fileModified
 Timestamp when file was last modified. More...
 
QElapsedTimer fileModifiedLastCheckTimer
 Time since last check of file modified date. More...
 
int mFileModifiedCheckTimeout = 30000
 Timeout before re-checking whether the file modified date has changed. More...
 
QgsAbstractContentCacheEntrynextEntry = nullptr
 Entries are kept on a linked list, sorted by last access. More...
 
QString path
 Represents the absolute path to a file, a remote URL, or a base64 encoded string. More...
 
QgsAbstractContentCacheEntrypreviousEntry = nullptr
 Entries are kept on a linked list, sorted by last access. More...
 

Protected Member Functions

virtual bool isEqual (const QgsAbstractContentCacheEntry *other) const =0
 Tests whether this entry matches another entry. More...
 

Detailed Description

Base class for entries in a QgsAbstractContentCache.

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).

Since
QGIS 3.6

Definition at line 54 of file qgsabstractcontentcache.h.

Constructor & Destructor Documentation

◆ QgsAbstractContentCacheEntry() [1/2]

QgsAbstractContentCacheEntry::QgsAbstractContentCacheEntry ( const QString &  path)

Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified path.

Definition at line 24 of file qgsabstractcontentcache.cpp.

◆ ~QgsAbstractContentCacheEntry()

virtual QgsAbstractContentCacheEntry::~QgsAbstractContentCacheEntry ( )
virtualdefault

◆ QgsAbstractContentCacheEntry() [2/2]

QgsAbstractContentCacheEntry::QgsAbstractContentCacheEntry ( const QgsAbstractContentCacheEntry rh)
delete

QgsAbstractContentCacheEntry cannot be copied.

Member Function Documentation

◆ dataSize()

virtual int QgsAbstractContentCacheEntry::dataSize ( ) const
pure virtual

Returns the memory usage in bytes for the entry.

◆ dump()

virtual void QgsAbstractContentCacheEntry::dump ( ) const
pure virtual

Dumps debugging strings containing the item's properties.

For testing purposes only.

◆ isEqual()

virtual bool QgsAbstractContentCacheEntry::isEqual ( const QgsAbstractContentCacheEntry other) const
protectedpure virtual

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.

◆ operator=()

QgsAbstractContentCacheEntry& QgsAbstractContentCacheEntry::operator= ( const QgsAbstractContentCacheEntry rh)
delete

QgsAbstractContentCacheEntry cannot be copied.

◆ operator==()

bool QgsAbstractContentCacheEntry::operator== ( const QgsAbstractContentCacheEntry other) const
inline

Definition at line 96 of file qgsabstractcontentcache.h.

Member Data Documentation

◆ fileModified

QDateTime QgsAbstractContentCacheEntry::fileModified

Timestamp when file was last modified.

Definition at line 76 of file qgsabstractcontentcache.h.

◆ fileModifiedLastCheckTimer

QElapsedTimer QgsAbstractContentCacheEntry::fileModifiedLastCheckTimer

Time since last check of file modified date.

Definition at line 79 of file qgsabstractcontentcache.h.

◆ mFileModifiedCheckTimeout

int QgsAbstractContentCacheEntry::mFileModifiedCheckTimeout = 30000

Timeout before re-checking whether the file modified date has changed.

Definition at line 82 of file qgsabstractcontentcache.h.

◆ nextEntry

QgsAbstractContentCacheEntry* QgsAbstractContentCacheEntry::nextEntry = nullptr

Entries are kept on a linked list, sorted by last access.

This point refers to the next entry in the cache.

Definition at line 88 of file qgsabstractcontentcache.h.

◆ path

QString QgsAbstractContentCacheEntry::path

Represents the absolute path to a file, a remote URL, or a base64 encoded string.

Definition at line 73 of file qgsabstractcontentcache.h.

◆ previousEntry

QgsAbstractContentCacheEntry* QgsAbstractContentCacheEntry::previousEntry = nullptr

Entries are kept on a linked list, sorted by last access.

This point refers to the previous entry in the cache.

Definition at line 94 of file qgsabstractcontentcache.h.


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