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


C++ ActionObject::GetName方法代码示例

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


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

示例1: CompareDocs

BOOL CCalculator::CompareDocs(CMCPforNTDoc* pDoc1,CMCPforNTDoc* pDoc2)
{
	BOOL EQUAL = TRUE;
	CString TheObject1[100];
	CString TheObject2[100];
	USHORT	Channels1[100];
	USHORT	Channels2[100];
	USHORT i,j;

	POSITION pos;


	if(!pDoc1->ActionObjList.IsEmpty())
	{
		i=0;
		ActionObject* pActionObj = (ActionObject*)pDoc1->ActionObjList.GetHead();
		pos = pDoc1->ActionObjList.GetHeadPosition();
		do
		{
			pActionObj = (ActionObject*)pDoc1->ActionObjList.GetNext(pos);
			if (pActionObj!=NULL)
			{
				TheObject1[i]	= pActionObj->GetName();
				Channels1[i]	= pActionObj->pTrack->Channels;
				i++;
			}
		}
		while (pos!=NULL);
	}


	if(!pDoc2->ActionObjList.IsEmpty())
	{
		i=0;
		ActionObject* pActionObj = (ActionObject*)pDoc2->ActionObjList.GetHead();
		pos = pDoc2->ActionObjList.GetHeadPosition();
		do
		{
			pActionObj = (ActionObject*)pDoc2->ActionObjList.GetNext(pos);
			if (pActionObj!=NULL)
			{
				TheObject2[i]	= pActionObj->GetName();
				Channels2[i]	= pActionObj->pTrack->Channels;
				i++;
			}
		}
		while (pos!=NULL);
	}

	for(j=0;j<i;j++)
	{
		if((TheObject2[j]!=TheObject1[j])||
			(Channels2[j]!=Channels1[j]))
			EQUAL = FALSE;
	}
	return EQUAL;
}
开发者ID:skappert,项目名称:mcp,代码行数:57,代码来源:Calculator.cpp

示例2: UpdateTree

void CCalculator::UpdateTree(CMCPforNTDoc* pDocument)
{
	int Image;
	int	Position = 0;
	CString TheObject;
	int Track=0;
	char TheString[50];
	POSITION pos;
	m_templview.DeleteAllItems();

	if(!pDocument->ActionObjList.IsEmpty())
	{
		ActionObject* pActionObj = (ActionObject*)pDocument->ActionObjList.GetHead();
		pos = pDocument->ActionObjList.GetHeadPosition();
		do
		{
			pActionObj = (ActionObject*)pDocument->ActionObjList.GetNext(pos);
			if (pActionObj!=NULL)
			{
				if (pActionObj->GetName().Find(_TrackObj)!=-1)
				{	
					++Track;
					m_templview.InsertItem(LVIF_TEXT|LVIF_IMAGE|LVIF_PARAM,Position,pActionObj->GetName(),0,0,2,(LPARAM)pActionObj);
					m_templview.SetItem(Position,1,LVIF_TEXT, pActionObj->GetInfo(),0,0,0,NULL);
				}
				else
				{
					if (pActionObj->TestHardware()) Image=0;
						else Image = 1;
	
					strcpy(TheString,(LPCSTR)TheObject);
					m_templview.InsertItem(LVIF_TEXT|LVIF_IMAGE|LVIF_PARAM,Position,pActionObj->GetName(),0,0,Image,(LPARAM)pActionObj);
					m_templview.SetItem(Position,1,LVIF_TEXT, pActionObj->GetInfo(),0,0,0,NULL);
				}
				
			}
			Position++;
		}
		while (pos!=NULL);
	}
}
开发者ID:skappert,项目名称:mcp,代码行数:41,代码来源:Calculator.cpp

示例3: _scal

double _scal( double x,... )
{
	POSITION pos;
	CString TheObject;
	double data = 0;
	BOOL FOUND = FALSE;
	double Track;
	CString TrackStr;
	va_list arg_ptr;
	va_start(arg_ptr,x);
	Track	= va_arg(arg_ptr,double);

	if(!pDocument->ActionObjList.IsEmpty())
	{
		ActionObject* pActionObj = (ActionObject*)pDocument->ActionObjList.GetHead();
		pos = pDocument->ActionObjList.GetHeadPosition();
		do
		{
			pActionObj = (ActionObject*)pDocument->ActionObjList.GetNext(pos);
			if (pActionObj!=NULL)
			{
				TheObject = pActionObj->GetName();
				if (TheObject.Find(__PM_SpectrumObj)!=-1)
				{
					PM_SpectrumObj* pScalerObj = (PM_SpectrumObj*)pActionObj;
					if ((pScalerObj->SubRegNo==(int)x)&&
						(pScalerObj->pTrack->MyPosition==(int)Track))
					{
						if(!EVALUATENEXT)data = pScalerObj->y[index];
						else data = pScalerObj->y[index]*(TheScan)/(TheScan-1);
						FOUND = TRUE;
					}
				}
			}
		}
		while ((pos!=NULL)&&(!FOUND));
	}
	return(data);
} 
开发者ID:skappert,项目名称:mcp,代码行数:39,代码来源:EVALUATE.CPP


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