GCC Code Coverage Report


Directory: ./
File: include/pinocchio/algorithm/check-base.hpp
Date: 2025-04-30 16:14:33
Exec Total Coverage
Lines: 4 4 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 //
2 // Copyright (c) 2025 INRIA
3 //
4
5 #ifndef __pinocchio_algorithm_check_base_hpp__
6 #define __pinocchio_algorithm_check_base_hpp__
7
8 #include "pinocchio/multibody/fwd.hpp"
9
10 namespace pinocchio
11 {
12
13 /// CRTP class describing the API of the checkers
14 template<typename AlgorithmCheckerDerived>
15 struct AlgorithmCheckerBase
16 {
17 AlgorithmCheckerDerived & derived()
18 {
19 return *static_cast<AlgorithmCheckerDerived *>(this);
20 }
21
22 11017 const AlgorithmCheckerDerived & derived() const
23 {
24 11017 return *static_cast<const AlgorithmCheckerDerived *>(this);
25 }
26
27 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
28 11004 bool checkModel(const ModelTpl<Scalar, Options, JointCollectionTpl> & model) const
29 {
30 11004 return derived().checkModel_impl(model);
31 }
32 };
33
34 } // namespace pinocchio
35
36 #endif // __pinocchio_algorithm_check_base_hpp__
37