aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
errors.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright (c) 2005-2021 by 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 Functions for error messages.
25  *
26  * @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
27  * @author Lionel TORTI
28  */
29 
30 #include <sstream>
31 #include <string>
32 #include <vector>
33 
34 #include <agrum/PRM/o3prm/O3prm.h>
35 #include <agrum/tools/core/errorsContainer.h>
36 
37 #ifndef GUM_PRM_O3PRM_ERRORS_H
38 # define GUM_PRM_O3PRM_ERRORS_H
39 
40 # ifndef DOXYGEN_SHOULD_SKIP_THIS
41 
42 namespace gum {
43  namespace prm {
44  namespace o3prm {
45 
46 
47  void O3PRM_TYPE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
48 
49  void O3PRM_TYPE_AMBIGUOUS(const O3Label& val,
50  const std::vector< std::string >& matches,
51  ErrorsContainer& errors);
52 
53  void O3PRM_TYPE_RESERVED(const O3Label& val, ErrorsContainer& errors);
54 
55  void O3PRM_TYPE_DUPPLICATE(const O3Label& val, ErrorsContainer& errors);
56 
57  void O3PRM_TYPE_CYCLIC_INHERITANCE(const O3Label& sub_type,
58  const O3Label& super_type,
59  ErrorsContainer& errors);
60 
61  void O3PRM_TYPE_UNKNOWN_LABEL(const O3Label& type, const O3Label& l, ErrorsContainer& errors);
62 
63  void O3PRM_TYPE_INVALID_RANGE(const O3IntType& val, ErrorsContainer& errors);
64 
65  void O3PRM_TYPE_INVALID_RANGE(const O3RealType& val, ErrorsContainer& errors);
66 
67  void O3PRM_CLASS_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
68 
69  void O3PRM_CLASS_AMBIGUOUS(const O3Label& val,
70  const std::vector< std::string >& matches,
71  ErrorsContainer& errors);
72 
73  void O3PRM_CLASS_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
74 
75  void O3PRM_CLASS_CYLIC_INHERITANCE(const O3Label& sub,
76  const O3Label& super,
77  ErrorsContainer& errors);
78 
79  void O3PRM_CLASS_ATTR_IMPLEMENTATION(const O3Label& c,
80  const O3Label& i,
81  const O3Label& attr,
82  ErrorsContainer& errors);
83 
84  void O3PRM_CLASS_AGG_IMPLEMENTATION(const O3Label& c,
85  const O3Label& i,
86  const O3Label& attr,
87  ErrorsContainer& errors);
88 
89  void O3PRM_CLASS_REF_IMPLEMENTATION(const O3Label& c,
90  const O3Label& i,
91  const O3Label& ref,
92  ErrorsContainer& errors);
93 
94  void O3PRM_CLASS_MISSING_ATTRIBUTES(const O3Label& c,
95  const O3Label& i,
96  ErrorsContainer& errors);
97 
98  void O3PRM_CLASS_DUPLICATE_REFERENCE(const O3Label& ref, ErrorsContainer& errors);
99 
100  void
101  O3PRM_CLASS_SELF_REFERENCE(const O3Label& c, const O3Label& ref, ErrorsContainer& errors);
102 
103  void O3PRM_CLASS_ILLEGAL_SUB_REFERENCE(const O3Label& c,
104  const O3Label& sub,
105  ErrorsContainer& errors);
106 
107  void O3PRM_CLASS_PARENT_NOT_FOUND(const O3Label& parent, ErrorsContainer& errors);
108 
109  void O3PRM_CLASS_ILLEGAL_PARENT(const O3Label& parent, ErrorsContainer& errors);
110 
111  void O3PRM_CLASS_LINK_NOT_FOUND(const O3Label& chain,
112  const std::string& s,
113  ErrorsContainer& errors);
114 
115  void O3PRM_CLASS_ILLEGAL_CPT_SIZE(const std::string& c,
116  const O3Label& attr,
117  Size found,
118  Size expected,
119  ErrorsContainer& errors);
120 
121  void O3PRM_CLASS_ILLEGAL_CPT_VALUE(const std::string& c,
122  const O3Label& attr,
123  const O3Formula& f,
124  ErrorsContainer& errors);
125 
126  void O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1(const std::string& c,
127  const O3Label& attr,
128  float f,
129  ErrorsContainer& errors);
130 
131  void O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1_WARNING(const std::string& c,
132  const O3Label& attr,
133  float f,
134  ErrorsContainer& errors);
135 
136 
137  void O3PRM_CLASS_ILLEGAL_RULE_SIZE(const O3RuleCPT::O3Rule& rule,
138  size_t found,
139  size_t expected,
140  ErrorsContainer& errors);
141 
142  void O3PRM_CLASS_ILLEGAL_RULE_LABEL(const O3RuleCPT::O3Rule& rule,
143  const O3Label& label,
144  const O3Label& parent,
145  ErrorsContainer& errors);
146 
147  void O3PRM_CLASS_WRONG_PARENT(const O3Label& prnt, ErrorsContainer& errors);
148 
149  void O3PRM_CLASS_WRONG_PARENT_TYPE(const O3Label& prnt,
150  const std::string& expected,
151  const std::string& found,
152  ErrorsContainer& errors);
153 
154  void O3PRM_CLASS_ILLEGAL_OVERLOAD(const O3Label& elt,
155  const O3Label& super,
156  ErrorsContainer& errors);
157 
158  void O3PRM_CLASS_AGG_PARAMETERS(const O3Label& agg,
159  Size expected,
160  Size found,
161  ErrorsContainer& errors);
162 
163  void O3PRM_CLASS_AGG_PARAMETER_NOT_FOUND(const O3Label& agg,
164  const O3Label& param,
165  ErrorsContainer& errors);
166 
167  void O3PRM_INTERFACE_ILLEGAL_ARRAY(const O3Label& val, ErrorsContainer& errors);
168 
169  void O3PRM_INTERFACE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
170 
171  void O3PRM_INTERFACE_AMBIGUOUS(const O3Label& val,
172  const std::vector< std::string >& matches,
173  ErrorsContainer& errors);
174 
175  void O3PRM_INTERFACE_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
176 
177  void O3PRM_INTERFACE_DUPLICATE_ELEMENT(const O3InterfaceElement& elt,
178  ErrorsContainer& errors);
179 
180  void O3PRM_INTERFACE_CYCLIC_INHERITANCE(const O3Label& sub,
181  const O3Label& super,
182  ErrorsContainer& errors);
183 
184  void O3PRM_INTERFACE_SELF_REFERENCE(const O3Interface& i,
185  const O3InterfaceElement& r,
186  ErrorsContainer& errors);
187 
188  void O3PRM_INTERFACE_ILLEGAL_SUB_REFERENCE(const O3Interface& i,
189  const O3InterfaceElement& ref,
190  ErrorsContainer& errors);
191 
192  void O3PRM_INTERFACE_ILLEGAL_OVERLOAD(const O3InterfaceElement& elt, ErrorsContainer& errors);
193 
194  void O3PRM_REFERENCE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
195 
196  void O3PRM_REFERENCE_AMBIGUOUS(const O3Label& val,
197  const std::vector< std::string >& matches,
198  ErrorsContainer& errors);
199 
200  void O3PRM_SYSTEM_INSTANTIATION_FAILED(const O3System& sys, ErrorsContainer& errors);
201 
202  void O3PRM_SYSTEM_NOT_A_CLASS(const O3Instance& i, ErrorsContainer& errors);
203 
204  void O3PRM_SYSTEM_DUPLICATE_INSTANCE(const O3Instance& i, ErrorsContainer& errors);
205 
206  void O3PRM_SYSTEM_NOT_A_PARAMETER(const O3InstanceParameter& param, ErrorsContainer& errors);
207 
208  void O3PRM_SYSTEM_PARAMETER_NOT_FOUND(const O3InstanceParameter& param,
209  ErrorsContainer& errors);
210 
211  void O3PRM_SYSTEM_PARAMETER_NOT_INT(const O3InstanceParameter& param,
212  ErrorsContainer& errors);
213 
214  void O3PRM_SYSTEM_PARAMETER_NOT_FLOAT(const O3InstanceParameter& param,
215  ErrorsContainer& errors);
216 
217  void O3PRM_SYSTEM_INVALID_LEFT_VALUE(const O3Label& val, ErrorsContainer& errors);
218 
219  void O3PRM_SYSTEM_INSTANCE_NOT_FOUND(const O3Label& i, ErrorsContainer& errors);
220 
221  void O3PRM_SYSTEM_REFERENCE_NOT_FOUND(const O3Label& ref,
222  const std::string& type,
223  ErrorsContainer& errors);
224 
225  void O3PRM_SYSTEM_NOT_AN_ARRAY(const O3Label& val, ErrorsContainer& errors);
226 
227  void O3PRM_DEPRECATED_TYPE_WARNING(const O3Label& type, ErrorsContainer& errors);
228 
229  } // namespace o3prm
230  } // namespace prm
231 } // namespace gum
232 
233 # endif // DOXYGEN_SHOULD_SKIP_THIS
234 
235 #endif // GUM_PRM_O3PRM_ERRORS_H