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>
class ConstraintCollectionTpl>
22 typedef _Scalar Scalar;
39 typedef _Scalar Scalar;
46 typedef typename ConstraintCollection::ConstraintDataVariant ConstraintDataVariant;
47 typedef typename ConstraintCollection::ConstraintModelVariant ConstraintModelVariant;
50 : ConstraintDataVariant()
55 : ConstraintDataVariant(cdata_variant)
59 template<
typename Contra
intDataDerived>
61 : ConstraintDataVariant((ConstraintDataVariant)cdata.derived())
64 (boost::mpl::contains<typename ConstraintDataVariant::types, ContraintDataDerived>));
67 ConstraintDataVariant & toVariant()
69 return static_cast<ConstraintDataVariant &
>(*this);
72 const ConstraintDataVariant & toVariant()
const
74 return static_cast<const ConstraintDataVariant &
>(*this);
77 template<
typename Constra
intDataDerived>
80 return ::pinocchio::isEqual(*
this, other.derived());
85 return toVariant() == other.toVariant();
90 return isEqual(other);
95 return !(*
this == other);
100 typename ConstraintDataDerived,
108 return data2 == data1.derived();
Main pinocchio namespace.
Common traits structure to fully define base classes for CRTP.