FOUND Coverage Report


src/
File: providers/factory.hpp
Date: 2025-11-20 21:57:26
Lines:
18/18
100.0%
Functions:
2/2
100.0%
Branches:
10/10
100.0%

Line Branch Exec Source
1 #ifndef SRC_PROVIDERS_FACTORY_HPP_
2 #define SRC_PROVIDERS_FACTORY_HPP_
3
4 #include <memory>
5 #include <utility>
6 #include <optional>
7
8 #include "command-line/execution/executors.hpp"
9 #include "providers/stage-providers.hpp"
10 #include "distance/edge-filters.hpp"
11
12 namespace found {
13
14 /**
15 * Creates a CalibrationPipelineExecutor
16 *
17 * @param options The options to create the pipeline executor from
18 *
19 * @return A pointer to a CalibrationPipelineExecutor
20 */
21 4 inline std::unique_ptr<CalibrationPipelineExecutor> CreateCalibrationPipelineExecutor(CalibrationOptions &&options) {
22 return std::make_unique<CalibrationPipelineExecutor>(std::forward<CalibrationOptions>(options),
23
2/2
✓ Branch 3 taken 4 times.
✓ Branch 7 taken 4 times.
8 ProvideCalibrationAlgorithm(std::forward<CalibrationOptions>(options)));
24 }
25
26 /**
27 * Creates a DistancePipelineExecutor
28 *
29 * @param options The options to create the pipeline executor from
30 *
31 * @return A pointer to a DistancePipelineExecutor
32 */
33 9 inline std::unique_ptr<DistancePipelineExecutor> CreateDistancePipelineExecutor(DistanceOptions &&options) {
34
1/1
✓ Branch 2 taken 9 times.
9 std::unique_ptr<EdgeDetectionAlgorithm> edgeAlg = ProvideEdgeDetectionAlgorithm(options);
35
1/1
✓ Branch 2 taken 9 times.
9 std::unique_ptr<EdgeFilteringAlgorithms> filtersOpt = ProvideEdgeFilteringAlgorithm(options);
36
1/1
✓ Branch 2 taken 8 times.
9 std::unique_ptr<DistanceDeterminationAlgorithm> distAlg = ProvideDistanceDeterminationAlgorithm(options);
37
1/1
✓ Branch 2 taken 8 times.
8 std::unique_ptr<VectorGenerationAlgorithm> vecAlg = ProvideVectorGenerationAlgorithm(options);
38
39
2/2
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 7 times.
8 if (filtersOpt) {
40 1 return std::make_unique<DistancePipelineExecutor>(std::move(options),
41 1 std::move(edgeAlg),
42 1 std::move(filtersOpt),
43 1 std::move(distAlg),
44
1/1
✓ Branch 2 taken 1 times.
2 std::move(vecAlg));
45 } else {
46 7 return std::make_unique<DistancePipelineExecutor>(std::move(options),
47 7 std::move(edgeAlg),
48 7 std::move(distAlg),
49
1/1
✓ Branch 2 taken 7 times.
14 std::move(vecAlg));
50 }
51 10 }
52
53 // TODO: Uncomment when orbit stage is implemented
54 /**
55 * Creates an OrbitPipelineExecutor
56 *
57 * @param options The options to create the pipeline executor from
58 *
59 * @return A OrbitPipelineExecutor
60 */
61 // inline std::unique_ptr<OrbitPipelineExecutor> CreateOrbitPipelineExecutor(OrbitOptions &&options) {
62 // return std::make_unique<OrbitPipelineExecutor>(std::forward<OrbitOptions>(options),
63 // ProvideOrbitPropagationAlgorithm(std::forward<OrbitOptions>(options)));
64 // }
65
66 } // namespace found
67
68 #endif // SRC_PROVIDERS_FACTORY_HPP_
69