Пример #1
0
set<Tuple> Database::joinTuples(set<Tuple> r1tup, set<Tuple> r2tup, set<pair<int,int>> myPairs){
	set<Tuple> newSet;
	for (set<Tuple>::iterator iter2 = r1tup.begin(); iter2 != r1tup.end(); iter2++){
		for (set<Tuple>::iterator iter3 = r2tup.begin(); iter3 != r2tup.end(); iter3++){
			if (canJoin(myPairs,*iter2, *iter3)){
				newSet.insert(joinTuple(myPairs,*iter2, *iter3));
			}
		}
	}
	return newSet;
}
Пример #2
0
int PBGameInfo::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    
#ifndef QT_NO_PROPERTIES
     if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = gameId(); break;
        case 1: *reinterpret_cast< QString*>(_v) = tableId(); break;
        case 2: *reinterpret_cast< QString*>(_v) = tourneyTableId(); break;
        case 3: *reinterpret_cast< QString*>(_v) = siteId(); break;
        case 4: *reinterpret_cast< int*>(_v) = canJoin(); break;
        case 5: *reinterpret_cast< QString*>(_v) = gameFamily(); break;
        case 6: *reinterpret_cast< double*>(_v) = smallBlind(); break;
        case 7: *reinterpret_cast< double*>(_v) = bigBlind(); break;
        case 8: *reinterpret_cast< int*>(_v) = maxSeats(); break;
        case 9: *reinterpret_cast< QString*>(_v) = driver(); break;
        case 10: *reinterpret_cast< int*>(_v) = canOpen(); break;
        case 11: *reinterpret_cast< int*>(_v) = openedTablesCount(); break;
        case 12: *reinterpret_cast< int*>(_v) = tablesMax(); break;
        case 13: *reinterpret_cast< int*>(_v) = tableOpened(); break;
        case 14: *reinterpret_cast< int*>(_v) = tourneyOpened(); break;
        case 15: *reinterpret_cast< int*>(_v) = gameComplete(); break;
        }
        _id -= 16;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setGameId(*reinterpret_cast< QString*>(_v)); break;
        case 1: setTableId(*reinterpret_cast< QString*>(_v)); break;
        case 2: setTourneyTableId(*reinterpret_cast< QString*>(_v)); break;
        case 3: setSiteId(*reinterpret_cast< QString*>(_v)); break;
        case 4: setCanJoin(*reinterpret_cast< int*>(_v)); break;
        case 5: setGameFamily(*reinterpret_cast< QString*>(_v)); break;
        case 6: setSmallBlind(*reinterpret_cast< double*>(_v)); break;
        case 7: setBigBlind(*reinterpret_cast< double*>(_v)); break;
        case 8: setMaxSeats(*reinterpret_cast< int*>(_v)); break;
        case 9: setDriver(*reinterpret_cast< QString*>(_v)); break;
        case 10: setCanOpen(*reinterpret_cast< int*>(_v)); break;
        case 11: setOpenedTablesCount(*reinterpret_cast< int*>(_v)); break;
        case 12: setTablesMax(*reinterpret_cast< int*>(_v)); break;
        case 13: setTableOpened(*reinterpret_cast< int*>(_v)); break;
        case 14: setTourneyOpened(*reinterpret_cast< int*>(_v)); break;
        case 15: setGameComplete(*reinterpret_cast< int*>(_v)); break;
        }
        _id -= 16;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 16;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 16;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 16;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 16;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 16;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 16;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}