本文整理汇总了C++中DLDS_LIST::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ DLDS_LIST::empty方法的具体用法?C++ DLDS_LIST::empty怎么用?C++ DLDS_LIST::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DLDS_LIST
的用法示例。
在下文中一共展示了DLDS_LIST::empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExportDownloads
void CDlgExportDownloads::ExportDownloads(int iWhich, BOOL bNoDone, BOOL bAppend)
{
DLDS_LIST vpDlds;
switch (iWhich)
{
case 0:
{
_DldsMgr.LockList (true);
size_t nCount = _DldsMgr.GetCount ();
for (size_t i = 0; i < nCount; i++)
{
vmsDownloadSmartPtr dld = _DldsMgr.GetDownload (i);
if (bNoDone && dld->pMgr->IsDone ())
continue;
vpDlds.push_back (dld);
}
_DldsMgr.UnlockList (true);
}
break;
case 1:
{
CDownloads_Tasks* list = &_pwndDownloads->m_wndDownloads.m_tasks;
int cItems = list->GetItemCount ();
for (int i = 0; i < cItems; i++)
{
vmsDownloadSmartPtr dld;
try
{
dld = (fsDownload*) list->GetItemData (i);
if (bNoDone && dld->pMgr->IsDone ())
dld = NULL;
}
catch (const std::exception& ex)
{
ASSERT (FALSE);
vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads " + tstring(ex.what()));
dld = NULL;
}
catch (...)
{
ASSERT (FALSE);
vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads unknown exception");
dld = NULL;
}
if (dld)
vpDlds.push_back (dld);
}
}
break;
case 2:
{
CDownloads_Tasks* list = &_pwndDownloads->m_wndDownloads.m_tasks;
POSITION pos = list->GetFirstSelectedItemPosition ();
while (pos)
{
int iItem = list->GetNextSelectedItem (pos);
vmsDownloadSmartPtr dld;
try
{
dld = (fsDownload*) list->GetItemData (iItem);
if (bNoDone && dld->pMgr->IsDone ())
dld = NULL;
}
catch (const std::exception& ex)
{
ASSERT (FALSE);
vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads " + tstring(ex.what()));
dld = NULL;
}
catch (...)
{
ASSERT (FALSE);
vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads unknown exception");
dld = NULL;
}
if (dld)
vpDlds.push_back (dld);
}
}
break;
}
if (vpDlds.empty ())
{
AfxGetApp ()->m_pMainWnd->MessageBox (LS (L_NODLDSTOEXPORT), NULL, MB_ICONEXCLAMATION);
}
else
{
CString strFilter;
//.........这里部分代码省略.........