QGIS API Documentation  3.6.0-Noosa (5873452)
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 QString &path)
 Constructor for QgsAbstractContentCacheEntry for an entry relating to the specified path. More...
 
 QgsAbstractContentCacheEntry (const QgsAbstractContentCacheEntry &rh)=delete
 QgsAbstractContentCacheEntry cannot be copied. 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 47 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 89 of file qgsabstractcontentcache.h.

Member Data Documentation

◆ fileModified

QDateTime QgsAbstractContentCacheEntry::fileModified

Timestamp when file was last modified.

Definition at line 69 of file qgsabstractcontentcache.h.

◆ fileModifiedLastCheckTimer

QElapsedTimer QgsAbstractContentCacheEntry::fileModifiedLastCheckTimer

Time since last check of file modified date.

Definition at line 72 of file qgsabstractcontentcache.h.

◆ mFileModifiedCheckTimeout

int QgsAbstractContentCacheEntry::mFileModifiedCheckTimeout = 30000

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

Definition at line 75 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 81 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 66 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 87 of file qgsabstractcontentcache.h.


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