QxOrm  1.4.8
C++ Object Relational Mapping library
qx::cache::detail::QxCache Class Reference

#include <QxCache.h>

Inheritance diagram for qx::cache::detail::QxCache:
qx::QxSingleton< QxCache > qx::IxSingleton

List of all members.

Public Member Functions

 QxCache ()
virtual ~QxCache ()
long getCurrCost () const
long getMaxCost () const
void setMaxCost (long l)
long count () const
long size () const
bool isEmpty () const
bool exist (const QString &sKey) const
bool contains (const QString &sKey) const
qx::any at (const QString &sKey)
long insertionCost (const QString &sKey)
QDateTime insertionDateTime (const QString &sKey)
void clear ()
bool insert (const QString &sKey, const qx::any &anyObj, long lCost=1, const QDateTime &dt=QDateTime())
bool remove (const QString &sKey)

Protected Types

typedef std::tuple< long,
QDateTime, qx::any
typedef qx::QxCollection
< QString, type_qx_cache

Protected Attributes

type_qx_lst_cache m_cache
 List of objects in cache under qx::any format.
QMutex m_oMutexCache
 Mutex => 'QxCache' is thread-safe.
long m_lMaxCost
 Max cost before deleting object in cache.
long m_lCurrCost
 Current cost in cache.

Private Member Functions

void updateCost ()


class qx::QxSingleton< QxCache >

Detailed Description

Definition at line 57 of file QxCache.h.

Member Typedef Documentation

typedef std::tuple<long, QDateTime, qx::any> qx::cache::detail::QxCache::type_qx_cache [protected]

Definition at line 64 of file QxCache.h.

Definition at line 65 of file QxCache.h.

Constructor & Destructor Documentation

qx::cache::detail::QxCache::QxCache ( )
virtual qx::cache::detail::QxCache::~QxCache ( ) [virtual]

Member Function Documentation

qx::any qx::cache::detail::QxCache::at ( const QString &  sKey)
void qx::cache::detail::QxCache::clear ( )
bool qx::cache::detail::QxCache::contains ( const QString &  sKey) const
long qx::cache::detail::QxCache::count ( ) const
bool qx::cache::detail::QxCache::exist ( const QString &  sKey) const
long qx::cache::detail::QxCache::getCurrCost ( ) const
long qx::cache::detail::QxCache::getMaxCost ( ) const
bool qx::cache::detail::QxCache::insert ( const QString &  sKey,
const qx::any anyObj,
long  lCost = 1,
const QDateTime &  dt = QDateTime() 
long qx::cache::detail::QxCache::insertionCost ( const QString &  sKey)
QDateTime qx::cache::detail::QxCache::insertionDateTime ( const QString &  sKey)
bool qx::cache::detail::QxCache::isEmpty ( ) const
bool qx::cache::detail::QxCache::remove ( const QString &  sKey)
void qx::cache::detail::QxCache::setMaxCost ( long  l)
long qx::cache::detail::QxCache::size ( ) const
void qx::cache::detail::QxCache::updateCost ( ) [private]

Friends And Related Function Documentation

friend class qx::QxSingleton< QxCache > [friend]

Definition at line 60 of file QxCache.h.

Member Data Documentation

List of objects in cache under qx::any format.

Definition at line 67 of file QxCache.h.

Current cost in cache.

Definition at line 70 of file QxCache.h.

Max cost before deleting object in cache.

Definition at line 69 of file QxCache.h.

Mutex => 'QxCache' is thread-safe.

Definition at line 68 of file QxCache.h.

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