int main(int argc, char** argv) { QGL::setPreferredPaintEngine(QPaintEngine::OpenGL); // The QApplication will strip its args from argc/argv, so we want to do // this before putting the command-line args into our ArgumentList, or we // will try to open the Qt args as data files. QApplication app(argc, argv); SystemServicesImp::instance()->WriteLogInfo(QString("%1 Startup").arg(APP_NAME).toStdString()); // Register the command line options ArgumentList* pArgumentList = ArgumentList::instance(); if (pArgumentList == NULL) { SystemServicesImp::instance()->WriteLogInfo(QString("%1 Shutdown").arg(APP_NAME).toStdString()); return -1; } pArgumentList->registerOption("input"); pArgumentList->registerOption("deployment"); pArgumentList->registerOption("debugDeployment"); pArgumentList->registerOption("exitAfterWizards"); pArgumentList->registerOption("generate"); pArgumentList->registerOption("processors"); pArgumentList->registerOption(""); pArgumentList->set(argc, argv); // Run the application InteractiveApplication interactiveApp(app); int success = interactiveApp.run(argc, argv); SystemServicesImp::instance()->WriteLogInfo(QString("%1 Shutdown").arg(APP_NAME).toStdString()); return success; }
bool Action::postControlAction() { ArgumentList *actionArgList = getArgumentList(); ArgumentList *actionInputArgList = getInputArgumentList(); ActionRequest ctrlReq; ctrlReq.setRequest(this, actionInputArgList); if (Debug::isOn() == true) ctrlReq.print(); ActionResponse *ctrlRes = new ActionResponse(); ctrlReq.post(ctrlRes); if (Debug::isOn() == true) ctrlRes->print(); setControlResponse(ctrlRes); // Thanks for Dimas <*****@*****.**> and Stefano Lenzi <*****@*****.**> (07/09/04) int statCode = ctrlRes->getStatusCode(); setStatus(statCode); if (ctrlRes->isSuccessful() == false) return false; ArgumentList *outArgList = ctrlRes->getResponse(); actionArgList->set(outArgList); return true; }