- //---------------------------------------------------------------------------
- // Sword3 Engine (c) 1999-2000 by Kingsoft
- //
- // File: KNode.cpp
- // Date: 2000.08.08
- // Code: WangWei(Daphnis)
- // Desc: Simple double linked node class
- //---------------------------------------------------------------------------
- #include "KWin32.h"
- #include "KDebug.h"
- #include "KNode.h"
- ////---------------------------------------------------------------------------
- //// 函数: Knode
- //// 功能: 构造
- //// 参数: void
- //// 返回: void
- ////---------------------------------------------------------------------------
- //inline KNode::KNode(void)
- //{
- // m_pNext = NULL;
- // m_pPrev = NULL;
- //}
- ////---------------------------------------------------------------------------
- //// 函数: GetNext
- //// 功能: 下一个结点
- //// 参数: void
- //// 返回: KNode*
- ////---------------------------------------------------------------------------
- //inline KNode* KNode::GetNext(void)
- //{
- // if (m_pNext->m_pNext)
- // return m_pNext;
- // return NULL;
- //}
- ////---------------------------------------------------------------------------
- //// 函数: GetPrev
- //// 功能: 前一个结点
- //// 参数: void
- //// 返回: KNode*
- ////---------------------------------------------------------------------------
- //inline KNode* KNode::GetPrev(void)
- //{
- // if (m_pPrev->m_pPrev)
- // return m_pPrev;
- // return NULL;
- //}
- ////----------------------------------------------------------------------------
- //// 函数: InsertBefore
- //// 功能: 在前面插入一个结点
- //// 参数: KNode*
- //// 返回: void
- ////---------------------------------------------------------------------------
- //inline void KNode::InsertBefore(KNode *pNode)
- //{
- // KASSERT(m_pPrev);
- // pNode->m_pPrev = m_pPrev;
- // pNode->m_pNext = this;
- // m_pPrev->m_pNext = pNode;
- // m_pPrev = pNode;
- //}
- ////---------------------------------------------------------------------------
- //// 函数: InsertAfter
- //// 功能: 在后面插入一个结点
- //// 参数: KNode*
- //// 返回: void
- ////---------------------------------------------------------------------------
- //inline void KNode::InsertAfter(KNode *pNode)
- //{
- // KASSERT(m_pNext);
- // pNode->m_pPrev = this;
- // pNode->m_pNext = m_pNext;
- // m_pNext->m_pPrev = pNode;
- // m_pNext = pNode;
- //}
- ////---------------------------------------------------------------------------
- //// 函数: Remove the node
- //// 功能: 删除这个结点
- //// 参数: void
- //// 返回: KNode*
- ////---------------------------------------------------------------------------
- //inline void KNode::Remove(void)
- //{
- // KASSERT(m_pPrev);
- // KASSERT(m_pNext);
- // m_pPrev->m_pNext = m_pNext;
- // m_pNext->m_pPrev = m_pPrev;
- // m_pPrev = NULL;
- // m_pNext = NULL;
- //}
- ////---------------------------------------------------------------------------
- //// 函数: IsLinked
- //// 功能: 这个节点是否链接
- //// 参数: void
- //// 返回: bool
- ////---------------------------------------------------------------------------
- //inline BOOL KNode::IsLinked(void)
- //{
- // return (m_pPrev && m_pNext);
- //}
- ////--------------------------------------------------------------------------------