aGrUM  0.20.2
a C++ library for (probabilistic) graphical models
errors.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 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,
62  const O3Label& l,
63  ErrorsContainer& errors);
64 
65  void O3PRM_TYPE_INVALID_RANGE(const O3IntType& val, ErrorsContainer& errors);
66 
67  void O3PRM_TYPE_INVALID_RANGE(const O3RealType& val,
68  ErrorsContainer& errors);
69 
70  void O3PRM_CLASS_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
71 
72  void O3PRM_CLASS_AMBIGUOUS(const O3Label& val,
73  const std::vector< std::string >& matches,
74  ErrorsContainer& errors);
75 
76  void O3PRM_CLASS_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
77 
78  void O3PRM_CLASS_CYLIC_INHERITANCE(const O3Label& sub,
79  const O3Label& super,
80  ErrorsContainer& errors);
81 
82  void O3PRM_CLASS_ATTR_IMPLEMENTATION(const O3Label& c,
83  const O3Label& i,
84  const O3Label& attr,
85  ErrorsContainer& errors);
86 
87  void O3PRM_CLASS_AGG_IMPLEMENTATION(const O3Label& c,
88  const O3Label& i,
89  const O3Label& attr,
90  ErrorsContainer& errors);
91 
92  void O3PRM_CLASS_REF_IMPLEMENTATION(const O3Label& c,
93  const O3Label& i,
94  const O3Label& ref,
95  ErrorsContainer& errors);
96 
97  void O3PRM_CLASS_MISSING_ATTRIBUTES(const O3Label& c,
98  const O3Label& i,
99  ErrorsContainer& errors);
100 
101  void O3PRM_CLASS_DUPLICATE_REFERENCE(const O3Label& ref,
102  ErrorsContainer& errors);
103 
104  void O3PRM_CLASS_SELF_REFERENCE(const O3Label& c,
105  const O3Label& ref,
106  ErrorsContainer& errors);
107 
108  void O3PRM_CLASS_ILLEGAL_SUB_REFERENCE(const O3Label& c,
109  const O3Label& sub,
110  ErrorsContainer& errors);
111 
112  void O3PRM_CLASS_PARENT_NOT_FOUND(const O3Label& parent,
113  ErrorsContainer& errors);
114 
115  void O3PRM_CLASS_ILLEGAL_PARENT(const O3Label& parent,
116  ErrorsContainer& errors);
117 
118  void O3PRM_CLASS_LINK_NOT_FOUND(const O3Label& chain,
119  const std::string& s,
120  ErrorsContainer& errors);
121 
122  void O3PRM_CLASS_ILLEGAL_CPT_SIZE(const std::string& c,
123  const O3Label& attr,
124  Size found,
125  Size expected,
126  ErrorsContainer& errors);
127 
128  void O3PRM_CLASS_ILLEGAL_CPT_VALUE(const std::string& c,
129  const O3Label& attr,
130  const O3Formula& f,
131  ErrorsContainer& errors);
132 
133  void O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1(const std::string& c,
134  const O3Label& attr,
135  float f,
136  ErrorsContainer& errors);
137 
138  void O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1_WARNING(const std::string& c,
139  const O3Label& attr,
140  float f,
141  ErrorsContainer& errors);
142 
143 
144  void O3PRM_CLASS_ILLEGAL_RULE_SIZE(const O3RuleCPT::O3Rule& rule,
145  size_t found,
146  size_t expected,
147  ErrorsContainer& errors);
148 
149  void O3PRM_CLASS_ILLEGAL_RULE_LABEL(const O3RuleCPT::O3Rule& rule,
150  const O3Label& label,
151  const O3Label& parent,
152  ErrorsContainer& errors);
153 
154  void O3PRM_CLASS_WRONG_PARENT(const O3Label& prnt, ErrorsContainer& errors);
155 
156  void O3PRM_CLASS_WRONG_PARENT_TYPE(const O3Label& prnt,
157  const std::string& expected,
158  const std::string& found,
159  ErrorsContainer& errors);
160 
161  void O3PRM_CLASS_ILLEGAL_OVERLOAD(const O3Label& elt,
162  const O3Label& super,
163  ErrorsContainer& errors);
164 
165  void O3PRM_CLASS_AGG_PARAMETERS(const O3Label& agg,
166  Size expected,
167  Size found,
168  ErrorsContainer& errors);
169 
170  void O3PRM_CLASS_AGG_PARAMETER_NOT_FOUND(const O3Label& agg,
171  const O3Label& param,
172  ErrorsContainer& errors);
173 
174  void O3PRM_INTERFACE_ILLEGAL_ARRAY(const O3Label& val,
175  ErrorsContainer& errors);
176 
177  void O3PRM_INTERFACE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
178 
179  void O3PRM_INTERFACE_AMBIGUOUS(const O3Label& val,
180  const std::vector< std::string >& matches,
181  ErrorsContainer& errors);
182 
183  void O3PRM_INTERFACE_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
184 
185  void O3PRM_INTERFACE_DUPLICATE_ELEMENT(const O3InterfaceElement& elt,
186  ErrorsContainer& errors);
187 
188  void O3PRM_INTERFACE_CYCLIC_INHERITANCE(const O3Label& sub,
189  const O3Label& super,
190  ErrorsContainer& errors);
191 
192  void O3PRM_INTERFACE_SELF_REFERENCE(const O3Interface& i,
193  const O3InterfaceElement& r,
194  ErrorsContainer& errors);
195 
196  void O3PRM_INTERFACE_ILLEGAL_SUB_REFERENCE(const O3Interface& i,
197  const O3InterfaceElement& ref,
198  ErrorsContainer& errors);
199 
200  void O3PRM_INTERFACE_ILLEGAL_OVERLOAD(const O3InterfaceElement& elt,
201  ErrorsContainer& errors);
202 
203  void O3PRM_REFERENCE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
204 
205  void O3PRM_REFERENCE_AMBIGUOUS(const O3Label& val,
206  const std::vector< std::string >& matches,
207  ErrorsContainer& errors);
208 
209  void O3PRM_SYSTEM_INSTANTIATION_FAILED(const O3System& sys,
210  ErrorsContainer& errors);
211 
212  void O3PRM_SYSTEM_NOT_A_CLASS(const O3Instance& i, ErrorsContainer& errors);
213 
214  void O3PRM_SYSTEM_DUPLICATE_INSTANCE(const O3Instance& i,
215  ErrorsContainer& errors);
216 
217  void O3PRM_SYSTEM_NOT_A_PARAMETER(const O3InstanceParameter& param,
218  ErrorsContainer& errors);
219 
220  void O3PRM_SYSTEM_PARAMETER_NOT_FOUND(const O3InstanceParameter& param,
221  ErrorsContainer& errors);
222 
223  void O3PRM_SYSTEM_PARAMETER_NOT_INT(const O3InstanceParameter& param,
224  ErrorsContainer& errors);
225 
226  void O3PRM_SYSTEM_PARAMETER_NOT_FLOAT(const O3InstanceParameter& param,
227  ErrorsContainer& errors);
228 
229  void O3PRM_SYSTEM_INVALID_LEFT_VALUE(const O3Label& val,
230  ErrorsContainer& errors);
231 
232  void O3PRM_SYSTEM_INSTANCE_NOT_FOUND(const O3Label& i,
233  ErrorsContainer& errors);
234 
235  void O3PRM_SYSTEM_REFERENCE_NOT_FOUND(const O3Label& ref,
236  const std::string& type,
237  ErrorsContainer& errors);
238 
239  void O3PRM_SYSTEM_NOT_AN_ARRAY(const O3Label& val, ErrorsContainer& errors);
240 
241  void O3PRM_DEPRECATED_TYPE_WARNING(const O3Label& type,
242  ErrorsContainer& errors);
243 
244  } // namespace o3prm
245  } // namespace prm
246 } // namespace gum
247 
248 # endif // DOXYGEN_SHOULD_SKIP_THIS
249 
250 #endif // GUM_PRM_O3PRM_ERRORS_H