当前位置: 首页>>代码示例>>C++>>正文


C++ Subscriber::GetTypeName方法代码示例

本文整理汇总了C++中Subscriber::GetTypeName方法的典型用法代码示例。如果您正苦于以下问题:C++ Subscriber::GetTypeName方法的具体用法?C++ Subscriber::GetTypeName怎么用?C++ Subscriber::GetTypeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Subscriber的用法示例。


在下文中一共展示了Subscriber::GetTypeName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UpdateOutput

//------------------------------------------------------------------------------
void OutputTree::UpdateOutput(bool resetTree, bool removeReports, bool removePlots)
{
   #if DEBUG_OUTPUT_TREE
   MessageInterface::ShowMessage
      ("OutputTree::UpdateOutput() resetTree=%d, removeReports=%d, removePlots=%d\n",
       resetTree, removeReports, removePlots);
   #endif
   
   // Collapse all reports. Consider ephemeris file as a report
   if (removeReports)
   {
      Collapse(mReportItem);
      Collapse(mEphemFileItem);
      if (GmatGlobal::Instance()->IsEventLocationAvailable())
         Collapse(mEventsItem);
   }
   
   // Remove all plots
   if (removePlots)
   {
      Collapse(mOrbitViewItem);
      Collapse(mGroundTrackItem);
      Collapse(mXyPlotItem);
   }
   
   // Delete all reports. Consider ephemeris file as a report
   if (removeReports)
   {
      DeleteChildren(mReportItem);
      DeleteChildren(mEphemFileItem);
      if (GmatGlobal::Instance()->IsEventLocationAvailable())
         DeleteChildren(mEventsItem);
   }
   
   // Delete all plots
   if (removePlots)
   {
      DeleteChildren(mOrbitViewItem);
      DeleteChildren(mGroundTrackItem);
      DeleteChildren(mXyPlotItem);
   }
   
   if (resetTree)    // do not load subscribers
      return;
   
   // get list of report files, ephemeris files, opengl plots, and xy plots
   StringArray listOfSubs = theGuiInterpreter->GetListOfObjects(Gmat::SUBSCRIBER);
   
   // put each subscriber in the proper folder
   for (unsigned int i=0; i<listOfSubs.size(); i++)
   {
      Subscriber *sub =
         (Subscriber*)theGuiInterpreter->GetConfiguredObject(listOfSubs[i]);
      
      wxString objName = wxString(listOfSubs[i].c_str());
      wxString objTypeName = wxString(sub->GetTypeName().c_str());
      objTypeName = objTypeName.Trim();
      
      if (objTypeName == "ReportFile")
      {
         AppendItem(mReportItem, objName, GmatTree::OUTPUT_ICON_REPORT_FILE, -1,
                    new GmatTreeItemData(objName, GmatTree::OUTPUT_REPORT));
      }
      // Removed checking for write ephemeris flag sice ephemeris file can be
      // toggled on after it is intially toggled off (LOJ: 2013.03.20)
      else if (objTypeName == "EphemerisFile")
         //&& sub->GetBooleanParameter("WriteEphemeris"))
      {
         if (sub->GetStringParameter("FileFormat") == "CCSDS-OEM")
         {
            AppendItem(mEphemFileItem, objName, GmatTree::OUTPUT_ICON_CCSDS_OEM_FILE, -1,
                       new GmatTreeItemData(objName, GmatTree::OUTPUT_CCSDS_OEM_FILE));
         }
      }
      else if (objTypeName == "OrbitView" &&
               sub->GetBooleanParameter("ShowPlot"))
      {
         AppendItem(mOrbitViewItem, objName, GmatTree::OUTPUT_ICON_ORBIT_VIEW, -1,
                    new GmatTreeItemData(objName, GmatTree::OUTPUT_ORBIT_VIEW));
      }
      else if (objTypeName == "GroundTrackPlot" &&
               sub->GetBooleanParameter("ShowPlot"))
      {
         AppendItem(mGroundTrackItem, objName, GmatTree::OUTPUT_ICON_GROUND_TRACK_PLOT, -1,
                    new GmatTreeItemData(objName, GmatTree::OUTPUT_GROUND_TRACK_PLOT));
      }
      else if (objTypeName == "XYPlot" &&
               sub->GetBooleanParameter("ShowPlot"))
      {
         AppendItem(mXyPlotItem, objName, GmatTree::OUTPUT_ICON_XY_PLOT, -1,
                    new GmatTreeItemData(objName, GmatTree::OUTPUT_XY_PLOT));
      }
   }

   // get list of Event Locators
   if (GmatGlobal::Instance()->IsEventLocationAvailable())
   {
      StringArray listOfEls = theGuiInterpreter->GetListOfObjects(Gmat::EVENT_LOCATOR);
      for (UnsignedInt i = 0; i < listOfEls.size(); ++i)
//.........这里部分代码省略.........
开发者ID:rockstorm101,项目名称:GMAT,代码行数:101,代码来源:OutputTree.cpp


注:本文中的Subscriber::GetTypeName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。