📄 debugall.h
字号:
#ifndef ___DEBUGALL_H___
#define ___DEBUGALL_H___
#include <vector>
#include <string>
#include <map>
#include <iostream>
#include <typeinfo.h>
using namespace std;
class DebugInfo
{
public:
DebugInfo()
:count(0)
{}
string typeName;
int count;
};
static map< string, DebugInfo* > g_DebugInfoVector;
class ObjectBase
{
public:
ObjectBase( const type_info& info )
{
//debug
string name = string( info.name() );
DebugInfo* pInfo = NULL;
pInfo = g_DebugInfoVector[name];
if( pInfo )
pInfo->count++;
else
{
pInfo = new DebugInfo;
pInfo->count = 1;
pInfo->typeName = name;
g_DebugInfoVector.insert( make_pair( name, pInfo ) );
}
}
~ObjectBase()
{
}
};
static
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -