本文整理汇总了C++中IsComplete函数的典型用法代码示例。如果您正苦于以下问题:C++ IsComplete函数的具体用法?C++ IsComplete怎么用?C++ IsComplete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsComplete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例5: NotifyIfComplete
void NotifyIfComplete()
{
if (IsComplete())
{
Complete.notify_all();
}
}
示例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() );
}
}
示例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();
}
示例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;
}
示例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();
}
示例10: FractionComplete
inline float FractionComplete() const
{
if(IsComplete())
{
return 1.0f;
}
return mTimeElapsed/mDuration;
}
示例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 );
}
示例12: ESS_ASSERT
bool SbpRecvPack::Next()
{
ESS_ASSERT(IsComplete());
if (m_currFrameIndex == (m_packInfo->Count() - 1)) return false;
++m_currFrameIndex;
return true;
}
示例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;
}
示例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 );
}
示例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);
}
}