本文整理汇总了C++中GmatBase::IsParameterValid方法的典型用法代码示例。如果您正苦于以下问题:C++ GmatBase::IsParameterValid方法的具体用法?C++ GmatBase::IsParameterValid怎么用?C++ GmatBase::IsParameterValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GmatBase
的用法示例。
在下文中一共展示了GmatBase::IsParameterValid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveData
//.........这里部分代码省略.........
int count = mObjectCheckListBox->GetCount();
for (int i = 0; i < count; i++)
{
if (mObjectCheckListBox->IsChecked(i))
{
std::string objName = mObjectCheckListBox->GetString(i).WX_TO_STD_STRING;
#ifdef DEBUG_PANEL_SAVE
MessageInterface::ShowMessage(" objName = '%s'\n", objName.c_str());
#endif
clonedObj->SetStringParameter("Add", objName);
}
}
mHasObjectListChanged = false;
}
if (mHasIntegerDataChanged)
{
#if DEBUG_PANEL_SAVE
MessageInterface::ShowMessage(" Saving Integer data\n");
#endif
clonedObj->SetIntegerParameter("DataCollectFrequency", collectFreq);
clonedObj->SetIntegerParameter("UpdatePlotFrequency", updateFreq);
clonedObj->SetIntegerParameter("NumPointsToRedraw", pointsToRedraw);
mHasIntegerDataChanged = false;
}
if (mHasDataOptionChanged)
{
#if DEBUG_PANEL_SAVE
MessageInterface::ShowMessage(" Saving drawing options\n");
#endif
clonedObj->SetBooleanParameter("ShowPlot", mShowPlotCheckBox->GetValue());
clonedObj->SetStringParameter("SolverIterations",
mSolverIterComboBox->GetValue().c_str());
mHasDataOptionChanged = false;
}
// Save texture map
if (mHasTextureMapChanged)
{
#if DEBUG_PANEL_SAVE
MessageInterface::ShowMessage(" Saving new texture map\n");
#endif
// Validate texture map file (LOJ: 2014.10.30)
wxString wxTextureMap = mTextureMapTextCtrl->GetValue();
std::string textureMap = wxTextureMap.WX_TO_STD_STRING;
if (clonedObj->IsParameterValid("TextureMap", textureMap))
{
clonedObj->SetStringParameter("TextureMap", textureMap);
// If texture map file is blank, display default one
if (wxTextureMap == "")
mTextureMapTextCtrl->SetValue(STD_TO_WX_STRING(clonedObj->GetStringParameter("TextureMap").c_str()));
mHasTextureMapChanged = false;
}
else
{
// Recheck central body
mHasCentralBodyChanged = true;
canClose = false;
MessageInterface::PopupMessage(Gmat::ERROR_, clonedObj->GetLastErrorMessage());
}
}
#ifdef __USE_COLOR_FROM_SUBSCRIBER__
// Save orbit colors
if (mHasOrbitColorChanged)
{
SaveObjectColors("Orbit", mOrbitColorMap);
mHasOrbitColorChanged = false;
}
// Save target colors
if (mHasTargetColorChanged)
{
SaveObjectColors("Target", mTargetColorMap);
mHasTargetColorChanged = false;
}
#endif
// Copy new values to original object (LOJ: 2014.10.30)
if (canClose)
{
mGroundTrackPlot->Copy(clonedObj);
mCentralBody = mCentralBodyComboBox->GetValue().c_str();
mTextureFile = mTextureMapTextCtrl->GetValue().c_str();
EnableUpdate(false);
}
}
catch (BaseException &e)
{
canClose = false;
MessageInterface::PopupMessage(Gmat::ERROR_, e.GetFullMessage().c_str());
}
delete clonedObj;
#if DEBUG_PANEL_SAVE
MessageInterface::ShowMessage("GroundTrackPlotPanel::SaveData() exiting.\n");
#endif
}