aGrUM  0.20.2
a C++ library for (probabilistic) graphical models
PRMReferenceSlot_tpl.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright 2005-2020 Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4  * info_at_agrum_dot_org
5  *
6  * This library is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 
22 /**
23  * @file
24  * @brief Inline implementation of gum::PRMReferenceSlot
25  *
26  * @author Lionel TORTI and Pierre-Henri WUILLEMIN(@LIP6)
27  */
28 #include <agrum/PRM/elements/PRMReferenceSlot.h>
29 
30 namespace gum {
31  namespace prm {
32 
33  template < typename GUM_SCALAR >
34  PRMReferenceSlot< GUM_SCALAR >::PRMReferenceSlot(
35  const std::string& name,
36  PRMClassElementContainer< GUM_SCALAR >& type,
37  bool isArray) :
38  PRMClassElement< GUM_SCALAR >(name),
39  slotType__(type), isArray__(isArray) {
40  GUM_CONSTRUCTOR(PRMReferenceSlot);
41  this->safeName_
42  = PRMObject::LEFT_CAST() + type.name() + PRMObject::RIGHT_CAST() + name;
43  }
44 
45  // Destructor.
46  template < typename GUM_SCALAR >
49  }
50 
51  template < typename GUM_SCALAR >
58  "illegal call to gum::ReferenceSlot copy constructor.");
59  }
60 
61  // Copy operator. Raise a FatalError.
62  template < typename GUM_SCALAR >
64  const PRMReferenceSlot< GUM_SCALAR >& from) {
65  GUM_ERROR(FatalError, "illegal call to gum::ReferenceSlot copy operator.");
66  }
67 
68  template < typename GUM_SCALAR >
71  return this->prm_refslot;
72  }
73 
74  template < typename GUM_SCALAR >
77  return slotType__;
78  }
79 
80  template < typename GUM_SCALAR >
83  return slotType__;
84  }
85 
86  template < typename GUM_SCALAR >
88  return isArray__;
89  }
90 
91  template < typename GUM_SCALAR >
93  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
94  }
95 
96  template < typename GUM_SCALAR >
98  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
99  }
100 
101  template < typename GUM_SCALAR >
103  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
104  }
105 
106  template < typename GUM_SCALAR >
107  INLINE const Potential< GUM_SCALAR >&
109  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
110  }
111 
112  template < typename GUM_SCALAR >
115  GUM_ERROR(OperationNotAllowed, "This is a ReferenceSlot.");
116  }
117 
118 
119  template < typename GUM_SCALAR >
121  const PRMClassElement< GUM_SCALAR >& elt) {}
122 
123  template < typename GUM_SCALAR >
125  const PRMClassElement< GUM_SCALAR >& elt) {}
126 
127  } /* namespace prm */
128 } /* namespace gum */
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:669
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)