本文整理汇总了C++中Operation::GetSize方法的典型用法代码示例。如果您正苦于以下问题:C++ Operation::GetSize方法的具体用法?C++ Operation::GetSize怎么用?C++ Operation::GetSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Operation
的用法示例。
在下文中一共展示了Operation::GetSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteLastOp
void OperationHistory::DeleteLastOp(BOOL ReduceOpHistSize)
{
Operation* pOpToDelete = FindLastOp();
// The NowPtr needs to be set to the previous operation - if one exists
// if not then NULL is an OK state for the NowPtr
NowPtr = OpHistoryList.GetPrev(NowPtr);
if (ReduceOpHistSize)
{
DecSize(pOpToDelete->GetSize()); // Reduce history size
}
OpHistoryList.RemoveItem((ListItem*)pOpToDelete); // Remove the operation from the
// history list but don't delete it yet
pOpToDelete->DeleteOnEnd(); // Mark it for deletion when it's safe
// to do so.
}
示例2: DeletePrevToLastOp
void OperationHistory::DeletePrevToLastOp(BOOL ReduceOpHistSize)
{
// find the previous operation
Operation *pPrev = (Operation *)OpHistoryList.GetPrev(NowPtr); // get the PrevToLastOp
if (pPrev != NULL)
{
if (ReduceOpHistSize)
{
DecSize(pPrev->GetSize()); // Reduce history size
}
// remove it from the list
OpHistoryList.RemoveItem((ListItem*)pPrev); // Remove the operation from the
// history list
// delete it
delete pPrev;
}
}