⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 counteddictionary.h

📁 hoard内存管理器
💻 H
字号:
#ifndef _COUNTEDDICTIONARY_H_#define _COUNTEDDICTIONARY_H_template <class Dict>class CountedDictionary : public Dict {public:  class Entry : public Dict::Entry {};  __forceinline CountedDictionary (void)    : num (0)  {}  __forceinline void clear (void) {    num = 0;    Dict::clear();  }  __forceinline Entry * get (void) {    Entry * e = (Entry *) Dict::get();    if (e) {      --num;    }    return e;  }  __forceinline Entry * remove (void) {    Entry * e = (Entry *) Dict::remove();    if (e) {      --num;    }    return e;  }  __forceinline void insert (Entry * e) {    Dict::insert (e);    ++num;  }  __forceinline int getNumber (void) const {    return num;  }private:  int num;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -