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

📄 g_debug.h

📁 PC网络游戏的编程
💻 H
字号:
/*
g_debug.h: interface for the CG_Debug class.
*/

#ifndef __CG_DEBUG_H__
#define __CG_DEBUG_H__

#include "g_platform.h"
#include <fstream.h>

const int DEFAULT_LOG_BUF_SIZE = 1024;

class CG_Debug  
{
public:
	void Log(char *format,...);
	void SetOpt(bool file,bool print,bool debugstr,bool time,bool idx);
	bool BeginLog(char *name);
	CG_Debug();
	virtual ~CG_Debug();

private:
	fstream m_file;
	bool m_bFile;
	bool m_bPrint;
	bool m_bDebugString;
	bool m_bTime;
	bool m_bIdx;
	bool m_bInit;
	
	int   m_idx;
	char  m_buf[DEFAULT_LOG_BUF_SIZE];
};

#endif 

⌨️ 快捷键说明

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