当前位置: 首页>>代码示例>>C++>>正文


C++ CDiskObjectList::end方法代码示例

本文整理汇总了C++中CDiskObjectList::end方法的典型用法代码示例。如果您正苦于以下问题:C++ CDiskObjectList::end方法的具体用法?C++ CDiskObjectList::end怎么用?C++ CDiskObjectList::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDiskObjectList的用法示例。


在下文中一共展示了CDiskObjectList::end方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddDiskObjectList

void CNBListViewCtrl::AddDiskObjectList(CDiskObjectList disks)
{
	CDiskObjectList::iterator itr;
	for ( itr = disks.begin(); itr != disks.end(); ++itr )
		AddDiskObject( *itr );
	SortItems();
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: SelectDiskObjectList

void CNBListViewCtrl::SelectDiskObjectList(CDiskObjectList disks)
{
	CDiskObjectList::iterator itr;
	for ( itr = disks.begin(); itr != disks.end(); ++itr )
		SelectDiskObject( *itr );

}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: UnBind

CDiskObjectList CDiskObjectComposite::UnBind(CDiskObjectPtr _this)
{
	ATLASSERT( this == _this.get() );
	CDiskObjectList unboundDisks;
	CDiskObjectList::iterator itr;
	for ( itr = begin(); itr != end(); ++itr )
	{
		CDiskObjectList subUnboundDisks = (*itr)->UnBind(*itr);
		unboundDisks.splice(  
			unboundDisks.end(), 
			subUnboundDisks
			);
	}
	return unboundDisks;
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:15,代码来源:ndasobject.cpp

示例4: OnOK

void CUnBindDlg::OnOK(UINT /*wNotifyCode*/, int /*wID*/, HWND /*hwndCtl*/)
{
	UINT32 nDiskCount = 0;
	unsigned int i;
	NDASCOMM_CONNECTION_INFO *pConnectionInfo;
	CFindIfVisitor<TRUE> unitDiskFinder;
	CDiskObjectList listUnbind;	// List of disks to unbind
	CDiskObjectList::iterator itr;
	CUnitDiskObjectPtr unitDisk;
	WTL::CString strMsg;
	WTL::CString strTitle;
	strTitle.LoadString(IDS_APPLICATION);
	BOOL bUnbindMirror;

	BOOL bReadyToUnbind;
	UINT32 BindResult;

	bUnbindMirror = (dynamic_cast<const CMirDiskObject*>(m_pDiskUnbind.get()) != NULL);

	// warning message
	strMsg.LoadString((bUnbindMirror) ? IDS_WARNING_UNBIND_MIR : IDS_WARNING_UNBIND);
	int id = MessageBox(
		strMsg,
		strTitle,
		MB_YESNO|MB_ICONEXCLAMATION
		);
	if(IDYES != id)
		return;

	listUnbind = unitDiskFinder.FindIf( m_pDiskUnbind, IsUnitDisk);
	nDiskCount = listUnbind.size();
	pConnectionInfo = new NDASCOMM_CONNECTION_INFO[nDiskCount];
	ZeroMemory(pConnectionInfo, sizeof(NDASCOMM_CONNECTION_INFO) * nDiskCount);

	bReadyToUnbind = TRUE;
	for ( itr = listUnbind.begin(), i = 0; itr != listUnbind.end(); ++itr )
	{
		if(!(*itr)->IsUnitDisk())
			continue;

		unitDisk = boost::dynamic_pointer_cast<CUnitDiskObject>(*itr);

		ZeroMemory(&pConnectionInfo[i], sizeof(NDASCOMM_CONNECTION_INFO));
		pConnectionInfo[i].address_type = NDASCOMM_CONNECTION_INFO_TYPE_ADDR_LPX;
		pConnectionInfo[i].login_type = NDASCOMM_LOGIN_TYPE_NORMAL;
		pConnectionInfo[i].UnitNo = unitDisk->GetLocation()->GetUnitDiskLocation()->UnitNumber;
		pConnectionInfo[i].bWriteAccess = TRUE;
		pConnectionInfo[i].ui64OEMCode = NULL;
		pConnectionInfo[i].bSupervisor = FALSE;
		pConnectionInfo[i].protocol = NDASCOMM_TRANSPORT_LPX;

		CopyMemory(pConnectionInfo[i].AddressLPX, 
			unitDisk->GetLocation()->GetUnitDiskLocation()->MACAddr,
			LPXADDR_NODE_LENGTH);
		
		if(!(unitDisk->GetAccessMask() & GENERIC_WRITE))
		{
			// "%1!s! does not have a write access privilege. You need to set write key to this NDAS device before this action."
			strMsg.FormatMessage(IDS_ERROR_NOT_REGISTERD_WRITE_FMT,
				unitDisk->GetTitle()
				);
			MessageBox(
				strMsg,
				strTitle,
				MB_OK|MB_ICONERROR
				);

			bReadyToUnbind = FALSE;
		}

		i++;
	}

	if(!bReadyToUnbind)
	{
		delete [] pConnectionInfo;
		EndDialog(IDCANCEL);
	}

	BindResult = NdasOpBind(i, pConnectionInfo,NMT_SINGLE);

	DWORD dwLastError = ::GetLastError();

	m_unboundDisks = listUnbind;

	if(i == BindResult)
	{
		strMsg.LoadString(
			(bUnbindMirror) ? IDS_WARNING_UNBIND_AFTER_MIR : 
			IDS_WARNING_UNBIND_AFTER);

		MessageBox(
			strMsg,
			strTitle,
			MB_OK|MB_ICONINFORMATION
			);
	}
	else
	{
		for ( itr = listUnbind.begin(); itr != listUnbind.end(); ++itr )
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


注:本文中的CDiskObjectList::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。