QtBase  v6.3.1
Classes | Public Member Functions | List of all members
QCache< Key, T > Class Template Reference

#include <qcache.h>

Public Member Functions

 QCache (qsizetype maxCost=100) noexcept
 
 ~QCache ()
 
qsizetype maxCost () const noexcept
 
void setMaxCost (qsizetype m) noexcept(std::is_nothrow_destructible_v< Node >)
 
qsizetype totalCost () const noexcept
 
qsizetype size () const noexcept
 
qsizetype count () const noexcept
 
bool isEmpty () const noexcept
 
QList< Key > keys () const
 
void clear () noexcept(std::is_nothrow_destructible_v< Node >)
 
bool insert (const Key &key, T *object, qsizetype cost=1)
 
Tobject (const Key &key) const noexcept
 
Toperator[] (const Key &key) const noexcept
 
bool contains (const Key &key) const noexcept
 
bool remove (const Key &key) noexcept(std::is_nothrow_destructible_v< Node >)
 
Ttake (const Key &key) noexcept(std::is_nothrow_destructible_v< Key >)
 

Detailed Description

template<class Key, class T>
class QCache< Key, T >

Definition at line 49 of file qcache.h.

Constructor & Destructor Documentation

◆ QCache()

template<class Key , class T >
QCache< Key, T >::QCache ( qsizetype  maxCost = 100)
inlineexplicitnoexcept

Definition at line 175 of file qcache.h.

◆ ~QCache()

template<class Key , class T >
QCache< Key, T >::~QCache ( )
inline

Definition at line 179 of file qcache.h.

Here is the call graph for this function:

Member Function Documentation

◆ clear()

template<class Key , class T >
void QCache< Key, T >::clear ( )
inlinenoexcept

Definition at line 210 of file qcache.h.

Here is the caller graph for this function:

◆ contains()

template<class Key , class T >
bool QCache< Key, T >::contains ( const Key &  key) const
inlinenoexcept

Definition at line 251 of file qcache.h.

◆ count()

template<class Key , class T >
qsizetype QCache< Key, T >::count ( ) const
inlinenoexcept

Definition at line 196 of file qcache.h.

◆ insert()

template<class Key , class T >
bool QCache< Key, T >::insert ( const Key &  key,
T object,
qsizetype  cost = 1 
)
inline

Definition at line 218 of file qcache.h.

Here is the caller graph for this function:

◆ isEmpty()

template<class Key , class T >
bool QCache< Key, T >::isEmpty ( ) const
inlinenoexcept

Definition at line 197 of file qcache.h.

◆ keys()

template<class Key , class T >
QList<Key> QCache< Key, T >::keys ( ) const
inline

Definition at line 198 of file qcache.h.

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

◆ maxCost()

template<class Key , class T >
qsizetype QCache< Key, T >::maxCost ( ) const
inlinenoexcept

Definition at line 187 of file qcache.h.

◆ object()

template<class Key , class T >
T* QCache< Key, T >::object ( const Key &  key) const
inlinenoexcept

Definition at line 243 of file qcache.h.

Here is the caller graph for this function:

◆ operator[]()

template<class Key , class T >
T* QCache< Key, T >::operator[] ( const Key &  key) const
inlinenoexcept

Definition at line 247 of file qcache.h.

◆ remove()

template<class Key , class T >
bool QCache< Key, T >::remove ( const Key &  key)
inlinenoexcept

Definition at line 256 of file qcache.h.

Here is the caller graph for this function:

◆ setMaxCost()

template<class Key , class T >
void QCache< Key, T >::setMaxCost ( qsizetype  m)
inlinenoexcept

Definition at line 188 of file qcache.h.

Here is the caller graph for this function:

◆ size()

template<class Key , class T >
qsizetype QCache< Key, T >::size ( ) const
inlinenoexcept

Definition at line 195 of file qcache.h.

Here is the caller graph for this function:

◆ take()

template<class Key , class T >
T* QCache< Key, T >::take ( const Key &  key)
inlinenoexcept

Definition at line 267 of file qcache.h.

◆ totalCost()

template<class Key , class T >
qsizetype QCache< Key, T >::totalCost ( ) const
inlinenoexcept

Definition at line 193 of file qcache.h.


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