aGrUM  0.16.0
PRMReferenceSlot_tpl.h
Go to the documentation of this file.
1 
30 
31 namespace gum {
32  namespace prm {
33 
34  template < typename GUM_SCALAR >
36  const std::string& name,
38  bool isArray) :
39  PRMClassElement< GUM_SCALAR >(name),
40  __slotType(type), __isArray(isArray) {
41  GUM_CONSTRUCTOR(PRMReferenceSlot);
42  this->_safeName =
43  PRMObject::LEFT_CAST() + type.name() + PRMObject::RIGHT_CAST() + name;
44  }
45 
46  // Destructor.
47  template < typename GUM_SCALAR >
49  GUM_DESTRUCTOR(PRMReferenceSlot);
50  }
51 
52  template < typename GUM_SCALAR >
54  const PRMReferenceSlot< GUM_SCALAR >& source) :
55  PRMClassElement< GUM_SCALAR >(source),
56  __slotType(source.__slotType), __isArray(source.__isArray) {
57  GUM_CONS_CPY(PRMReferenceSlot);
59  "illegal call to gum::ReferenceSlot copy constructor.");
60  }
61 
62  // Copy operator. Raise a FatalError.
63  template < typename GUM_SCALAR >
66  GUM_ERROR(FatalError, "illegal call to gum::ReferenceSlot copy operator.");
67  }
68 
69  template < typename GUM_SCALAR >
72  return this->prm_refslot;
73  }
74 
75  template < typename GUM_SCALAR >
78  return __slotType;
79  }
80 
81  template < typename GUM_SCALAR >
84  return __slotType;
85  }
86 
87  template < typename GUM_SCALAR >
89  return __isArray;
90  }
91 
92  template < typename GUM_SCALAR >
94  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
95  }
96 
97  template < typename GUM_SCALAR >
99  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
100  }
101 
102  template < typename GUM_SCALAR >
104  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
105  }
106 
107  template < typename GUM_SCALAR >
108  INLINE const Potential< GUM_SCALAR >&
110  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
111  }
112 
113  template < typename GUM_SCALAR >
116  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
117  }
118 
119 
120  template < typename GUM_SCALAR >
122  const PRMClassElement< GUM_SCALAR >& elt) {}
123 
124  template < typename GUM_SCALAR >
126  const PRMClassElement< GUM_SCALAR >& elt) {}
127 
128  } /* namespace prm */
129 } /* namespace gum */
aGrUM&#39;s Potential is a multi-dimensional array with tensor operators.
Definition: potential.h:60
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:35
Abstract class representing an element of PRM class.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
A PRMReferenceSlot represent a relation between two PRMClassElementContainer.
Definition: PRMObject.h:223
PRMReferenceSlot(const std::string &name, PRMClassElementContainer< GUM_SCALAR > &type, bool isArray=false)
Default constructor.
This is a decoration of the DiscreteVariable class.
Definition: PRMType.h:63
<agrum/PRM/classElementContainer.h>
PRMAttribute is a member of a Class in a PRM.
Definition: PRMAttribute.h:61
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
ClassElementType
Returns true if obj_ptr is of type PRMReferenceSlot.