Go to the documentation of this file.
5 #ifndef __pinocchio_check_hpp__
6 #define __pinocchio_check_hpp__
10 #include <boost/fusion/container/list.hpp>
11 #include <boost/fusion/container/generation/make_list.hpp>
13 #ifndef PINOCCHIO_ALGO_CHECKER_LIST_MAX_LIST_SIZE
14 #define PINOCCHIO_ALGO_CHECKER_LIST_MAX_LIST_SIZE 5
21 template<
typename AlgorithmCheckerDerived>
25 {
return *
static_cast< AlgorithmCheckerDerived*
>(
this); }
27 inline const AlgorithmCheckerDerived&
derived()
const
28 {
return *
static_cast<const AlgorithmCheckerDerived*
>(
this); }
30 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
35 #define PINOCCHIO_DEFINE_ALGO_CHECKER(NAME) \
36 struct NAME##Checker : public AlgorithmCheckerBase<NAME##Checker> \
38 template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl> \
39 inline bool checkModel_impl(const ModelTpl<Scalar,Options,JointCollectionTpl> &) const; \
45 #if !defined(BOOST_FUSION_HAS_VARIADIC_LIST)
46 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(PINOCCHIO_ALGO_CHECKER_LIST_MAX_LIST_SIZE,
class D,boost::fusion::
void_)>
57 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
63 #define MAKE_ALGO_CHECKER_LIST(z,n,_) \
65 template<BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n),class D)> \
66 AlgorithmCheckerList<BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n),D)> makeAlgoCheckerList(BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_INC(n) , D, const & arg)) \
67 { return AlgorithmCheckerList<BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n),D)>(boost::fusion::make_list(BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n),arg))); } \
72 struct AlgorithmCheckerList: AlgorithmCheckerBase< AlgorithmCheckerList<D...> >
74 typedef typename boost::fusion::list<
D...>
ArgType;
81 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
88 AlgorithmCheckerList<
T...> makeAlgoCheckerList(
const T&... args)
90 return AlgorithmCheckerList<
T...>(boost::fusion::make_list(
args...));
101 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
102 inline bool checkData(
const ModelTpl<Scalar,Options,JointCollectionTpl> &
model,
103 const DataTpl<Scalar,Options,JointCollectionTpl> &
data);
109 #include "pinocchio/algorithm/check.hxx"
111 #endif // ifndef __pinocchio_check_hpp__
boost::fusion::list< BOOST_PP_ENUM_PARAMS(PINOCCHIO_ALGO_CHECKER_LIST_MAX_LIST_SIZE, D)> ArgType
CRTP class describing the API of the checkers.
bool checkModel(const ModelTpl< Scalar, Options, JointCollectionTpl > &model) const
#define MAKE_ALGO_CHECKER_LIST(z, n, _)
#define PINOCCHIO_ALGO_CHECKER_LIST_MAX_LIST_SIZE
AlgorithmCheckerDerived & derived()
BOOST_PP_REPEAT(DOXYGEN_DOC_MAX_NUMBER_OF_ARGUMENTS_IN_CONSTRUCTOR, DOXYGEN_DOC_DECLARE_CONSTRUCTOR, ~) template< typename Class > struct destructor_doc_impl
AlgorithmCheckerList(const ArgType &checkerList)
Checker having a list of Checker as input argument.
PINOCCHIO_DEFINE_ALGO_CHECKER(ABA)
bool checkData(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data)
bool checkModel_impl(const ModelTpl< Scalar, Options, JointCollectionTpl > &model) const
const AlgorithmCheckerDerived & derived() const
const ArgType & checkerList
JointCollectionTpl & model
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Tue Feb 13 2024 03:43:57