5 #ifndef __pinocchio_multibody_visitor_joint_unary_visitor_hpp__
6 #define __pinocchio_multibody_visitor_joint_unary_visitor_hpp__
8 #include <boost/variant/apply_visitor.hpp>
9 #include <boost/variant/get.hpp>
24 template<
typename Jo
intVisitorDerived,
typename ReturnType =
void>
31 template<
typename,
int>
class JointCollectionTpl,
33 static ReturnType
run(
38 InternalVisitorModelAndData<JointModelTpl<Scalar, Options, JointCollectionTpl>, ArgsTmp>
40 return boost::apply_visitor(visitor, jmodel);
43 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
44 static ReturnType
run(
48 InternalVisitorModelAndData<JointModelTpl<Scalar, Options, JointCollectionTpl>,
NoArg>
50 return boost::apply_visitor(visitor, jmodel);
53 template<
typename Jo
intModelDerived,
typename ArgsTmp>
54 static ReturnType
run(
59 InternalVisitorModelAndData<JointModelDerived, ArgsTmp> visitor(jdata,
args);
60 return visitor(jmodel.
derived());
63 template<
typename Jo
intModelDerived>
64 static ReturnType
run(
68 InternalVisitorModelAndData<JointModelDerived, NoArg> visitor(jdata);
69 return visitor(jmodel.
derived());
75 template<
typename,
int>
class JointCollectionTpl,
80 InternalVisitorModel<ArgsTmp> visitor(
args);
81 return boost::apply_visitor(visitor, jmodel);
87 template<
typename,
int>
class JointCollectionTpl,
92 InternalVisitorModel<ArgsTmp> visitor(
args);
93 return boost::apply_visitor(visitor, jdata);
96 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
99 InternalVisitorModel<NoArg> visitor;
100 return boost::apply_visitor(visitor, jmodel);
103 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
106 InternalVisitorModel<NoArg> visitor;
107 return boost::apply_visitor(visitor, jdata);
110 template<
typename Jo
intModelDerived,
typename ArgsTmp>
113 InternalVisitorModel<ArgsTmp> visitor(
args);
114 return visitor(jmodel.
derived());
117 template<
typename Jo
intDataDerived,
typename ArgsTmp>
120 InternalVisitorModel<ArgsTmp> visitor(
args);
121 return visitor(jdata.
derived());
124 template<
typename Jo
intModelDerived>
127 InternalVisitorModel<NoArg> visitor;
128 return visitor(jmodel.
derived());
131 template<
typename Jo
intDataDerived>
134 InternalVisitorModel<NoArg> visitor;
135 return visitor(jdata.
derived());
139 template<
typename Jo
intModel,
typename ArgType>
142 typedef typename JointModel::JointDataDerived
JointData;
150 template<
typename Jo
intModelDerived>
154 &JointVisitorDerived::template algo<JointModelDerived>,
171 template<
typename Jo
intModel>
173 :
public boost::static_visitor<ReturnType>
175 typedef typename JointModel::JointDataDerived
JointData;
182 template<
typename Jo
intModelDerived>
186 &JointVisitorDerived::template algo<JointModelDerived>,
196 template<
typename ArgType,
typename Dummy =
void>
204 template<
typename Jo
intModelDerived>
208 &JointVisitorDerived::template algo<JointModelDerived>,
212 template<
typename Jo
intDataDerived>
216 &JointVisitorDerived::template algo<JointDataDerived>,
228 template<
typename Dummy>
235 template<
typename Jo
intModelDerived>
238 return JointVisitorDerived::template algo<JointModelDerived>(jmodel.
derived());
241 template<
typename Jo
intDataDerived>
244 return JointVisitorDerived::template algo<JointDataDerived>(jdata.
derived());
252 #endif // ifndef __pinocchio_multibody_visitor_joint_unary_visitor_hpp__