2,新增“Apps”; 3,新增“Common”; 4,新增“FileList”; 5,新增“MediaX”; 6,新增“OpenSource”; 7,新增“Samples”; 8,新增“SoftwareBusinessLines”.
54 lines
736 B
C++
54 lines
736 B
C++
#ifndef QLOG_H
|
|
#define QLOG_H
|
|
|
|
#include "thread.h"
|
|
#include <queue>
|
|
#include <Windows.h>
|
|
#include <QString>
|
|
using namespace std;
|
|
class QLog
|
|
{
|
|
public:
|
|
QLog(QString strDirName);
|
|
|
|
void setLogOpen(bool bl);
|
|
|
|
void start();
|
|
|
|
void addLog(const char* format, ...);
|
|
|
|
|
|
void stop();
|
|
|
|
bool isStart();
|
|
|
|
protected:
|
|
void run();
|
|
|
|
private:
|
|
|
|
|
|
|
|
static void fun(void* pthis);
|
|
|
|
// static QLog* m_log;
|
|
Thread* m_thread;
|
|
|
|
queue<string> m_logList;
|
|
|
|
bool m_isOpen;
|
|
|
|
bool m_isExit;
|
|
|
|
char m_fileName[256];
|
|
int m_currentIndex;
|
|
|
|
HANDLE m_hUDPMutex;
|
|
int createDirectory(std::string path);
|
|
QString m_strDirName;
|
|
FILE* fp ;
|
|
QString m_strDir;
|
|
};
|
|
|
|
#endif // QLOG_H
|