QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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 (const QString &path)
 Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified path.
 
virtual ~QgsAbstractContentCacheEntry ()=default
 
virtual int dataSize () const =0
 Returns the memory usage in bytes for the entry.
 
virtual void dump () const =0
 Dumps debugging strings containing the item's properties.
 
QgsAbstractContentCacheEntryoperator= (const QgsAbstractContentCacheEntry &rh)=delete
 
bool operator== (const QgsAbstractContentCacheEntry &other) const
 

Public Attributes

QDateTime fileModified
 Timestamp when file was last modified.
 
QElapsedTimer fileModifiedLastCheckTimer
 Time since last check of file modified date.
 
int mFileModifiedCheckTimeout = 30000
 Timeout before re-checking whether the file modified date has changed.
 
QgsAbstractContentCacheEntrynextEntry = nullptr
 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.
 
QgsAbstractContentCacheEntrypreviousEntry = nullptr
 Entries are kept on a linked list, sorted by last access.
 

Protected Member Functions

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

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 51 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 26 of file qgsabstractcontentcache.cpp.

◆ ~QgsAbstractContentCacheEntry()

virtual QgsAbstractContentCacheEntry::~QgsAbstractContentCacheEntry ( )
virtualdefault

◆ QgsAbstractContentCacheEntry() [2/2]

QgsAbstractContentCacheEntry::QgsAbstractContentCacheEntry ( const QgsAbstractContentCacheEntry rh)
delete

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

◆ operator==()

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

Definition at line 91 of file qgsabstractcontentcache.h.

Member Data Documentation

◆ fileModified

QDateTime QgsAbstractContentCacheEntry::fileModified

Timestamp when file was last modified.

Definition at line 71 of file qgsabstractcontentcache.h.

◆ fileModifiedLastCheckTimer

QElapsedTimer QgsAbstractContentCacheEntry::fileModifiedLastCheckTimer

Time since last check of file modified date.

Definition at line 74 of file qgsabstractcontentcache.h.

◆ mFileModifiedCheckTimeout

int QgsAbstractContentCacheEntry::mFileModifiedCheckTimeout = 30000

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

Definition at line 77 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 83 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 68 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 89 of file qgsabstractcontentcache.h.


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