28 #include <agrum/PRM/elements/PRMSlotChain.h> 33 template <
typename GUM_SCALAR >
34 PRMSlotChain< GUM_SCALAR >::PRMSlotChain(
35 const std::string& name,
36 const Sequence< PRMClassElement< GUM_SCALAR >* >& chain) :
37 PRMClassElement< GUM_SCALAR >(name),
38 chain__(
new Sequence< PRMClassElement< GUM_SCALAR >* >(chain)),
40 GUM_CONSTRUCTOR(PRMSlotChain);
42 if (chain__->size() < 2) {
43 GUM_ERROR(OperationNotAllowed,
44 "chain must contain at least two ClassElement");
47 for (Size i = 0; i < chain__->size() - 1; ++i) {
48 if (chain__->atPos(i)->elt_type()
49 != PRMClassElement< GUM_SCALAR >::prm_refslot) {
50 GUM_ERROR(WrongClassElement,
"illegal ClassElement in chain");
54 ||
static_cast< PRMReferenceSlot< GUM_SCALAR >* >(chain__->atPos(i))
61 this->safeName_ = PRMObject::LEFT_CAST() + lastElt().type().name()
62 + PRMObject::RIGHT_CAST() + name;
63 this->lastElt().type().variable().setName(name);
158 "Illegal call to gum::SlotChain<GUM_SCALAR> copy constructor.");
INLINE void emplace(Args &&... args)
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)