本文整理汇总了C++中SimpleList::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleList::Clear方法的具体用法?C++ SimpleList::Clear怎么用?C++ SimpleList::Clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleList
的用法示例。
在下文中一共展示了SimpleList::Clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
flush_results()
{
std::string *next_str;
results_queue.Rewind();
while ( results_queue.Next( next_str ) ) {
daemonCore->Write_Pipe( RESULT_OUTBOX, next_str->c_str(),
next_str->length() );
delete next_str;
}
results_queue.Clear();
}
示例2: doContactSchedd
//.........这里部分代码省略.........
if ( update_jobs_complete == true ) {
updateJobsSignaled = false;
} else {
formatstr( error_str, "Schedd connection error during dirty attribute update at line %d!", failure_line_num );
goto contact_schedd_failure;
}
if ( schedd_updates_complete == false ) {
formatstr( error_str, "Schedd connection error during updates at line %d!", failure_line_num );
goto contact_schedd_failure;
}
// Clear dirty bits for all jobs updated
if ( !dirty_job_ids.isEmpty() ) {
ClassAd *rval;
dprintf( D_FULLDEBUG, "Calling clearDirtyAttrs on %d jobs\n",
dirty_job_ids.number() );
dirty_job_ids.rewind();
rval = ScheddObj->clearDirtyAttrs( &dirty_job_ids, &errstack );
if ( rval == NULL ) {
dprintf(D_ALWAYS, "Failed to notify schedd to clear dirty attributes. CondorError: %s\n", errstack.getFullText().c_str() );
}
delete rval;
}
// Wake up jobs that had schedd updates pending and delete job
// objects that wanted to be deleted
pendingScheddUpdates.startIterations();
while ( pendingScheddUpdates.iterate( curr_request ) != 0 ) {
curr_job = curr_request->m_job;
curr_job->jobAd->ClearAllDirtyFlags();
if ( curr_job->deleteFromGridmanager ) {
// If the Job object wants to delete the job from the
// schedd but we failed to do so, don't delete the job
// object yet; wait until we successfully delete the job
// from the schedd.
if ( curr_job->deleteFromSchedd == true &&
schedd_deletes_complete == false ) {
continue;
}
// If wantRematch is set, send a reschedule now
if ( curr_job->wantRematch ) {
send_reschedule = true;
}
pendingScheddUpdates.remove( curr_job->procID );
pendingScheddVacates.remove( curr_job->procID );
pendingJobStatus.remove( curr_job->procID );
completedJobStatus.remove( curr_job->procID );
completedScheddVacates.remove( curr_job->procID );
delete curr_job;
} else {
pendingScheddUpdates.remove( curr_job->procID );
if ( curr_request->m_notify ) {
curr_job->SetEvaluateState();
}
}
delete curr_request;