コード例 #1
0
ファイル: Builder.cpp プロジェクト: rkohel/XCSoar
void
MapItemListBuilder::AddVisibleAirspace(
    const Airspaces &airspaces,
    const ProtectedAirspaceWarningManager *warning_manager,
    const AirspaceComputerSettings &computer_settings,
    const AirspaceRendererSettings &renderer_settings,
    const MoreData &basic, const DerivedInfo &calculated)
{
  AirspaceWarningList warnings;
  if (warning_manager != nullptr)
    warnings.Fill(*warning_manager);

  const AircraftState aircraft = ToAircraftState(basic, calculated);
  AirspaceAtPointPredicate predicate(computer_settings, renderer_settings,
                                     aircraft,
                                     warnings, location);

  for (const auto &i : airspaces.QueryWithinRange(location, 100)) {
    if (list.full())
      break;

    const AbstractAirspace &airspace = i.GetAirspace();
    if (predicate(airspace))
      list.append(new AirspaceMapItem(airspace));
  }
}
コード例 #2
0
void
MapItemListBuilder::AddVisibleAirspace(
    const Airspaces &airspaces,
    const ProtectedAirspaceWarningManager *warning_manager,
    const AirspaceComputerSettings &computer_settings,
    const AirspaceRendererSettings &renderer_settings,
    const MoreData &basic, const DerivedInfo &calculated)
{
  AirspaceWarningList warnings;
  if (warning_manager != NULL)
    warnings.Fill(*warning_manager);

  AirspaceAtPointPredicate predicate(computer_settings, renderer_settings,
                                     ToAircraftState(basic, calculated),
                                     warnings, location);

  AirspaceListBuilderVisitor builder(list);
  airspaces.visit_within_range(location, fixed(100.0), builder, predicate);
}
コード例 #3
0
 gcc_pure
 const_iterator end() const {
   return warnings.end();
 }
コード例 #4
0
 gcc_pure
 const_iterator begin() const {
   return warnings.begin();
 }
コード例 #5
0
 /**
  * Return size of warning list
  *
  * @return Number of items in warning list
  */
 AirspaceWarningList::size_type size() const {
   return warnings.size();
 }
コード例 #6
0
 /**
  * Clear all warnings
  */
 void clear() {
   ++serial;
   warnings.clear();
 }
コード例 #7
0
 /**
  * Test whether warning list is empty
  *
  * @return True if no warnings in list
  */
 gcc_pure
 bool empty() const {
   return warnings.empty();
 }
コード例 #8
0
 /**
  * Return size of warning list
  *
  * @return Number of items in warning list
  */
 size_t size() const {
   return warnings.size();
 }
コード例 #9
0
 /**
  * Clear all warnings
  */
 void clear() {
   warnings.clear();
 }
コード例 #10
0
/** 
 * Clear all warnings
 */
  void clear() {
    m_warnings.clear();
  }