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,
typename ArgsTmp>
76 InternalVisitorModel<ArgsTmp> visitor(args);
77 return boost::apply_visitor(visitor,jdata);
80 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
83 InternalVisitorModel<NoArg> visitor;
84 return boost::apply_visitor(visitor,jmodel);
87 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
90 InternalVisitorModel<NoArg> visitor;
91 return boost::apply_visitor(visitor,jdata);
94 template<
typename Jo
intModelDerived,
typename ArgsTmp>
98 InternalVisitorModel<ArgsTmp> visitor(args);
99 return visitor(jmodel.
derived());
102 template<
typename Jo
intDataDerived,
typename ArgsTmp>
106 InternalVisitorModel<ArgsTmp> visitor(args);
107 return visitor(jdata.
derived());
110 template<
typename Jo
intModelDerived>
113 InternalVisitorModel<NoArg> visitor;
114 return visitor(jmodel.
derived());
117 template<
typename Jo
intDataDerived>
120 InternalVisitorModel<NoArg> visitor;
121 return visitor(jdata.
derived());
126 template<
typename Jo
intModel,
typename ArgType>
128 :
public boost::static_visitor<ReturnType>
130 typedef typename JointModel::JointDataDerived
JointData;
133 : jdata(jdata), args(args)
136 template<
typename Jo
intModelDerived>
139 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
151 template<
typename Jo
intModel>
153 :
public boost::static_visitor<ReturnType>
155 typedef typename JointModel::JointDataDerived
JointData;
161 template<
typename Jo
intModelDerived>
164 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
165 bf::make_vector(boost::ref(jmodel.
derived()),
172 template<
typename ArgType,
typename Dummy =
void>
174 :
public boost::static_visitor<ReturnType>
180 template<
typename Jo
intModelDerived>
183 return bf::invoke(&JointVisitorDerived::template algo<JointModelDerived>,
188 template<
typename Jo
intDataDerived>
191 return bf::invoke(&JointVisitorDerived::template algo<JointDataDerived>,
201 template<
typename Dummy>
203 :
public boost::static_visitor<ReturnType>
207 template<
typename Jo
intModelDerived>
210 return JointVisitorDerived::template algo<JointModelDerived>(jmodel.
derived());
213 template<
typename Jo
intDataDerived>
216 return JointVisitorDerived::template algo<JointDataDerived>(jdata.
derived());
224 template<
typename Jo
intVisitorDerived,
typename ReturnType =
void>
235 #endif // ifndef __pinocchio_multibody_visitior_joint_unary_visitor_hpp__ JointModel::JointDataDerived JointData
result_of::push_front< V const, T >::type append(T const &t, V const &v)
Append the element T at the front of boost fusion vector V.
ReturnType operator()(const JointModelBase< JointModelDerived > &jmodel) const
ReturnType operator()(const JointModelBase< JointModelDerived > &jmodel) const
static ReturnType run(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
static ReturnType run(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
ReturnType operator()(const JointModelVoid)
ReturnType operator()(const JointDataBase< JointDataDerived > &jdata) const
ReturnType operator()(const JointModelVoid)
static ReturnType run(const JointModelBase< JointModelDerived > &jmodel, ArgsTmp args)
JointUnaryVisitorBase< JointVisitorDerived, ReturnType > Base
ReturnType operator()(const JointDataBase< JointDataDerived > &jdata) const
static ReturnType run(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, ArgsTmp args)
static ReturnType run(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, ArgsTmp args)
static ReturnType run(const JointDataBase< JointDataDerived > &jdata)
Base structure for Unary visitation of a JointModel. This structure provides runners to call the righ...
static ReturnType run(const JointDataBase< JointDataDerived > &jdata, ArgsTmp args)
static ReturnType run(const JointModelBase< JointModelDerived > &jmodel)
This helper structure is now deprecated and has been replaced by JointUnaryVisitorBase.
JointModelDerived & derived()
InternalVisitorModel(ArgType args)
Main pinocchio namespace.
InternalVisitorModelAndData(JointData &jdata)
static ReturnType run(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
static ReturnType run(const JointModelBase< JointModelDerived > &jmodel, typename JointModelBase< JointModelDerived >::JointDataDerived &jdata, ArgsTmp args)
static ReturnType run(const JointModelBase< JointModelDerived > &jmodel, typename JointModelBase< JointModelDerived >::JointDataDerived &jdata)
ReturnType operator()(const JointModelBase< JointModelDerived > &jmodel) const
ReturnType operator()(const JointModelBase< JointModelDerived > &jmodel) const
InternalVisitorModelAndData(JointData &jdata, ArgType args)
static ReturnType run(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, ArgsTmp args)
JointModel::JointDataDerived JointData