22#include " ECFMP/SdkEvents.h"
33#include " ECFMP/flightinformationregion/FlightInformationRegion.h"
44#include " ECFMP/flowmeasure/FlowMeasure.h"
5+ #include " ECFMP/flowmeasure/FlowMeasureFilters.h"
56#include " ECFMP/log/Logger.h"
67#include " FlowMeasureFilterParser.h"
78#include " FlowMeasureMeasureParser.h"
@@ -16,15 +17,17 @@ namespace ECFMP::Api {
1617 FlowMeasureDataParser::FlowMeasureDataParser (
1718 std::unique_ptr<FlowMeasureFilterParserInterface> filterParser,
1819 std::unique_ptr<FlowMeasureMeasureParserInterface> measureParser, std::shared_ptr<Log::Logger> logger,
19- std::shared_ptr<EventBus::InternalEventBus> eventBus
20+ std::shared_ptr<EventBus::InternalEventBus> eventBus,
21+ std::shared_ptr<std::vector<std::shared_ptr<ECFMP::FlowMeasure::CustomFlowMeasureFilter>>> customFilters
2022 )
2123 : filterParser(std::move(filterParser)), measureParser(std::move(measureParser)), logger(std::move(logger)),
22- eventBus (std::move(eventBus))
24+ eventBus (std::move(eventBus)), customFilters(std::move(customFilters))
2325 {
2426 assert (this ->filterParser != nullptr && " FlowMeasureDataParser::FlowMeasureDataParser: filterParser is null" );
2527 assert (this ->measureParser != nullptr && " FlowMeasureDataParser::FlowMeasureDataParser: measureParser is null" );
2628 assert (this ->logger != nullptr && " FlowMeasureDataParser::FlowMeasureDataParser: logger is null" );
2729 assert (this ->eventBus != nullptr && " FlowMeasureDataParser::FlowMeasureDataParser: eventBus is null" );
30+ assert (this ->customFilters != nullptr && " FlowMeasureDataParser::FlowMeasureDataParser: customFilters is null" );
2831 }
2932
3033 auto FlowMeasureDataParser::ParseFlowMeasures (
@@ -89,7 +92,7 @@ namespace ECFMP::Api {
8992 auto flowMeasure = std::make_shared<FlowMeasure::ConcreteFlowMeasure>(
9093 flowMeasureData.at (" id" ).get <int >(), event, flowMeasureData.at (" ident" ).get <std::string>(),
9194 flowMeasureData.at (" reason" ).get <std::string>(), startTime, endTime, withdrawnAt, measureStatus,
92- std::move (notifiedFirs), std::move (measure), std::move (filters)
95+ std::move (notifiedFirs), std::move (measure), std::move (filters), customFilters
9396 );
9497 flowMeasures->Add (flowMeasure);
9598 }
0 commit comments