aGrUM  0.16.0
PRMReferenceSlot.h
Go to the documentation of this file.
1 
30 #ifndef GUM_REFERENCE_SLOT_H
31 #define GUM_REFERENCE_SLOT_H
32 
35 
36 namespace gum {
37  namespace prm {
38 
59  // ==========================================================================
60  template < typename GUM_SCALAR >
61  class PRMReferenceSlot : public PRMClassElement< GUM_SCALAR > {
62  public:
63  // ========================================================================
65  // ========================================================================
67 
75  PRMReferenceSlot(const std::string& name,
76  PRMClassElementContainer< GUM_SCALAR >& type,
77  bool isArray = false);
78 
82  virtual ~PRMReferenceSlot();
83 
85  // ========================================================================
87  // ========================================================================
89 
94  elt_type() const;
95 
100  PRMClassElementContainer< GUM_SCALAR >& slotType();
101 
106  const PRMClassElementContainer< GUM_SCALAR >& slotType() const;
107 
111  bool isArray() const;
112 
114  virtual void addParent(const PRMClassElement< GUM_SCALAR >& elt);
115 
117  virtual void addChild(const PRMClassElement< GUM_SCALAR >& elt);
118 
120  // ========================================================================
122  // ========================================================================
124 
127  virtual PRMType& type();
128 
131  virtual const PRMType& type() const;
132 
135  virtual Potential< GUM_SCALAR >& cpf();
136 
139  virtual const Potential< GUM_SCALAR >& cpf() const;
140 
143  virtual PRMAttribute< GUM_SCALAR >* getCastDescendant() const;
144 
146  private:
147  // ========================================================================
149  // ========================================================================
150  // @{
151 
153  PRMReferenceSlot(const PRMReferenceSlot< GUM_SCALAR >& source);
154 
156  PRMReferenceSlot& operator=(const PRMReferenceSlot< GUM_SCALAR >& from);
157 
159  // ========================================================================
161  // ========================================================================
162  // @{
163 
166 
168  bool __isArray;
169 
171  };
172 
173 
174 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
175  extern template class PRMReferenceSlot< double >;
176 #endif
177 
178 
179  } /* namespace prm */
180 } // namespace gum
181 
183 
184 #endif /* GUM_CLASS_ELEMENT_H */
bool isArray() const
Returns true if this reference slot is an array.
virtual ~PRMReferenceSlot()
Destructor.
virtual Potential< GUM_SCALAR > & cpf()
Raise an OperationNotAllowed. See gum::PRMClassElement::cpf().
const std::string & name() const
Returns the name of this object.
Definition: PRMObject_inl.h:35
PRMReferenceSlot & operator=(const PRMReferenceSlot< GUM_SCALAR > &from)
Copy operator. Don&#39;t use it.
virtual void addParent(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement::addParent().
PRMClassElementContainer< GUM_SCALAR > & __slotType
The type of this PRMReferenceSlot.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
PRMClassElementContainer< GUM_SCALAR > & slotType()
Returns the type of this slot, which is a PRMClassElementContainer (it is not the type of PRMObject)...
virtual PRMClassElement< GUM_SCALAR >::ClassElementType elt_type() const
Implementation of the pure virtual method of PRMObject.
PRMReferenceSlot(const std::string &name, PRMClassElementContainer< GUM_SCALAR > &type, bool isArray=false)
Default constructor.
virtual void addChild(const PRMClassElement< GUM_SCALAR > &elt)
See gum::PRMClassElement::addChild().
bool __isArray
Flag indicating if this slot is an array.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
<agrum/PRM/classElementContainer.h>
virtual PRMAttribute< GUM_SCALAR > * getCastDescendant() const
Raise an OperationNotAllowed. See gum::PRMClassElement::getCastDescendant().
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
ClassElementType
Returns true if obj_ptr is of type PRMReferenceSlot.
virtual PRMType & type()
Raise an OperationNotAllowed. See gum::PRMClassElement::type().