示例#1
0
Bool testlist::Child::pushFreeChild(const Child & child)  {
    if( !child.isExists())
        return false;
    child.setNextChildFreeChild(getFirstFreeChild());
    setFirstFreeChild(child);
    setNumFreeChilds(getNumFreeChilds() + 1);
    child.setupFreeChildHandler();
    return true;
}
示例#2
0
Bool testlist::Child::insertAfterFreeChild(const Child & child, const Child & prev)  {
    if(!prev.isExists() || !child.isExists())
        return false;
    Child nxt = prev.getNextChildFreeChild();
    child.setNextChildFreeChild(nxt);
    prev.setNextChildFreeChild(child);
    setNumFreeChilds(getNumFreeChilds() - 1);
    child.setupFreeChildHandler();
    return true;
}