-
Notifications
You must be signed in to change notification settings - Fork 0
/
frame_log.cpp
executable file
·79 lines (61 loc) · 1.25 KB
/
frame_log.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* frame_log.cpp
*
* Created on: 2013-1-2
* Author: jimm
*/
#include "frame_log.h"
FRAME_NAMESPACE_BEGIN
CFrameLog::CFrameLog()
{
}
CFrameLog::~CFrameLog()
{
}
//初始化日志队列
int32_t CFrameLog::Initialize()
{
int32_t nRet = m_stUserLogQueue.Initialize();
if(0 > nRet)
{
return nRet;
}
return S_OK;
}
//恢复日志队列
int32_t CFrameLog::Resume()
{
int32_t nRet = m_stUserLogQueue.Resume();
if(0 > nRet)
{
return nRet;
}
return S_OK;
}
//注销日志队列
int32_t CFrameLog::Uninitialize()
{
m_stUserLogQueue.Uninitialize();
return S_OK;
}
//从队列尾部追加一条日志
int32_t CFrameLog::Push(const char *szLog, const char *szName, const int32_t nID1, const int32_t nID2, const char* szDate)
{
return m_stUserLogQueue.Push(szLog, szName, nID1, nID2, szDate);
}
//从队列头部读取一条日志
int32_t CFrameLog::Pop(char* szLog, uint32_t nLogSize, char *szName, int32_t& nID1, int32_t& nID2, char* szDate)
{
return m_stUserLogQueue.Pop(szLog, nLogSize, szName, nID1, nID2, szDate);
}
//判断队列是否已满
bool CFrameLog::IsFull()
{
return m_stUserLogQueue.IsFull();
}
//判读队列是否为空
bool CFrameLog::IsEmpty()
{
return m_stUserLogQueue.IsEmpty();
}
FRAME_NAMESPACE_END