Verified Commit 6826f6bc authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: minor renaming

parent 73d64e20
// //
// Copyright (c) 2015,2018 CNRS // Copyright (c) 2015-2019 CNRS INRIA
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France. // Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
// //
...@@ -51,7 +51,7 @@ namespace pinocchio ...@@ -51,7 +51,7 @@ namespace pinocchio
JointDataTpl<Scalar,Options,JointCollectionTpl> & jdata, JointDataTpl<Scalar,Options,JointCollectionTpl> & jdata,
ArgsTmp args) ArgsTmp args)
{ {
InternalVisitor<JointModelTpl<Scalar,Options,JointCollectionTpl>,ArgsTmp> visitor(jdata,args); InternalVisitorModelAndData<JointModelTpl<Scalar,Options,JointCollectionTpl>,ArgsTmp> visitor(jdata,args);
return boost::apply_visitor(visitor,jmodel); return boost::apply_visitor(visitor,jmodel);
} }
...@@ -59,16 +59,16 @@ namespace pinocchio ...@@ -59,16 +59,16 @@ namespace pinocchio
static ReturnType run(const JointModelTpl<Scalar,Options,JointCollectionTpl> & jmodel, static ReturnType run(const JointModelTpl<Scalar,Options,JointCollectionTpl> & jmodel,
JointDataTpl<Scalar,Options,JointCollectionTpl> & jdata) JointDataTpl<Scalar,Options,JointCollectionTpl> & jdata)
{ {
InternalVisitor<JointModelTpl<Scalar,Options,JointCollectionTpl>,NoArg> visitor(jdata); InternalVisitorModelAndData<JointModelTpl<Scalar,Options,JointCollectionTpl>,NoArg> visitor(jdata);
return boost::apply_visitor(visitor,jmodel); return boost::apply_visitor(visitor,jmodel);
} }
template<typename JointModelDerived, typename ArgsTmp> template<typename JointModelDerived, typename ArgsTmp>
static ReturnType run(const JointModelBase<JointModelDerived> & jmodel, static ReturnType run(const JointModelBase<JointModelDerived> & jmodel,
typename JointModelBase<JointModelDerived>::JointDataDerived & jdata, typename JointModelBase<JointModelDerived>::JointDataDerived & jdata,
ArgsTmp args) ArgsTmp args)
{ {
InternalVisitor<JointModelDerived,ArgsTmp> visitor(jdata,args); InternalVisitorModelAndData<JointModelDerived,ArgsTmp> visitor(jdata,args);
return visitor(jmodel.derived()); return visitor(jmodel.derived());
} }
...@@ -76,7 +76,7 @@ namespace pinocchio ...@@ -76,7 +76,7 @@ namespace pinocchio
static ReturnType run(const JointModelBase<JointModelDerived> & jmodel, static ReturnType run(const JointModelBase<JointModelDerived> & jmodel,
typename JointModelBase<JointModelDerived>::JointDataDerived & jdata) typename JointModelBase<JointModelDerived>::JointDataDerived & jdata)
{ {
InternalVisitor<JointModelDerived,NoArg> visitor(jdata); InternalVisitorModelAndData<JointModelDerived,NoArg> visitor(jdata);
return visitor(jmodel.derived()); return visitor(jmodel.derived());
} }
...@@ -84,14 +84,14 @@ namespace pinocchio ...@@ -84,14 +84,14 @@ namespace pinocchio
static ReturnType run(const JointModelTpl<Scalar,Options,JointCollectionTpl> & jmodel, static ReturnType run(const JointModelTpl<Scalar,Options,JointCollectionTpl> & jmodel,
ArgsTmp args) ArgsTmp args)
{ {
ModelOnlyInternalVisitor<ArgsTmp> visitor(args); InternalVisitorModel<ArgsTmp> visitor(args);
return boost::apply_visitor(visitor,jmodel); return boost::apply_visitor(visitor,jmodel);
} }
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl> template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
static ReturnType run(const JointModelTpl<Scalar,Options,JointCollectionTpl> & jmodel) static ReturnType run(const JointModelTpl<Scalar,Options,JointCollectionTpl> & jmodel)
{ {
ModelOnlyInternalVisitor<NoArg> visitor; InternalVisitorModel<NoArg> visitor;
return boost::apply_visitor(visitor,jmodel); return boost::apply_visitor(visitor,jmodel);
} }
...@@ -99,26 +99,26 @@ namespace pinocchio ...@@ -99,26 +99,26 @@ namespace pinocchio
static ReturnType run(const JointModelBase<JointModelDerived> & jmodel, static ReturnType run(const JointModelBase<JointModelDerived> & jmodel,
ArgsTmp args) ArgsTmp args)
{ {
ModelOnlyInternalVisitor<ArgsTmp> visitor(args); InternalVisitorModel<ArgsTmp> visitor(args);
return visitor(jmodel.derived()); return visitor(jmodel.derived());
} }
template<typename JointModelDerived> template<typename JointModelDerived>
static ReturnType run(const JointModelBase<JointModelDerived> & jmodel) static ReturnType run(const JointModelBase<JointModelDerived> & jmodel)
{ {
ModelOnlyInternalVisitor<NoArg> visitor; InternalVisitorModel<NoArg> visitor;
return visitor(jmodel.derived()); return visitor(jmodel.derived());
} }
private: private:
template<typename JointModel, typename ArgType> template<typename JointModel, typename ArgType>
struct InternalVisitor struct InternalVisitorModelAndData
: public boost::static_visitor<ReturnType> : public boost::static_visitor<ReturnType>
{ {
typedef typename JointModel::JointDataDerived JointData; typedef typename JointModel::JointDataDerived JointData;
InternalVisitor(JointData & jdata, ArgType args) InternalVisitorModelAndData(JointData & jdata, ArgType args)
: jdata(jdata), args(args) : jdata(jdata), args(args)
{} {}
...@@ -138,12 +138,12 @@ namespace pinocchio ...@@ -138,12 +138,12 @@ namespace pinocchio
}; };
template<typename JointModel> template<typename JointModel>
struct InternalVisitor<JointModel,NoArg> struct InternalVisitorModelAndData<JointModel,NoArg>
: public boost::static_visitor<ReturnType> : public boost::static_visitor<ReturnType>
{ {
typedef typename JointModel::JointDataDerived JointData; typedef typename JointModel::JointDataDerived JointData;
InternalVisitor(JointData & jdata) InternalVisitorModelAndData(JointData & jdata)
: jdata(jdata) : jdata(jdata)
{} {}
...@@ -160,9 +160,9 @@ namespace pinocchio ...@@ -160,9 +160,9 @@ namespace pinocchio
}; };
template<typename ArgType, typename Dummy = void> template<typename ArgType, typename Dummy = void>
struct ModelOnlyInternalVisitor : public boost::static_visitor<ReturnType> struct InternalVisitorModel : public boost::static_visitor<ReturnType>
{ {
ModelOnlyInternalVisitor(ArgType args) InternalVisitorModel(ArgType args)
: args(args) : args(args)
{} {}
...@@ -180,10 +180,10 @@ namespace pinocchio ...@@ -180,10 +180,10 @@ namespace pinocchio
}; };
template<typename Dummy> template<typename Dummy>
struct ModelOnlyInternalVisitor<NoArg,Dummy> struct InternalVisitorModel<NoArg,Dummy>
: public boost::static_visitor<ReturnType> : public boost::static_visitor<ReturnType>
{ {
ModelOnlyInternalVisitor() {} InternalVisitorModel() {}
template<typename JointModelDerived> template<typename JointModelDerived>
ReturnType operator()(const JointModelBase<JointModelDerived> & jmodel) const ReturnType operator()(const JointModelBase<JointModelDerived> & jmodel) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment