本文整理汇总了C++中GmatBase::SetBooleanParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ GmatBase::SetBooleanParameter方法的具体用法?C++ GmatBase::SetBooleanParameter怎么用?C++ GmatBase::SetBooleanParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GmatBase
的用法示例。
在下文中一共展示了GmatBase::SetBooleanParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveData
//------------------------------------------------------------------------------
// virtual void SaveData()
//------------------------------------------------------------------------------
void GroundTrackPlotPanel::SaveData()
{
#if DEBUG_PANEL_SAVE
MessageInterface::ShowMessage
("GroundTrackPlotPanel::SaveData() entered, mHasCentralBodyChanged=%d, "
" mHasObjectListChanged=%d\n mHasIntegerDataChanged=%d, "
"mHasTextureMapChanged=%d\n", mHasCentralBodyChanged, mHasObjectListChanged,
mHasIntegerDataChanged, mHasTextureMapChanged);
#endif
canClose = true;
std::string str1, str2;
Integer collectFreq = 0, updateFreq = 0, pointsToRedraw = 0;
//-----------------------------------------------------------------
// check values from text field
//-----------------------------------------------------------------
if (mHasIntegerDataChanged)
{
CheckInteger(collectFreq, mDataCollectFreqTextCtrl->GetValue().c_str(),
"DataCollectFrequency", "Integer Number > 0", false, true, true);
CheckInteger(updateFreq, mUpdatePlotFreqTextCtrl->GetValue().c_str(),
"UpdatePlotFrequency", "Integer Number > 0", false, true, true);
CheckInteger(pointsToRedraw, mNumPointsToRedrawTextCtrl->GetValue().c_str(),
"NumPointsToRedraw", "Integer Number >= 0", false, true, true, true);
}
if (!canClose)
return;
//-----------------------------------------------------------------
// save values to base, base code should do the range checking
//-----------------------------------------------------------------
GmatBase *clonedObj = mGroundTrackPlot->Clone();
try
{
if (mHasCentralBodyChanged)
{
std::string newCentralBody = mCentralBodyComboBox->GetValue().WX_TO_STD_STRING;
std::string newTexture = mTextureMapTextCtrl->GetValue().WX_TO_STD_STRING;
clonedObj->SetStringParameter("CentralBody", newCentralBody);
mHasCentralBodyChanged = false;
// Set mHasTextureMapChanged to true so that it can be validated below (LOJ: 2014.11.03)
mHasTextureMapChanged = true;
}
if (mHasObjectListChanged)
{
#if DEBUG_PANEL_SAVE
MessageInterface::ShowMessage(" Saving object list\n");
#endif
clonedObj->TakeAction("Clear");
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");
//.........这里部分代码省略.........