QxOrm 1.1.6
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
boost::any at (const QString &sKey)
void clear ()
bool insert (const QString &sKey, const boost::any &pObj, long lCost=1)
bool remove (const QString &sKey)

Protected Types

typedef std::pair< long,
boost::any > 
type_qx_cache
typedef qx::QxCollection
< QString, type_qx_cache
type_qx_lst_cache

Protected Attributes

type_qx_lst_cache m_cache
 List of objects in cache under boost::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 ()

Friends

class qx::QxSingleton< QxCache >

Detailed Description

Definition at line 52 of file QxCache.h.


Member Typedef Documentation

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

Definition at line 59 of file QxCache.h.

Definition at line 60 of file QxCache.h.


Constructor & Destructor Documentation

qx::cache::detail::QxCache::QxCache ( ) [inline]

Definition at line 69 of file QxCache.h.

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

Definition at line 70 of file QxCache.h.


Member Function Documentation

boost::any qx::cache::detail::QxCache::at ( const QString &  sKey) [inline]

Definition at line 81 of file QxCache.h.

void qx::cache::detail::QxCache::clear ( ) [inline]

Definition at line 82 of file QxCache.h.

bool qx::cache::detail::QxCache::contains ( const QString &  sKey) const [inline]

Definition at line 80 of file QxCache.h.

long qx::cache::detail::QxCache::count ( ) const [inline]

Definition at line 76 of file QxCache.h.

bool qx::cache::detail::QxCache::exist ( const QString &  sKey) const [inline]

Definition at line 79 of file QxCache.h.

long qx::cache::detail::QxCache::getCurrCost ( ) const [inline]

Definition at line 72 of file QxCache.h.

long qx::cache::detail::QxCache::getMaxCost ( ) const [inline]

Definition at line 73 of file QxCache.h.

bool qx::cache::detail::QxCache::insert ( const QString &  sKey,
const boost::any &  pObj,
long  lCost = 1 
)
bool qx::cache::detail::QxCache::isEmpty ( ) const [inline]

Definition at line 78 of file QxCache.h.

bool qx::cache::detail::QxCache::remove ( const QString &  sKey)
void qx::cache::detail::QxCache::setMaxCost ( long  l) [inline]

Definition at line 74 of file QxCache.h.

long qx::cache::detail::QxCache::size ( ) const [inline]

Definition at line 77 of file QxCache.h.

void qx::cache::detail::QxCache::updateCost ( ) [private]

Friends And Related Function Documentation

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

Definition at line 55 of file QxCache.h.


Member Data Documentation

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

Definition at line 62 of file QxCache.h.

Current cost in cache.

Definition at line 65 of file QxCache.h.

Max cost before deleting object in cache.

Definition at line 64 of file QxCache.h.

Mutex => 'QxCache' is thread-safe.

Definition at line 63 of file QxCache.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines