void CPhonruleProcess::readParametersFromSFMFile(SFMFile *f) { setDefaultValues(); CString sMarker, sField; BOOL bEnabled; // not really used here while(f->getField(sMarker, sField, &bEnabled)) { if(sMarker=="-Process") break; else checkAndReadBool("MonitorRules",m_bMonitorRules) else checkAndReadBool("Trace",m_bTrace) else if(sMarker == "CommentChar" && sField.GetLength()) { #if !defined(rde270) && defined(_DEBUG) USES_CONVERSION_U8; CString str(sField[0]); ASSERT(strlen(T2CU8(str)) <= 1); #endif m_cCommentChar = (char)sField[0]; } else { f->throwParseFailure(_T("PhonruleProcess"), sMarker, sField); } } }
void CPCPATRDllProcess::readParametersFromSFMFile(SFMFile *f) { setDefaultValues(); CString sMarker, sField; while(f->getField(sMarker, sField)) { if(sMarker== _T("-Process")) break; else checkAndReadBool( "AmplePropertyIsFeature", m_bAmplePropertyIsFeature) else checkAndReadBool( "PromoteDefaultAtomicValues", m_bPromoteDefaultAtomicValues) else checkAndReadBool( "ShowFailures", m_bShowFailures) else checkAndReadBool( "DisplayGloss", m_bDisplayGloss) else checkAndReadBool( "DisplayFeatures", m_bDisplayFeatures) else checkAndReadBool( "AllFeatures", m_bAllFeatures) else checkAndReadBool( "FlatFeatureDisplay", m_bFlatFeatureDisplay) else checkAndReadBool( "TrimEmptyFeatures", m_bTrimEmptyFeatures) else checkAndReadBool( "PerformUnification", m_bPerformUnification) else checkAndReadBool( "WriteAmpleParses", m_bWriteAmpleParses) else checkAndReadInt( "MaxAmbiguities", m_uiMaxAmbiguities) else checkAndReadString("SentenceFinalPunctuation", m_sSentenceFinalPunctuation) else checkAndReadInt( "TimeLimit", m_uiTimeLimit) else checkAndReadInt( "TreeDisplayFormat", m_iTreeDisplayFormat) else checkAndReadString("GrammarFileName", m_sGrammarFileName) #ifndef hab262 else checkAndReadInt( "RootGlossFeature", m_iRootGlossSetting) #endif // hab262 else f->throwParseFailure(_T("PCPATRDLLProcess"), sMarker, sField); } }
CSentransProcess::CSentransProcess(int iFunction) :CDOSProcess() { setDefaultValues(); m_iFunction = iFunction; // must be *after* setDefaultValues }
static char *getPlot3d(char *pAxeUID, scicos_block * block) { char *pPlot3d; sco_data *sco = (sco_data *) * (block->work); // assert the sco is not NULL if (sco == NULL) { return NULL; } // fast path for an existing object if (sco->scope.cachedPlot3dUID != NULL) { return sco->scope.cachedPlot3dUID; } pPlot3d = findChildWithKindAt(pAxeUID, __GO_PLOT3D__, 0); /* * Allocate if necessary */ if (pPlot3d == NULL) { pPlot3d = createGraphicObject(__GO_PLOT3D__); if (pPlot3d != NULL) { createDataObject(pPlot3d, __GO_PLOT3D__); setGraphicObjectRelationship(pAxeUID, pPlot3d); } } /* * Setup on first access */ if (pPlot3d != NULL) { setBounds(block, pAxeUID, pPlot3d); setPlot3dSettings(pPlot3d); setDefaultValues(block, pPlot3d); { int iClipState = 1; //on setGraphicObjectProperty(pPlot3d, __GO_CLIP_STATE__, &iClipState, jni_int, 1); } } /* * then cache with a local storage */ if (pPlot3d != NULL && sco->scope.cachedPlot3dUID == NULL) { sco->scope.cachedPlot3dUID = strdup(pPlot3d); releaseGraphicObjectProperty(__GO_PARENT__, pPlot3d, jni_string, 1); } return sco->scope.cachedPlot3dUID; }
CMotionPlanningTask::CMotionPlanningTask(const std::vector<int>& jointHandles) { setDefaultValues(); // Following not really necessary, but will look cleaner and more "logic" when ordered from base to tip: std::vector<int> jointH; std::vector<int> parentCnt; for (int i=0;i<int(jointHandles.size());i++) { jointH.push_back(jointHandles[i]); C3DObject* obj=App::ct->objCont->getObject(jointHandles[i]); int cnt=-1; while (obj!=NULL) { cnt++; obj=obj->getParent(); } parentCnt.push_back(cnt); } tt::orderAscending(parentCnt,jointH); for (int i=0;i<int(jointH.size());i++) { _jointHandles.push_back(jointH[i]); _jointStepCount.push_back(6); // 7 DoF manipulator with 8 --> 2'097'152 nodes, with 7 --> 823'543, with 6 --> 279'936 _robotMetric.push_back(1.0f); } while (calculateResultingNodeCount()==-1) { // we have too many nodes! for (int i=0;i<int(_jointStepCount.size());i++) _jointStepCount[i]--; } }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimCellPropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { if (&name == changedField) { } if ( &(resultDefinition->m_resultTypeUiField) == changedField || &(resultDefinition->m_porosityModelUiField) == changedField) { resultDefinition->fieldChangedByUi(changedField, oldValue, newValue); } if ( &(resultDefinition->m_resultVariableUiField) == changedField ) { resultDefinition->fieldChangedByUi(changedField, oldValue, newValue); setDefaultValues(); m_parentContainer->fieldChangedByUi(changedField, oldValue, newValue); } if ( &lowerBound == changedField || &upperBound == changedField || &evaluationRegion == changedField || &isActive == changedField || &filterMode == changedField) { m_parentContainer->fieldChangedByUi(changedField, oldValue, newValue); this->updateIconState(); } }
/* * LoadImgedConfig - get configuration from a profile file */ void LoadImgedConfig( void ) { settings_info info; HINI handle_inifile; #ifdef __NT__ GetConfigFilePath( iniPath, sizeof( iniPath ) ); strcat( iniPath, "\\" WATCOM_INI ); #endif setDefaultValues( &info ); /* * Image editor will ALWAYS maintain this setting ... which determines * whether or not all other settings will be saved. Note that the * PM version opens the configuration file and the Windows version stores * the information in some kind of cache. */ handle_inifile = _wpi_openinifile( Instance, iniPath ); info.settings = _wpi_getprivateprofileint( handle_inifile, imgedSection, "profile", info.settings, iniPath ); if( info.settings & SET_SAVE_POS ) { loadPositionValues( handle_inifile ); } if( info.settings & SET_SAVE_SET ) { loadSettings( &info, handle_inifile ); } _wpi_closeinifile( handle_inifile ); SetSettingsDlg( &info ); SetInitialOpenDir( info.opendir ); SetInitialSaveDir( info.savedir ); SetInitScreenColor( atol( info.color ) ); } /* LoadImgedConfig */
void BreakpointWindow::loadFromMemcheck(MemCheck& memcheck) { memory = true; read = (memcheck.cond & MEMCHECK_READ) != 0; write = (memcheck.cond & MEMCHECK_WRITE) != 0; onChange = (memcheck.cond & MEMCHECK_WRITE_ONCHANGE) != 0; switch (memcheck.result) { case MEMCHECK_BOTH: log = enabled = true; break; case MEMCHECK_LOG: log = true; enabled = false; break; case MEMCHECK_BREAK: log = false; enabled = true; break; case MEMCHECK_IGNORE: log = enabled = false; break; } address = memcheck.start; size = memcheck.end-address; setDefaultValues(); }
GNEClosingReroute::GNEClosingReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CLOSING_REROUTE, "", false, {}, {}, {}, {rerouterIntervalDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}), myClosedEdge(rerouterIntervalDialog->getEditedAdditional()->getAdditionalParents().at(0)->getEdgeChilds().at(0)) { // fill closing reroute interval with default values setDefaultValues(); }
////////////////////////////////////////////////////////////////////////////////////////////////// // // // void CLeyboldSimPortDriver::addIOPort(const char* IOPortName) // // // // Description: // // Called once (from LeyboldSimAddIOPort) for each pump, // // in response to the st.cmd startup script. // // Adds a pump, and the parameters to support it, to the configuration. // // // ////////////////////////////////////////////////////////////////////////////////////////////////// void CLeyboldSimPortDriver::addIOPort(const char* IOPortName) { epicsGuard < epicsMutex > guard ( CLeyboldSimPortDriver::m_Mutex ); for (size_t ParamIndex = 0; ParamIndex < size_t(NUM_PARAMS); ParamIndex++) { if (ParameterDefns[ParamIndex].m_UseCase == NotForSim) // Not implemented, because not meaningful for the simulater. continue; if (ParameterDefns[ParamIndex].m_UseCase == Single) // Single instance parameter continue; createParam(m_asynUsers.size(), ParamIndex); } setDefaultValues(m_asynUsers.size()); setIntegerParam(m_asynUsers.size(), FAULT, 0); asynUser *asynUser = pasynManager->createAsynUser(0,0); m_TableLookup[IOPortName] = m_asynUsers.size(); m_asynUsers.push_back(asynUser); asynStatus Status = pasynManager->connectDevice(asynUser, IOPortName, int(m_asynUsers.size())); if (Status != asynSuccess) throw CException(asynUser, Status, __FUNCTION__, "connectDevice" + std::string(IOPortName)); asynInterface* pasynOctetInterface = pasynManager->findInterface(asynUser, asynOctetType, 1); asynOctet* Octet = (asynOctet*)pasynOctetInterface->pinterface; void *pinterruptNode; Octet->registerInterruptUser(pasynOctetInterface->drvPvt, asynUser, octetConnectionCallback, this, &pinterruptNode); }
void CFStencil::clear() { m_fineIVS.define(); m_coarIVS.define(); setDefaultValues(); }
PBASFrameProcessor::PBASFrameProcessor(int N, double defaultR, int minHits, int defaultSubsampling, double alpha, double beta, double RScale, double RIncDec, double subsamplingIncRate, double subsamplingDecRate, int samplingLowerBound, int samplingUpperBound) : m_iteration(0), m_pbas(PBAS<PBASFeature>()) // double newLabelThresh, int newNeighbour) //const for graphCuts { setDefaultValues(N, defaultR, minHits, defaultSubsampling, alpha, beta, RScale, RIncDec, subsamplingIncRate, subsamplingDecRate, samplingLowerBound, samplingUpperBound); }
GNECalibratorFlow::GNECalibratorFlow(GNEAdditional* calibratorParent) : GNEAdditional(calibratorParent, calibratorParent->getViewNet(), GLO_CALIBRATOR, SUMO_TAG_CALIBRATORFLOW, "", false, {}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}), myVehicleType(calibratorParent->getViewNet()->getNet()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID)), myRoute(calibratorParent->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).begin()->second) { // fill calibrator flows with default values setDefaultValues(); }
EBLevelGrid:: EBLevelGrid(const DisjointBoxLayout& a_dbl, const EBISLayout& a_ebisl, const ProblemDomain& a_domain) { setDefaultValues(); define(a_dbl, a_ebisl, a_domain); }
EBLevelGrid:: EBLevelGrid(const DisjointBoxLayout& a_dbl, const ProblemDomain& a_domain, const int& a_numGhostEBISL, const EBIndexSpace* a_ebisPtr) { setDefaultValues(); define(a_dbl, a_domain, a_numGhostEBISL, a_ebisPtr); }
LevelFluxRegisterEdge::LevelFluxRegisterEdge(const DisjointBoxLayout& a_dblFine, const DisjointBoxLayout& a_dblCoar, const ProblemDomain& a_dProblem, int a_nRefine, int a_nComp) { setDefaultValues(); define(a_dblFine, a_dblCoar, a_dProblem, a_nRefine, a_nComp); }
static int getGrayplot(int iAxeUID, scicos_block * block) { int iGrayplot; int i__0 = 0; sco_data *sco = (sco_data *) * (block->work); // assert the sco is not NULL if (sco == NULL) { return 0; } // fast path for an existing object if (sco->scope.cachedGrayplotUID) { return sco->scope.cachedGrayplotUID; } iGrayplot = findChildWithKindAt(iAxeUID, __GO_GRAYPLOT__, 0); /* * Allocate if necessary */ if (iGrayplot == 0) { iGrayplot = createGraphicObject(__GO_GRAYPLOT__); if (iGrayplot != 0) { createDataObject(iGrayplot, __GO_GRAYPLOT__); setGraphicObjectRelationship(iAxeUID, iGrayplot); } else { return 0; } } /* * Setup on first access */ setGraphicObjectProperty(iGrayplot, __GO_DATA_MAPPING__, &i__0, jni_int, 1); setBounds(block, iAxeUID, iGrayplot); setDefaultValues(block, iGrayplot); { int iClipState = 1; //on setGraphicObjectProperty(iGrayplot, __GO_CLIP_STATE__, &iClipState, jni_int, 1); } /* * then cache with a local storage */ sco->scope.cachedGrayplotUID = iGrayplot; return sco->scope.cachedGrayplotUID; }
static int getPlot3d(int iAxeUID, scicos_block * block) { int iPlot3d; sco_data *sco = (sco_data *) * (block->work); // assert the sco is not NULL if (sco == NULL) { return 0; } // fast path for an existing object if (sco->scope.cachedPlot3dUID) { return sco->scope.cachedPlot3dUID; } iPlot3d = findChildWithKindAt(iAxeUID, __GO_PLOT3D__, 0); /* * Allocate if necessary */ if (iPlot3d == 0) { iPlot3d = createGraphicObject(__GO_PLOT3D__); if (iPlot3d != 0) { createDataObject(iPlot3d, __GO_PLOT3D__); setGraphicObjectRelationship(iAxeUID, iPlot3d); } else { return 0; } } /* * Setup on first access */ setBounds(block, iAxeUID, iPlot3d); setPlot3dSettings(iPlot3d); setDefaultValues(block, iPlot3d); { int iClipState = 1; //on setGraphicObjectProperty(iPlot3d, __GO_CLIP_STATE__, &iClipState, jni_int, 1); } /* * then cache with a local storage */ sco->scope.cachedPlot3dUID = iPlot3d; return sco->scope.cachedPlot3dUID; }
EBCoarsen::EBCoarsen(const EBLevelGrid& a_eblgFine, const EBLevelGrid& a_eblgCoar, const int& a_nref, const int& a_nvar) { CH_TIME("EBCoarsen:EBCoarsen"); setDefaultValues(); define(a_eblgFine, a_eblgCoar,a_nref, a_nvar); }
Object::Object(Model *_model, QOpenGLShaderProgram *_program, GLuint _texture0, GLuint _texture1, GLuint _texture2) { model = _model; texture0 = _texture0; texture1 = _texture1; texture2 = _texture2; program = _program; setDefaultValues(); }
GNERouteProbReroute::GNERouteProbReroute(GNERerouterIntervalDialog* rerouterIntervalDialog) : GNEAdditional(rerouterIntervalDialog->getEditedAdditional(), rerouterIntervalDialog->getEditedAdditional()->getViewNet(), GLO_REROUTER, SUMO_TAG_ROUTE_PROB_REROUTE, "", false, {}, {}, {}, {rerouterIntervalDialog->getEditedAdditional()}, {}, {}, {}, {}, {}, {}) { // if exist a reroute, set newRoute ID if (rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).size() > 0) { myNewRouteId = rerouterIntervalDialog->getEditedAdditional()->getViewNet()->getNet()->getDemandElementByType(SUMO_TAG_ROUTE).begin()->first; } // fill route prob reroute interval with default values setDefaultValues(); }
EBCoarseAverage::EBCoarseAverage(const EBLevelGrid& a_eblgFine, const EBLevelGrid& a_eblgCoar, const EBLevelGrid& a_eblgCoFi, const int& a_nref, const int& a_nvar) { setDefaultValues(); define(a_eblgFine, a_eblgCoar, a_eblgCoFi, a_nref, a_nvar); }
void BreakpointWindow::initBreakpoint(u32 _address) { memory = false; enabled = true; address = _address; size = 1; condition[0] = 0; setDefaultValues(); }
DataManager::DataManager() { Current_Slice_Index = 0; //setDataBase(); InitFile(); setMemory(); setDefaultValues(); ReadSEGYData(); //GetSurface(800); }
Object::Object(ModelLoader *_model, QOpenGLShaderProgram *_program, GLuint _texture0, GLuint _texture1, GLuint _texture2) { printf("using alternate object constructor \n"); model2 = _model; texture0 = _texture0; texture1 = _texture1; texture2 = _texture2; program = _program; setDefaultValues(); }
ProfileEditGui::ProfileEditGui(const QString &_strNick, QWidget *parent) : QDialog(parent), strNick(_strNick) { ui.setupUi(this); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Edit profile")); // center screen move(QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(parent)).center() - rect().center()); createGui(); setDefaultValues(); createSignals(); }
//----------------------------------------------------------------------- // AMR Factory define function void VCAMRPoissonOp2Factory::define(const ProblemDomain& a_coarseDomain, const Vector<DisjointBoxLayout>& a_grids, const Vector<int>& a_refRatios, const Real& a_coarsedx, BCHolder a_bc, const Real& a_alpha, Vector<RefCountedPtr<LevelData<FArrayBox> > >& a_aCoef, const Real& a_beta, Vector<RefCountedPtr<LevelData<FluxBox> > >& a_bCoef) { CH_TIME("VCAMRPoissonOp2Factory::define"); setDefaultValues(); m_boxes = a_grids; m_refRatios = a_refRatios; m_bc = a_bc; m_dx.resize(a_grids.size()); m_dx[0] = a_coarsedx; m_domains.resize(a_grids.size()); m_domains[0] = a_coarseDomain; m_exchangeCopiers.resize(a_grids.size()); m_exchangeCopiers[0].exchangeDefine(a_grids[0], IntVect::Unit); m_exchangeCopiers[0].trimEdges(a_grids[0], IntVect::Unit); m_cfregion.resize(a_grids.size()); m_cfregion[0].define(a_grids[0], m_domains[0]); for (int i = 1; i < a_grids.size(); i++) { m_dx[i] = m_dx[i-1] / m_refRatios[i-1]; m_domains[i] = m_domains[i-1]; m_domains[i].refine(m_refRatios[i-1]); m_exchangeCopiers[i].exchangeDefine(a_grids[i], IntVect::Unit); m_exchangeCopiers[i].trimEdges(a_grids[i], IntVect::Unit); m_cfregion[i].define(a_grids[i], m_domains[i]); } m_alpha = a_alpha; m_aCoef = a_aCoef; m_beta = a_beta; m_bCoef = a_bCoef; }
CFStencil::CFStencil( const ProblemDomain& a_fineDomain, const Box& a_grid, const DisjointBoxLayout& a_fineBoxes, const DisjointBoxLayout& a_coarBoxes, int a_refRatio, int a_direction, Side::LoHiSide a_hiorlo) { setDefaultValues(); define(a_fineDomain, a_grid, a_fineBoxes, a_coarBoxes, a_refRatio, a_direction, a_hiorlo); }
//------------------------------------------------------------------------------ // Checks the given baud rate // Parameters: // IN: // - int iBaudrate -> the baud rate //Return: the baud rate or error //------------------------------------------------------------------------------ int Interpreter::checkBaudrate(int iBaudrate) { if (iBaudrate == DEFAULT_VALUE) { MessageBoxA(NULL,"Please select a baud rate!!!!!!", WINDOW_TITLE, MB_OK | MB_ICONERROR); setDefaultValues(); return DEFAULT_VALUE; } else if(iBaudrate == ERROR_BAUDRATE) { MessageBoxA(NULL,"Baud rate is not suported by" " this port\n" "Please choose another baud rate", WINDOW_TITLE, MB_OK | MB_ICONERROR); setDefaultValues(); return ERROR_BAUDRATE; } else return iBaudrate; }
ProfileAddGui::ProfileAddGui(ProfileManagerGui *_profileManager, QWidget *parent) : QDialog(parent), profileManager(_profileManager) { ui.setupUi(this); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("Add profile")); // center screen move(QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(parent)).center() - rect().center()); createGui(); setDefaultValues(); createSignals(); ui.lineEdit_nick->setFocus(); }