int Doc_Test::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: initTestCase(); break; case 1: defaults(); break; case 2: addFixture(); break; case 3: deleteFixture(); break; case 4: fixtureLimits(); break; case 5: fixture(); break; case 6: findAddress(); break; case 7: totalPowerConsumption(); break; case 8: addFunction(); break; case 9: deleteFunction(); break; case 10: function(); break; case 11: functionLimits(); break; case 12: load(); break; case 13: loadWrongRoot(); break; case 14: save(); break; default: ; } _id -= 15; } return _id; }
PassRefPtr<IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) { RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec); if (ec) return 0; return deleteFunction(context, keyRange.release(), ec); }
PassRefPtr<IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, PassRefPtr<IDBKey> key, ExceptionCode& ec) { IDB_TRACE("IDBObjectStore::delete"); RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(key, ec); if (ec) return 0; return deleteFunction(context, keyRange.release(), ec); }
RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) { DOMRequestState requestState(context); RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key); if (!idbKey || idbKey->type() == KeyType::Invalid) { ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError); return nullptr; } return deleteFunction(context, &IDBKeyRange::create(idbKey.get()).get(), ec); }
RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, JSC::JSValue key, ExceptionCodeWithMessage& ec) { DOMRequestState requestState(context); RefPtr<IDBKey> idbKey = scriptValueToIDBKey(&requestState, key); if (!idbKey || idbKey->type() == KeyType::Invalid) { ec.code = IDBDatabaseException::DataError; ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key."); return nullptr; } return deleteFunction(context, &IDBKeyRange::create(idbKey.get()).get(), ec); }
void deleteLinkedList(linkedList l, void (*deleteFunction)(void*)){ if(l){ if(l->head){ linkedNode node = l->head; while(node){ linkedNode temp = node; node = temp->next; deleteFunction(temp->content); free(temp); } } free(l); } }
void numberToFunction(int number, char* secondary){ if (number == 1){ readFunction(secondary); } else if (number == 2){ writeFunction(secondary); } else if (number == 3){ deleteFunction(secondary); } else if (number == 4){ printFunction(); } else if (number == 0){ printf("Not a valid command!\n"); } else if (number == 404){ printf("The file you provided does not exist.\n"); } }
PlotControlWindow::PlotControlWindow(const int plotId, PlotArea *parent) : QMainWindow(parent), ui(new Ui::PlotControlWindow) { ui->setupUi(this); mPlot = parent->getPlotWidget(); mPlotId = plotId; init(); initFromConfig(); // Dialog connect(this->ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(this->ui->buttonBox, SIGNAL(accepted()), this, SLOT(close())); connect(this->ui->buttonBox, SIGNAL(accepted()), parent, SLOT(plotConfigChanged())); connect(this->ui->buttonBox, SIGNAL(rejected()), this, SLOT(close())); QPushButton* applyButton = ui->buttonBox->button(QDialogButtonBox::Apply); connect(applyButton, SIGNAL(clicked()), this, SLOT(apply())); connect(ui->autoOrdinate, SIGNAL(toggled(bool)), this, SLOT(autoOrdinateChecked(bool))); // Curve page connect(ui->newCurveButton, SIGNAL(clicked()), this, SLOT(newCurve())); connect(ui->curveSelection, SIGNAL(doubleClicked ( const QModelIndex &)), this, SLOT(editCurve(const QModelIndex &))); connect(ui->deleteCurveButton, SIGNAL(clicked()), this, SLOT(deleteSelectedCurve())); // Function page connect(ui->functionNew, SIGNAL(clicked()), this, SLOT(newFunction())); connect(ui->functionHierarchicalNew, SIGNAL(clicked()), this, SLOT(newHierarachicalFunction())); connect(ui->functionIntegralNew, SIGNAL(clicked()), this, SLOT(newIntegralFunction())); connect(ui->functionDifferentialNew, SIGNAL(clicked()), this, SLOT(newDifferentialFunction())); connect(ui->functionView, SIGNAL(doubleClicked ( const QModelIndex &)), this, SLOT(editFunction(const QModelIndex &))); connect(ui->functionDelete, SIGNAL(clicked()), this, SLOT(deleteFunction())); connect(ui->functionEditCurve, SIGNAL(clicked()), this, SLOT(editFunctionCurve())); setWindowModality(Qt::NonModal); }
RefPtr<WebCore::IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) { return deleteFunction(context, key.jsValue(), ec); }
main () { Id c, sc; int i; TEXT name[STRINGSIZ+1]; CODE testFunction(), deleteFunction (); int *ip; CODE display (); CODE Vm_Free (); CODE writeSingleFile (); struct VARIABLE *v; c = Co_New (0); for (i=0; i < 10; i++) { ip = (int *) tae_alloc (1, sizeof (int)); /* each obj is an int */ *ip = i; /* value of obj */ sprintf (name, "%d", i); /* make a name */ Co_Add (c, ip, name, i); /* let type == i */ } Co_ForEach (c, (coFunction)testFunction, "proper context"); ip = Co_Find (c, "5"); if (*ip != 5) printf ("\n***********error in Co_Find call\n\n"); Co_Free (c, deleteFunction); /* start again and test remove */ c = Co_New (0); for (i=0; i < 10; i++) { ip = (int *) tae_alloc (1, sizeof (int)); /* each obj is an int */ *ip = i; /* value of obj */ sprintf (name, "%d", i); /* make a name */ Co_Add (c, ip, name, i); /* let type == i */ } ip = (int *) Co_Remove (c, "0"); tae_free (ip); ip = (int *) Co_Remove (c, "5"); tae_free (ip); ip = (int *) Co_Remove (c, "9"); tae_free (ip); Co_ForEach (c, (coFunction)testFunction, "0, 5, and 9 missing?"); Co_Free (c, deleteFunction); printf ("\n\n********** remember to check dm_bytes zero here *********\n"); /* vm read and write */ c = Co_New (0); Co_ReadFile (c, "test", P_ABORT) ; /* read concatenated file */ Co_ForEach (c, (coFunction)display, NULL); /* show variable names */ Co_ForEach (c, (coFunction)writeSingleFile, NULL); /* write individual files */ Co_WriteFile (c, "newtest") ; /* wirte one concat file */ Co_Free (c, Vm_Free); printf ("\n\n********** remember to check dm_bytes zero here *********\n"); /* test collections of collections */ c = Co_New (0); for (i=0; i < 10; i++) { ip = (int *) tae_alloc (1, sizeof (int)); /* each obj is an int */ *ip = i; /* value of obj */ sprintf (name, "%d", i); /* make a name */ Co_Add (c, ip, name, i); /* let type == i */ } sc = Co_New (0); /* super collection */ Co_Add (sc, c, "subc1", C_COLLECTION); /* with 4 sub-collections */ Co_Add (sc, c, "subc2", C_COLLECTION); Co_Add (sc, c, "subc3", C_COLLECTION); Co_Add (sc, c, "subc4", C_COLLECTION); /* do some composite lookups */ ip = (int *) Co_Find (sc, "subc1.5"); printf ("should be a 5: %d\n", *ip); ip = (int *) Co_Find (sc, "subc2.1"); printf ("should be a 1: %d\n", *ip); Co_Free (c, deleteFunction); Co_Free (sc, NULL); printf ("\n\n********** remember to check dm_bytes zero here *********\n"); /* check composite Co_Find with Vm objects */ c = Co_New (0); Co_ReadFile (c, "test", P_ABORT) ; /* read concatenated file */ v = (struct VARIABLE *) Co_Find (c, "pp_target.p2"); printf ("variable P2 in block pp_target: %s\n", SVAL(*v,0)); v = (struct VARIABLE *) Co_Find (c, "pp_view._panel.origin"); printf ("variable _panel.origin in block pp_view: %d %d \n", IVAL(*v,0), IVAL(*v,1)); Co_Free (c, Vm_Free); printf ("\n\n********** remember to check dm_bytes zero here *********\n"); }