本文整理汇总了C++中setDefaultValues函数的典型用法代码示例。如果您正苦于以下问题:C++ setDefaultValues函数的具体用法?C++ setDefaultValues怎么用?C++ setDefaultValues使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setDefaultValues函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setDefaultValues
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);
}
}
}
示例2: setDefaultValues
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);
}
}
示例3: setDefaultValues
CSentransProcess::CSentransProcess(int iFunction)
:CDOSProcess()
{
setDefaultValues();
m_iFunction = iFunction; // must be *after* setDefaultValues
}
示例4: findChildWithKindAt
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;
}
示例5: setDefaultValues
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]--;
}
}
示例6: setDefaultValues
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
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();
}
}
示例7: switch
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();
}
示例8: GNEAdditional
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();
}
示例9: guard
//////////////////////////////////////////////////////////////////////////////////////////////////
// //
// 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);
}
示例10: setDefaultValues
void
CFStencil::clear()
{
m_fineIVS.define();
m_coarIVS.define();
setDefaultValues();
}
示例11: m_iteration
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);
}
示例12: GNEAdditional
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();
}
示例13: EBLevelGrid
EBLevelGrid::
EBLevelGrid(const DisjointBoxLayout& a_dbl,
const EBISLayout& a_ebisl,
const ProblemDomain& a_domain)
{
setDefaultValues();
define(a_dbl, a_ebisl, a_domain);
}
示例14: setDefaultValues
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);
}
示例15: getGrayplot
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;
}