//从队列总弹出第一个元素 int CNEOPopBuffer::GetAndDeleteFirst(char *szBuffer,int nBufferSize) { if(!ICanWork()) return 0; int nRet=GetFirst(szBuffer,nBufferSize);//获得第一个元素 DeleteFirst(); return nRet; }
//--------------------------------------------------------- // Destructor //--------------------------------------------------------- MLStubCache::~MLStubCache() { MLCHASHENTRY *phe = (MLCHASHENTRY*)GetFirst(); while (phe) { phe->m_pMLStub->DecRef(); phe = (MLCHASHENTRY*)GetNext((BYTE*)phe); } }
ValueList::~ValueList() { Value* pvalue = GetFirst(); while (pvalue) { pvalue->RemoveParent(this); pvalue = GetNext(); } }
void __fastcall TScreenSpy::Execute() { while (!Terminated && FSocket->State == wsConnected) { if (CheckScr()) GetFirst(); else GetNext(); Sleep(30); } }
// use this to display debug information about vehicle void Debug () const { for (dListNode* ptr = GetFirst(); ptr; ptr = ptr->GetNext()) { CustomVehicleController* const controller = &ptr->GetInfo(); BasicCarEntity* const vehicleEntity = (BasicCarEntity*)NewtonBodyGetUserData (controller->GetBody()); vehicleEntity->Debug(); } }
dgInt32 GetMemoryUsed () const { dgInt32 mem = m_memoryUsed; for (dgList<dgMemoryAllocator*>::dgListNode* node = GetFirst(); node; node = node->GetNext()) { mem += node->GetInfo()->GetMemoryUsed(); } return mem; }
void SCH_SHEET_LIST::ClearModifyStatus() { for( SCH_SHEET_PATH* sheet = GetFirst(); sheet; sheet = GetNext() ) { if( sheet->LastScreen() ) sheet->LastScreen()->ClrModify(); } }
virtual ~FractureEffect() { for (dListNode* node = GetFirst(); node; node = node->GetNext()) { FractureAtom& atom = node->GetInfo(); NewtonDestroyCollision(atom.m_collision); atom.m_mesh->Release(); } }
int CNEOPopBuffer::GetAndDeleteFirst(CNEOStaticBuffer *pBuffer) { if(!ICanWork()) return 0; int nRet=GetFirst(pBuffer); DeleteFirst(); return nRet; }
~ShatterEffect() { for (dListNode* node = GetFirst(); node; node = node->GetNext()) { ShatterAtom& atom = node->GetInfo(); NewtonReleaseCollision (m_world, atom.m_collision); atom.m_mesh->Release(); } }
dNewtonTriggerManager::dNewtonTrigger* dNewtonTriggerManager::GetFirstTrigger() const { dListNode* const node = GetFirst(); if (node) { return (dNewtonTriggerManager::dNewtonTrigger*) NewtonBodyGetUserData (node->GetInfo().GetBody()); } return NULL; }
int32_t Screen::GetMouseControlledDialogCount() { Dialog *pDlg; int32_t iResult=0; for (Element *pEl = GetFirst(); pEl; pEl = pEl->GetNext()) if (pDlg = pEl->GetDlg()) if (pDlg->IsShown() && pDlg->IsMouseControlled()) ++iResult; return iResult; }
void BaseSystem::InitSystems () { BaseSystem* it ( GetFirst () ); while( it != nullptr ) { it->Init (); GetNext ( it ); } }
void BaseSystem::TryLoadSystems () { BaseSystem* it ( GetFirst () ); while( it != nullptr ) { it->SetActive ( true ); GetNext ( it ); } }
void BaseSystem::TryUnloadSystems () { BaseSystem* it ( GetFirst () ); while( it != nullptr ) { if( ! it->GotJob () ) it->SetActive ( false ); GetNext ( it ); } }
void BaseSystem::UnloadAllSystems () { BaseSystem* it ( GetFirst () ); while( it != nullptr ) { it->SetActive ( false ); GetNext ( it ); } }
bool FindOperator(dCRCTYPE symbol) const { for (dListNode* node = GetFirst(); node; node = node->GetNext()) { if (symbol == node->GetInfo()) { return true; } } return false; }
dNewtonArticulationManager::dNewtonArticulationController* dNewtonArticulationManager::GetFirstController() const { dAssert (0); dListNode* const node = GetFirst(); if (node) { return (dNewtonArticulationManager::dNewtonArticulationController*) NewtonBodyGetUserData (node->GetInfo().GetBody()); } return NULL; }
const wxFilterClassFactory * wxFilterClassFactory::Find(const wxString& protocol, wxStreamProtocolType type) { for (const wxFilterClassFactory *f = GetFirst(); f; f = f->GetNext()) if (f->CanHandle(protocol, type)) return f; return NULL; }
SCH_ITEM* SCH_SHEET_LIST::FindNextItem( KICAD_T aType, SCH_SHEET_PATH** aSheetFoundIn, SCH_ITEM* aLastItem, bool aWrap ) { bool hasWrapped = false; bool firstItemFound = false; SCH_ITEM* drawItem = NULL; SCH_SHEET_PATH* sheet = GetFirst(); while( sheet ) { drawItem = sheet->LastDrawList(); while( drawItem ) { if( drawItem->Type() == aType ) { if( aLastItem == NULL || firstItemFound ) { if( aSheetFoundIn ) *aSheetFoundIn = sheet; return drawItem; } else if( !firstItemFound && drawItem == aLastItem ) { firstItemFound = true; } } drawItem = drawItem->Next(); } sheet = GetNext(); if( sheet == NULL && aLastItem && aWrap && !hasWrapped ) { hasWrapped = true; sheet = GetFirst(); } } return NULL; }
int Table::ReadTableConsole(const char* sFileName) { int ndim; int dim[MAXDIMENS]; int s; double rs; int i, j; printf("Number of Dimensions :: "); if(!scanf("%d", &s)) { return 0; } if(s > MAXDIMENS) { printf("Increase MAXDIMENS!\n"); return 0; } ndim = s; //read the dimensions for(i=0; i<ndim; i++) { printf("Index %d :: ", i+1); if(!scanf("%d", &s)) { return 0; } dim[i] = s; } if(!Alloc(dim, ndim)) { return 0; } int NotFinished = 1; GetFirst(); for(i=0; i<Total; i++) { printf("("); for(j=0; j<nDimens-1; j++) { printf("%d,", Index[j]+1); } printf("%d) :: ", Index[nDimens-1]+1); if(!scanf("%lf", &rs)) { return 0; } Data[i] = rs; if(NotFinished) { NotFinished = GetNext(); } } return WriteTable(sFileName); }
void dBasicBlocksGraph::CalculateSuccessorsAndPredecessors () { m_mark += 1; dList<dBasicBlock*> stack; stack.Append(&GetFirst()->GetInfo()); while (stack.GetCount()) { dBasicBlock* const block = stack.GetLast()->GetInfo(); stack.Remove(stack.GetLast()->GetInfo()); if (block->m_mark < m_mark) { block->m_mark = m_mark; //m_traversalBlocksOrder.Addtop(block); //block->Trace(); dCILInstr* const instruction = block->m_end->GetInfo(); dAssert(instruction->IsBasicBlockEnd()); if (instruction->GetAsIF()) { dCILInstrConditional* const ifInstr = instruction->GetAsIF(); dAssert (ifInstr->GetTrueTarget()); dAssert (ifInstr->GetFalseTarget()); dCILInstrLabel* const target0 = ifInstr->GetTrueTarget()->GetInfo()->GetAsLabel(); dCILInstrLabel* const target1 = ifInstr->GetFalseTarget()->GetInfo()->GetAsLabel(); dBasicBlock* const block0 = target0->m_basicBlock; dAssert (block0); block->m_successors.Append (block0); block0->m_predecessors.Append(block); stack.Append (block0); dBasicBlock* const block1 = target1->m_basicBlock; dAssert(block1); block->m_successors.Append(block1); block1->m_predecessors.Append(block); stack.Append(block1); } else if (instruction->GetAsGoto()) { dCILInstrGoto* const gotoInst = instruction->GetAsGoto(); dAssert(gotoInst->GetTarget()); dCILInstrLabel* const target = gotoInst->GetTarget()->GetInfo()->GetAsLabel(); dBasicBlock* const block0 = target->m_basicBlock; dAssert(block0); block->m_successors.Append(block0); block0->m_predecessors.Append(block); stack.Append(block0); } } } DeleteUnreachedBlocks(); }
void *wxListBase::FirstThat(wxListIterateFunction F) { for ( wxNodeBase *current = GetFirst(); current; current = current->GetNext() ) { if ( (*F)(current->GetData()) ) return current->GetData(); } return NULL; }
CString CFunctionCollection::SymbolsProvided() { CString result; COHScriptObject *p_oh_script_object = GetFirst(); while (p_oh_script_object != NULL) { result += p_oh_script_object->name(); result += " "; p_oh_script_object = GetNext(); } return result; }
void CFunctionCollection::ClearCache() { CSLock lock(m_critsec); COHScriptObject *p_oh_script_object = GetFirst(); while (p_oh_script_object != NULL) { if (p_oh_script_object->IsFunction() || p_oh_script_object->IsOpenPPLSymbol()) { ((CFunction*)p_oh_script_object)->ClearCache(); } p_oh_script_object = GetNext(); } }
int BuildConnections(LISTE *PLC_List) { ELEMENT *elt=GetFirst(PLC_List); if (elt!=NULL) do { PLC *plc=elt->Data; if (BuildSession(plc)) BuildConnection(plc); } while ((elt=GetNext(PLC_List,elt))!=NULL); return(CONNECTIONs.Count); }
void dgDeformableBodiesUpdate::SolveConstraintsAndIntegrate (dgFloat32 timestep) { for (dgListNode* node = GetFirst(); node; node = node->GetNext()) { dgCollisionDeformableMesh* const softShape = node->GetInfo(); if (softShape->GetBody()) { softShape->ResolvePositionsConstraints (timestep); } } }
void dgDeformableBodiesUpdate::ApplyExternaForces(dgFloat32 timestep) { for (dgListNode* node = GetFirst(); node; node = node->GetNext()) { dgCollisionDeformableMesh* const softShape = node->GetInfo(); if (softShape->GetBody()) { softShape->ApplyExternalForces (timestep); } } }
void dBonesToPoseBinding::UpdatePose() const { if (m_updateCallback) { for (dListNode* node = GetFirst(); node; node = node->GetNext()) { dBindFrameToNode& bindFrame = node->GetInfo(); m_updateCallback (bindFrame.m_userData, &bindFrame.m_sourceTranform->m_posit[0], &bindFrame.m_sourceTranform->m_rotation.m_q0); //break; } } }
wxResourceCache::~wxResourceCache () { wxList::compatibility_iterator node = GetFirst (); while (node) { wxObject *item = (wxObject *)node->GetData(); delete item; node = node->GetNext (); } }