loglist.h

来自「linux程序」· C头文件 代码 · 共 45 行

H
45
字号
#ifndef _LOG_LIST_H_
#define _LOG_LIST_H_
#include "OSHead.h"
#ifdef __Win32__
    #include <Afxmt.h>     
#endif

#ifdef __REDHATLINUX__
    #include <string.h>
#endif
#include "OSMutex.h"

class CLogList  
{
public:
	CLogList(char *msg = NULL,Bool8 type = false);

	Bool8 IsEmpty();
	CLogList *RemoveHead();
	Bool8 RemoveAll();
	const char *GetMsg();
	Bool8 GetMsgIsError();
	Bool8 SetMsgIsError(Bool8 type);
	Bool8 AddMsgIntoTail(CLogList *msg);
	Bool8 AddMsgIntoTail(char *msg,Bool8 type = false);
	virtual ~CLogList();

	enum
	{
		MAX_LOG_MSG_LEN = 300,
	};
	
	// CCriticalSection mListLock;
	OSMutex mListLock;

	static CLogList *pHead,*pTail;
	CLogList *pNext;
private:
	char mLogMsg[MAX_LOG_MSG_LEN];
	Bool8 mIsError;

};

#endif // !defined(AFX_LOGLIST_H__693EEBE1_B6BE_4FFF_B970_768FADD196F6__INCLUDED_)

⌨️ 快捷键说明

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