18 #include "LogHandlerList.hpp"
20 #include <LogHandler.hpp>
42 LogHandlerNode* pNode =
new LogHandlerNode();
46 if (m_pHeadNode == NULL)
53 m_pTailNode->pNext = pNode;
54 pNode->pPrev = m_pTailNode;
58 pNode->pHandler = pNewHandler;
68 LogHandlerNode* pNode = m_pHeadNode;
72 if (pNode->pHandler == pRemoveHandler)
78 }
while ( (pNode =
next(pNode)) != NULL);
86 while (m_pHeadNode != NULL)
88 removeNode(m_pHeadNode);
96 if (m_pCurrNode == NULL)
98 m_pCurrNode = m_pHeadNode;
99 if (m_pCurrNode != NULL)
101 pHandler = m_pCurrNode->pHandler;
106 m_pCurrNode =
next(m_pCurrNode);
107 if (m_pCurrNode != NULL)
109 pHandler = m_pCurrNode->pHandler;
126 LogHandlerList::LogHandlerNode*
129 LogHandlerNode* pCurr = pNode;
130 if (pNode->pNext != NULL)
132 pCurr = pNode->pNext;
142 LogHandlerList::LogHandlerNode*
143 LogHandlerList::prev(LogHandlerNode* pNode)
145 LogHandlerNode* pCurr = pNode;
146 if (pNode->pPrev != NULL)
148 pCurr = pNode->pPrev;
160 LogHandlerList::removeNode(LogHandlerNode* pNode)
162 if (pNode->pPrev == NULL)
164 m_pHeadNode = pNode->pNext;
168 pNode->pPrev->pNext = pNode->pNext;
171 if (pNode->pNext == NULL)
173 m_pTailNode = pNode->pPrev;
177 pNode->pNext->pPrev = pNode->pPrev;
182 delete pNode->pHandler;