本文整理汇总了C++中Operation::Redo方法的典型用法代码示例。如果您正苦于以下问题:C++ Operation::Redo方法的具体用法?C++ Operation::Redo怎么用?C++ Operation::Redo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Operation
的用法示例。
在下文中一共展示了Operation::Redo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RedoNext
BOOL OperationHistory::RedoNext()
{
ListItem* next;
if (NowPtr == NULL)
// If the NowPtr is NULL then if there are any redo operations then the first will be
// found at the head of the OpHistoryList
next = OpHistoryList.GetHead();
else
// The first redo operation will be found after the NowPtr
next = OpHistoryList.GetNext(NowPtr);
if ( next != NULL)
{
Operation* pOp = (Operation*)next;
BROADCAST_TO_ALL(OpMsg(pOp,OpMsg::BEFORE_REDO));
// There is an operation to redo
if (pOp->Redo()) // REDO the operation
{
NowPtr = next;
BROADCAST_TO_ALL(OpMsg(((Operation*)NowPtr), OpMsg::AFTER_REDO));
return (TRUE);
}
}
return (FALSE); // There are no operations to REDO
}
示例2: Redo
void ManipulatorOperation::Redo()
{
if (!m_lstRedo.empty())
{
Operation* op = m_lstRedo.back();
op->Redo();
m_lstRedo.pop_back();
m_lstUndo.push_back(op);
++m_snapshot;
}
}