GCC Code Coverage Report


Directory: ./
File: unittest/factory/control.hpp
Date: 2025-05-13 10:30:51
Exec Total Coverage
Lines: 0 6 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
1 ///////////////////////////////////////////////////////////////////////////////
2 // BSD 3-Clause License
3 //
4 // Copyright (C) 2021, LAAS-CNRS, University of Edinburgh, University of Trento
5 // Copyright note valid unless otherwise stated in individual files.
6 // All rights reserved.
7 ///////////////////////////////////////////////////////////////////////////////
8
9 #ifndef CROCODDYL_CONTROL_FACTORY_HPP_
10 #define CROCODDYL_CONTROL_FACTORY_HPP_
11
12 #include "crocoddyl/core/control-base.hpp"
13 #include "crocoddyl/core/fwd.hpp"
14
15 namespace crocoddyl {
16 namespace unittest {
17
18 struct ControlTypes {
19 enum Type { PolyZero, PolyOne, PolyTwoRK3, PolyTwoRK4, NbControlTypes };
20 static std::vector<Type> init_all() {
21 std::vector<Type> v;
22 v.reserve(NbControlTypes);
23 for (int i = 0; i < NbControlTypes; ++i) {
24 v.push_back((Type)i);
25 }
26 return v;
27 }
28 static const std::vector<Type> all;
29 };
30
31 std::ostream& operator<<(std::ostream& os, ControlTypes::Type type);
32
33 class ControlFactory {
34 public:
35 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
36
37 explicit ControlFactory();
38 ~ControlFactory();
39
40 std::shared_ptr<crocoddyl::ControlParametrizationModelAbstract> create(
41 ControlTypes::Type control_type, const std::size_t nu) const;
42 };
43
44 } // namespace unittest
45 } // namespace crocoddyl
46
47 #endif // CROCODDYL_CONTROL_FACTORY_HPP_
48