1 /** 2 * @file SedError.h 3 * @brief Definition of the SedError class. 4 * @author DEVISER 5 * 6 * <!-------------------------------------------------------------------------- 7 * This file is part of libSEDML. Please visit http://sed-ml.org for more 8 * information about SED-ML. The latest version of libSEDML can be found on 9 * github: https://github.com/fbergmann/libSEDML/ 10 * 11 12 * Copyright (c) 2013-2019, Frank T. Bergmann 13 * All rights reserved. 14 * 15 16 * Redistribution and use in source and binary forms, with or without 17 * modification, are permitted provided that the following conditions are met: 18 * 19 20 * 1. Redistributions of source code must retain the above copyright notice, 21 * this 22 * list of conditions and the following disclaimer. 23 * 2. Redistributions in binary form must reproduce the above copyright notice, 24 * this list of conditions and the following disclaimer in the documentation 25 * and/or other materials provided with the distribution. 26 * 27 * This library is free software; you can redistribute it and/or modify it 28 * under the terms of the GNU Lesser General Public License as published by the 29 * Free Software Foundation. A copy of the license agreement is provided in the 30 * file named "LICENSE.txt" included with this software distribution and also 31 * available online as http://sbml.org/software/libsbml/license.html 32 * ------------------------------------------------------------------------ --> 33 */ 34 35 36 #ifndef SedError_h 37 #define SedError_h 38 39 #include <sedml/common/extern.h> 40 #include <sbml/xml/XMLError.h> 41 #include <sedml/SedNamespaces.h> 42 43 44 LIBSEDML_CPP_NAMESPACE_BEGIN 45 BEGIN_C_DECLS 46 47 /** 48 * @enum SedErrorCode_t 49 * Codes for all SEDML-level errors and warnings from the core specification. 50 */ 51 typedef enum 52 { 53 SedUnknown = 10000 /*!< Encountered unknown internal libSEDML error. */ 54 , SedNotUTF8 = 10001 /*!< File does not use UTF-8 encoding. */ 55 , SedUnrecognizedElement = 10002 /*!< Encountered unrecognized element. */ 56 , SedNotSchemaConformant = 10003 /*!< Document does not conform to the SED-ML XML schema. */ 57 , SedInvalidMathElement = 10201 58 , SedMissingAnnotationNamespace = 10401 /*!< Missing declaration of the XML namespace for the annotation. */ 59 , SedDuplicateAnnotationNamespaces = 10402 /*!< Multiple annotations using the same XML namespace. */ 60 , SedNamespaceInAnnotation = 10403 /*!< The SED-ML XML namespace cannot be used in an Annotation object. */ 61 , SedMultipleAnnotations = 10404 /*!< Only one Annotation object is permitted under a given SED-ML object. */ 62 , SedAnnotationNotElement = 10405 63 , SedNotesNotInXHTMLNamespace = 10801 /*!< Notes must be placed in the XHTML XML namespace. */ 64 , SedNotesContainsXMLDecl = 10802 /*!< XML declarations are not permitted in Notes objects. */ 65 , SedNotesContainsDOCTYPE = 10803 /*!< XML DOCTYPE elements are not permitted in Notes objects. */ 66 , SedInvalidNotesContent = 10804 /*!< Invalid notes content found. */ 67 , SedOnlyOneNotesElementAllowed = 10805 /*!< Only one Notes subobject is permitted on a given SED-ML object. */ 68 , SedmlNSUndeclared = 10101 69 , SedmlElementNotInNs = 10102 70 , SedmlDuplicateComponentId = 10301 71 , SedmlIdSyntaxRule = 10302 72 , SedInvalidMetaidSyntax = 10303 73 , InvalidNamespaceOnSed = 20101 74 , SedAllowedAttributes = 20102 75 , SedEmptyListElement = 20103 76 , SedmlDocumentAllowedCoreAttributes = 20201 77 , SedmlDocumentAllowedCoreElements = 20202 78 , SedmlDocumentAllowedAttributes = 20203 79 , SedmlDocumentAllowedElements = 20204 80 , SedmlDocumentLevelMustBeNonNegativeInteger = 20205 81 , SedmlDocumentVersionMustBeNonNegativeInteger = 20206 82 , SedmlDocumentLODataDescriptionsAllowedCoreElements = 20207 83 , SedmlDocumentLOModelsAllowedCoreElements = 20208 84 , SedmlDocumentLOSimulationsAllowedCoreElements = 20209 85 , SedmlDocumentLOTasksAllowedCoreElements = 20210 86 , SedmlDocumentLODataGeneratorsAllowedCoreElements = 20211 87 , SedmlDocumentLOOutputsAllowedCoreElements = 20212 88 , SedmlDocumentLOStylesAllowedCoreElements = 20213 89 , SedmlDocumentLODataDescriptionsAllowedCoreAttributes = 20214 90 , SedmlDocumentLOModelsAllowedCoreAttributes = 20215 91 , SedmlDocumentLOSimulationsAllowedCoreAttributes = 20216 92 , SedmlDocumentLOTasksAllowedCoreAttributes = 20217 93 , SedmlDocumentLODataGeneratorsAllowedCoreAttributes = 20218 94 , SedmlDocumentLOOutputsAllowedCoreAttributes = 20219 95 , SedmlDocumentLOStylesAllowedCoreAttributes = 20220 96 , SedmlDocumentLOAlgorithmParametersAllowedCoreElements = 20221 97 , SedmlDocumentLOAlgorithmParametersAllowedCoreAttributes = 20222 98 , SedmlModelAllowedCoreAttributes = 20301 99 , SedmlModelAllowedCoreElements = 20302 100 , SedmlModelAllowedAttributes = 20303 101 , SedmlModelAllowedElements = 20304 102 , SedmlModelSourceMustBeString = 20305 103 , SedmlModelNameMustBeString = 20306 104 , SedmlModelLanguageMustBeString = 20307 105 , SedmlModelLOChangesAllowedCoreElements = 20308 106 , SedmlModelLOChangesAllowedCoreAttributes = 20309 107 , SedmlChangeAllowedCoreAttributes = 20401 108 , SedmlChangeAllowedCoreElements = 20402 109 , SedmlChangeAllowedAttributes = 20403 110 , SedmlChangeTargetMustBeString = 20404 111 , SedmlAddXMLAllowedCoreAttributes = 20501 112 , SedmlAddXMLAllowedCoreElements = 20502 113 , SedmlAddXMLAllowedElements = 20503 114 , SedmlChangeAttributeAllowedCoreAttributes = 20601 115 , SedmlChangeAttributeAllowedCoreElements = 20602 116 , SedmlChangeAttributeAllowedAttributes = 20603 117 , SedmlChangeAttributeNewValueMustBeString = 20604 118 , SedmlVariableAllowedCoreAttributes = 20701 119 , SedmlVariableAllowedCoreElements = 20702 120 , SedmlVariableAllowedAttributes = 20703 121 , SedmlVariableAllowedElements = 20704 122 , SedmlVariableSymbolMustBeString = 20705 123 , SedmlVariableTargetMustBeString = 20706 124 , SedmlVariableTaskReferenceMustBeAbstractTask = 20707 125 , SedmlVariableModelReferenceMustBeModel = 20708 126 , SedmlVariableTermMustBeString = 20709 127 , SedmlVariableSymbol2MustBeString = 20710 128 , SedmlVariableTarget2MustBeString = 20711 129 , SedmlVariableDimensionTermMustBeString = 20712 130 , SedmlVariableLOAppliedDimensionsAllowedCoreElements = 20713 131 , SedmlVariableLOAppliedDimensionsAllowedCoreAttributes = 20714 132 , SedmlVariableNameMustBeString = 20715 133 , SedmlParameterAllowedCoreAttributes = 20801 134 , SedmlParameterAllowedCoreElements = 20802 135 , SedmlParameterAllowedAttributes = 20803 136 , SedmlParameterValueMustBeDouble = 20804 137 , SedmlParameterNameMustBeString = 20805 138 , SedmlSimulationAllowedCoreAttributes = 20901 139 , SedmlSimulationAllowedCoreElements = 20902 140 , SedmlSimulationAllowedAttributes = 20903 141 , SedmlSimulationAllowedElements = 20904 142 , SedmlSimulationNameMustBeString = 20905 143 , SedmlUniformTimeCourseAllowedCoreAttributes = 21001 144 , SedmlUniformTimeCourseAllowedCoreElements = 21002 145 , SedmlUniformTimeCourseAllowedAttributes = 21003 146 , SedmlUniformTimeCourseInitialTimeMustBeDouble = 21004 147 , SedmlUniformTimeCourseOutputStartTimeMustBeDouble = 21005 148 , SedmlUniformTimeCourseOutputEndTimeMustBeDouble = 21006 149 , SedmlUniformTimeCourseNumberOfPointsMustBeInteger = 21007 150 , SedmlUniformTimeCourseNumberOfStepsMustBeInteger = 21008 151 , SedmlAlgorithmAllowedCoreAttributes = 21101 152 , SedmlAlgorithmAllowedCoreElements = 21102 153 , SedmlAlgorithmAllowedAttributes = 21103 154 , SedmlAlgorithmAllowedElements = 21104 155 , SedmlAlgorithmKisaoIDMustBeString = 21105 156 , SedmlAlgorithmLOAlgorithmParametersAllowedCoreElements = 21106 157 , SedmlAlgorithmLOAlgorithmParametersAllowedCoreAttributes = 21107 158 , SedmlAbstractTaskAllowedCoreAttributes = 21201 159 , SedmlAbstractTaskAllowedCoreElements = 21202 160 , SedmlAbstractTaskAllowedAttributes = 21203 161 , SedmlAbstractTaskNameMustBeString = 21204 162 , SedmlTaskAllowedCoreAttributes = 21301 163 , SedmlTaskAllowedCoreElements = 21302 164 , SedmlTaskAllowedAttributes = 21303 165 , SedmlTaskModelReferenceMustBeModel = 21304 166 , SedmlTaskSimulationReferenceMustBeSimulation = 21305 167 , SedmlDataGeneratorAllowedCoreAttributes = 21401 168 , SedmlDataGeneratorAllowedCoreElements = 21402 169 , SedmlDataGeneratorAllowedAttributes = 21403 170 , SedmlDataGeneratorAllowedElements = 21404 171 , SedmlDataGeneratorNameMustBeString = 21405 172 , SedmlDataGeneratorLOVariablesAllowedCoreElements = 21406 173 , SedmlDataGeneratorLOParametersAllowedCoreElements = 21407 174 , SedmlDataGeneratorLOVariablesAllowedCoreAttributes = 21408 175 , SedmlDataGeneratorLOParametersAllowedCoreAttributes = 21409 176 , SedmlOutputAllowedCoreAttributes = 21501 177 , SedmlOutputAllowedCoreElements = 21502 178 , SedmlOutputAllowedAttributes = 21503 179 , SedmlOutputNameMustBeString = 21504 180 , SedmlPlotAllowedCoreAttributes = 21601 181 , SedmlPlotAllowedCoreElements = 21602 182 , SedmlPlotAllowedAttributes = 21603 183 , SedmlPlotAllowedElements = 21604 184 , SedmlPlotLegendMustBeBoolean = 21605 185 , SedmlPlotHeightMustBeDouble = 21606 186 , SedmlPlotWidthMustBeDouble = 21607 187 , SedmlPlot2DAllowedCoreAttributes = 21701 188 , SedmlPlot2DAllowedCoreElements = 21702 189 , SedmlPlot2DAllowedElements = 21703 190 , SedmlPlot2DLOCurvesAllowedCoreElements = 21704 191 , SedmlPlot2DLOCurvesAllowedCoreAttributes = 21705 192 , SedmlPlot3DAllowedCoreAttributes = 21801 193 , SedmlPlot3DAllowedCoreElements = 21802 194 , SedmlPlot3DAllowedElements = 21803 195 , SedmlPlot3DLOSurfacesAllowedCoreElements = 21804 196 , SedmlPlot3DLOSurfacesAllowedCoreAttributes = 21805 197 , SedmlAbstractCurveAllowedCoreAttributes = 21901 198 , SedmlAbstractCurveAllowedCoreElements = 21902 199 , SedmlAbstractCurveAllowedAttributes = 21903 200 , SedmlAbstractCurveNameMustBeString = 21904 201 , SedmlAbstractCurveLogXMustBeBoolean = 21905 202 , SedmlAbstractCurveOrderMustBeInteger = 21906 203 , SedmlAbstractCurveStyleMustBeStyle = 21907 204 , SedmlAbstractCurveYAxisMustBeString = 21908 205 , SedmlAbstractCurveXDataReferenceMustBeDataReference = 21909 206 , SedmlCurveAllowedCoreAttributes = 22001 207 , SedmlCurveAllowedCoreElements = 22002 208 , SedmlCurveAllowedAttributes = 22003 209 , SedmlCurveYDataReferenceMustBeDataGenerator = 22004 210 , SedmlCurveLogYMustBeBoolean = 22005 211 , SedmlCurveTypeMustBeCurveTypeEnum = 22006 212 , SedmlCurveXErrorUpperMustBeDataGenerator = 22007 213 , SedmlCurveXErrorLowerMustBeDataGenerator = 22008 214 , SedmlCurveYErrorUpperMustBeDataGenerator = 22009 215 , SedmlCurveYErrorLowerMustBeDataGenerator = 22010 216 , SedmlSurfaceAllowedCoreAttributes = 22101 217 , SedmlSurfaceAllowedCoreElements = 22102 218 , SedmlSurfaceAllowedAttributes = 22103 219 , SedmlSurfaceZDataReferenceMustBeDataGenerator = 22104 220 , SedmlSurfaceNameMustBeString = 22105 221 , SedmlSurfaceXDataReferenceMustBeDataGenerator = 22106 222 , SedmlSurfaceYDataReferenceMustBeDataGenerator = 22107 223 , SedmlSurfaceTypeMustBeSurfaceTypeEnum = 22108 224 , SedmlSurfaceStyleMustBeStyle = 22109 225 , SedmlSurfaceLogXMustBeBoolean = 22110 226 , SedmlSurfaceLogYMustBeBoolean = 22111 227 , SedmlSurfaceLogZMustBeBoolean = 22112 228 , SedmlSurfaceOrderMustBeInteger = 22113 229 , SedmlDataSetAllowedCoreAttributes = 22201 230 , SedmlDataSetAllowedCoreElements = 22202 231 , SedmlDataSetAllowedAttributes = 22203 232 , SedmlDataSetLabelMustBeString = 22204 233 , SedmlDataSetDataReferenceMustBeDataGenerator = 22205 234 , SedmlDataSetNameMustBeString = 22206 235 , SedmlReportAllowedCoreAttributes = 22301 236 , SedmlReportAllowedCoreElements = 22302 237 , SedmlReportAllowedElements = 22303 238 , SedmlReportLODataSetsAllowedCoreElements = 22304 239 , SedmlReportLODataSetsAllowedCoreAttributes = 22305 240 , SedmlAlgorithmParameterAllowedCoreAttributes = 22401 241 , SedmlAlgorithmParameterAllowedCoreElements = 22402 242 , SedmlAlgorithmParameterAllowedAttributes = 22403 243 , SedmlAlgorithmParameterAllowedElements = 22404 244 , SedmlAlgorithmParameterKisaoIDMustBeString = 22405 245 , SedmlAlgorithmParameterValueMustBeString = 22406 246 , SedmlAlgorithmParameterLOAlgorithmParametersAllowedCoreElements = 22407 247 , SedmlAlgorithmParameterLOAlgorithmParametersAllowedCoreAttributes = 22408 248 , SedmlRangeAllowedCoreAttributes = 22501 249 , SedmlRangeAllowedCoreElements = 22502 250 , SedmlRangeAllowedAttributes = 22503 251 , SedmlChangeXMLAllowedCoreAttributes = 22601 252 , SedmlChangeXMLAllowedCoreElements = 22602 253 , SedmlChangeXMLAllowedElements = 22603 254 , SedmlRemoveXMLAllowedCoreAttributes = 22701 255 , SedmlRemoveXMLAllowedCoreElements = 22702 256 , SedmlSetValueAllowedCoreAttributes = 22801 257 , SedmlSetValueAllowedCoreElements = 22802 258 , SedmlSetValueAllowedAttributes = 22803 259 , SedmlSetValueAllowedElements = 22804 260 , SedmlSetValueModelReferenceMustBeModel = 22805 261 , SedmlSetValueSymbolMustBeString = 22806 262 , SedmlSetValueTargetMustBeString = 22807 263 , SedmlSetValueRangeMustBeRange = 22808 264 , SedmlUniformRangeAllowedCoreAttributes = 22901 265 , SedmlUniformRangeAllowedCoreElements = 22902 266 , SedmlUniformRangeAllowedAttributes = 22903 267 , SedmlUniformRangeStartMustBeDouble = 22904 268 , SedmlUniformRangeEndMustBeDouble = 22905 269 , SedmlUniformRangeNumberOfPointsMustBeInteger = 22906 270 , SedmlUniformRangeTypeMustBeString = 22907 271 , SedmlVectorRangeAllowedCoreAttributes = 23001 272 , SedmlVectorRangeAllowedCoreElements = 23002 273 , SedmlVectorRangeAllowedAttributes = 23003 274 , SedmlVectorRangeValueMustBeString = 23004 275 , SedmlFunctionalRangeAllowedCoreAttributes = 23101 276 , SedmlFunctionalRangeAllowedCoreElements = 23102 277 , SedmlFunctionalRangeAllowedAttributes = 23103 278 , SedmlFunctionalRangeAllowedElements = 23104 279 , SedmlFunctionalRangeRangeMustBeRange = 23105 280 , SedmlFunctionalRangeLOVariablesAllowedCoreElements = 23106 281 , SedmlFunctionalRangeLOParametersAllowedCoreElements = 23107 282 , SedmlFunctionalRangeLOVariablesAllowedCoreAttributes = 23108 283 , SedmlFunctionalRangeLOParametersAllowedCoreAttributes = 23109 284 , SedmlSubTaskAllowedCoreAttributes = 23201 285 , SedmlSubTaskAllowedCoreElements = 23202 286 , SedmlSubTaskAllowedAttributes = 23203 287 , SedmlSubTaskOrderMustBeInteger = 23204 288 , SedmlSubTaskTaskMustBeAbstractTask = 23205 289 , SedmlSubTaskAllowedElements = 23206 290 , SedmlOneStepAllowedCoreAttributes = 23301 291 , SedmlOneStepAllowedCoreElements = 23302 292 , SedmlOneStepAllowedAttributes = 23303 293 , SedmlOneStepStepMustBeDouble = 23304 294 , SedmlSteadyStateAllowedCoreAttributes = 23401 295 , SedmlSteadyStateAllowedCoreElements = 23402 296 , SedmlAnalysisAllowedCoreAttributes = 23403 297 , SedmlAnalysisAllowedCoreElements = 23404 298 , SedmlRepeatedTaskAllowedCoreAttributes = 23501 299 , SedmlRepeatedTaskAllowedCoreElements = 23502 300 , SedmlRepeatedTaskAllowedAttributes = 23503 301 , SedmlRepeatedTaskAllowedElements = 23504 302 , SedmlRepeatedTaskRangeMustBeRange = 23505 303 , SedmlRepeatedTaskResetModelMustBeBoolean = 23506 304 , SedmlRepeatedTaskLORangesAllowedCoreElements = 23507 305 , SedmlRepeatedTaskLOSetValuesAllowedCoreElements = 23508 306 , SedmlRepeatedTaskLOSubTasksAllowedCoreElements = 23509 307 , SedmlRepeatedTaskLORangesAllowedCoreAttributes = 23510 308 , SedmlRepeatedTaskLOSetValuesAllowedCoreAttributes = 23511 309 , SedmlRepeatedTaskLOSubTasksAllowedCoreAttributes = 23512 310 , SedmlRepeatedTaskConcatenateMustBeBoolean = 23513 311 , SedmlComputeChangeAllowedCoreAttributes = 23601 312 , SedmlComputeChangeAllowedCoreElements = 23602 313 , SedmlComputeChangeAllowedElements = 23603 314 , SedmlComputeChangeLOVariablesAllowedCoreElements = 23604 315 , SedmlComputeChangeLOParametersAllowedCoreElements = 23605 316 , SedmlComputeChangeLOVariablesAllowedCoreAttributes = 23606 317 , SedmlComputeChangeLOParametersAllowedCoreAttributes = 23607 318 , SedmlDataDescriptionAllowedCoreAttributes = 23701 319 , SedmlDataDescriptionAllowedCoreElements = 23702 320 , SedmlDataDescriptionAllowedAttributes = 23703 321 , SedmlDataDescriptionAllowedElements = 23704 322 , SedmlDataDescriptionNameMustBeString = 23705 323 , SedmlDataDescriptionFormatMustBeString = 23706 324 , SedmlDataDescriptionSourceMustBeString = 23707 325 , SedmlDataDescriptionLODataSourcesAllowedCoreElements = 23708 326 , SedmlDataDescriptionLODataSourcesAllowedCoreAttributes = 23709 327 , SedmlDataSourceAllowedCoreAttributes = 23801 328 , SedmlDataSourceAllowedCoreElements = 23802 329 , SedmlDataSourceAllowedAttributes = 23803 330 , SedmlDataSourceAllowedElements = 23804 331 , SedmlDataSourceNameMustBeString = 23805 332 , SedmlDataSourceIndexSetMustBeSId = 23806 333 , SedmlDataSourceLOSlicesAllowedCoreElements = 23807 334 , SedmlDataSourceLOSlicesAllowedCoreAttributes = 23808 335 , SedmlSliceAllowedCoreAttributes = 23901 336 , SedmlSliceAllowedCoreElements = 23902 337 , SedmlSliceAllowedAttributes = 23903 338 , SedmlSliceReferenceMustBeSId = 23904 339 , SedmlSliceValueMustBeString = 23905 340 , SedmlSliceIndexMustBeSId = 23906 341 , SedmlSliceStartIndexMustBeInteger = 23907 342 , SedmlSliceEndIndexMustBeInteger = 23908 343 , SedmlParameterEstimationTaskAllowedCoreAttributes = 24001 344 , SedmlParameterEstimationTaskAllowedCoreElements = 24002 345 , SedmlParameterEstimationTaskAllowedElements = 24003 346 , SedmlParameterEstimationTaskLOAdjustableParametersAllowedCoreElements = 24004 347 , SedmlParameterEstimationTaskLOFitExperimentsAllowedCoreElements = 24005 348 , SedmlParameterEstimationTaskLOAdjustableParametersAllowedCoreAttributes = 24006 349 , SedmlParameterEstimationTaskLOFitExperimentsAllowedCoreAttributes = 24007 350 , SedmlObjectiveAllowedCoreAttributes = 24101 351 , SedmlObjectiveAllowedCoreElements = 24102 352 , SedmlLeastSquareObjectiveFunctionAllowedCoreAttributes = 24201 353 , SedmlLeastSquareObjectiveFunctionAllowedCoreElements = 24202 354 , SedmlAdjustableParameterAllowedCoreAttributes = 24301 355 , SedmlAdjustableParameterAllowedCoreElements = 24302 356 , SedmlAdjustableParameterAllowedAttributes = 24303 357 , SedmlAdjustableParameterAllowedElements = 24304 358 , SedmlAdjustableParameterInitialValueMustBeDouble = 24305 359 , SedmlAdjustableParameterModelReferenceMustBeModel = 24306 360 , SedmlAdjustableParameterTargetMustBeString = 24307 361 , SedmlAdjustableParameterLOExperimentReferencesAllowedCoreElements = 24308 362 , SedmlAdjustableParameterLOExperimentReferencesAllowedCoreAttributes = 24309 363 , SedmlExperimentReferenceAllowedCoreAttributes = 24401 364 , SedmlExperimentReferenceAllowedCoreElements = 24402 365 , SedmlExperimentReferenceAllowedAttributes = 24403 366 , SedmlExperimentReferenceExperimentIdMustBeFitExperiment = 24404 367 , SedmlFitExperimentAllowedCoreAttributes = 24501 368 , SedmlFitExperimentAllowedCoreElements = 24502 369 , SedmlFitExperimentAllowedAttributes = 24503 370 , SedmlFitExperimentAllowedElements = 24504 371 , SedmlFitExperimentTypeMustBeExperimentTypeEnum = 24505 372 , SedmlFitExperimentLOFitMappingsAllowedCoreElements = 24506 373 , SedmlFitExperimentLOFitMappingsAllowedCoreAttributes = 24507 374 , SedmlFitMappingAllowedCoreAttributes = 24601 375 , SedmlFitMappingAllowedCoreElements = 24602 376 , SedmlFitMappingAllowedAttributes = 24603 377 , SedmlFitMappingDataSourceMustBeDataSource = 24604 378 , SedmlFitMappingTargetMustBeDataGenerator = 24605 379 , SedmlFitMappingTypeMustBeMappingTypeEnum = 24606 380 , SedmlFitMappingWeightMustBeDouble = 24607 381 , SedmlFitMappingPointWeightMustBeDataSource = 24608 382 , SedmlBoundsAllowedCoreAttributes = 24701 383 , SedmlBoundsAllowedCoreElements = 24702 384 , SedmlBoundsAllowedAttributes = 24703 385 , SedmlBoundsLowerBoundMustBeDouble = 24704 386 , SedmlBoundsUpperBoundMustBeDouble = 24705 387 , SedmlBoundsScaleMustBeScaleTypeEnum = 24706 388 , SedmlFigureAllowedCoreAttributes = 24801 389 , SedmlFigureAllowedCoreElements = 24802 390 , SedmlFigureAllowedAttributes = 24803 391 , SedmlFigureAllowedElements = 24804 392 , SedmlFigureNumRowsMustBeInteger = 24805 393 , SedmlFigureNumColsMustBeInteger = 24806 394 , SedmlFigureLOSubPlotsAllowedCoreElements = 24807 395 , SedmlFigureLOSubPlotsAllowedCoreAttributes = 24808 396 , SedmlSubPlotAllowedCoreAttributes = 24901 397 , SedmlSubPlotAllowedCoreElements = 24902 398 , SedmlSubPlotAllowedAttributes = 24903 399 , SedmlSubPlotPlotMustBePlot = 24904 400 , SedmlSubPlotRowMustBeInteger = 24905 401 , SedmlSubPlotColMustBeInteger = 24906 402 , SedmlSubPlotRowSpanMustBeInteger = 24907 403 , SedmlSubPlotColSpanMustBeInteger = 24908 404 , SedmlAxisAllowedCoreAttributes = 25001 405 , SedmlAxisAllowedCoreElements = 25002 406 , SedmlAxisAllowedAttributes = 25003 407 , SedmlAxisTypeMustBeAxisTypeEnum = 25004 408 , SedmlAxisMinMustBeDouble = 25005 409 , SedmlAxisMaxMustBeDouble = 25006 410 , SedmlAxisGridMustBeBoolean = 25007 411 , SedmlAxisStyleMustBeStyle = 25008 412 , SedmlAxisReverseMustBeBoolean = 25009 413 , SedmlStyleAllowedCoreAttributes = 25101 414 , SedmlStyleAllowedCoreElements = 25102 415 , SedmlStyleAllowedAttributes = 25103 416 , SedmlStyleAllowedElements = 25104 417 , SedmlStyleBaseStyleMustBeStyle = 25105 418 , SedmlLineAllowedCoreAttributes = 25201 419 , SedmlLineAllowedCoreElements = 25202 420 , SedmlLineAllowedAttributes = 25203 421 , SedmlLineTypeMustBeLineTypeEnum = 25204 422 , SedmlLineColorMustBeString = 25205 423 , SedmlLineThicknessMustBeDouble = 25206 424 , SedmlMarkerAllowedCoreAttributes = 25301 425 , SedmlMarkerAllowedCoreElements = 25302 426 , SedmlMarkerAllowedAttributes = 25303 427 , SedmlMarkerSizeMustBeDouble = 25304 428 , SedmlMarkerTypeMustBeMarkerTypeEnum = 25305 429 , SedmlMarkerFillMustBeString = 25306 430 , SedmlMarkerLineColorMustBeString = 25307 431 , SedmlMarkerLineThicknessMustBeDouble = 25308 432 , SedmlFillAllowedCoreAttributes = 25401 433 , SedmlFillAllowedCoreElements = 25402 434 , SedmlFillAllowedAttributes = 25403 435 , SedmlFillColorMustBeString = 25404 436 , SedmlFillSecondColorMustBeString = 25405 437 , SedmlDependentVariableAllowedCoreAttributes = 25501 438 , SedmlDependentVariableAllowedCoreElements = 25502 439 , SedmlDependentVariableAllowedAttributes = 25503 440 , SedmlDependentVariableTermMustBeString = 25504 441 , SedmlDependentVariableTarget2MustBeString = 25505 442 , SedmlDependentVariableSymbol2MustBeString = 25506 443 , SedmlAppliedDimensionAllowedCoreAttributes = 25601 444 , SedmlAppliedDimensionAllowedCoreElements = 25602 445 , SedmlAppliedDimensionAllowedAttributes = 25603 446 , SedmlAppliedDimensionTargetMustBeSId = 25604 447 , SedmlAppliedDimensionDimensionTargetMustBeSId = 25605 448 , SedmlDataRangeAllowedCoreAttributes = 25701 449 , SedmlDataRangeAllowedCoreElements = 25702 450 , SedmlDataRangeAllowedAttributes = 25703 451 , SedmlDataRangeSourceReferenceMustBeSId = 25704 452 , SedmlShadedAreaAllowedCoreAttributes = 25901 453 , SedmlShadedAreaAllowedCoreElements = 25902 454 , SedmlShadedAreaAllowedAttributes = 25903 455 , SedmlShadedAreaYDataReferenceFromMustBeDataGenerator = 25904 456 , SedmlShadedAreaYDataReferenceToMustBeDataGenerator = 25905 457 , SedmlParameterEstimationResultPlotAllowedCoreAttributes = 26001 458 , SedmlParameterEstimationResultPlotAllowedCoreElements = 26002 459 , SedmlParameterEstimationResultPlotAllowedAttributes = 26003 460 , SedmlParameterEstimationResultPlotTaskReferenceMustBeTask = 26004 461 , SedmlWaterfallPlotAllowedCoreAttributes = 26101 462 , SedmlWaterfallPlotAllowedCoreElements = 26102 463 , SedmlWaterfallPlotAllowedAttributes = 26103 464 , SedmlWaterfallPlotTaskReferenceMustBeTask = 26104 465 , SedmlParameterEstimationReportAllowedCoreAttributes = 26201 466 , SedmlParameterEstimationReportAllowedCoreElements = 26202 467 , SedmlParameterEstimationReportAllowedAttributes = 26203 468 , SedmlParameterEstimationReportTaskReferenceMustBeTask = 26204 469 , SedUnknownCoreAttribute = 99994 /*!< Encountered an unknown attribute in the SED-ML Core namespace. */ 470 , SedCodesUpperBound = 99999 /*!< Upper boundary of libSEDML-specific diagnostic codes. */ 471 } SedErrorCode_t; 472 473 474 /** 475 * @enum SedErrorCategory_t 476 * Category codes for SedError diagnostics. 477 * 478 * Note that these are distinct from XMLError's category codes. User 479 * programs receiving an SedError object can use this distinction to 480 * check whether the error represents a low-level XML problem or a 481 * SED-ML problem. 482 * 483 * @see #XMLErrorCategory_t 484 */ 485 typedef enum 486 { 487 LIBSEDML_CAT_INTERNAL = LIBSBML_CAT_INTERNAL, 488 LIBSEDML_CAT_SYSTEM = LIBSBML_CAT_SYSTEM, 489 LIBSEDML_CAT_XML = LIBSBML_CAT_XML, 490 491 LIBSEDML_CAT_SEDML = (LIBSEDML_CAT_XML + 1) 492 /*!< General SED-ML error not falling into another category below. */ 493 494 , LIBSEDML_CAT_GENERAL_CONSISTENCY 495 /*!< Category of errors that can occur while validating general SED-ML 496 * constructs. */ 497 498 , LIBSEDML_CAT_IDENTIFIER_CONSISTENCY 499 /*!< Category of errors that can occur while validating symbol 500 * identifiers in a model. */ 501 502 , LIBSEDML_CAT_MATHML_CONSISTENCY 503 /*!< Category of errors that can occur while validating MathML formulas 504 * in a model. With respect to the SED-ML specification, these concern 505 * failures in applying the validation rules numbered 102xx in the 506 * Level 2 Versions 2–4 507 * and Level 3 Version 1 specifications. */ 508 509 , LIBSEDML_CAT_INTERNAL_CONSISTENCY 510 /*!< Category of errors that can occur while validating libSEDML's 511 * internal representation of SED-ML constructs. (These are tests 512 * performed by libSEDML and do not have equivalent SED-ML validation 513 * rules.) */ 514 515 } SedErrorCategory_t; 516 517 518 /** 519 * @enum SedErrorSeverity_t 520 * Severity codes for SedError diagnostics. 521 * 522 * The only publicly-reported values of this type are the four from #XMLErrorSeverity_t. 523 * All other values are used internally only, with translation of those 524 * codes done in SedError.cpp 525 * 526 * @see XMLErrorSeverity_t 527 */ 528 typedef enum 529 { 530 /** @cond doxygenLibsedmlInternal **/ 531 532 /* The following are used internally in SedErrorTable, but publicly, 533 * we only report one of the 4 XMLError_Severity values. Translation 534 * of the codes is done in SedError.cpp. 535 */ 536 LIBSEDML_SEV_WARNING = LIBSBML_SEV_WARNING, 537 LIBSEDML_SEV_ERROR = LIBSBML_SEV_ERROR, 538 LIBSEDML_SEV_FATAL = LIBSBML_SEV_FATAL, 539 540 LIBSEDML_SEV_SCHEMA_ERROR = (LIBSEDML_SEV_FATAL + 1) 541 /*!< The XML content does not conform to 542 * the relevant version of the SED-ML XML 543 * Schema. The content is not valid SED-ML. */ 544 545 , LIBSEDML_SEV_GENERAL_WARNING 546 /*!< The XML content is invalid for some 547 * levels/versions of SED-ML, and while it 548 * may be valid in others, it is something 549 * that is best avoided anyway. LibSEDML 550 * will issue warnings in those cases it 551 * can recognize. */ 552 553 , LIBSEDML_SEV_NOT_APPLICABLE 554 /*!< This error code is only a placeholder 555 * for errors that have relevance to some 556 * versions of SED-ML but not others. */ 557 558 /** @endcond **/ 559 } SedErrorSeverity_t; 560 561 END_C_DECLS 562 LIBSEDML_CPP_NAMESPACE_END 563 564 #ifdef __cplusplus 565 566 LIBSEDML_CPP_NAMESPACE_BEGIN 567 568 class LIBSEDML_EXTERN SedError : public XMLError 569 { 570 public: 571 572 /** 573 * Creates a new SedError to report that something occurred during SED-ML 574 * processing. 575 * 576 * When a libSEDML operation on SED-ML content results in a warning, error 577 * or other diagnostic, the issue is reported as an SedError object. 578 * SedError objects have identification numbers to indicate the nature 579 * of the exception. @if clike These numbers are drawn from 580 * the enumeration <a class="el" 581 * href="#SedErrorCode_t"> 582 * SedErrorCode_t</a>. @endif@if java These numbers are 583 * defined as unsigned integer constants in the file 584 * "libsedmlConstants.html". See the <a class="el" 585 * href="#SedErrorCode_t">top of this documentation page</a> for a table 586 * listing the possible values and their meanings. @endif@if python These 587 * numbers are defined as unsigned integer constants in the interface 588 * class @link libsedml libsedml@endlink. See the <a class="el" 589 * href="#SedErrorCode_t">top of this documentation page</a> for a table 590 * listing the possible values and their meanings. @endif@~ The argument 591 * @p errorId to this constructor @em can be (but does not have to be) a 592 * value from this @if clike enumeration. If it @em is a value 593 * from <a class="el" href="#SedErrorCode_t">SedErrorCode_t</a>, the 594 * SedError class assumes the error is a low-level system or SED-ML layer 595 * error and <em>prepends</em> a built-in, predefined error message to 596 * any string passed in the argument @p details to this constructor. In 597 * addition, all <a class="el" 598 * href="#SedErrorCode_t">SedErrorCode_t</a> errors have associated 599 * values for the @p severity and @p category codes, and these fields are 600 * filled-in as well from the enumerations <a class="el" 601 * href="#SedErrorSeverity_t">SedErrorSeverity_t</a> and <a class="el" 602 * href="#SedErrorCategory_t">SedErrorCategory_t</a>, 603 * respectively. @else set of constants. If it @em 604 * is one of the predefined error identifiers, the SedError class 605 * assumes the error is a low-level system or SED-ML layer error and 606 * <em>prepends</em> a built-in, predefined error message to any string 607 * passed in the argument @p details to this constructor. In addition, 608 * all the predefined error identifiers have associated values for the 609 * @p severity and @p category codes, and these fields are filled-in using 610 * the libSEDML defaults for each different error identifier. @endif@~ 611 * 612 * If the error identifier @p errorId is a number greater than 99999, the 613 * SedError class assumes the error was generated from another part of 614 * the software and does not do additional filling in of values beyond 615 * the default in the constructor itself. This allows SedError to serve 616 * as a base class for other errors, such as for user-defined validation 617 * rules (see Validator). Callers should fill in all the parameters with 618 * suitable values if generating errors with codes greater than 99999 to 619 * make maximum use of the SedError facilities. 620 * 621 * @if clike As mentioned above, there are two other 622 * enumerations, <a class="el" 623 * href="#SedErrorSeverity_t">SedErrorSeverity_t</a> and <a class="el" 624 * href="#SedErrorCategory_t">SedErrorCategory_t</a>, used for indicating 625 * the severity and category of error for the predefined SedError codes. 626 * The values passed in @p severity and @p category override the defaults 627 * assigned based on the error code. If the value of @p errorId is a 628 * value from <a class="el" href="#SedErrorCode_t">SedErrorCode_t</a>, 629 * callers do not need to fill in @p severity and @p category. 630 * Conversely, if @p errorId is not a value from <a class="el" 631 * href="#SedErrorCode_t">SedErrorCode_t</a>, callers can use other 632 * values (not just those from <a class="el" 633 * href="#SedErrorSeverity_t">SedErrorSeverity_t</a> and <a class="el" 634 * href="#SedErrorCategory_t">SedErrorCategory_t</a>, but their own 635 * special values) for @p severity and 636 * @p category. @else As mentioned above, 637 * there are additional constants defined for <a class="el" 638 * href="#SedErrorSeverity_t">standard severity</a> and <a class="el" 639 * href="#SedErrorCategory_t">standard category</a> codes, and every predefined 640 * error in libSEDML has an associated value for severity and category taken 641 * from these predefined sets. These constants have symbol names 642 * prefixed with <code>LIBSEDML_SEV_</code> and <code>LIBSEDML_CAT_</code>, 643 * respectively. If the value of @p errorId is one of the standard error 644 * codes, callers do not need to fill in @p severity and @p category in a 645 * call to this constructor. Conversely, if @p errorId is not an existing 646 * SEDML-level error code, callers can use other values for @p severity and 647 * @p category. @endif@~ 648 * 649 * Please see the top of the documentation for SedError for a longer 650 * discussion of the possible error codes, their meanings, and their 651 * applicability to different combinations of Level+Version of SED-ML. 652 * 653 * @param errorId an unsigned int, the identification number of the error. 654 * 655 * @param level the SED-ML Level of the SED-ML model 656 * 657 * @param version the SED-ML Version within the Level of the SED-ML model 658 * 659 * @param details a string containing additional details about the error. 660 * If the error code in @p errorId is one that is recognized by SedError, 661 * the given message is @em appended to a predefined message associated 662 * with the given code. If the error code is not recognized, the message 663 * is stored as-is as the text of the error. 664 * 665 * @param line an unsigned int, the line number at which the error occured. 666 * 667 * @param column an unsigned int, the column number at which the error occured. 668 * 669 * @param severity an integer indicating severity of the error. 670 * 671 * @param category an integer indicating the category to which the error 672 * belongs. 673 */ 674 SedError 675 ( 676 const unsigned int errorId = 0 677 , const unsigned int level = SEDML_DEFAULT_LEVEL 678 , const unsigned int version = SEDML_DEFAULT_VERSION 679 , const std::string& details = "" 680 , const unsigned int line = 0 681 , const unsigned int column = 0 682 , const unsigned int severity = LIBSEDML_SEV_ERROR 683 , const unsigned int category = LIBSEDML_CAT_SEDML 684 ); 685 686 687 /** 688 * Copy constructor; creates a copy of this SedError. 689 */ 690 SedError(const SedError& orig); 691 692 /** 693 * Destroys this SedError. 694 */ 695 virtual ~SedError(); 696 697 SedError& operator=(const SedError& rhs); 698 699 #ifndef SWIG 700 701 /** @cond doxygenLibsedmlInternal **/ 702 703 /** 704 * Creates and returns a deep copy of this SedError object. 705 * 706 * @return the (deep) copy of this SedError object. 707 */ 708 virtual SedError* clone() const; 709 710 /** 711 * Outputs this SedError to stream in the following format (and followed 712 * by a newline): 713 * 714 * line: (error id) message 715 * 716 * @param stream the output stream to write to. 717 */ 718 virtual void print(std::ostream& stream) const; 719 720 /** @endcond **/ 721 722 #endif /* !SWIG */ 723 724 protected: 725 /** @cond doxygenLibsedmlInternal **/ 726 727 virtual std::string stringForSeverity(unsigned int code) const; 728 virtual std::string stringForCategory(unsigned int code) const; 729 730 /** @endcond **/ 731 }; 732 733 LIBSEDML_CPP_NAMESPACE_END 734 735 #endif /* __cplusplus */ 736 #endif /* SedError_h */ 737