• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IsComplete函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: NotifyQuest

void UKillQuestObjective::EnemyKilled(AMech_RPGCharacter* character)
{
	if (character->GetClass()->IsChildOf(killClass) && !IsComplete()) {
		kills += 1;
		NotifyQuest();
	}
	else if (IsComplete()) {
		character->GetGroup()->OnGroupEnemyKilled.RemoveDynamic(this, &UKillQuestObjective::EnemyKilled);
	}
}
开发者ID:belven,项目名称:Mech_RPG,代码行数:10,代码来源:KillQuestObjective.cpp


示例2: ASSERT

ResourceBufferHandle ResourceStream::AcquireBufferHandle() {
	ASSERT(IsComplete());

	if (!IsComplete()) {
        ResourceBufferHandle handle;
        
        return handle;
	}
    
    ResourceBufferHandle handle(this, m_FrontBuffer->path, m_FrontBuffer->data, m_FrontBuffer->size, m_FrontBuffer->error, m_FrontBuffer->type);

	m_FrontBuffer->status = kResourceBufferProgress;

	return handle;
}
开发者ID:colintan95,项目名称:raven,代码行数:15,代码来源:ResourceStream.cpp


示例3: RGBA

bool
WebGLTexture::GetFakeBlackType(const char* funcName, uint32_t texUnit,
                               FakeBlackType* const out_fakeBlack)
{
    const char* incompleteReason;
    bool initFailed = false;
    if (!IsComplete(funcName, texUnit, &incompleteReason, &initFailed)) {
        if (initFailed) {
            mContext->ErrorOutOfMemory("%s: Failed to initialize texture data.",
                                       funcName);
            return false; // The world just exploded.
        }

        if (incompleteReason) {
            mContext->GenerateWarning("%s: Active texture %u for target 0x%04x is"
                                      " 'incomplete', and will be rendered as"
                                      " RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: %s",
                                      funcName, texUnit, mTarget.get(),
                                      incompleteReason);
        }
        *out_fakeBlack = FakeBlackType::RGBA0001;
        return true;
    }


    *out_fakeBlack = FakeBlackType::None;
    return true;
}
开发者ID:alphan102,项目名称:gecko-dev,代码行数:28,代码来源:WebGLTexture.cpp


示例4: AddFragment

/*!	Reassembles the fragments to the specified buffer \a to.
	This buffer must have been added via AddFragment() before.
*/
status_t
FragmentPacket::Reassemble(net_buffer* to)
{
	if (!IsComplete())
		return B_ERROR;

	net_buffer* buffer = NULL;

	net_buffer* fragment;
	while ((fragment = fFragments.RemoveHead()) != NULL) {
		if (buffer != NULL) {
			status_t status;
			if (to == fragment) {
				status = gBufferModule->merge(fragment, buffer, false);
				buffer = fragment;
			} else
				status = gBufferModule->merge(buffer, fragment, true);
			if (status != B_OK)
				return status;
		} else
			buffer = fragment;
	}

	if (buffer != to)
		panic("ipv6 packet reassembly did not work correctly.");

	to->index = fIndex;
		// reset the buffer's device index

	return B_OK;
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:34,代码来源:ipv6.cpp


示例5: NotifyIfComplete

 void NotifyIfComplete()
 {
   if (IsComplete())
   {
     Complete.notify_all();
   }
 }
开发者ID:djdron,项目名称:zxtune,代码行数:7,代码来源:progress.cpp


示例6: GetComponents

//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void CDmeSingleIndexedComponent::GetComponents( CUtlVector< int > &components, CUtlVector< float > &weights ) const
{
	if ( IsComplete() )
	{
		const int nComponents = Count();

		int *pComponents = reinterpret_cast< int * >( alloca( nComponents * sizeof( int ) ) );
		float *pWeights = reinterpret_cast< float * >( alloca( nComponents * sizeof( float ) ) );

		for ( int i = 0; i < nComponents; ++i )
		{
			pComponents[ i ] = i;
			pWeights[ i ] = 1.0f;
		}

		components.CopyArray( pComponents, nComponents );
		weights.CopyArray( pWeights, nComponents );
	}
	else
	{
		components.RemoveAll();
		components.CopyArray( m_Components.Base(), m_Components.Count() );

		weights.RemoveAll();
		weights.CopyArray( m_Weights.Base(), m_Weights.Count() );
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:30,代码来源:dmeselection.cpp


示例7: Draw

void XSlideInOut::Draw( void )
{
	if( IsComplete() )
		return;
	if( m_nType == 1 )
	{
		// m_nXPos를 중심으로 좌측에 이전 화면을 찍는다.
		GetpSurface1()->Draw( (float)m_nXPos - GetpSurface1()->GetWidth(), 0.f );
		// m_nXPos를 중심으로 우측에 새 화면을 찍는다.
		GetpSurface2()->Draw( (float)m_nXPos, 0.f );
		m_nXPos -= m_nSpeed;
		if( m_nXPos <= 0 )				// 화면 왼쪽까지 다 이동했으면 완료
			SetComplete( TRUE );
	} else 
	{
		// m_nXPos를 중심으로 좌측에 새 화면을 찍는다.
		GetpSurface2()->Draw( (float)m_nXPos - GetpSurface1()->GetWidth(), 0.f );
		// m_nXPos를 중심으로 우측에 이전 화면을 찍는다.
		GetpSurface1()->Draw( (float)m_nXPos, 0 );
		m_nXPos += m_nSpeed;
		if( m_nXPos >= XE::GetGameWidth() )				// 화면 왼쪽까지 다 이동했으면 완료
			SetComplete( TRUE );		
	}
	XTransition::Draw();
}
开发者ID:xahgo,项目名称:tama,代码行数:25,代码来源:XTransition.cpp


示例8: _T

//
/// The next group is repeated X times
//
TPicResult
TPXPictureValidator::Iteration(LPTSTR input, uint termCh, uint& i, uint& j)
{
  TPicResult rslt;
  uint newTermCh;

  i++;  // Skip '*'

  // Retrieve number

  uint itr = 0;
  for (; _istdigit((tchar)Pic[i]); i++)
    itr = itr * 10 + Pic[i] - _T('0');

  if (i >= termCh)
    return prSyntax;

  newTermCh = CalcTerm(termCh, i);

  //
  // if itr is 0 allow any number, otherwise enforce the number
  //
  uint k = i;
  if (itr) {
    for (uint m = 0; m < itr; m++) {
      i = k;
      rslt = Process(input, newTermCh, i, j);
      if (!IsComplete(rslt)) {
        if (rslt == prEmpty)  // Empty means incomplete since all are required
          rslt = prIncomplete;
        return rslt;
      }
    }
  }
  else {
    do {
      i = k;
      rslt = Process(input, newTermCh, i, j);
    } while (IsComplete(rslt));
    if (rslt == prEmpty || rslt == prError) {
      i++;
      rslt = prAmbiguous;
    }
  }
  i = newTermCh;
  return rslt;
}
开发者ID:Darkman-M59,项目名称:Meridian59_115,代码行数:50,代码来源:pictval.cpp


示例9: printf

///Do a modular part of the task.  For example, if the task is to load the entire file, load one BlockFile.
///Relies on DoSomeInternal(), which is the subclasses must implement.
///@param amountWork the percent amount of the total job to do.  1.0 represents the entire job.  the default of 0.0
/// will do the smallest unit of work possible
void ODTask::DoSome(float amountWork)
{
   mBlockUntilTerminateMutex.Lock();

   printf("%s %i subtask starting on new thread with priority\n", GetTaskName(),GetTaskNumber());

   mDoingTask=mTaskStarted=true;
   
   float workUntil = amountWork+PercentComplete();
   
   if(workUntil<PercentComplete())
      workUntil = PercentComplete();
   
   //check periodically to see if we should exit.
   mTerminateMutex.Lock();
   if(mTerminate)
   {
      mBlockUntilTerminateMutex.Unlock();
      mTerminateMutex.Unlock();
      return;
   }  
   mTerminateMutex.Unlock();

   Update();   
   
   //Do Some of the task.
   
   mTerminateMutex.Lock();
   while(PercentComplete() < workUntil && PercentComplete() < 1.0 && !mTerminate)
   {
      wxThread::This()->Yield();
      //release within the loop so we can cut the number of iterations short
      mTerminateMutex.Unlock();
      //TODO: check to see if ondemand has been called
      if(false)
         ODUpdate();
      DoSomeInternal();
      
      //But add the mutex lock back before we check the value again.
      mTerminateMutex.Lock();
   }
   mTerminateMutex.Unlock();
   mDoingTask=false;
   
   mTerminateMutex.Lock();
   //if it is not done, put it back onto the ODManager queue.
   if(!IsComplete() && !mTerminate)
   {
      ODManager::Instance()->AddTask(this);
      printf("%s %i is %f done\n", GetTaskName(),GetTaskNumber(),PercentComplete());
   }
   else
   {
      printf("%s %i complete\n", GetTaskName(),GetTaskNumber());
   }
   mTerminateMutex.Unlock();
   mBlockUntilTerminateMutex.Unlock();
   
}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:63,代码来源:ODTask.cpp


示例10: FractionComplete

	inline float FractionComplete() const
	{
		if(IsComplete())
		{
			return 1.0f;
		}
		return  mTimeElapsed/mDuration;
	}
开发者ID:ProframFiles,项目名称:CPSC314-Project-1,代码行数:8,代码来源:animation.hpp


示例11: check

void FBuildPatchInstaller::ExecuteCompleteDelegate()
{
    // Should be executed in main thread, and already be complete
    check( IsInGameThread() );
    check( IsComplete() );
    // Call the complete delegate
    OnCompleteDelegate.Execute( bSuccess, NewBuildManifest );
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:8,代码来源:BuildPatchInstaller.cpp


示例12: ESS_ASSERT

 bool SbpRecvPack::Next()
 {
     ESS_ASSERT(IsComplete());
     
     if (m_currFrameIndex == (m_packInfo->Count() - 1)) return false;
     
     ++m_currFrameIndex;
     return true;
 }
开发者ID:ixc-software,项目名称:lucksi,代码行数:9,代码来源:SbpRecvPack.cpp


示例13: MOERTEL_TEMPLATE_CLASS

bool MoertelT::MOERTEL_TEMPLATE_CLASS(InterfaceT)::BuildNormals()
{
  //-------------------------------------------------------------------
  // interface needs to be complete
  if (!IsComplete()) {
    if (gcomm_->getRank() == 0)
      std::cout << "***ERR*** MoertelT::Interface::Project:\n"
                << "***ERR*** Complete() not called on interface " << Id_
                << "\n"
                << "***ERR*** file/line: " << __FILE__ << "/" << __LINE__
                << "\n";
    return false;
  }

  //-------------------------------------------------------------------
  // send all procs not member of this interface's intra-comm out of here
  if (lcomm_ == Teuchos::null) return true;

  //-------------------------------------------------------------------
  // interface segments need to have at least one function on each side
  std::map<int, Teuchos::RCP<MoertelT::SEGMENT_TEMPLATE_CLASS(SegmentT)>>::
      iterator curr;
  for (int side = 0; side < 2; ++side)
    for (curr = rseg_[side].begin(); curr != rseg_[side].end(); ++curr) {
      if (curr->second->Nfunctions() < 1) {
        std::cout << "***ERR*** MoertelT::Interface::Project:\n"
                  << "***ERR*** interface " << Id_ << ", mortar side\n"
                  << "***ERR*** segment " << curr->second->Id()
                  << " needs at least 1 function set\n"
                  << "***ERR*** file/line: " << __FILE__ << "/" << __LINE__
                  << "\n";
        return false;
      }
    }

  //-------------------------------------------------------------------
  // build nodal normals on both sides
  std::map<int, Teuchos::RCP<MoertelT::MOERTEL_TEMPLATE_CLASS(NodeT)>>::iterator
      ncurr;

  for (int side = 0; side < 2; ++side)

    for (ncurr = rnode_[side].begin(); ncurr != rnode_[side].end(); ++ncurr) {
#if 0
      std::cout << "side " << side << ": " << *(ncurr->second);
#endif
      ncurr->second->BuildAveragedNormal();
#if 0
      std::cout << "side " << side << ": " << *(ncurr->second);
#endif

    }  // for(ncurr ...)

  return true;
}
开发者ID:gahansen,项目名称:Albany,代码行数:55,代码来源:Moertel_InterfaceT_Project_Def.hpp


示例14: Assert

//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void CDmeSingleIndexedComponent::RemoveComponent( int component )
{
	Assert( !IsComplete() );	// TODO: Convert from complete to complete - component

	const int cIndex = BinarySearch( component );
	if ( cIndex >= m_Components.Count() || m_Components[ cIndex ] != component )	// Component not in selection
		return;

	m_Components.Remove( cIndex );
	m_Weights.Remove( cIndex );
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:14,代码来源:dmeselection.cpp


示例15: GetQuest

void UQuestObjective::NotifyQuest(){
	if (GetQuest() != NULL){
		GetQuest()->ObjectiveUpdated(this);
	}

	if (OnObjectiveCompleted.IsBound() && IsComplete()){
		OnObjectiveCompleted.Broadcast(this);
	}
	else if (OnObjectiveUpdated.IsBound()){
		OnObjectiveUpdated.Broadcast(this);
	}
}
开发者ID:belven,项目名称:Mutagen,代码行数:12,代码来源:QuestObjective.cpp


示例16: Count

//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
void CDmeSingleIndexedComponent::Intersection( const CDmeSingleIndexedComponent &rhs )
{
	const int nLhs = Count();
	const int nRhs = rhs.Count();

	int l = 0;
	int r = 0;

	if ( IsComplete() )
	{
		// TODO
		Assert( 0 );
	}
	else
	{
		CUtlVector< int > newComponents;
		newComponents.EnsureCapacity( nLhs );
		CUtlVector< float > newWeights;
		newWeights.EnsureCapacity( nLhs );

		while ( l < nLhs || r < nRhs )
		{
			// In LHS but not RHS
			while ( l < nLhs && ( r >= nRhs || m_Components[ l ] < rhs.m_Components[ r ] ) )
			{
				++l;
			}

			// In RHS but not LHS
			while ( r < nRhs && ( l >= nLhs || m_Components[ l ] > rhs.m_Components[ r ] ) )
			{
				++r;
			}

			// In Both LHS & RHS
			while ( l < nLhs && r < nRhs && m_Components[ l ] == rhs.m_Components[ r ] )
			{
				newComponents.AddToTail( m_Components[ l ] );
				newWeights.AddToTail( m_Weights[ l ] );
				++l;
				++r;
			}
		}

		m_Components.CopyArray( newComponents.Base(), newComponents.Count() );
		m_Weights.CopyArray( newWeights.Base(), newWeights.Count() );
	}

	m_CompleteCount.Set( 0 );
	m_bComplete.Set( false );
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:54,代码来源:dmeselection.cpp


示例17: HasComponent

//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
bool CDmeSingleIndexedComponent::HasComponent( int component ) const
{
	if ( IsComplete() )
		return true;

	const int cIndex = BinarySearch( component );
	if ( cIndex >= m_Components.Count() )
		return false;

	if ( m_Components[ cIndex ] == component )
		return true;

	return false;
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:17,代码来源:dmeselection.cpp


示例18: DoCancel

EXPORT_C void CMdEQuery::Cancel()
    {
    // is query incomplete before canceling
    TBool incomplete = !IsComplete();
    
    if( incomplete )
    	{
    	DoCancel();
    	}

	if( iConditions )
		{		
    	iConditions->SetLocked( EFalse );
		}
    
    if( incomplete || IsComplete() == EFalse )
    	{
    	iState = EStateError;
    	if( !iDestroyed )
    	    {
            NotifyCompleted( KErrCancel );
    	    }
    	}
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:24,代码来源:mdequery.cpp


示例19: SetResult

/**
 * Function to save the result of provisioning.
 *
 * @param[in,out] otmCtx   Context value of ownership transfer.
 * @param[in] res   result of provisioning
 */
static void SetResult(OTMContext_t* otmCtx, const OCStackResult res)
{
    OC_LOG_V(DEBUG, TAG, "IN SetResult : %d ", res);

    if(!otmCtx)
    {
        OC_LOG(WARNING, TAG, "OTMContext is NULL");
        return;
    }

    if(otmCtx->selectedDeviceInfo)
    {
        for(size_t i = 0; i < otmCtx->ctxResultArraySize; i++)
        {
            if(memcmp(otmCtx->selectedDeviceInfo->doxm->deviceID.id,
                      otmCtx->ctxResultArray[i].deviceId.id, UUID_LENGTH) == 0)
            {
                otmCtx->ctxResultArray[i].res = res;
                if(OC_STACK_OK != res)
                {
                    otmCtx->ctxHasError = true;
                }
            }
        }

        g_otmCtx = NULL;

        //If all request is completed, invoke the user callback.
        if(IsComplete(otmCtx))
        {
            otmCtx->ctxResultCallback(otmCtx->userCtx, otmCtx->ctxResultArraySize,
                                       otmCtx->ctxResultArray, otmCtx->ctxHasError);
            OICFree(otmCtx->ctxResultArray);
            OICFree(otmCtx);
        }
        else
        {
            if(OC_STACK_OK != StartOwnershipTransfer(otmCtx,
                                                     otmCtx->selectedDeviceInfo->next))
            {
                OC_LOG(ERROR, TAG, "Failed to StartOwnershipTransfer");
            }
        }
    }

    OC_LOG(DEBUG, TAG, "OUT SetResult");
}
开发者ID:keyfour,项目名称:iotivity,代码行数:53,代码来源:ownershiptransfermanager.c


示例20: kungFuDeathGrip

NS_IMETHODIMP
nsHtml5Parser::Terminate()
{
  // We should only call DidBuildModel once, so don't do anything if this is
  // the second time that Terminate has been called.
  if (mExecutor->IsComplete()) {
    return NS_OK;
  }
  // XXX - [ until we figure out a way to break parser-sink circularity ]
  // Hack - Hold a reference until we are completely done...
  nsCOMPtr<nsIParser> kungFuDeathGrip(this);
  nsRefPtr<nsHtml5StreamParser> streamKungFuDeathGrip(mStreamParser);
  nsRefPtr<nsHtml5TreeOpExecutor> treeOpKungFuDeathGrip(mExecutor);
  if (mStreamParser) {
    mStreamParser->Terminate();
  }
  return mExecutor->DidBuildModel(true);
}
开发者ID:Anachid,项目名称:mozilla-central,代码行数:18,代码来源:nsHtml5Parser.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsConnected函数代码示例发布时间:2022-05-30
下一篇:
C++ IsCombatMovementAllowed函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap