Example #1
0
Void CNode::RemoveAllChilds()
{
    if( m_Child )
    {
        CNode* node = m_Child;
        CNode* tmp = NULL;
        while( node )
        {
            tmp = node;
            node = node->GetSibling();
            tmp->SetParent( NULL );
        }

        DebugAssert( m_Child == NULL );
    }
}
Example #2
0
CNode* CParentNode::RemoveChild( long no )
{
	CNode *pNode = GetChild( no );

	if( pNode )
	{
		if( pNode->GetPrev() )
			pNode->GetPrev()->SetNext( pNode->GetNext() );
		if( pNode->GetNext() )
			pNode->GetNext()->SetPrev( pNode->GetPrev() );
		pNode->SetNext( NULL );
		pNode->SetPrev( NULL );
		pNode->SetParent( NULL );

		m_children.remove( no );
	}

	return pNode;
}