aGrUM  0.14.2
errors.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
29 #include <sstream>
30 #include <string>
31 #include <vector>
32 
33 #include <agrum/PRM/o3prm/O3prm.h>
35 
36 #ifndef GUM_PRM_O3PRM_ERRORS_H
37 # define GUM_PRM_O3PRM_ERRORS_H
38 
39 # ifndef DOXYGEN_SHOULD_SKIP_THIS
40 
41 namespace gum {
42  namespace prm {
43  namespace o3prm {
44 
45 
46  void O3PRM_TYPE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
47 
48  void O3PRM_TYPE_AMBIGUOUS(const O3Label& val,
49  const std::vector< std::string >& matches,
50  ErrorsContainer& errors);
51 
52  void O3PRM_TYPE_RESERVED(const O3Label& val, ErrorsContainer& errors);
53 
54  void O3PRM_TYPE_DUPPLICATE(const O3Label& val, ErrorsContainer& errors);
55 
56  void O3PRM_TYPE_CYCLIC_INHERITANCE(const O3Label& sub_type,
57  const O3Label& super_type,
58  ErrorsContainer& errors);
59 
60  void O3PRM_TYPE_UNKNOWN_LABEL(const O3Label& type,
61  const O3Label& l,
62  ErrorsContainer& errors);
63 
64  void O3PRM_TYPE_INVALID_RANGE(const O3IntType& val, ErrorsContainer& errors);
65 
66  void O3PRM_TYPE_INVALID_RANGE(const O3RealType& val,
67  ErrorsContainer& errors);
68 
69  void O3PRM_CLASS_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
70 
71  void O3PRM_CLASS_AMBIGUOUS(const O3Label& val,
72  const std::vector< std::string >& matches,
73  ErrorsContainer& errors);
74 
75  void O3PRM_CLASS_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
76 
77  void O3PRM_CLASS_CYLIC_INHERITANCE(const O3Label& sub,
78  const O3Label& super,
79  ErrorsContainer& errors);
80 
81  void O3PRM_CLASS_ATTR_IMPLEMENTATION(const O3Label& c,
82  const O3Label& i,
83  const O3Label& attr,
84  ErrorsContainer& errors);
85 
86  void O3PRM_CLASS_AGG_IMPLEMENTATION(const O3Label& c,
87  const O3Label& i,
88  const O3Label& attr,
89  ErrorsContainer& errors);
90 
91  void O3PRM_CLASS_REF_IMPLEMENTATION(const O3Label& c,
92  const O3Label& i,
93  const O3Label& ref,
94  ErrorsContainer& errors);
95 
96  void O3PRM_CLASS_MISSING_ATTRIBUTES(const O3Label& c,
97  const O3Label& i,
98  ErrorsContainer& errors);
99 
100  void O3PRM_CLASS_DUPLICATE_REFERENCE(const O3Label& ref,
101  ErrorsContainer& errors);
102 
103  void O3PRM_CLASS_SELF_REFERENCE(const O3Label& c,
104  const O3Label& ref,
105  ErrorsContainer& errors);
106 
107  void O3PRM_CLASS_ILLEGAL_SUB_REFERENCE(const O3Label& c,
108  const O3Label& sub,
109  ErrorsContainer& errors);
110 
111  void O3PRM_CLASS_PARENT_NOT_FOUND(const O3Label& parent,
112  ErrorsContainer& errors);
113 
114  void O3PRM_CLASS_ILLEGAL_PARENT(const O3Label& parent,
115  ErrorsContainer& errors);
116 
117  void O3PRM_CLASS_LINK_NOT_FOUND(const O3Label& chain,
118  const std::string& s,
119  ErrorsContainer& errors);
120 
121  void O3PRM_CLASS_ILLEGAL_CPT_SIZE(const std::string& c,
122  const O3Label& attr,
123  Size found,
124  Size expected,
125  ErrorsContainer& errors);
126 
127  void O3PRM_CLASS_ILLEGAL_CPT_VALUE(const std::string& c,
128  const O3Label& attr,
129  const O3Formula& f,
130  ErrorsContainer& errors);
131 
132  void O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1(const std::string& c,
133  const O3Label& attr,
134  float f,
135  ErrorsContainer& errors);
136 
137  void O3PRM_CLASS_CPT_DOES_NOT_SUM_TO_1_WARNING(const std::string& c,
138  const O3Label& attr,
139  float f,
140  ErrorsContainer& errors);
141 
142 
143  void O3PRM_CLASS_ILLEGAL_RULE_SIZE(const O3RuleCPT::O3Rule& rule,
144  size_t found,
145  size_t expected,
146  ErrorsContainer& errors);
147 
148  void O3PRM_CLASS_ILLEGAL_RULE_LABEL(const O3RuleCPT::O3Rule& rule,
149  const O3Label& label,
150  const O3Label& parent,
151  ErrorsContainer& errors);
152 
153  void O3PRM_CLASS_WRONG_PARENT(const O3Label& prnt, ErrorsContainer& errors);
154 
155  void O3PRM_CLASS_WRONG_PARENT_TYPE(const O3Label& prnt,
156  const std::string& expected,
157  const std::string& found,
158  ErrorsContainer& errors);
159 
160  void O3PRM_CLASS_ILLEGAL_OVERLOAD(const O3Label& elt,
161  const O3Label& super,
162  ErrorsContainer& errors);
163 
164  void O3PRM_CLASS_AGG_PARAMETERS(const O3Label& agg,
165  Size expected,
166  Size found,
167  ErrorsContainer& errors);
168 
169  void O3PRM_CLASS_AGG_PARAMETER_NOT_FOUND(const O3Label& agg,
170  const O3Label& param,
171  ErrorsContainer& errors);
172 
173  void O3PRM_INTERFACE_ILLEGAL_ARRAY(const O3Label& val,
174  ErrorsContainer& errors);
175 
176  void O3PRM_INTERFACE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
177 
178  void O3PRM_INTERFACE_AMBIGUOUS(const O3Label& val,
179  const std::vector< std::string >& matches,
180  ErrorsContainer& errors);
181 
182  void O3PRM_INTERFACE_DUPLICATE(const O3Label& val, ErrorsContainer& errors);
183 
184  void O3PRM_INTERFACE_DUPLICATE_ELEMENT(const O3InterfaceElement& elt,
185  ErrorsContainer& errors);
186 
187  void O3PRM_INTERFACE_CYCLIC_INHERITANCE(const O3Label& sub,
188  const O3Label& super,
189  ErrorsContainer& errors);
190 
191  void O3PRM_INTERFACE_SELF_REFERENCE(const O3Interface& i,
192  const O3InterfaceElement& r,
193  ErrorsContainer& errors);
194 
195  void O3PRM_INTERFACE_ILLEGAL_SUB_REFERENCE(const O3Interface& i,
196  const O3InterfaceElement& ref,
197  ErrorsContainer& errors);
198 
199  void O3PRM_INTERFACE_ILLEGAL_OVERLOAD(const O3InterfaceElement& elt,
200  ErrorsContainer& errors);
201 
202  void O3PRM_REFERENCE_NOT_FOUND(const O3Label& val, ErrorsContainer& errors);
203 
204  void O3PRM_REFERENCE_AMBIGUOUS(const O3Label& val,
205  const std::vector< std::string >& matches,
206  ErrorsContainer& errors);
207 
208  void O3PRM_SYSTEM_INSTANTIATION_FAILED(const O3System& sys,
209  ErrorsContainer& errors);
210 
211  void O3PRM_SYSTEM_NOT_A_CLASS(const O3Instance& i, ErrorsContainer& errors);
212 
213  void O3PRM_SYSTEM_DUPLICATE_INSTANCE(const O3Instance& i,
214  ErrorsContainer& errors);
215 
216  void O3PRM_SYSTEM_NOT_A_PARAMETER(const O3InstanceParameter& param,
217  ErrorsContainer& errors);
218 
219  void O3PRM_SYSTEM_PARAMETER_NOT_FOUND(const O3InstanceParameter& param,
220  ErrorsContainer& errors);
221 
222  void O3PRM_SYSTEM_PARAMETER_NOT_INT(const O3InstanceParameter& param,
223  ErrorsContainer& errors);
224 
225  void O3PRM_SYSTEM_PARAMETER_NOT_FLOAT(const O3InstanceParameter& param,
226  ErrorsContainer& errors);
227 
228  void O3PRM_SYSTEM_INVALID_LEFT_VALUE(const O3Label& val,
229  ErrorsContainer& errors);
230 
231  void O3PRM_SYSTEM_INSTANCE_NOT_FOUND(const O3Label& i,
232  ErrorsContainer& errors);
233 
234  void O3PRM_SYSTEM_REFERENCE_NOT_FOUND(const O3Label& ref,
235  const std::string& type,
236  ErrorsContainer& errors);
237 
238  void O3PRM_SYSTEM_NOT_AN_ARRAY(const O3Label& val, ErrorsContainer& errors);
239 
240  void O3PRM_DEPRECATED_TYPE_WARNING(const O3Label& type,
241  ErrorsContainer& errors);
242 
243  } // namespace o3prm
244  } // namespace prm
245 } // namespace gum
246 
247 # endif // DOXYGEN_SHOULD_SKIP_THIS
248 
249 #endif // GUM_PRM_O3PRM_ERRORS_H
std::pair< O3LabelList, O3FormulaList > O3Rule
Definition: O3prm.h:544
Errors container (at least) for parser.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
Headers for the AST of the O3PRM language.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:45