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)); } }
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); }
gcc_pure const_iterator end() const { return warnings.end(); }
gcc_pure const_iterator begin() const { return warnings.begin(); }
/** * Return size of warning list * * @return Number of items in warning list */ AirspaceWarningList::size_type size() const { return warnings.size(); }
/** * Clear all warnings */ void clear() { ++serial; warnings.clear(); }
/** * Test whether warning list is empty * * @return True if no warnings in list */ gcc_pure bool empty() const { return warnings.empty(); }
/** * Return size of warning list * * @return Number of items in warning list */ size_t size() const { return warnings.size(); }
/** * Clear all warnings */ void clear() { warnings.clear(); }
/** * Clear all warnings */ void clear() { m_warnings.clear(); }