您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ IsDone函数代码示例

51自学网 2021-06-01 21:40:56
  C++
这篇教程C++ IsDone函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中IsDone函数的典型用法代码示例。如果您正苦于以下问题:C++ IsDone函数的具体用法?C++ IsDone怎么用?C++ IsDone使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: Tick

int Scene::Tick(int* currFunction, int* currTask) {  if(IsDone())    return (int)SUCCES;  if(stack.empty())      return (int)FAILURE;  // Go to stack and execute last entry if not null-pointer. If null-pointer, remove and take next. If stack is empty, return false.  while(functions[stack.back().x][stack.back().y] == UNDEFINED) { // Find entry which is not undefined    stack.pop_back();    if(stack.empty())      return FAILURE; // No more commmands. We already checked if we solved the task, so we return FAILURE  }    *currFunction = stack.back().x;  *currTask = stack.back().y;  // Execute function  int returnValue = CallFunc(functions[stack.back().x][stack.back().y]);  // (x, y+1) into stack.  stack.back().y++;  // If return is not -1, put (return, 0) into stack;  if(returnValue != -1)    stack.push_back((Pos){returnValue, 0});  return (int)NOT_DONE;}
开发者ID:Newspaperman57,项目名称:Crane_bot,代码行数:27,


示例2: GetProgress

CVariant CKadOperation::AddLoadRes(const CVariant& LoadRes, CKadNode* pNode){	SOpProgress* pProgress = GetProgress(pNode);	CVariant FilteredRes = LoadRes.Clone(false); // Make a Shellow Copy	const CVariant& LoadedList = LoadRes["RES"];	CVariant FilteredList;	for(uint32 i=0; i < LoadedList.Count(); i++)	{		CVariant Loaded = LoadedList.At(i).Clone(false); // Make a Shellow Copy		const CVariant& XID = Loaded["XID"];		// Counting		if(pProgress) // might be NULL if we filter our own index response right now		{			SOpStatus &Status = pProgress->Loads[XID];			Status.Results++;			if(!Loaded.Get("MORE"))				Status.Done = true; // this marks that no more results are to be expected form this node		}		SOpStatus* pStatus = &m_LoadMap[XID].Status;		pStatus->Results++;		if(!pStatus->Done)			pStatus->Done = IsDone(SOpProgress::GetLoads, XID);				if(!pStatus->Done)			Loaded.Insert("MORE", true);		else			Loaded.Remove("MORE");		//		if(Loaded.Has("ERR"))		{			FilteredList.Append(Loaded);			continue;		}		// Filtering		CVariant UniquePayloads;		const CVariant& Payloads = Loaded["PLD"];		for(uint32 j=0; j < Payloads.Count(); j++)		{			const CVariant& Payload = Payloads.At(j);			if(m_LoadFilter[XID].insert(Payload["DATA"].GetFP()).second)				UniquePayloads.Append(Payload);		}		// Note: we must add this even if UniquePayloads is empty or else we will misscount replys		CVariant NewLoaded;		NewLoaded["XID"] = XID;		NewLoaded["PLD"] = UniquePayloads;		FilteredList.Append(NewLoaded);		//	}	FilteredRes.Insert("RES", FilteredList);	return FilteredRes;}
开发者ID:0vermind,项目名称:NeoLoader,代码行数:60,


示例3: IsDone

void CLoadLTADlg::OnTimer(UINT nIDEvent) {	CEdit* pEdit = ((CEdit*)GetDlgItem(IDC_LOADLOG));	pEdit->SetSel(-1, 0, TRUE);	if(nIDEvent == TIMER_ID)	{		BOOL bDone = IsDone();		//see if we need to update the load log		//(the check is done so that when it is running, we don't refresh it		//continually)		if(m_bPrevLoaderDone == FALSE)		{			UpdateLoadLog();		}		//see if the finishing state has finished at all		if(bDone != m_bPrevLoaderDone)		{			((CButton*)GetDlgItem(IDC_SAVELOADLOG))->EnableWindow(bDone);			((CButton*)GetDlgItem(IDOK))->EnableWindow(bDone);			m_bPrevLoaderDone = bDone;		}		// automatically close the dialog on load completion		if( m_bAutoConfirm && bDone && m_bPrevLoaderDone )		{			OnOK();		}	}		CDialog::OnTimer(nIDEvent);}
开发者ID:Joincheng,项目名称:lithtech,代码行数:34,


示例4: NS_ERROR

//------------------------------------------------------------voidnsFilteredContentIterator::Last(){  if (!mCurrentIterator) {    NS_ERROR("Missing iterator!");    return;  }  // If we are switching directions then  // we need to switch how we process the nodes  if (mDirection != eBackward) {    mCurrentIterator = mIterator;    mDirection       = eBackward;    mIsOutOfRange    = false;  }  mCurrentIterator->Last();  if (mCurrentIterator->IsDone()) {    return;  }  nsINode *currentNode = mCurrentIterator->GetCurrentNode();  nsCOMPtr<nsIDOMNode> node(do_QueryInterface(currentNode));  bool didCross;  CheckAdvNode(node, didCross, eBackward);}
开发者ID:lofter2011,项目名称:Icefox,代码行数:30,


示例5: NS_ASSERTION

voidnsFilteredContentIterator::Prev(){  if (mIsOutOfRange || !mCurrentIterator) {    NS_ASSERTION(mCurrentIterator, "Missing iterator!");    return;  }  // If we are switching directions then  // we need to switch how we process the nodes  if (mDirection != eBackward) {    nsresult rv = SwitchDirections(false);    if (NS_FAILED(rv)) {      return;    }  }  mCurrentIterator->Prev();  if (mCurrentIterator->IsDone()) {    return;  }  // If we can't get the current node then   // don't check to see if we can skip it  nsINode *currentNode = mCurrentIterator->GetCurrentNode();  nsCOMPtr<nsIDOMNode> node(do_QueryInterface(currentNode));  CheckAdvNode(node, mDidSkip, eBackward);}
开发者ID:lofter2011,项目名称:Icefox,代码行数:31,


示例6:

PyObject *pyllbc_PackLemma_Top::Read(pyllbc_Stream *stream){    if (UNLIKELY(!IsDone()))    {        pyllbc_SetError("top-lemma not done, could not unpack data");        return NULL;    }    size_t idx = 0;    PyObject *values = PyTuple_New(_lemmas.size());    for (; idx < _lemmas.size(); idx++)    {        PyObject *value;        Base *lemma = _lemmas[idx];        if (!(value = lemma->Read(stream)))            break;        PyTuple_SET_ITEM(values, idx, value);    }    if (idx != _lemmas.size())    {        Py_DECREF(values);        values = NULL;    }    return values;}
开发者ID:lailongwei,项目名称:llbc,代码行数:28,


示例7: Rewind

HRESULTSoundD3D::Play(){	if (IsPlaying())  return S_OK;	if (!buffer)      return E_FAIL;	HRESULT hr = E_FAIL;	if (IsDone())	hr = Rewind();	if (IsReady()) {		if (moved)		Localize();		if (flags & LOOP || flags & STREAMED)		hr = buffer->Play(0, 0, DSBPLAY_LOOPING);		else		hr = buffer->Play(0, 0, 0);		if (SUCCEEDED(hr))		status = PLAYING;	}	return hr;}
开发者ID:lightgemini78,项目名称:Starshatter-Rearmed,代码行数:26,


示例8: IsFinished

bool CLIENTFX_INSTANCE::IsFinished(){	if (IsDone()) 		return true;	CLinkListNode<FX_LINK>	*pActiveNode = m_collActiveFX.GetHead();	CBaseFX	*pFX = LTNULL;	while (pActiveNode)	{		pFX = pActiveNode->m_Data.m_pFX;		// Check for expiration		if( pFX ) 		{							//determine if this effect has expired			bool bExpired = ((pFX->GetElapsed() >= pFX->GetEndTime()) || pFX->IsShuttingDown()) && 							 (pFX->IsFinishedShuttingDown() || !pActiveNode->m_Data.m_pRef->m_bSmoothShutdown);						if (!bExpired) 				return false;		}		pActiveNode = pActiveNode->m_pNext;	}	return true;}
开发者ID:bibendovsky,项目名称:ltjs,代码行数:27,


示例9: DrawAt

void BattleAnimation::DrawAt(int x, int y) {	if (!sprite) return; // Initialization failed	if (IsDone()) return;	const RPG::AnimationFrame& anim_frame = animation.frames[frame];	std::vector<RPG::AnimationCellData>::const_iterator it;	for (it = anim_frame.cells.begin(); it != anim_frame.cells.end(); ++it) {		const RPG::AnimationCellData& cell = *it;		if (!cell.valid) {			// Skip unused cells (they are created by deleting cells in the			// animation editor, resulting in gaps)			continue;		}		sprite->SetX(cell.x + x);		sprite->SetY(cell.y + y);		int sx = cell.cell_id % 5;		int sy = cell.cell_id / 5;		int size = large ? 128 : 96;		sprite->SetSrcRect(Rect(sx * size, sy * size, size, size));		sprite->SetOx(size / 2);		sprite->SetOy(size / 2);		sprite->SetTone(Tone(cell.tone_red * 128 / 100,			cell.tone_green * 128 / 100,			cell.tone_blue * 128 / 100,			cell.tone_gray * 128 / 100));		sprite->SetOpacity(255 * (100 - cell.transparency) / 100);		sprite->SetZoomX(cell.zoom / 100.0);		sprite->SetZoomY(cell.zoom / 100.0);		sprite->Draw();	}}
开发者ID:FaithFeather,项目名称:Player,代码行数:34,


示例10:

const LLBC_String &pyllbc_PackLemma::ToString() const{    if (!IsDone())        return _emptyStr;    return _str;}
开发者ID:lailongwei,项目名称:llbc,代码行数:7,


示例11: UpdateDisplays

    void Environment::Run(const int n_steps)    {      int t;      unsigned int i;      for(i = 0; i < agents.size(); i++)	{	  agents[i]->SetPerformance(0);	}      UpdateDisplays();      if(delay)	{	  sleep(delay);	}      for(t = 0; t < n_steps; t++)	{	  if(IsDone())	    {	      return;	    }	  Step();	  if(delay)	    {	      sleep(delay);	    }	}    }
开发者ID:sstephens,项目名称:sstephens1,代码行数:26,


示例12: NAssert

void T_SimpleListIterator<Item>::Next() {	NAssert(!IsDone()) ;	if (_reverse) {		_current=_current->prev ;	} else {		_current=_current->next ;	}}
开发者ID:EQ4,项目名称:LittleGPTracker,代码行数:8,


示例13: IteratorOutOfBoundException

		const char& String::StringIterator::CurrentItem() const		{			if (IsDone()) {				throw IteratorOutOfBoundException();			}			return (_string->operator[](_current));		}
开发者ID:chronos38,项目名称:lupus-framework,代码行数:8,


示例14: OnCancel

void CLoadLTADlg::OnCancel() {	//don't let them quit while the thread is running	if(IsDone() == FALSE)		return;		CDialog::OnCancel();}
开发者ID:Joincheng,项目名称:lithtech,代码行数:8,


示例15:

Item MyListIterator<Item>::CurrentItem() const{    if(IsDone())    {        throw IteratorOutOfBounds;    }    return _list->Get(_current);}
开发者ID:saranfly,项目名称:DesignPatterns,代码行数:8,


示例16:

	virtual ~FXmppMessageReceiveTask()	{		// task shouldn't really be deleted until done but just in case		if (!IsDone())		{			Stop();		}	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:8,


示例17:

boolnsFilteredContentIterator::IsDone(){  if (mIsOutOfRange || !mCurrentIterator) {    return true;  }  return mCurrentIterator->IsDone();}
开发者ID:lofter2011,项目名称:Icefox,代码行数:9,


示例18: CreateJob

Job*CryptTask::CreateNextJob(){	if (IsDone())		return NULL;	CryptJob* job = CreateJob();	_PrepareJob(job);	return job;}
开发者ID:axeld,项目名称:driveencryption,代码行数:10,


示例19: MustShowReadJobs

bool CItem::MustShowReadJobs() const{	if (GetParent() != NULL)	{		return !GetParent()->IsDone();	}	else	{		return !IsDone();	}}
开发者ID:coapp-packages,项目名称:windirstat,代码行数:11,


示例20: Render

void Window::Render(const boost::shared_ptr<Surface>& target){    if (IsDone())    {        return;    }    target->PushState();    target->SetViewportRelative(GetBounds());    OnRender(target);    target->PopState();}
开发者ID:FooSoft,项目名称:moonfall,代码行数:12,


示例21: GetProgress

bool S3FileRequest::WaitUntilDone() const{    unsigned timeoutCount = 0;    float totalProgress = GetProgress();    while (timeoutCount++ < DOWNLOAD_WAIT_TIMEOUT)    {        if (IsDone())        {            break;        }        // Let's reset our timeout        if (GetProgress() != totalProgress)        {            timeoutCount = 0;            totalProgress = GetProgress();        }        std::this_thread::sleep_for(std::chrono::seconds(1));    }    return IsDone();}
开发者ID:kyoungchinseo,项目名称:aws-sdk-cpp,代码行数:21,


示例22: Reset

unsigned VChatClient::GetAllChannelsEx(){	Reset();	VChatAPI::GetAllChannels(NULL);	while(!IsDone() && !HasFailed())	{		Process();		soe::Sleep(10);	}	return m_result;}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:13,


示例23: Write

int pyllbc_PackLemma_Top::Write(pyllbc_Stream *stream, PyObject *values){    if (UNLIKELY(!IsDone()))    {        pyllbc_SetError("top-lemma not done, could not pack data");        return LLBC_FAILED;    }    const bool valuesIsNone = pyllbc_TypeDetector::IsNone(values);    if (valuesIsNone)    {        if (!_lemmas.empty())        {            pyllbc_SetError("not found any values to pack, but has been specified format character symbol");            return LLBC_FAILED;        }        return LLBC_OK;    }    else if (!pyllbc_TypeDetector::IsSequence(values))    {        pyllbc_SetError("will pack data not iterable");        return LLBC_FAILED;    }        const Py_ssize_t seqSize = PySequence_Size(values);    if (seqSize != static_cast<Py_ssize_t>(_lemmas.size()))    {        LLBC_String errStr;        pyllbc_SetError(errStr.format(            "will pack data sequence size[%ld] not equal format character size[%d]",             seqSize, _lemmas.size()));        return LLBC_FAILED;    }    for (Py_ssize_t i = 0; i < seqSize; i++)    {        Base *lemma = _lemmas.at(i);        PyObject *obj = PySequence_GetItem(values, i);        if (lemma->Write(stream, obj) != LLBC_OK)        {            Py_DECREF(obj);            return LLBC_FAILED;        }        Py_DECREF(obj);    }    return LLBC_OK;}
开发者ID:lailongwei,项目名称:llbc,代码行数:51,



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


C++ IsEOF函数代码示例
C++ IsDlgButtonChecked函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。