本文整理汇总了C++中Child::setNextParentTableListChild方法的典型用法代码示例。如果您正苦于以下问题:C++ Child::setNextParentTableListChild方法的具体用法?C++ Child::setNextParentTableListChild怎么用?C++ Child::setNextParentTableListChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Child
的用法示例。
在下文中一共展示了Child::setNextParentTableListChild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setLastTableListChild
Bool testhash::Parent::insertAfterTableListChild(const Child & child, const Child & prev) const {
if( !child.isExists() || !prev.isExists())
return false;
Child next = prev.getNextParentTableListChild();
prev.setNextParentTableListChild(child);
child.setPrevParentTableListChild(prev);
child.setNextParentTableListChild(next);
if(next.isValid())
next.setPrevParentTableListChild(child);
else
setLastTableListChild(child);
setNumTableListChilds(getNumTableListChilds() + 1);
child.setupTableListParentHandler();
return true;
}
示例2: setFirstTableListChild
Bool testhash::Parent::insertBeforeTableListChild(const Child & child, const Child & next) const {
if(!child.isExists() || !next.isExists())
return false;
Child prev = next.getPrevParentTableListChild();
next.setPrevParentTableListChild(child);
child.setNextParentTableListChild(next);
child.setPrevParentTableListChild(prev);
if(prev.isValid())
prev.setNextParentTableListChild(child);
else
setFirstTableListChild(child);
setNumTableListChilds(getNumTableListChilds() + 1);
child.setupTableListParentHandler();
return true;
}
示例3: getLastTableListChild
testhash::Child testhash::Parent::popBackTableListChild() const {
Child result = getLastTableListChild();
if(result.isValid())
{
result.removeTableListParentHandler();
Child prev = result.getPrevParentTableListChild();
result.setPrevParentTableListChild(Child());
result.setNextParentTableListChild(Child());
setLastTableListChild(prev);
if(!prev.isValid())
setFirstTableListChild(Child());
else
prev.setNextParentTableListChild(Child());
setNumTableListChilds(getNumTableListChilds() - 1);
}
return result;
}
示例4: getFirstTableListChild
Bool testhash::Parent::pushFrontTableListChild(const Child & child) const {
if(!child.isExists())
return false;
Child first_child = getFirstTableListChild();
child.setNextParentTableListChild(first_child);
if(first_child.isValid())
first_child.setPrevParentTableListChild(child);
else
setLastTableListChild(child);
child.setPrevParentTableListChild(Child());
setFirstTableListChild(child);
setNumTableListChilds(getNumTableListChilds() + 1);
child.setupTableListParentHandler();
return true;
}
示例5: if
Bool testhash::Parent::removeTableListChild(const Child & child) const {
if( !child.isExists())
return false;
child.removeTableListParentHandler();
Child next = child.getNextParentTableListChild(), prev = child.getPrevParentTableListChild();
if(next.isValid())
next.setPrevParentTableListChild(prev);
else if (getLastTableListChild() == child)
setLastTableListChild(prev);
else
return false;
if(prev.isValid())
prev.setNextParentTableListChild(next);
else if (getFirstTableListChild() == child)
setFirstTableListChild(next);
else
return false;
child.setNextParentTableListChild(Child());
child.setPrevParentTableListChild(Child());
setNumTableListChilds(getNumTableListChilds() - 1);
return true;
}