STDMETHODIMP GuestMultiTouchEventWrap::COMGETTER(ContactCount)(LONG *aContactCount) { LogRelFlow(("{%p} %s: enter aContactCount=%p\n", this, "GuestMultiTouchEvent::getContactCount", aContactCount)); VirtualBoxBase::clearError(); HRESULT hrc; try { CheckComArgOutPointerValidThrow(aContactCount); AutoCaller autoCaller(this); if (FAILED(autoCaller.rc())) throw autoCaller.rc(); hrc = getContactCount(aContactCount); } catch (HRESULT hrc2) { hrc = hrc2; } catch (...) { hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS); } LogRelFlow(("{%p} %s: leave *aContactCount=%RI32 hrc=%Rhrc\n", this, "GuestMultiTouchEvent::getContactCount", *aContactCount, hrc)); return hrc; }
void BaseContestLog::updateStats( void ) { QSO1 = 0; kms1 = 0; mults1 = 0; QSO2 = 0; kms2 = 0; mults2 = 0; QSO1p = 0; kms1p = 0; mults1p = 0; QSO2p = 0; kms2p = 0; mults2p = 0; for ( int i = getContactCount() - 1; i >= 0; i-- ) { if ( !updateStat( ctList[ i ] ) ) break; } }
// and we need to do this a bit more often to pick up unfilled properly void BaseContestLog::scanContest( void ) { DupSheet.clear(); locs.freeAll(); delete [] districtWorked; delete [] countryWorked; districtWorked = 0; countryWorked = 0; int nc = MultLists::getMultLists() ->getDistListSize(); districtWorked = new int[ nc ]; memset( districtWorked, 0, nc * sizeof( int ) ); nc = MultLists::getMultLists() ->getCtryListSize(); countryWorked = new int[ nc ]; memset( countryWorked, 0, nc * sizeof( int ) ); // set up for the idle loop scan // NB we may need to clear e.g. the accumulated score // we will need to clear the multiplier work counts contestScore = 0; ndistrict = 0; nctry = 0; nlocs = 0; nextScan = -1; unfilledCount = 0; std::string curop1; std::string curop2; oplist.clear(); while ( nextScan >= -1 ) { // get the next contact in sequence and do any required scan checks nextScan++; if ( nextScan >= getContactCount() ) { // end of scan nextScan = -2; if ( isReadOnly() ) { DupSheet.clear(); } break; } BaseContact *nct = ctList[ nextScan ]; if ( !nct ) break ; if (nct->contactFlags.getValue() & TO_BE_ENTERED) { unfilledCount++; } curop1 = nct->op1.getValue(); oplist.insert( curop1 ); curop2 = nct->op2.getValue(); oplist.insert( curop2 ); if ( nct->contactFlags.getValue() & ( NON_SCORING | DONT_PRINT | LOCAL_COMMENT | COMMENT_ONLY ) ) { nct->contactScore.setValue( -1 ); // force it! continue; } validationPoint = nct; // check for duplicates; accumulate the current points score nct->cs.valRes = CS_NOT_VALIDATED; nct->cs.validate( ); nct->bearing = -1; // force a recalc nct->loc.validate(); int index; if ( DupSheet.checkCurDup( nct, 0, true ) ) // check for dup, insert it if required nct->cs.valRes = ERR_DUPCS; nct->multCount = 0; nct->newDistrict = false; nct->newCtry = false; nct->newLoc = false; nct->check( ); } op1.setInitialValue( curop1 ); op2.setInitialValue( curop2 ); }