5 #ifndef __pinocchio_algorithm_constraint_data_generic_hpp__
6 #define __pinocchio_algorithm_constraint_data_generic_hpp__
8 #include "pinocchio/algorithm/constraints/fwd.hpp"
9 #include "pinocchio/algorithm/constraints/constraint-model-base.hpp"
10 #include "pinocchio/algorithm/constraints/constraint-data-base.hpp"
11 #include "pinocchio/algorithm/constraints/visitors/constraint-model-visitor.hpp"
19 template<
typename S,
int O>
20 class ConstraintCollectionTpl>
23 typedef _Scalar Scalar;
34 template<
typename S,
int O>
41 typedef _Scalar Scalar;
48 typedef typename ConstraintCollection::ConstraintDataVariant ConstraintDataVariant;
49 typedef typename ConstraintCollection::ConstraintModelVariant ConstraintModelVariant;
52 : ConstraintDataVariant()
57 : ConstraintDataVariant(cdata_variant)
61 template<
typename Contra
intDataDerived>
63 : ConstraintDataVariant((ConstraintDataVariant)cdata.derived())
66 (boost::mpl::contains<typename ConstraintDataVariant::types, ContraintDataDerived>));
69 ConstraintDataVariant & toVariant()
71 return static_cast<ConstraintDataVariant &
>(*this);
74 const ConstraintDataVariant & toVariant()
const
76 return static_cast<const ConstraintDataVariant &
>(*this);
79 template<
typename Constra
intDataDerived>
82 return ::pinocchio::isEqual(*
this, other.derived());
87 return toVariant() == other.toVariant();
92 return isEqual(other);
97 return !(*
this == other);
102 typename ConstraintDataDerived,
105 template<
typename S,
int O>
111 return data2 == data1.derived();
Main pinocchio namespace.
Common traits structure to fully define base classes for CRTP.