5 #ifndef __pinocchio_multibody_visitior_joint_unary_visitor_hpp__ 6 #define __pinocchio_multibody_visitior_joint_unary_visitor_hpp__ 8 #include <boost/variant.hpp> 10 #include "pinocchio/multibody/joint/joint-base.hpp" 11 #include "pinocchio/multibody/visitor/fusion.hpp" 19 typedef boost::blank NoArg;
26 template<
typename Jo
intVisitorDerived,
typename ReturnType =
void>
30 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl,
typename ArgsTmp>
35 InternalVisitorModelAndData<JointModelTpl<Scalar,Options,JointCollectionTpl>,ArgsTmp> visitor(jdata,args);
36 return boost::apply_visitor(visitor,jmodel);
39 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
43 InternalVisitorModelAndData<JointModelTpl<Scalar,Options,JointCollectionTpl>,NoArg> visitor(jdata);
44 return boost::apply_visitor(visitor,jmodel);
47 template<
typename Jo
intModelDerived,
typename ArgsTmp>
52 InternalVisitorModelAndData<JointModelDerived,ArgsTmp> visitor(jdata,args);
53 return visitor(jmodel.derived());
56 template<
typename Jo
intModelDerived>
60 InternalVisitorModelAndData<JointModelDerived,NoArg> visitor(jdata);
61 return visitor(jmodel.derived());
64 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl,
typename ArgsTmp>
68 InternalVisitorModel<ArgsTmp> visitor(args);
69 return boost::apply_visitor(visitor,jmodel);
72 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
75 InternalVisitorModel<NoArg> visitor;
76 return boost::apply_visitor(visitor,jmodel);
79 template<
typename Jo
intModelDerived,
typename ArgsTmp>
83 InternalVisitorModel<ArgsTmp> visitor(args);
84 return visitor(jmodel.derived());
87 template<
typename Jo
intModelDerived>
90 InternalVisitorModel<NoArg> visitor;
91 return visitor(jmodel.derived());
96 template<
typename Jo
intModel,
typename ArgType>
97 struct InternalVisitorModelAndData
98 :
public boost::static_visitor<ReturnType>
100 typedef typename JointModel::JointDataDerived
JointData;
102 InternalVisitorModelAndData(JointData & jdata, ArgType args)
103 : jdata(jdata), args(args)
106 template<
typename Jo
intModelDerived>
109 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
110 bf::append(boost::ref(jmodel.derived()),
121 template<
typename Jo
intModel>
122 struct InternalVisitorModelAndData<JointModel,NoArg>
123 :
public boost::static_visitor<ReturnType>
125 typedef typename JointModel::JointDataDerived
JointData;
127 InternalVisitorModelAndData(JointData & jdata)
131 template<
typename Jo
intModelDerived>
134 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
135 bf::make_vector(boost::ref(jmodel.derived()),
142 template<
typename ArgType,
typename Dummy =
void>
143 struct InternalVisitorModel
144 :
public boost::static_visitor<ReturnType>
146 InternalVisitorModel(ArgType args)
150 template<
typename Jo
intModelDerived>
153 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
154 bf::append(boost::ref(jmodel.derived()),
163 template<
typename Dummy>
164 struct InternalVisitorModel<NoArg,Dummy>
165 :
public boost::static_visitor<ReturnType>
167 InternalVisitorModel() {}
169 template<
typename Jo
intModelDerived>
172 return JointVisitorDerived::template algo<JointModelDerived>(jmodel.derived());
180 template<
typename Jo
intVisitorDerived,
typename ReturnType =
void>
191 #endif // ifndef __pinocchio_multibody_visitior_joint_unary_visitor_hpp__
Base structure for Unary visitation of a JointModel. This structure provides runners to call the righ...
This helper structure is now deprecated and has been replaced by JointUnaryVisitorBase.
Main pinocchio namespace.