From 145c0e9c748f86fc39fdbf5f529d7c1eae7a563e Mon Sep 17 00:00:00 2001 From: "Frank T. Bergmann" Date: Tue, 27 Aug 2024 10:57:58 +0200 Subject: [PATCH] - sneak option past swig --- src/sbml/SBMLDocument.cpp | 6 ++++++ src/sbml/SBMLDocument.h | 22 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/sbml/SBMLDocument.cpp b/src/sbml/SBMLDocument.cpp index fd8577d3a..0d7aadf11 100644 --- a/src/sbml/SBMLDocument.cpp +++ b/src/sbml/SBMLDocument.cpp @@ -730,6 +730,12 @@ SBMLDocument::checkConsistency () } +unsigned int +SBMLDocument::checkConsistencyWithStrictUnits () +{ + return checkConsistencyWithStrictUnits(LIBSBML_OVERRIDE_ERROR); +} + /* * Performs a set of semantic consistency checks on the document. Query * the results by calling getNumErrors() and getError(). diff --git a/src/sbml/SBMLDocument.h b/src/sbml/SBMLDocument.h index d92e349de..111581d28 100644 --- a/src/sbml/SBMLDocument.h +++ b/src/sbml/SBMLDocument.h @@ -1015,8 +1015,28 @@ class LIBSBML_EXTERN SBMLDocument: public SBase * * @see SBMLDocument::checkInternalConsistency() */ - unsigned int checkConsistencyWithStrictUnits (XMLErrorSeverityOverride_t strictErrorOverride = LIBSBML_OVERRIDE_ERROR ); + unsigned int checkConsistencyWithStrictUnits (); + /** + * Performs consistency checking and validation on this SBML document + * using the ultra strict units validator that assumes that there + * are no hidden numerical conversion factors. + * + * If this method returns a nonzero value (meaning, one or more + * consistency checks have failed for SBML document), the failures may be + * due to warnings @em or errors. Callers should inspect the severity + * flag in the individual SBMLError objects returned by + * SBMLDocument::getError(@if java long@endif) to determine the nature of the failures. + * + * @param strictErrorOverride the severity of the error to use for strict units checking + * by default unit validations will be flagged as an error using this method. Use + * LIBSBML_OVERRIDE_WARNING to change this to a warning. + * + * @return the number of failed checks (errors) encountered. + * + * @see SBMLDocument::checkInternalConsistency() + */ + unsigned int checkConsistencyWithStrictUnits (XMLErrorSeverityOverride_t strictErrorOverride); /** * Performs consistency checking and validation on this SBML document.