本文整理汇总了C++中SourceFile::RemoveObjects方法的典型用法代码示例。如果您正苦于以下问题:C++ SourceFile::RemoveObjects方法的具体用法?C++ SourceFile::RemoveObjects怎么用?C++ SourceFile::RemoveObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SourceFile
的用法示例。
在下文中一共展示了SourceFile::RemoveObjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GroupAt
void
Project::ForceRebuild(void)
{
STRACE(1,("%s: Force rebuild\n",GetName()));
for (int32 i = 0; i < CountGroups(); i++)
{
SourceGroup *group = GroupAt(i);
for (int32 j = 0; j < group->filelist.CountItems(); j++)
{
SourceFile *file = group->filelist.ItemAt(j);
file->RemoveObjects(fBuildInfo);
}
}
}
示例2: partnerPath
void
ProjectWindow::ActOnSelectedFiles(const int32 &command)
{
SCMOutputWindow *win = NULL;
switch (command)
{
case M_ADD_SELECTION_TO_REPO:
{
if (!fSourceControl)
return;
win = new SCMOutputWindow(TR("Add to Repository"));
win->Show();
break;
}
case M_REMOVE_SELECTION_FROM_REPO:
{
if (!fSourceControl)
return;
win = new SCMOutputWindow(TR("Remove from Repository"));
win->Show();
break;
}
case M_REVERT_SELECTION:
{
if (!fSourceControl)
return;
win = new SCMOutputWindow(TR("Revert"));
win->Show();
break;
}
case M_DIFF_SELECTION:
{
if (!fSourceControl)
return;
win = new SCMOutputWindow(TR("Show Differences"));
win->Show();
break;
}
default:
break;
}
for (int32 i = 0; i < fProjectList->CountItems(); i++)
{
SourceFileItem *item = dynamic_cast<SourceFileItem*>(fProjectList->ItemAt(i));
if (item && item->IsSelected())
{
SourceFile *file = item->GetData();
BString relPath = file->GetPath().GetFullPath();
if (relPath.FindFirst(fProject->GetPath().GetFolder()) == 0)
{
relPath.RemoveFirst(fProject->GetPath().GetFolder());
relPath.RemoveFirst("/");
}
BString relPartnerPath;
entry_ref partnerRef = GetPartnerRef(file->GetPath().GetRef());
if (partnerRef.name)
{
DPath partnerPath(partnerRef);
relPartnerPath = partnerPath.GetFullPath();
if (relPartnerPath.FindFirst(fProject->GetPath().GetFolder()) == 0)
{
relPartnerPath.RemoveFirst(fProject->GetPath().GetFolder());
relPartnerPath.RemoveFirst("/");
}
}
switch (command)
{
case M_REBUILD_FILE:
{
if (file->UsesBuild())
{
file->RemoveObjects(*fProject->GetBuildInfo());
item->SetDisplayState(SFITEM_NEEDS_BUILD);
fProjectList->InvalidateItem(fProjectList->IndexOf(item));
}
break;
}
case M_ADD_SELECTION_TO_REPO:
{
fSourceControl->AddToRepository(relPath.String());
if (relPartnerPath.CountChars() > 0)
fSourceControl->AddToRepository(relPartnerPath.String());
break;
}
case M_REMOVE_SELECTION_FROM_REPO:
{
fSourceControl->RemoveFromRepository(relPath.String());
if (relPartnerPath.CountChars() > 0)
fSourceControl->RemoveFromRepository(relPartnerPath.String());
break;
}
case M_REVERT_SELECTION:
{
//.........这里部分代码省略.........