diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-12-10 20:30:14 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-12-10 20:30:14 (GMT) |
commit | e7c5e0d738bcc16bb2194740fd009242d4059045 (patch) | |
tree | bb2f8266e3a639e6a4b15f02416a3aae5173c275 /qtools | |
parent | cfb38c32173c3a16dc1c8e868b4cc23a68ed28b8 (diff) | |
download | Doxygen-e7c5e0d738bcc16bb2194740fd009242d4059045.zip Doxygen-e7c5e0d738bcc16bb2194740fd009242d4059045.tar.gz Doxygen-e7c5e0d738bcc16bb2194740fd009242d4059045.tar.bz2 |
Release-1.7.6.1
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/Doxyfile | 4 | ||||
-rw-r--r-- | qtools/qcache.h | 4 | ||||
-rw-r--r-- | qtools/qgcache.cpp | 10 | ||||
-rw-r--r-- | qtools/qgcache.h | 2 |
4 files changed, 18 insertions, 2 deletions
diff --git a/qtools/Doxyfile b/qtools/Doxyfile index c57b15f..ddf9909 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -164,8 +164,8 @@ QHP_SECT_FILTER_ATTRS = QHG_LOCATION = GENERATE_ECLIPSEHELP = YES ECLIPSE_DOC_ID = org.doxygen.qtools -DISABLE_INDEX = YES -GENERATE_TREEVIEW = YES +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO ENUM_VALUES_PER_LINE = 4 USE_INLINE_TREES = YES TREEVIEW_WIDTH = 250 diff --git a/qtools/qcache.h b/qtools/qcache.h index f15345e..e1f13d6 100644 --- a/qtools/qcache.h +++ b/qtools/qcache.h @@ -73,6 +73,8 @@ public: type *operator[]( const QString &k ) const { return (type *)QGCache::find_string(k);} void statistics() const { QGCache::statistics(); } + int hits() const { return QGCache::hits(); } + int misses() const { return QGCache::misses(); } private: void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } }; @@ -107,6 +109,8 @@ public: type *operator[]( const char *k ) const { return (type *)QGCache::find_other(k);} void statistics() const { QGCache::statistics(); } + int hits() const { return QGCache::hits(); } + int misses() const { return QGCache::misses(); } private: void deleteItem( Item d ) { if ( del_item ) delete (type *)d; } }; diff --git a/qtools/qgcache.cpp b/qtools/qgcache.cpp index 89282c7..e5dd8de 100644 --- a/qtools/qgcache.cpp +++ b/qtools/qgcache.cpp @@ -655,6 +655,16 @@ void QGCache::statistics() const #endif } +int QGCache::hits() const +{ + return lruList->hits; +} + +int QGCache::misses() const +{ + return lruList->finds - lruList->hits; +} + /***************************************************************************** QGCacheIterator member functions diff --git a/qtools/qgcache.h b/qtools/qgcache.h index 5c3e126..2f35c41 100644 --- a/qtools/qgcache.h +++ b/qtools/qgcache.h @@ -83,6 +83,8 @@ protected: QCollection::Item find_other( const char *key, bool ref=TRUE ) const; void statistics() const; + int hits() const; + int misses() const; private: bool makeRoomFor( int cost, int priority = -1 ); |