本文整理汇总了C++中Solver::SetStringParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ Solver::SetStringParameter方法的具体用法?C++ Solver::SetStringParameter怎么用?C++ Solver::SetStringParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solver
的用法示例。
在下文中一共展示了Solver::SetStringParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveData
//.........这里部分代码省略.........
CheckVariable(strMultSf.c_str(), objTypes,
"MultiplicativeScaleFactor", expRange, true);
}
if (!canClose)
return;
//-----------------------------------------------------------------
// save values to base, base code should do the range checking
//-----------------------------------------------------------------
#ifdef DEBUG_VARYPANEL_SAVE
MessageInterface::ShowMessage(" solverName=%s, variableName=%s\n",
solverName.c_str(), variableName.c_str());
#endif
Solver *solver = (Solver*)theGuiInterpreter->GetConfiguredObject(solverName);
if (solver == NULL)
throw GmatBaseException("Cannot find the solver: " + solverName);
bool validateCommand = false;
try
{
bool changed = false;
if (solverChanged)
{
#ifdef DEBUG_VARYPANEL_SAVE
MessageInterface::ShowMessage
(" Solver changed, solver=<%p>'%s'\n", solver, solver->GetName().c_str());
#endif
mVaryCommand->SetStringParameter("SolverName", solverName);
mVaryCommand->SetRefObject(solver, Gmat::SOLVER, solverName);
solverChanged = false;
changed = true;
}
if (variableChanged)
{
#ifdef DEBUG_VARYPANEL_SAVE
MessageInterface::ShowMessage
(" Variable changed, variableName='%s'\n", variableName.c_str());
#endif
validateCommand = true;
mVaryCommand->SetStringParameter("Variable", variableName);
solver->SetStringParameter("Variables", variableName);
variableChanged = false;
changed = true;
}
if (mInitialTextCtrl->IsModified())
{
validateCommand = true;
mVaryCommand->SetStringParameter("InitialValue", strInitVal.c_str());
mInitialTextCtrl->DiscardEdits();
changed = true;
}
if (mPertTextCtrl->IsModified())
{
validateCommand = true;
mVaryCommand->SetStringParameter("Perturbation", strPert.c_str());
mPertTextCtrl->DiscardEdits();
changed = true;