本文整理汇总了C++中CChildFrame::Save方法的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame::Save方法的具体用法?C++ CChildFrame::Save怎么用?C++ CChildFrame::Save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChildFrame
的用法示例。
在下文中一共展示了CChildFrame::Save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunTool
/**
* @param pTool ToolWrapper instance to be orphaned to ToolOwner.
* @param OwnerID Unique Identifier for the owning object - use "this".
*/
void ToolOwner::RunTool(ToolWrapperPtr& pTool, ToolOwnerID OwnerID)
{
_ToolWrapper _wrapper = {0};
_wrapper.OwnerID = OwnerID;
_wrapper.pWrapper = pTool;
_wrapper.pRunner = new ToolRunner( pTool.get() );
bool bThreaded = _wrapper.pRunner->GetThreadedExecution();
if( bThreaded )
{
CSSCritLock lock(&m_crRunningTools);
m_RunningTools.push_back(_wrapper); // Add this tool to our list to mind.
}
if(pTool->SaveAll())
{
g_Context.m_frame->SaveAll();
}
else if(pTool->SaveProjectGroup())
{
DocumentList list;
g_Context.m_frame->GetOpenWorkspaceDocuments(list);
for (DocumentList::iterator i = list.begin(); i != list.end(); ++i)
{
CChildFrame* frame = (*i)->GetFrame();
if (frame != NULL && frame->GetModified())
{
frame->Save(true); // save and notify change
}
}
}
else if (pTool->SaveOne())
{
CChildFrame* pChild = pTool->GetActiveChild();
if (pChild && pChild->GetModified())
{
pChild->Save(true); // save and notify change
}
}
if (!_wrapper.pRunner->Execute() && bThreaded)
{
// Signal this tool wrapper as done with.
MarkToolForDeletion(_wrapper.pRunner);
}
else if( !bThreaded )
{
delete _wrapper.pRunner;
_wrapper.pWrapper.reset();
}
///@todo
//pT->UpdateRunningTools();
}