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


C++ CList::GetNext方法代码示例

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


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

示例1: Format_NetParam_Value

/**
* \brief      Parses the Net Parameter's Other Values(BA_).
* \param[in]  CStdioFile &fileInput,CList<CParameters,CParameters&>& m_listParam
* \param[out] None
* \return     void
* \authors    Padmaja.A
* \date       16.11.2004
*/
void CParameters::Format_NetParam_Value(CStdioFile &fileInput,CList<CParameters,CParameters&>& m_listParam)
{
    CParameterValues pVal;
    char acLine[defCON_MAX_LINE_LEN];
    char *pcToken, *pcLine;
    char acTemp[defCON_CHAR_LEN],*pcTemp;
    pcTemp = acTemp;
    //parses the mesg pram other values.
    while(strcmp((fileInput.ReadString(acLine,defCON_MAX_LINE_LEN)),"[END_PARAM_NET_VAL]\n")!=0)
    {
        pcLine = acLine;
        //get other values.
        pcToken=strtok(pcLine,",");
        pcToken++;
        while(*pcToken && *pcToken!='"')
        {
            *pcTemp++=*pcToken++;
        }
        *pcTemp='\0';
        //assigns other values to the matching param.
        POSITION posMsg = m_listParam.GetHeadPosition();
        while(posMsg != NULL)
        {
            CParameters& rParam = m_listParam.GetNext(posMsg);
            // find matching Parameter from list
            if(strcmp(rParam.m_ParamName,acTemp)==0 )
            {
                pVal.Format_Param_Value(rParam.m_ParamType,(pcLine+strlen(acTemp)+3),0);
                rParam.m_listParamValues[0].AddTail(pVal);
                pcTemp=acTemp;
                break;
            }
        }
    }
}
开发者ID:grmujumdar,项目名称:busmaster,代码行数:43,代码来源:Parameter.cpp

示例2: FillFromIDs

//******************************************************************************
void CBCGPRibbonCommandsListBox::FillFromIDs (const CList<UINT,UINT>& lstCommands,
											  BOOL bDeep)
{
	ASSERT_VALID (this);
	ASSERT_VALID (m_pRibbonBar);

	CArray<CBCGPBaseRibbonElement*, CBCGPBaseRibbonElement*> arElements;

	for (POSITION pos = lstCommands.GetHeadPosition (); pos != NULL;)
	{
		UINT uiCmd = lstCommands.GetNext (pos);

		if (uiCmd == 0)
		{
			if (m_pSeparator != NULL)
			{
				arElements.Add (m_pSeparator);
			}

			continue;
		}

		CBCGPBaseRibbonElement* pElem = m_pRibbonBar->FindByID (uiCmd, FALSE);
		if (pElem == NULL)
		{
			continue;
		}

		ASSERT_VALID (pElem);
		arElements.Add (pElem);
	}

	FillFromArray (arElements, bDeep, FALSE);
}
开发者ID:iclosure,项目名称:jframework,代码行数:35,代码来源:BCGPRibbonCommandsListBox.cpp

示例3: writeValuDescToFile

/**
* \brief      Write's the Value Descriptor in the CANoe format 
* \param[in]  CStdioFile &fileOutput,char ,CList<CValueDescriptor,CValueDescriptor&>
* \param[out] None   
* \return     int
* \authors    Mahesh.B.S
* \date       15.11.2002
*/
void CValueDescriptor::writeValuDescToFile(CStdioFile &fileOutput,char m_ucType,CList<CValueDescriptor,CValueDescriptor&> &m_listValueDescriptor)
{
    char acLine[defVDES_MAX_OUT_STR];
    POSITION posValDesc = m_listValueDescriptor.GetHeadPosition();
    while(posValDesc != NULL)
    {
        CValueDescriptor& rValDesc = m_listValueDescriptor.GetNext(posValDesc);
        switch(m_ucType)
        {
        case CSignal::SIG_TYPE_INT:
        case CSignal::SIG_TYPE_FLOAT:            
        case CSignal::SIG_TYPE_DOUBLE:
        case CSignal::SIG_TYPE_INT64:
            sprintf(acLine,"%I64d \"%s\" ",rValDesc.m_value.i64Value,rValDesc.m_sDescriptor);
            break;

        case CSignal::SIG_TYPE_BOOL:
        case CSignal::SIG_TYPE_UINT:
        case CSignal::SIG_TYPE_UINT64:
            sprintf(acLine,"%I64u \"%s\" ",rValDesc.m_value.ui64Value,rValDesc.m_sDescriptor);
            break;

        default:
            break;
        }

        fileOutput.WriteString(acLine);    
    }
    fileOutput.WriteString(";\n");
    return;
}
开发者ID:Fetze,项目名称:busmaster,代码行数:39,代码来源:ValueDescriptor.cpp

示例4: GetDelParamlst

int CDlgParamSet::GetDelParamlst(vector<ZTreeParam*> &vecParams,int &nGroupCount)
{
	int  ncount  =0;
	ZTreeParam* pParam  = NULL;
	CBCGPGridItem*pItem = NULL;
	CZGridRow  *pRow =  NULL;
	CList <CBCGPGridItem*, CBCGPGridItem*> lstSelected;
	m_wndGridTree.GetSelectedItems (lstSelected);

	for (POSITION pos = lstSelected.GetHeadPosition(); pos != NULL; )
	{
		pItem = lstSelected.GetAt(pos);
		lstSelected.GetNext(pos);
		pRow = (CZGridRow*)pItem->GetParentRow();
		pParam = (ZTreeParam*)pRow->GetData();

		if (pParam==NULL)	
			continue;

		if (pParam->m_bIsGroup)	
			nGroupCount++;

		ncount++;
		vecParams.push_back(pParam);
	}
	return ncount;
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:27,代码来源:DlgParamSet.cpp

示例5: GetNextRowAfterDel

CZGridRow* CDlgParamSet::GetNextRowAfterDel( CZGridRow*pCurItem)
{
	CZGridRow* pParaentItem=NULL;
	CZGridRow* pNextItem=NULL;

	CList<CBCGPGridRow*, CBCGPGridRow*> lst;

	//要删除的pRow
	//pCurItem = (CZGridRow*)m_wndGridTree.GetRow(nIndex);

	//if (pCurItem==NULL)		return n;

	pParaentItem = (CZGridRow*)pCurItem->GetParent();
	pParaentItem->GetSubItems(lst);
	POSITION pos =lst.Find(pCurItem);
	lst.GetNext (pos);
	 
	if (pos==NULL)
		pNextItem=pParaentItem;
	else
		pNextItem=(CZGridRow*)lst.GetAt(pos);
	
	return pNextItem;

}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:25,代码来源:DlgParamSet.cpp

示例6: FindInList

int CToolCervicales::FindInList(CList<CPoint, CPoint&>& i_List, const CPoint& i_Point) const {
	POSITION i_Pos = i_List.GetHeadPosition();
	while (i_Pos != NULL) {
		if (i_List.GetNext(i_Pos) == i_Point) return (int) i_Pos;
	}	
	return -1;
}
开发者ID:dblock,项目名称:rxcervicales,代码行数:7,代码来源:ToolCervicales.cpp

示例7: OnBnClickedOk

void CMetaDlg::OnBnClickedOk()
{
	typedef std::map<CString, char> StrCharMap;

	BOOL bRemain = TRUE;
	ChangeAclParams params;
	params.buckname = m_strBucket;
	params.objname = m_strObject;

	char acl_c, acl_a;
	bRemain &= GetCanonicalGroupAcl(&acl_c);
	params.acls.insert(StrCharMap::value_type(_T(CANONICAL_GROUP), acl_c));

	bRemain &= GetAnonymouseGroupAcl(&acl_a);
	params.acls.insert(StrCharMap::value_type(_T(ANONYMOUSE_GROUP), acl_a));

	CList<CString, CString> users;
	GetAllUser(users);

	POSITION pos = users.GetHeadPosition();
	while (pos)
	{
		char acl;
		CString name = users.GetNext(pos);
		bRemain &= GetUserAcl(name, &acl);
		params.acls.insert(StrCharMap::value_type(name, acl));
	}

	if (!bRemain)
	{
		AfxGetApp()->GetMainWnd()->SendMessage(WM_MAINDLG_ChangeAcl, (WPARAM)&params);
	}

	CDialogEx::OnOK();
}
开发者ID:SimonInHub,项目名称:scs-client-vc,代码行数:35,代码来源:MetaDlg.cpp

示例8: OnContextMenu

//右键弹出处理
void CComputerListView::OnContextMenu(CWnd*, CPoint point)
{
	m_SelectRows.RemoveAll();

	CMenu menu;

	CBCGPGridRow* pRow = GetGridCtrl()->GetCurSel();

	if (pRow != NULL)//存在选中的子行
	{
		CList<CBCGPGridItem*, CBCGPGridItem*> lstSelected;
		GetGridCtrl()->GetSelectedItems(lstSelected);//多重选择队列

		POSITION pos = lstSelected.GetHeadPosition();//第一个

		while (pos != NULL)
		{
			CBCGPGridItem* pItem = lstSelected.GetNext(pos);//下一个			
			m_SelectRows.Add((UINT)pItem->GetParentRow()->GetData());//保存选中的序号			
		}

		SendMessage(WM_LBUTTONUP);//弹起

		VERIFY(menu.LoadMenu(IDR_COMPUTER_MENU));//载入
		CMenu* pPopup = menu.GetSubMenu(0);//第一个子菜单
		ASSERT(pPopup != NULL);

#ifndef __USING_INTER_RESOURCE
		HMENU hTmp = pPopup->GetSubMenu(6)->GetSafeHmenu();
		pPopup->ModifyMenu((UINT_PTR)hTmp,MF_POPUP,(UINT_PTR)hTmp,LOAD_STRING(IDS_REMOTE_OPERATION));
#endif

		//弹出菜单
		theApp.GetContextMenuManager()->ShowPopupMenu(pPopup->Detach(), point.x, point.y, this, TRUE);
	}
	else
	{
		//扫描鼠标位置,点击在列栏上,才弹出此菜单
		CRect rect;
		m_pWndGridCtrl->GetClientRect(rect);
		rect.bottom = 21; //栏高度大概为21个像素
		ClientToScreen(rect);

		if (rect.PtInRect(point))//点击在栏上
		{
			VERIFY(menu.LoadMenu(IDR_MENU_COLUMN));//载入列菜单

			CMenu* pPopup = menu.GetSubMenu(0);
			ASSERT(pPopup != NULL);

			for (INT i = 0; i < GetGridCtrl()->GetColumnCount(); i++)//列枚举
			{//动态插入与列项有关的菜单
				pPopup->InsertMenu(i, MF_BYPOSITION, IDM_MINCOLUMNCMD + i, GetGridCtrl()->GetColumnName(i));
				pPopup->CheckMenuItem(i, MF_BYPOSITION | (GetGridCtrl()->GetColumnVisible(i) ? MF_CHECKED : MF_UNCHECKED));
			}

			theApp.GetContextMenuManager()->ShowPopupMenu(pPopup->Detach(), point.x, point.y, this, TRUE);
		}
	}
}
开发者ID:layerfsd,项目名称:PersonalIBA,代码行数:61,代码来源:ComputerListView.cpp

示例9: Write_DefVal_ToFile

/**
* \brief      Writes the parameter default values to the output file.
* \param[in]  CStdioFile& fileOutput,CList<CParameters,CParameters&> &m_listParameter
* \param[out] None
* \return     bool
* \authors    Padmaja.A
* \date       15.11.2004
*/
bool Write_DefVal_ToFile(CStdioFile& fileOutput,CList<CParameters,CParameters&> &m_listParameter)
{
    bool pResult=true;
    char acLine[defCON_MAX_LINE_LEN];
    //gets the first param from the list.
    POSITION pos=m_listParameter .GetHeadPosition();
    while(pos!=NULL)
    {
        CParameters& rParam=m_listParameter.GetNext(pos);
        //checks whether def val is with in the range or not.
        if(rParam.m_RangeError)
            pResult=false;
        //writes def val of type int to the o/p file.
        if(strcmp(rParam.m_ParamType,"INT")==0 )
            sprintf(acLine,"BA_DEF_DEF_  \"%s\" %d;\n",rParam.m_ParamName,rParam.m_InitVal.iValue);
        //writes def val of type ex to the o/p file.
        else if(strcmp(rParam.m_ParamType,"HEX")==0)
            sprintf(acLine,"BA_DEF_DEF_  \"%s\" %u;\n",rParam.m_ParamName,rParam.m_InitVal.uiValue);
        //writes def val of type flaot to the o/p file.
        else if(strcmp(rParam.m_ParamType,"FLOAT")==0)
            sprintf(acLine,"BA_DEF_DEF_  \"%s\" %f;\n",rParam.m_ParamName,rParam.m_InitVal.fValue);
        //writes def val of type enum to the o/p file.
        else if(strcmp(rParam.m_ParamType,"ENUM")==0)
            sprintf(acLine,"BA_DEF_DEF_  \"%s\" \"%s\";\n",rParam.m_ParamName,rParam.m_InitVal.cValue);
        //writes def val of type string to the o/p file.
        else
            sprintf(acLine,"BA_DEF_DEF_  \"%s\" %s;\n",rParam.m_ParamName,rParam.m_InitVal.cValue);
        fileOutput.WriteString(acLine);
    }
    return pResult;
}
开发者ID:grmujumdar,项目名称:busmaster,代码行数:39,代码来源:Parameter.cpp

示例10:

YGroup::YGroup(CList<YObject*, YObject*>& list){

	resizing = FALSE;
	// 그룹 리스트 초기화
	YObject* tmp;
	POSITION pos = list.GetHeadPosition();
	while (pos){
		tmp = list.GetNext(pos);
		tmp->setSelect(FALSE);
		groupList.AddTail(tmp);
	}

	// 리젼 사각형을 위한 좌표값 생성
	sPoint.SetPoint(10000, 10000);
	ePoint.SetPoint(0, 0);
	CRect rec;
	pos = groupList.GetHeadPosition();
	while (pos){
		tmp = groupList.GetNext(pos);
		rec = tmp->getORect();
		if (sPoint.x > rec.TopLeft().x) sPoint.x = rec.TopLeft().x;
		if (sPoint.y > rec.TopLeft().y) sPoint.y = rec.TopLeft().y;
		if (ePoint.x < rec.BottomRight().x) ePoint.x = rec.BottomRight().x;
		if (ePoint.y < rec.BottomRight().y) ePoint.y = rec.BottomRight().y;
	}
}
开发者ID:Yoonsungbin,项目名称:MFC_PaintEdit,代码行数:26,代码来源:YGroup.cpp

示例11: AddHeaders

void CHttpRequest::AddHeaders(CList<CHttpHeader *, CHttpHeader *> &headers) {
	POSITION pos = headers.GetHeadPosition();
	while (pos != NULL) {
		CHttpHeader *hdr = headers.GetNext(pos);
		Headers.AddTail(new CHttpHeader(hdr->Name, hdr->Value));
	}
}
开发者ID:Tallefer,项目名称:prssr,代码行数:7,代码来源:http.cpp

示例12: DropItemOnList

void CPlayerPlaylistBar::DropItemOnList()
{
    m_ptDropPoint.y += 10;
    m_nDropIndex = m_list.HitTest(CPoint(10, m_ptDropPoint.y));

    TCHAR szLabel[_MAX_PATH];
    LV_ITEM lvi;
    ZeroMemory(&lvi, sizeof(LV_ITEM));
    lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE | LVIF_PARAM;
    lvi.stateMask = LVIS_DROPHILITED | LVIS_FOCUSED | LVIS_SELECTED;
    lvi.pszText = szLabel;
    lvi.iItem = m_nDragIndex;
    lvi.cchTextMax = _MAX_PATH;
    m_list.GetItem(&lvi);

    if (m_nDropIndex < 0) {
        m_nDropIndex = m_list.GetItemCount();
    }
    lvi.iItem = m_nDropIndex;
    m_list.InsertItem(&lvi);

    CHeaderCtrl* pHeader = (CHeaderCtrl*)m_list.GetDlgItem(0);
    int nColumnCount = pHeader->GetItemCount();
    lvi.mask = LVIF_TEXT;
    lvi.iItem = m_nDropIndex;
    //INDEX OF DRAGGED ITEM WILL CHANGE IF ITEM IS DROPPED ABOVE ITSELF
    if (m_nDropIndex < m_nDragIndex) {
        m_nDragIndex++;
    }
    for (int col = 1; col < nColumnCount; col++) {
        _tcscpy_s(lvi.pszText, _MAX_PATH, (LPCTSTR)(m_list.GetItemText(m_nDragIndex, col)));
        lvi.iSubItem = col;
        m_list.SetItem(&lvi);
    }

    m_list.DeleteItem(m_nDragIndex);

    CList<CPlaylistItem> tmp;
    UINT id = (UINT) - 1;
    for (int i = 0; i < m_list.GetItemCount(); i++) {
        POSITION pos = (POSITION)m_list.GetItemData(i);
        CPlaylistItem& pli = m_pl.GetAt(pos);
        tmp.AddTail(pli);
        if (pos == m_pl.GetPos()) {
            id = pli.m_id;
        }
    }
    m_pl.RemoveAll();
    POSITION pos = tmp.GetHeadPosition();
    for (int i = 0; pos; i++) {
        CPlaylistItem& pli = tmp.GetNext(pos);
        m_pl.AddTail(pli);
        if (pli.m_id == id) {
            m_pl.SetPos(m_pl.GetTailPosition());
        }
        m_list.SetItemData(i, (DWORD_PTR)m_pl.GetTailPosition());
    }

    ResizeListColumn();
}
开发者ID:Azpidatziak,项目名称:mpc-hc,代码行数:60,代码来源:PlayerPlaylistBar.cpp

示例13: WriteParamToFile

/**
* \brief      Writes the parameter definition to the specified output file.
* \param[in]  OutputFileName,Parameters List.
* \param[out] None
* \return     CParameters&
* \authors    Padmaja.A
* \date       15.11.2004
*/
bool WriteParamToFile(CStdioFile& fileOutput,CList<CParameters,CParameters&> &m_listParameter)
{
    bool pResult=true;
    char acLine[defCON_MAX_LINE_LEN];

    //gets the frst param in the list.
    POSITION pos=m_listParameter .GetHeadPosition();
    while(pos!=NULL)
    {
        CParameters& rParam=m_listParameter.GetNext(pos);
        if(rParam.m_RangeError)
            pResult=false;
        //writes param def to the specified o/p file.
        if(strcmp(rParam.m_ParamType,"INT")==0 )
            sprintf(acLine,"BA_DEF_ %s  \"%s\" %s %d %d;\n",rParam.m_ObjectId,rParam.m_ParamName,rParam.m_ParamType, rParam.m_MinVal.iValue,rParam.m_MaxVal.iValue);
        else if(strcmp(rParam.m_ParamType,"HEX")==0)
            sprintf(acLine,"BA_DEF_ %s  \"%s\" %s %u %u;\n",rParam.m_ObjectId,rParam.m_ParamName,rParam.m_ParamType,rParam.m_MinVal.uiValue,rParam.m_MaxVal.uiValue);
        else if(strcmp(rParam.m_ParamType,"FLOAT")==0)
            sprintf(acLine,"BA_DEF_ %s  \"%s\" %s %f %f;\n",rParam.m_ObjectId,rParam.m_ParamName,rParam.m_ParamType,rParam.m_MinVal.fValue,rParam.m_MaxVal.fValue);
        else if(strcmp(rParam.m_ParamType,"ENUM")==0)
            sprintf(acLine,"BA_DEF_ %s  \"%s\" %s%s;\n",rParam.m_ObjectId,rParam.m_ParamName,rParam.m_ParamType,rParam.m_ValRange);
        else
            sprintf(acLine,"BA_DEF_ %s  \"%s\" %s ;\n",rParam.m_ObjectId,rParam.m_ParamName,rParam.m_ParamType);
        fileOutput.WriteString(acLine);
    }
    return pResult;
}
开发者ID:grmujumdar,项目名称:busmaster,代码行数:35,代码来源:Parameter.cpp

示例14: AddButtons

//********************************************************************************
void CBCGPRibbonButtonsGroup::AddButtons (
		const CList<CBCGPBaseRibbonElement*, CBCGPBaseRibbonElement*>& lstButtons)
{
	ASSERT_VALID (this);
	
	for (POSITION pos = lstButtons.GetHeadPosition (); pos != NULL;)
	{
		AddButton (lstButtons.GetNext (pos));
	}
}
开发者ID:iclosure,项目名称:jframework,代码行数:11,代码来源:BCGPRibbonButtonsGroup.cpp

示例15: OnLibraryView

void CLibraryHeaderBar::OnLibraryView()
{
	CMenu pMenu;

	pMenu.CreatePopupMenu();

	CLibraryFrame* pFrame	= (CLibraryFrame*)GetParent();
	CList< CLibraryView* >* pViews = pFrame->GetViews();

	for ( POSITION pos = pViews->GetHeadPosition() ; pos ; )
	{
		CLibraryView* pView = (CLibraryView*)pViews->GetNext( pos );
		if ( ! pView->m_bAvailable ) continue;

		CString strName;
		Skin.LoadString( strName, pView->m_nCommandID );
		LPCTSTR pszName = _tcschr( strName, '\n' );
		pszName = ( pszName ) ? ( pszName + 1 ) : (LPCTSTR)strName;

		pMenu.AppendMenu( MF_STRING | ( pView == m_pLastView ? MF_CHECKED : 0 ),
			pView->m_nCommandID, pszName );
	}

	m_pCoolMenu = new CCoolMenu();
	m_pCoolMenu->AddMenu( &pMenu, TRUE );
	m_pCoolMenu->SetWatermark( Skin.GetWatermark( _T("CCoolMenu") ) );

	if ( UINT nCmd = ThrowMenu( ID_LIBRARY_VIEW, &pMenu, this, TRUE, TRUE ) )
	{
		for ( POSITION pos = pViews->GetHeadPosition() ; pos ; )
		{
			CLibraryView* pView = (CLibraryView*)pViews->GetNext( pos );

			if ( pView->m_nCommandID == nCmd )
			{
				pFrame->SetView( pView );
			}
		}
	}

	delete m_pCoolMenu;
	m_pCoolMenu = NULL;
}
开发者ID:ivan386,项目名称:Shareaza,代码行数:43,代码来源:CtrlLibraryHeaderBar.cpp


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