本文整理汇总了C++中CDiskObjectList::front方法的典型用法代码示例。如果您正苦于以下问题:C++ CDiskObjectList::front方法的具体用法?C++ CDiskObjectList::front怎么用?C++ CDiskObjectList::front使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiskObjectList
的用法示例。
在下文中一共展示了CDiskObjectList::front方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOK
void CSelectDiskDlg::OnOK(UINT /*wNotifyCode*/, int /*wID*/, HWND /*hwndCtl*/)
{
CDiskObjectList listSelected;// = m_wndListSingle.GetSelectedDiskObjectList();
if ( listSelected.size() == 0 )
// TODO : Display message to select
return;
ATLASSERT( listSelected.size() == 1 );
m_pSelectedDisk = boost::dynamic_pointer_cast<CUnitDiskObject>(listSelected.front());
// Check if the selected disk's size is not smaller than the source disk's size
EndDialog(IDOK);
}
示例2: SetDiskToUnbind
void CUnBindDlg::SetDiskToUnbind(CDiskObjectPtr obj)
{
m_pDiskUnbind = obj;
CFindIfVisitor<TRUE> unitDiskFinder;
CDiskObjectList listUnbind; // List of disks to unbind
listUnbind = unitDiskFinder.FindIf( m_pDiskUnbind, IsUnitDisk);
//
// Data is deleted only when the disks are aggregated
// Thus, change message if they are not.
//
CUnitDiskObjectPtr unitDisk =
boost::dynamic_pointer_cast<CUnitDiskObject>(listUnbind.front());
if ( unitDisk->GetInfoHandler()->IsBoundAndNotSingleMirrored() )
{
IDD = IDD_UNBIND_MIRROR;
}
}
示例3: OnOK
void CSelectMirDlg::OnOK(UINT /*wNotifyCode*/, int /*wID*/, HWND /*hwndCtl*/)
{
CDiskObjectList listSelected = m_wndListSingle.GetSelectedDiskObjectList();
if ( listSelected.size() == 0 )
// TODO : Display message to select
return;
ATLASSERT( listSelected.size() == 1 );
m_pSelectedDisk = boost::dynamic_pointer_cast<CUnitDiskObject>(listSelected.front());
// Check if the selected disk's size is not smaller than the source disk's size
if ( m_pSelectedDisk->GetInfoHandler()->GetUserSectorCount()
< m_pSourceDisk->GetInfoHandler()->GetUserSectorCount() )
{
MessageBox(
_T("A disk cannot be mirrored by a smaller disk."),
_T(PROGRAM_TITLE),
MB_OK
);
return;
}
// FIXME : Confirmation would be necessary.
EndDialog(IDOK);
}