Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 163 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 114 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 268 of file qcache3q_p.h.

Referenced by ~QCache3Q(), and deserializeQueue().

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 187 of file qcache3q_p.h.

References clear().

Here is the call 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 224 of file qcache3q_p.h.

◆ keys()

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

Definition at line 391 of file qcache3q_p.h.

◆ maxCost()

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

Definition at line 116 of file qcache3q_p.h.

Referenced by printStats().

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 397 of file qcache3q_p.h.

◆ operator[]()

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

Definition at line 433 of file qcache3q_p.h.

◆ printStats()

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

Definition at line 149 of file qcache3q_p.h.

References maxCost(), and totalCost().

Here is the call 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 119 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 376 of file qcache3q_p.h.

◆ serializeQueue()

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

Definition at line 175 of file qcache3q_p.h.

◆ 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 211 of file qcache3q_p.h.

◆ setPromoteAt()

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

Definition at line 120 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 122 of file qcache3q_p.h.

Referenced by printStats().

Here is the caller graph for this function:

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