Skip to content

Commit e48ef5e

Browse files
committed
Merge branch 'main' of github.com:ECFMP/plugin
2 parents e0245d5 + 63061fa commit e48ef5e

41 files changed

Lines changed: 473 additions & 11 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ and
2121
then create an instance of it.
2222

2323
```c++
24-
#include "ECFMP/SDKFactory.h"
25-
#include "ECFMP/SDK.h"
24+
#include "ECFMP.h"
2625

2726
auto http = std::make_shared<MyHttpClient>();
2827
auto logger = std::make_shared<MyLogger>();
@@ -59,7 +58,8 @@ ecfmp.EventBus().Subscribe<ECFMP::Plugin::FlowMeasureActivatedEvent>(eventListen
5958
You can test your integration by making use of the mocks provided by the SDK. These mocks will allow you to simulate
6059
events that would be sent by the ECFMP SDK.
6160

62-
You can find the mocks in `include/mock`.
61+
You can find the mocks in `include/mock`, just be sure to include the main include `ECFMP.h` as well as the mocks
62+
header `ecfmp-sdk-mock.h`.
6363

6464
## Known Limitations
6565

include/ECFMP/flowmeasure/AirportFilter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,10 @@ namespace ECFMP::FlowMeasure {
3030
* Returns the type of airport filter
3131
*/
3232
[[nodiscard]] virtual auto Type() const noexcept -> AirportFilterType = 0;
33+
34+
/**
35+
* Returns a string representation of the filter.
36+
*/
37+
[[nodiscard]] virtual auto FilterDescription() const noexcept -> std::string = 0;
3338
};
3439
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/EventFilter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,10 @@ namespace ECFMP::FlowMeasure {
4343
* Returns true if the event participation is "Participating in"
4444
*/
4545
[[nodiscard]] virtual auto IsParticipating() const noexcept -> bool = 0;
46+
47+
/**
48+
* Returns a description of the filter.
49+
*/
50+
[[nodiscard]] virtual auto FilterDescription() const noexcept -> std::string = 0;
4651
};
4752
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/FlowMeasureFilters.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,10 @@ namespace ECFMP::FlowMeasure {
7171
[[nodiscard]] virtual auto
7272
FirstRangeToDestinationFilter(const std::function<bool(const RangeToDestinationFilter&)>& callback
7373
) const noexcept -> std::shared_ptr<RangeToDestinationFilter> = 0;
74+
75+
/**
76+
* Convenience method to return string description of the filters.
77+
*/
78+
[[nodiscard]] virtual auto FilterDescriptions() const noexcept -> std::vector<std::string> = 0;
7479
};
7580
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/LevelRangeFilter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,10 @@ namespace ECFMP::FlowMeasure {
4141
* Helper method to determine, given a particular altitude (e.g. 35000), does this filter apply.
4242
*/
4343
[[nodiscard]] virtual auto ApplicableToAltitude(int level) const noexcept -> bool = 0;
44+
45+
/**
46+
* Description of the filter.
47+
*/
48+
[[nodiscard]] virtual auto FilterDescription() const noexcept -> std::string = 0;
4449
};
4550
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/Measure.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,10 @@ namespace ECFMP::FlowMeasure {
7373
* Throws an IllegalFlowMeasureValueException exception otherwise.
7474
*/
7575
[[nodiscard]] virtual auto SetValue() const -> const std::set<std::string>& = 0;
76+
77+
/**
78+
* Returns a string representation of the measure.
79+
*/
80+
[[nodiscard]] virtual auto MeasureDescription() const noexcept -> std::string = 0;
7681
};
7782
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/MultipleLevelFilter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@ namespace ECFMP::FlowMeasure {
2929
* Helper method to determine, given a particular altitude (e.g. 35000), does this filter apply.
3030
*/
3131
[[nodiscard]] virtual auto ApplicableToAltitude(int level) const noexcept -> bool = 0;
32+
33+
/**
34+
* Description of the filter
35+
*/
36+
[[nodiscard]] virtual auto FilterDescription() const noexcept -> std::string = 0;
3237
};
3338
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/RangeToDestinationFilter.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ namespace ECFMP::FlowMeasure {
88
class RangeToDestinationFilter : public ChecksAircraftApplicability
99
{
1010
public:
11-
virtual ~RangeToDestinationFilter() = default;
11+
~RangeToDestinationFilter() override = default;
1212

1313
/**
1414
* Returns the range to destination.
1515
*/
1616
[[nodiscard]] virtual auto Range() const noexcept -> int = 0;
17+
18+
/**
19+
* Description of the filter
20+
*/
21+
[[nodiscard]] virtual auto FilterDescription() const noexcept -> std::string = 0;
1722
};
1823
}// namespace ECFMP::FlowMeasure

include/ECFMP/flowmeasure/RouteFilter.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ namespace ECFMP::FlowMeasure {
99
{
1010
public:
1111
virtual ~RouteFilter() = default;
12+
13+
/**
14+
* Returns the set of route strings that this filter pertains to.
15+
* @return
16+
*/
1217
[[nodiscard]] virtual auto RouteStrings() const noexcept -> const std::set<std::string>& = 0;
18+
19+
/**
20+
* Description of the filter.
21+
*/
22+
[[nodiscard]] virtual auto FilterDescription() const noexcept -> std::string = 0;
1323
};
1424
}// namespace ECFMP::FlowMeasure

include/mock/AirportFilterMock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ namespace ECFMP::Mock::FlowMeasure {
1111
MOCK_METHOD(ECFMP::FlowMeasure::AirportFilterType, Type, (), (const, noexcept, override));
1212
MOCK_METHOD(bool, ApplicableToAirport, (const std::string&), (const, noexcept, override));
1313
MOCK_METHOD(bool, ApplicableToAircraft, (const Euroscope::EuroscopeAircraft&), (const, noexcept, override));
14+
MOCK_METHOD(std::string, FilterDescription, (), (const, noexcept, override));
1415
};
1516

1617
}// namespace ECFMP::Mock::FlowMeasure

0 commit comments

Comments
 (0)