本文整理汇总了C++中Solver::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Solver::GetName方法的具体用法?C++ Solver::GetName怎么用?C++ Solver::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solver
的用法示例。
在下文中一共展示了Solver::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveData
//------------------------------------------------------------------------------
// void SaveData()
//------------------------------------------------------------------------------
void VaryPanel::SaveData()
{
#ifdef DEBUG_VARYPANEL_SAVE
MessageInterface::ShowMessage("VaryPanel::SaveData() entered\n");
#endif
canClose = true;
std::string strInitVal, strPert, strLower, strUpper, strMaxStep;
std::string strAddSf, strMultSf;
//-----------------------------------------------------------------
// check input values: Number, Variable, Array element, Parameter
//-----------------------------------------------------------------
std::string expRange = "Real Number, Variable, Array element, Plottable Parameter";
ObjectTypeArray objTypes;
objTypes.push_back(Gmat::UNKNOWN_OBJECT);
// Any plottable Parameters allowed, so use UNKNOWN_OBJECT
if (mInitialTextCtrl->IsModified())
{
strInitVal = mInitialTextCtrl->GetValue().c_str();
CheckVariable(strInitVal, objTypes,
"InitialValue", expRange, true);
}
if (mPertTextCtrl->IsModified())
{
strPert = mPertTextCtrl->GetValue().c_str();
CheckVariable(strPert, objTypes,
"Perturbation", expRange, true);
}
if (mLowerValueTextCtrl->IsModified())
{
strLower = mLowerValueTextCtrl->GetValue().c_str();
CheckVariable(strLower, objTypes,
"Lower", expRange, true);
}
if (mUpperValueTextCtrl->IsModified())
{
strUpper = mUpperValueTextCtrl->GetValue().c_str();
CheckVariable(strUpper.c_str(), objTypes,
"Upper", expRange, true);
}
if (mMaxStepTextCtrl->IsModified())
{
strMaxStep = mMaxStepTextCtrl->GetValue().c_str();
CheckVariable(strMaxStep.c_str(), objTypes,
"MaxStep", expRange, true);
}
if (mAdditiveTextCtrl->IsModified())
{
strAddSf = mAdditiveTextCtrl->GetValue().c_str();
CheckVariable(strAddSf.c_str(), objTypes,
"AdditiveScaleFactor", expRange, true);
}
if (mMultiplicativeTextCtrl->IsModified())
{
strMultSf = mMultiplicativeTextCtrl->GetValue().c_str();
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
//.........这里部分代码省略.........