Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QCache3Q< Key, T, EvPolicy > Class Template Reference

#include <qcache3q_p.h>

+ Inheritance diagram for QCache3Q< Key, T, EvPolicy >:
+ Collaboration diagram for QCache3Q< Key, T, EvPolicy >:

Public Member Functions

 QCache3Q (int maxCost=0, int minRecent=-1, int maxOldPopular=-1)
 
 ~QCache3Q ()
 
int maxCost () const
 
void setMaxCost (int maxCost, int minRecent=-1, int maxOldPopular=-1)
 
int promoteAt () const
 
void setPromoteAt (int p)
 
int totalCost () const
 
void clear ()
 
bool insert (const Key &key, QSharedPointer< T > object, int cost=1)
 
QSharedPointer< T > object (const Key &key) const
 
QSharedPointer< T > operator[] (const Key &key) const
 
void remove (const Key &key, bool force=false)
 
QList< Keykeys () const
 
void printStats ()
 
void deserializeQueue (int queueNumber, const QList< Key > &keys, const QList< QSharedPointer< T > > &values, const QList< int > &costs)
 
void serializeQueue (int queueNumber, QList< QSharedPointer< T > > &buffer)
 

Additional Inherited Members

- Protected Member Functions inherited from QCache3QDefaultEvictionPolicy< Key, T >
void aboutToBeEvicted (const Key &key, QSharedPointer< T > obj)
 
void aboutToBeRemoved (const Key &key, QSharedPointer< T > obj)
 

Detailed Description

template<class Key, class T, class EvPolicy = QCache3QDefaultEvictionPolicy<Key,T>>
class QCache3Q< Key, T, EvPolicy >

Definition at line 75 of file qcache3q_p.h.

Constructor & Destructor Documentation

◆ QCache3Q()

template<class Key , class T , class EvPolicy >
QCache3Q< Key, T, EvPolicy >::QCache3Q ( int maxCost = 0,
int minRecent = -1,
int maxOldPopular = -1 )
explicit

Definition at line 167 of file qcache3q_p.h.

◆ ~QCache3Q()

template<class Key , class T , class EvPolicy = QCache3QDefaultEvictionPolicy<Key,T>>
QCache3Q< Key, T, EvPolicy >::~QCache3Q ( )
inline

Definition at line 113 of file qcache3q_p.h.

References clear().

+ Here is the call graph for this function:

Member Function Documentation

◆ clear()

template<class Key , class T , class EvPolicy >
void QCache3Q< Key, T, EvPolicy >::clear ( )

Definition at line 270 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::clearAll().

+ Here is the caller graph for this function:

◆ deserializeQueue()

template<class Key , class T , class EvPolicy >
void QCache3Q< Key, T, EvPolicy >::deserializeQueue ( int queueNumber,
const QList< Key > & keys,
const QList< QSharedPointer< T > > & values,
const QList< int > & costs )

Definition at line 191 of file qcache3q_p.h.

References clear(), i, keys, Q_ASSERT, and queue.

Referenced by QGeoFileTileCache::loadTiles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

template<class Key , class T , class EvPolicy >
bool QCache3Q< Key, T, EvPolicy >::insert ( const Key & key,
QSharedPointer< T > object,
int cost = 1 )

Definition at line 228 of file qcache3q_p.h.

References cost().

Referenced by QGeoFileTileCache::addToDiskCache(), QGeoFileTileCache::addToDiskCache(), QGeoFileTileCache::addToMemoryCache(), and QGeoFileTileCache::addToTextureCache().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keys()

template<class Key , class T , class EvPolicy >
QList< Key > QCache3Q< Key, T, EvPolicy >::keys ( ) const

Definition at line 392 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::clearMapId(), and QGeoFileTileCacheOsm::dropTiles().

+ Here is the caller graph for this function:

◆ maxCost()

template<class Key , class T , class EvPolicy = QCache3QDefaultEvictionPolicy<Key,T>>
int QCache3Q< Key, T, EvPolicy >::maxCost ( ) const
inline

Definition at line 115 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::maxDiskUsage(), QGeoFileTileCache::maxMemoryUsage(), and QGeoFileTileCache::maxTextureUsage().

+ Here is the caller graph for this function:

◆ object()

template<class Key , class T , class EvPolicy >
QSharedPointer< T > QCache3Q< Key, T, EvPolicy >::object ( const Key & key) const

Definition at line 398 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::getFromDisk(), and QGeoFileTileCache::getFromMemory().

+ Here is the caller graph for this function:

◆ operator[]()

template<class Key , class T , class EvPolicy >
QSharedPointer< T > QCache3Q< Key, T, EvPolicy >::operator[] ( const Key & key) const
inline

Definition at line 434 of file qcache3q_p.h.

◆ printStats()

template<class Key , class T , class EvPolicy >
void QCache3Q< Key, T, EvPolicy >::printStats ( )

Definition at line 153 of file qcache3q_p.h.

References qDebug.

Referenced by QGeoFileTileCache::printStats().

+ Here is the caller graph for this function:

◆ promoteAt()

template<class Key , class T , class EvPolicy = QCache3QDefaultEvictionPolicy<Key,T>>
int QCache3Q< Key, T, EvPolicy >::promoteAt ( ) const
inline

Definition at line 118 of file qcache3q_p.h.

◆ remove()

template<class Key , class T , class EvPolicy >
void QCache3Q< Key, T, EvPolicy >::remove ( const Key & key,
bool force = false )

Definition at line 378 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::clearMapId(), and QGeoFileTileCacheOsm::dropTiles().

+ Here is the caller graph for this function:

◆ serializeQueue()

template<class Key , class T , class EvPolicy >
void QCache3Q< Key, T, EvPolicy >::serializeQueue ( int queueNumber,
QList< QSharedPointer< T > > & buffer )

Definition at line 179 of file qcache3q_p.h.

References Q_ASSERT, and queue.

Referenced by QGeoFileTileCache::~QGeoFileTileCache().

+ Here is the caller graph for this function:

◆ setMaxCost()

template<class Key , class T , class EvPolicy >
void QCache3Q< Key, T, EvPolicy >::setMaxCost ( int maxCost,
int minRecent = -1,
int maxOldPopular = -1 )
inline

Definition at line 215 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::setExtraTextureUsage(), QGeoFileTileCache::setMaxDiskUsage(), QGeoFileTileCache::setMaxMemoryUsage(), and QGeoFileTileCache::setMinTextureUsage().

+ Here is the caller graph for this function:

◆ setPromoteAt()

template<class Key , class T , class EvPolicy = QCache3QDefaultEvictionPolicy<Key,T>>
void QCache3Q< Key, T, EvPolicy >::setPromoteAt ( int p)
inline

Definition at line 119 of file qcache3q_p.h.

◆ totalCost()

template<class Key , class T , class EvPolicy = QCache3QDefaultEvictionPolicy<Key,T>>
int QCache3Q< Key, T, EvPolicy >::totalCost ( ) const
inline

Definition at line 121 of file qcache3q_p.h.

Referenced by QGeoFileTileCache::diskUsage(), QGeoFileTileCache::memoryUsage(), and QGeoFileTileCache::textureUsage().

+ Here is the caller graph for this function:

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