You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(121) |
Aug
(343) |
Sep
(98) |
Oct
(55) |
Nov
(158) |
Dec
(219) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(278) |
Feb
(170) |
Mar
(286) |
Apr
(32) |
May
(83) |
Jun
(140) |
Jul
(212) |
Aug
(242) |
Sep
(52) |
Oct
(29) |
Nov
(132) |
Dec
(259) |
2010 |
Jan
(251) |
Feb
(147) |
Mar
(76) |
Apr
(140) |
May
(43) |
Jun
(66) |
Jul
(273) |
Aug
(205) |
Sep
(260) |
Oct
(100) |
Nov
(58) |
Dec
(264) |
2011 |
Jan
(219) |
Feb
(344) |
Mar
(320) |
Apr
(334) |
May
(125) |
Jun
(131) |
Jul
(195) |
Aug
(155) |
Sep
(55) |
Oct
(261) |
Nov
(286) |
Dec
(216) |
2012 |
Jan
(188) |
Feb
(177) |
Mar
(39) |
Apr
(179) |
May
(148) |
Jun
(43) |
Jul
(229) |
Aug
(104) |
Sep
(76) |
Oct
(82) |
Nov
(93) |
Dec
(180) |
2013 |
Jan
(323) |
Feb
(335) |
Mar
(35) |
Apr
(220) |
May
(238) |
Jun
(122) |
Jul
(316) |
Aug
(73) |
Sep
(135) |
Oct
(515) |
Nov
(320) |
Dec
(185) |
2014 |
Jan
(81) |
Feb
(146) |
Mar
(337) |
Apr
(234) |
May
(112) |
Jun
(239) |
Jul
(323) |
Aug
(123) |
Sep
(83) |
Oct
(285) |
Nov
(321) |
Dec
(96) |
2015 |
Jan
(77) |
Feb
(79) |
Mar
(124) |
Apr
(71) |
May
(35) |
Jun
(45) |
Jul
(77) |
Aug
(44) |
Sep
(22) |
Oct
(84) |
Nov
(120) |
Dec
(37) |
2016 |
Jan
(38) |
Feb
(74) |
Mar
(242) |
Apr
(153) |
May
(59) |
Jun
(44) |
Jul
(67) |
Aug
(74) |
Sep
(150) |
Oct
(35) |
Nov
(69) |
Dec
(43) |
2017 |
Jan
(43) |
Feb
(9) |
Mar
(274) |
Apr
(40) |
May
(81) |
Jun
(81) |
Jul
(87) |
Aug
(46) |
Sep
(98) |
Oct
(50) |
Nov
(220) |
Dec
(66) |
2018 |
Jan
(110) |
Feb
(22) |
Mar
(20) |
Apr
(147) |
May
(148) |
Jun
(30) |
Jul
(83) |
Aug
(63) |
Sep
(40) |
Oct
(53) |
Nov
(51) |
Dec
(104) |
2019 |
Jan
(14) |
Feb
(81) |
Mar
(80) |
Apr
(102) |
May
(16) |
Jun
(5) |
Jul
(34) |
Aug
(24) |
Sep
(9) |
Oct
(12) |
Nov
(42) |
Dec
(76) |
2020 |
Jan
(15) |
Feb
(11) |
Mar
(12) |
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fbe...@us...> - 2019-07-31 11:37:19
|
Revision: 26095 http://sourceforge.net/p/sbml/code/26095 Author: fbergmann Date: 2019-07-31 11:37:14 +0000 (Wed, 31 Jul 2019) Log Message: ----------- - use libsbml defined isnan to silence mingw warning Modified Paths: -------------- trunk/libsbml/src/sbml/packages/fbc/sbml/FluxBound.cpp Modified: trunk/libsbml/src/sbml/packages/fbc/sbml/FluxBound.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/fbc/sbml/FluxBound.cpp 2019-07-30 21:20:30 UTC (rev 26094) +++ trunk/libsbml/src/sbml/packages/fbc/sbml/FluxBound.cpp 2019-07-31 11:37:14 UTC (rev 26095) @@ -41,9 +41,7 @@ #include <sbml/packages/fbc/extension//FbcExtension.h> #include <sbml/packages/fbc/validator/FbcSBMLError.h> -#if defined(WIN32) && !defined(CYGWIN) -#define isnan _isnan -#endif +#include <sbml/util/util.h> using namespace std; @@ -401,7 +399,7 @@ bool FluxBound::isSetValue () const { - return (!isnan(mValue)); + return (!util_isNaN(mValue)); } |
From: <luc...@us...> - 2019-07-30 21:20:36
|
Revision: 26094 http://sourceforge.net/p/sbml/code/26094 Author: luciansmith Date: 2019-07-30 21:20:30 +0000 (Tue, 30 Jul 2019) Log Message: ----------- Remove the 'steady' folder: it was never a package. Removed Paths: ------------- trunk/specifications/sbml-level-3/version-1/steady/ |
From: <luc...@us...> - 2019-07-30 21:19:57
|
Revision: 26093 http://sourceforge.net/p/sbml/code/26093 Author: luciansmith Date: 2019-07-30 21:19:53 +0000 (Tue, 30 Jul 2019) Log Message: ----------- Remove the 'geom' folder: it was never a package. Removed Paths: ------------- trunk/specifications/sbml-level-3/version-1/geom/ |
From: <luc...@us...> - 2019-07-30 20:57:45
|
Revision: 26092 http://sourceforge.net/p/sbml/code/26092 Author: luciansmith Date: 2019-07-30 20:57:35 +0000 (Tue, 30 Jul 2019) Log Message: ----------- Fixes for documentation: * Balance doxygenLibsbmlInternal flags in L3ParserSettings, so it stops complaining about things not being defined that actually are. * Get all the @file commands to point to the actual file they are in. * Add doc_render_spreadMethod. * Reference functions with correct arguments. * Replace doc_warning_L1_math_string_syntax with doc_note_l3_parser_encouraged * Fix @param calls to document missing/misnamed arguments. * Properly wrap some functions in doxygenLibsbmlInternal flags. Modified Paths: -------------- trunk/libsbml/src/sbml/annotation/RDFAnnotationParser.h trunk/libsbml/src/sbml/common/common-documentation.h trunk/libsbml/src/sbml/conversion/SBMLConverterRegistry.cpp trunk/libsbml/src/sbml/conversion/SBMLFunctionDefinitionConverter.cpp trunk/libsbml/src/sbml/conversion/SBMLRuleConverter.cpp trunk/libsbml/src/sbml/extension/ISBMLExtensionNamespaces.cpp trunk/libsbml/src/sbml/extension/SBaseExtensionPoint.cpp trunk/libsbml/src/sbml/math/ASTNode.h trunk/libsbml/src/sbml/math/DefinitionURLRegistry.cpp trunk/libsbml/src/sbml/math/DefinitionURLRegistry.h trunk/libsbml/src/sbml/math/FormulaFormatter.cpp trunk/libsbml/src/sbml/math/FormulaFormatter.h trunk/libsbml/src/sbml/math/FormulaParser.cpp trunk/libsbml/src/sbml/math/FormulaParser.h trunk/libsbml/src/sbml/math/FormulaTokenizer.cpp trunk/libsbml/src/sbml/math/FormulaTokenizer.h trunk/libsbml/src/sbml/math/L3FormulaFormatter.cpp trunk/libsbml/src/sbml/math/L3ParserSettings.cpp trunk/libsbml/src/sbml/math/L3ParserSettings.h trunk/libsbml/src/sbml/packages/comp/sbml/ListOfModelDefinitions.cpp trunk/libsbml/src/sbml/packages/comp/sbml/ListOfReplacedElements.cpp trunk/libsbml/src/sbml/packages/comp/util/SBMLResolverRegistry.cpp trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.cpp trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.h trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.cpp trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.h trunk/libsbml/src/sbml/packages/comp/validator/constraints/CompConsistencyConstraints.cpp trunk/libsbml/src/sbml/packages/fbc/validator/constraints/FbcConsistencyConstraints.cpp trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathUnitConsistencyValidator.cpp trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathUnitConsistencyConstraints.cpp trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.cpp trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.h trunk/libsbml/src/sbml/packages/multi/sbml/SubListOfSpeciesFeatures.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/MultiMathMLConsistencyConstraints.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.h trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.h trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.h trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.h trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.h trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.cpp trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.h trunk/libsbml/src/sbml/packages/qual/validator/constraints/QualMathConsistencyConstraints.cpp trunk/libsbml/src/sbml/packages/render/sbml/GradientBase.h trunk/libsbml/src/sbml/packages/render/util/RenderLayoutConverter.cpp trunk/libsbml/src/sbml/util/IdFilter.cpp trunk/libsbml/src/sbml/util/MetaIdFilter.cpp trunk/libsbml/src/sbml/validator/constraints/CompatibilityConstraints.cxx Modified: trunk/libsbml/src/sbml/annotation/RDFAnnotationParser.h =================================================================== --- trunk/libsbml/src/sbml/annotation/RDFAnnotationParser.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/annotation/RDFAnnotationParser.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file RDFAnnotation.h + * @file RDFAnnotationParser.h * @brief RDFAnnotation I/O * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/common/common-documentation.h =================================================================== --- trunk/libsbml/src/sbml/common/common-documentation.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/common/common-documentation.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1077,8 +1077,8 @@ * @li <code>unsigned int @link ASTNode::getNumChildren() getNumChildren() * @endlink</code> returns the number of children of this AST node or * <code>0</code> is this node has no children. - * @li <code>void @link ASTNode::addChild(ASTNode* child) addChild(ASTNode* - * child)@endlink</code> adds the given node as a child of this AST node. + * @li <code>void @link ASTNode::addChild(ASTNode* child, bool inRead) addChild(ASTNode* + * child, bool inRead)@endlink</code> adds the given node as a child of this AST node. * Child nodes are added in left-to-right order. * @li <code>void @link ASTNode::prependChild(ASTNode* child) * prependChild(ASTNode* child)@endlink</code> adds the given node as a child @@ -3932,4 +3932,20 @@ * </ul> * <!-- ------------------------------------------------------------------- --> * + * @class doc_render_spreadMethod + * + * @par + * The attribute "spreadMethod" for GradientBase objects defines how gradients + * propagate over the whole element they are applied to. It is an enumeration + * consisting of the following three values called pad, reflect or repeat: + * <ul> + * <li> @c "PAD": the gradient color at the endpoint of the vector defines + * how the gradient is continued beyond that point (default value). + * <li> @c "REFLECT": the gradient continues from end to start and then from + * start to end again and again. + * <li> @c "REPEAT": the gradient pattern is repeated from start to end over + * and over again. + * </ul> + * <!-- ------------------------------------------------------------------- --> + * */ Modified: trunk/libsbml/src/sbml/conversion/SBMLConverterRegistry.cpp =================================================================== --- trunk/libsbml/src/sbml/conversion/SBMLConverterRegistry.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/conversion/SBMLConverterRegistry.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file SBMLConverterRegistry.h + * @file SBMLConverterRegistry.cpp * @brief Implementation of SBMLConverterRegistry, a registry of available converters. * @author Frank Bergmann * Modified: trunk/libsbml/src/sbml/conversion/SBMLFunctionDefinitionConverter.cpp =================================================================== --- trunk/libsbml/src/sbml/conversion/SBMLFunctionDefinitionConverter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/conversion/SBMLFunctionDefinitionConverter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,6 +1,6 @@ /** - * @file SBMLLevelVersionConverter.cpp + * @file SBMLFunctionDefinitionConverter.cpp * @brief Implementation of SBMLFunctionDefinitionConverter, a converter replacing function definitions * @author Frank Bergmann * Modified: trunk/libsbml/src/sbml/conversion/SBMLRuleConverter.cpp =================================================================== --- trunk/libsbml/src/sbml/conversion/SBMLRuleConverter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/conversion/SBMLRuleConverter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,6 +1,6 @@ /** - * @file SBMLLevelVersionConverter.cpp + * @file SBMLRuleConverter.cpp * @brief Implementation of SBMLRuleConverter, a converter sorting rules * @author Frank Bergmann * Modified: trunk/libsbml/src/sbml/extension/ISBMLExtensionNamespaces.cpp =================================================================== --- trunk/libsbml/src/sbml/extension/ISBMLExtensionNamespaces.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/extension/ISBMLExtensionNamespaces.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file ISBMLExtensionNamespaces.h + * @file ISBMLExtensionNamespaces.cpp * @brief implementation ISBMLExtensionNamespaces interface to the SBMLExtensionNamespaces class * @author Frank Bergmann * Modified: trunk/libsbml/src/sbml/extension/SBaseExtensionPoint.cpp =================================================================== --- trunk/libsbml/src/sbml/extension/SBaseExtensionPoint.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/extension/SBaseExtensionPoint.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file SBaseExtensionPoint.h + * @file SBaseExtensionPoint.cpp * @brief Implementation of SBaseExtensionPoint * @author Akiya Jouraku * Modified: trunk/libsbml/src/sbml/math/ASTNode.h =================================================================== --- trunk/libsbml/src/sbml/math/ASTNode.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/ASTNode.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -123,7 +123,7 @@ * * @htmlinclude math-functions.html * - * @copydetails doc_warning_L1_math_string_syntax + * @copydetails doc_note_l3_parser_encouraged * * @if clike @see SBML_parseL3Formula()@endif@~ * @if csharp @see SBML_parseL3Formula()@endif@~ @@ -313,6 +313,9 @@ * Child nodes are added in-order, from left to right. * * @param disownedChild the ASTNode instance to add + * @param inRead @c false by default; may be set to @c true when + * reading XML where there may be a lambda function with no + * bvar arguments. * * @copydetails doc_returns_success_code * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} @@ -553,8 +556,8 @@ * * For portability between different programming languages, the predicate * is passed in as a pointer to a function. @if clike The function - * definition must have the type @sbmlconstant{AST_PLUS, ASTNode.h::ASTNodePredicate - * ASTNodePredicate@endlink, which is defined as + * definition must have the type + * @link ASTNode.h::ASTNodePredicate ASTNodePredicate@endlink, which is defined as * @verbatim int (*ASTNodePredicate) (const ASTNode *node); @endverbatim Modified: trunk/libsbml/src/sbml/math/DefinitionURLRegistry.cpp =================================================================== --- trunk/libsbml/src/sbml/math/DefinitionURLRegistry.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/DefinitionURLRegistry.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file DefinitionURLRegistry.h + * @file DefinitionURLRegistry.cpp * @brief Implementation of DefinitionURLRegistry, a registry of available DefinitionURLs. * @author Frank Bergmann * Modified: trunk/libsbml/src/sbml/math/DefinitionURLRegistry.h =================================================================== --- trunk/libsbml/src/sbml/math/DefinitionURLRegistry.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/DefinitionURLRegistry.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -93,7 +93,8 @@ /** * Adds the given DefinitionURL to the registry of SBML DefinitionURLs. * - * @param DefinitionURL the DefinitionURL to add to the registry. + * @param url the DefinitionURL to add to the registry. + * @param type the ASTNodeType_t of the URL to add to the registry. * * @copydetails doc_returns_success_code * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} Modified: trunk/libsbml/src/sbml/math/FormulaFormatter.cpp =================================================================== --- trunk/libsbml/src/sbml/math/FormulaFormatter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/FormulaFormatter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file FormulaFormatter.c + * @file FormulaFormatter.cpp * @brief Formats an AST formula tree as an SBML formula string. * @author Ben Bornstein * Modified: trunk/libsbml/src/sbml/math/FormulaFormatter.h =================================================================== --- trunk/libsbml/src/sbml/math/FormulaFormatter.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/FormulaFormatter.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -53,7 +53,7 @@ * * @copydetails doc_summary_of_string_math * - * @copydetails doc_warning_L1_math_string_syntax + * @copydetails doc_note_l3_parser_encouraged * * @param tree the AST to be converted. * Modified: trunk/libsbml/src/sbml/math/FormulaParser.cpp =================================================================== --- trunk/libsbml/src/sbml/math/FormulaParser.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/FormulaParser.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file FormulaParser.c + * @file FormulaParser.cpp * @brief Parses an SBML formula string into an AST. * @author Ben Bornstein * Modified: trunk/libsbml/src/sbml/math/FormulaParser.h =================================================================== --- trunk/libsbml/src/sbml/math/FormulaParser.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/FormulaParser.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -54,7 +54,7 @@ * * @copydetails doc_summary_of_string_math * - * @copydetails doc_warning_L1_math_string_syntax + * @copydetails doc_note_l3_parser_encouraged * * @param formula the text-string formula expression to be parsed * Modified: trunk/libsbml/src/sbml/math/FormulaTokenizer.cpp =================================================================== --- trunk/libsbml/src/sbml/math/FormulaTokenizer.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/FormulaTokenizer.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file FormulaTokenizer.c + * @file FormulaTokenizer.cpp * @brief Tokenizes an SBML formula string * @author Ben Bornstein * Modified: trunk/libsbml/src/sbml/math/FormulaTokenizer.h =================================================================== --- trunk/libsbml/src/sbml/math/FormulaTokenizer.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/FormulaTokenizer.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -64,7 +64,7 @@ * tokenizer system, such as FormulaTokenizer_createFromFormula() and * FormulaTokenizer_getName(). * - * @copydetails doc_warning_L1_math_string_syntax + * @copydetails doc_note_l3_parser_encouraged */ #ifndef FormulaTokenizer_h @@ -217,7 +217,7 @@ * @see FormulaTokenizer_nextToken() * @see FormulaTokenizer_free() * - * @copydetails doc_warning_L1_math_string_syntax + * @copydetails doc_note_l3_parser_encouraged * * @if conly * @memberof FormulaTokenizer_t @@ -272,7 +272,7 @@ * @see FormulaTokenizer_free() * @see FormulaTokenizer_createFromFormula() * - * @copydetails doc_warning_L1_math_string_syntax + * @copydetails doc_note_l3_parser_encouraged * * @if conly * @memberof FormulaTokenizer_t Modified: trunk/libsbml/src/sbml/math/L3FormulaFormatter.cpp =================================================================== --- trunk/libsbml/src/sbml/math/L3FormulaFormatter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/L3FormulaFormatter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file L3FormulaFormatter.c + * @file L3FormulaFormatter.cpp * @brief Formats an AST formula tree as an SBML L3 formula string. * @author Lucian Smith (from FormulaFormatter, by Ben Bornstein) * Modified: trunk/libsbml/src/sbml/math/L3ParserSettings.cpp =================================================================== --- trunk/libsbml/src/sbml/math/L3ParserSettings.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/L3ParserSettings.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -329,7 +329,6 @@ return true; } - void L3ParserSettings::setParsePackageMath(ExtendedMathType_t package, bool parsepackage) { mParsePackages[package] = parsepackage; Modified: trunk/libsbml/src/sbml/math/L3ParserSettings.h =================================================================== --- trunk/libsbml/src/sbml/math/L3ParserSettings.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/math/L3ParserSettings.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -544,7 +544,14 @@ * @sbmlconstant{L3P_COMPARE_BUILTINS_CASE_SENSITIVE,}, symbols are * interpreted in a case-sensitive manner. * - * @param modulol3v2 ("modulo l3v2") a flag that controls how the + * @param sbmlns ("SBML namespaces") an SBML namespaces object. The + * namespaces identify the SBML Level 3 packages that can extend the + * syntax understood by the formula parser. When non-@c NULL, the parser + * will interpret additional syntax defined by the packages; for example, + * it may understand vector/array extensions introduced by the SBML + * Level 3 @em Arrays package. + * + * @param moduloL3v2 ("modulo l3v2") a flag that controls how the * parser will handle the '%' ('modulo') symbol in formulas. By default, * the parser will convert 'a % b' to a piecewise function that properly * calculates the remainder of a with respect to be, but the parser can @@ -555,12 +562,13 @@ * @sbmlconstant{L3P_MODULO_IS_PIECEWISE,} (to parse '%' as a piecewise function) and * @sbmlconstant{L3P_MODULO_IS_REM,} (to parse '%' as @c rem). * - * @param sbmlns ("SBML namespaces") an SBML namespaces object. The - * namespaces identify the SBML Level 3 packages that can extend the - * syntax understood by the formula parser. When non-@c NULL, the parser - * will interpret additional syntax defined by the packages; for example, - * it may understand vector/array extensions introduced by the SBML - * Level 3 @em Arrays package. + * @param l3v2functions ("l3v2 functions") a flag that controls how the + * parser will handle the functions added to SBML Level~3 Version~2 (namely, + * 'rateOf', 'implies', 'max', 'min', 'quotient', and 'rem'). By + * default, the parser will convert them to FunctionDefinitions with those names, + * but if set to @c true ( + * (@sbmlconstant{L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY,}), the parser will convert + * them to their respective L3v2 equivalents. * * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ * @@ -914,7 +922,7 @@ * values are as follows: * @copydetails doc_l3v2_function_values * - * @see setParsePackageMath(@if java boolean@endif) + * @see setParseL3v2Functions(@if java boolean@endif) */ bool getParseL3v2Functions() const; @@ -932,12 +940,14 @@ * * @copydetails doc_package_math_values * - * @param l3v2functions a boolean value (one of the constants + * @param package an ExtendedMathType_t indicating the extended math package + * to be queried. + * @param parsepackage a boolean value (one of the constants * @sbmlconstant{L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY,} or * @sbmlconstant{L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC,}) * indicating how to interpret those function names. * - * @see getParsePackageMath() + * @see getParsePackageMath(@if java ExtendedMathType_t@endif) */ void setParsePackageMath(ExtendedMathType_t package, bool parsepackage); @@ -948,11 +958,14 @@ * * @copydetails doc_package_math_settings * + * @param package an ExtendedMathType_t indicating the extended math package + * to be set. + * * @return A boolean indicating the behavior currently set. The possible * values are as follows: * @copydetails doc_package_math_values * - * @see setParsePackageMath(@if java boolean@endif) + * @see setParsePackageMath(@if java ExtendedMathType_t, boolean@endif) */ bool getParsePackageMath(ExtendedMathType_t package) const; @@ -975,7 +988,6 @@ private: /** @cond doxygenLibsbmlInternal */ - /** * This function checks the provided ASTNode function to see if it is a * known function with the wrong number of arguments. If so, the error is @@ -985,8 +997,10 @@ */ bool checkNumArgumentsForPackage(const ASTNode* function, std::stringstream& error) const; + /** @endcond */ + /** @cond doxygenLibsbmlInternal */ /** * The generic parsing function for grammar lines that packages recognize, * but not core. When a package recognizes the 'type', it will parse and @@ -997,8 +1011,10 @@ std::vector<ASTNode*> *nodeList = NULL, std::vector<std::string*> *stringList = NULL, std::vector<double> *doubleList = NULL) const; + /** @endcond */ + /** @cond doxygenLibsbmlInternal */ /** * The user input a string of the form "name(...)", and we want to know if * 'name' is recognized by a package as being a particular function. We @@ -1007,8 +1023,10 @@ * or AST_UNKNOWN if nothing found. */ ASTNodeType_t getPackageFunctionFor(const std::string& name) const; + /** @endcond */ + /** @cond doxygenLibsbmlInternal */ /** * The user input a string of the form "name" with no parentheses, and we want to know if * 'name' is recognized by a package as being a particular function. We @@ -1017,6 +1035,7 @@ * or AST_UNKNOWN if nothing found. */ ASTNodeType_t getPackageSymbolFor(const std::string& name) const; + /** @endcond */ }; @@ -1253,6 +1272,8 @@ * * @copydetails doc_modulo_l3v2_values * +* @param settings the L3ParserSettings_t structure from which to get the option. +* * @param modulol3v2 a boolean value (one of the constants * @sbmlconstant{L3P_MODULO_IS_PIECEWISE,} or * @sbmlconstant{L3P_MODULO_IS_REM,}) Modified: trunk/libsbml/src/sbml/packages/comp/sbml/ListOfModelDefinitions.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/comp/sbml/ListOfModelDefinitions.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/sbml/ListOfModelDefinitions.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,6 +1,6 @@ /** - * @file ModelDefinition.cpp - * @brief Implementation of ModelDefinition, the Subelement derived class of modelDefinitions package. + * @file ListOfModelDefinitions.cpp + * @brief Implementation of ListOfModelDefinitions from the comp package. * @author Lucian Smith * *<!--------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/comp/sbml/ListOfReplacedElements.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/comp/sbml/ListOfReplacedElements.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/sbml/ListOfReplacedElements.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,6 +1,6 @@ /** - * @file ReplacedElement.cpp - * @brief Implementation of ReplacedElement, the Subelement derived class of replacedElements package. + * @file ListOfReplacedElements.cpp + * @brief Implementation of ListOfReplacedElements from the comp package. * @author Lucian Smith * *<!--------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/comp/util/SBMLResolverRegistry.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/comp/util/SBMLResolverRegistry.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/util/SBMLResolverRegistry.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,5 +1,5 @@ /** - * @file SBMLResolverRegistry.h + * @file SBMLResolverRegistry.cpp * @brief Implementation of SBMLResolverRegistry, a registry of available resolvers. * @author Frank Bergmann * Modified: trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyValidator.cpp + * @file CompConsistencyValidator.cpp * @brief Checks an SBML model for structural consistency * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.h =================================================================== --- trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/validator/CompConsistencyValidator.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyValidator.h + * @file CompConsistencyValidator.h * @brief Performs consistency checks on an SBML model * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyValidator.cpp + * @file CompUnitConsistencyValidator.cpp * @brief Checks an SBML model for structural consistency * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.h =================================================================== --- trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/validator/CompUnitConsistencyValidator.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyValidator.h + * @file CompUnitConsistencyValidator.h * @brief Performs consistency checks on an SBML model * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/packages/comp/validator/constraints/CompConsistencyConstraints.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/comp/validator/constraints/CompConsistencyConstraints.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/comp/validator/constraints/CompConsistencyConstraints.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyConstraints.cpp + * @file CompConsistencyConstraints.cpp * @brief IdentifierConsistency check constraints. See SBML Wiki * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/packages/fbc/validator/constraints/FbcConsistencyConstraints.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/fbc/validator/constraints/FbcConsistencyConstraints.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/fbc/validator/constraints/FbcConsistencyConstraints.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,8 +1,8 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyConstraints.cpp - * @brief IdentifierConsistency check constraints. See SBML Wiki + * @file FbcConsistencyConstraints.cpp + * @brief FbcConsistency check constraints. * @author Sarah Keating * * <!-------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathMathMLConsistencyValidator.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -2,8 +2,8 @@ /** @cond doxygenLibsbmlInternal */ /** - * @file L3v2extendedmathConsistencyValidator.cpp - * @brief Definition of L3v2extendedmathConsistencyValidator. + * @file L3v2extendedmathMathMLConsistencyValidator.cpp + * @brief Definition of L3v2extendedmathMathMLConsistencyValidator. * @author SBMLTeam * * <!-------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathUnitConsistencyValidator.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathUnitConsistencyValidator.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/L3v2extendedmathUnitConsistencyValidator.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -2,8 +2,8 @@ /** @cond doxygenLibsbmlInternal */ /** - * @file L3v2extendedmathConsistencyValidator.cpp - * @brief Definition of L3v2extendedmathConsistencyValidator. + * @file L3v2extendedmathUnitConsistencyValidator.cpp + * @brief Definition of L3v2extendedmathUnitConsistencyValidator. * @author SBMLTeam * * <!-------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathMathMLConsistencyConstraints.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -2,7 +2,7 @@ /** @cond doxygenLibsbmlInternal */ /** - * @file L3v2extendedmathConsistencyConstraints.cpp + * @file L3v2extendedmathMathMLConsistencyConstraints.cpp * @brief Definition of L3v2extendedmathConsistencyConstraints. * @author SBMLTeam * Modified: trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathUnitConsistencyConstraints.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathUnitConsistencyConstraints.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/l3v2extendedmath/validator/constraints/L3v2extendedmathUnitConsistencyConstraints.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -2,8 +2,8 @@ /** @cond doxygenLibsbmlInternal */ /** - * @file L3v2extendedmathConsistencyConstraints.cpp - * @brief Definition of L3v2extendedmathConsistencyConstraints. + * @file L3v2extendedmathUnitConsistencyConstraints.cpp + * @brief Definition of L3v2extendedmathUnitConsistencyConstraints. * @author SBMLTeam * * <!-------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -129,6 +129,7 @@ /** @endcond */ +/** @cond doxygenLibsbmlInternal */ /* * Sets the parent SBML object of this plugin object to * this object and child elements (if any). @@ -141,6 +142,7 @@ ASTBasePlugin::connectToParent(astbase); } +/** @endcond */ /** @cond doxygenLibsbmlInternal *//* Modified: trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/extension/MultiASTPlugin.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -145,7 +145,6 @@ // --------------------------------------------------------- /** @cond doxygenLibsbmlInternal */ - /** * Returns the prefix of the package extension of this plugin object. * @@ -152,8 +151,10 @@ * @return the prefix of the package extension of this plugin object. */ virtual const std::string& getPrefix() const; + /** @endcond */ + /** @cond doxygenLibsbmlInternal */ /** * Sets the parent SBML object of this plugin object to * this object and child elements (if any). @@ -171,7 +172,9 @@ * @see enablePackageInternal */ void connectToParent(ASTNode *astbase); + /** @endcond */ + /** @cond doxygenLibsbmlInternal */ /** * Enables/Disables the given package with child elements in this plugin * object (if any). @@ -206,7 +209,7 @@ /** * Sets the value of the "speciesReference" attribute of this MultiASTPlugin. * - * @param id std::string& value of the "speciesReference" attribute to be set. + * @param speciesReference std::string& value of the "speciesReference" attribute to be set. * * @copydetails doc_returns_one_success_code * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} @@ -242,7 +245,7 @@ /** * Sets the value of the "representationType" attribute of this MultiASTPlugin. * - * @param id std::string& value of the "representationType" attribute to be set. + * @param representationType std::string& value of the "representationType" attribute to be set. * * @copydetails doc_returns_one_success_code * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} Modified: trunk/libsbml/src/sbml/packages/multi/sbml/SubListOfSpeciesFeatures.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/sbml/SubListOfSpeciesFeatures.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/sbml/SubListOfSpeciesFeatures.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,6 +1,6 @@ /** - * @file: SpeciesFeature.cpp - * @brief: Implementation of the SpeciesFeature class + * @file: SubListOfSpeciesFeatures.cpp + * @brief: Implementation of the SubListOfSpeciesFeatures class * @author: SBMLTeam * * <!-------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/MultiMathMLConsistencyConstraints.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/MultiMathMLConsistencyConstraints.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/MultiMathMLConsistencyConstraints.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** @cond doxygenLibsbmlInternal */ /** - * @file: MultiConsistencyConstraints.cpp + * @file: MultiMathMLConsistencyConstraints.cpp * @brief: Implementation of the MultiConsistencyConstraints class * @author: Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueCompartmentReferenceIdsWithinCompartment.cpp + * @file UniqueCRefIdsWithinCompartment.cpp * @brief Ensures the CompartmentReference ids within a Compartment are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueCRefIdsWithinCompartment.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueCompartmentReferenceIdsWithinCompartment.h + * @file UniqueCRefIdsWithinCompartment.h * @brief Ensures the CompartmentReference ids within a Compartment are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueInSpeciesTypeBondIdsWithinMultiSpeciesType.cpp + * @file UniqueISTBIdsWithinMultiSpeciesType.cpp * @brief Ensures the InSpeciesTypeBond ids within a MultiSpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueISTBIdsWithinMultiSpeciesType.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueInSpeciesTypeBondIdsWithinMultiSpeciesType.h + * @file UniqueISTBIdsWithinMultiSpeciesType.h * @brief Ensures the InSpeciesTypeBond ids within a MultiSpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSpeciesFeatureTypeIdsWithinMultiSpeciesType.cpp + * @file UniqueSFTIdsWithinMultiSpeciesType.cpp * @brief Ensures the SpeciesFeatureType ids within a MultiSpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSFTIdsWithinMultiSpeciesType.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSpeciesFeatureTypeIdsWithinMultiSpeciesType.h + * @file UniqueSFTIdsWithinMultiSpeciesType.h * @brief Ensures the SpeciesFeatureType ids within a MultiSpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSubListOfSpeciesFeaturesIdsWithinSpecies.cpp + * @file UniqueSLOSFIdsWithinSpecies.cpp * @brief Ensures the SpeciesFeature ids within a Species are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSLOSFIdsWithinSpecies.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSubListOfSpeciesFeaturesIdsWithinSpecies.h + * @file UniqueSLOSFIdsWithinSpecies.h * @brief Ensures the SpeciesFeature ids within a Species are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSpeciesTypeComponentIndexIdsWithinMultiSpeciesType.cpp + * @file UniqueSTCIdsWithinMultiSpeciesType.cpp * @brief Ensures the SpeciesTypeComponentIndex ids within a SpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTCIdsWithinMultiSpeciesType.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSpeciesTypeComponentIndexIdsWithinMultiSpeciesType.h + * @file UniqueSTCIdsWithinMultiSpeciesType.h * @brief Ensures the SpeciesTypeComponentIndex ids within a SpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSpeciesTypeInstanceIdsWithinMultiSpeciesType.cpp + * @file UniqueSTIIdsWithinMultiSpeciesType.cpp * @brief Ensures the SpeciesTypeInstance ids within a MultiSpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.h =================================================================== --- trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/multi/validator/constraints/UniqueSTIIdsWithinMultiSpeciesType.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file UniqueSpeciesTypeInstanceIdsWithinMultiSpeciesType.h + * @file UniqueSTIIdsWithinMultiSpeciesType.h * @brief Ensures the SpeciesTypeInstance ids within a MultiSpeciesType are unique * @author Fengkai Zhang * Modified: trunk/libsbml/src/sbml/packages/qual/validator/constraints/QualMathConsistencyConstraints.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/qual/validator/constraints/QualMathConsistencyConstraints.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/qual/validator/constraints/QualMathConsistencyConstraints.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,8 +1,8 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdentifierConsistencyConstraints.cpp - * @brief IdentifierConsistency check constraints. See SBML Wiki + * @file QualMathConsistencyConstraints.cpp + * @brief QualMathConsistencyConstraints check constraints. * @author Sarah Keating * * <!-------------------------------------------------------------------------- Modified: trunk/libsbml/src/sbml/packages/render/sbml/GradientBase.h =================================================================== --- trunk/libsbml/src/sbml/packages/render/sbml/GradientBase.h 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/render/sbml/GradientBase.h 2019-07-30 20:57:35 UTC (rev 26092) @@ -1341,7 +1341,7 @@ * * @copydetails doc_gradientbase_spreadMethod * @if clike The value is drawn from the enumeration - * GradientSpreadMethod_t.@~ + * GradientSpreadMethod_t. @endif@~ * The possible values returned by this method are: * @li @sbmlconstant{GRADIENT_SPREADMETHOD_PAD, GradientSpreadMethod_t} * @li @sbmlconstant{GRADIENT_SPREADMETHOD_REFLECT, GradientSpreadMethod_t} Modified: trunk/libsbml/src/sbml/packages/render/util/RenderLayoutConverter.cpp =================================================================== --- trunk/libsbml/src/sbml/packages/render/util/RenderLayoutConverter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/packages/render/util/RenderLayoutConverter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -30,7 +30,6 @@ #include <sbml/packages/render/util/RenderLayoutConverter.h> #include <sbml/conversion/SBMLConverterRegistry.h> -#include <sbml/conversion/SBMLConverterRegister.h> #include <sbml/common/sbmlfwd.h> #include <sbml/extension/SBasePlugin.h> Modified: trunk/libsbml/src/sbml/util/IdFilter.cpp =================================================================== --- trunk/libsbml/src/sbml/util/IdFilter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/util/IdFilter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file IdFilterFilter.cpp + * @file IdFilter.cpp * @brief Filter to return only elements with an id set * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/util/MetaIdFilter.cpp =================================================================== --- trunk/libsbml/src/sbml/util/MetaIdFilter.cpp 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/util/MetaIdFilter.cpp 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file MetaIdFilterFilter.h + * @file MetaIdFilter.cpp * @brief Filter to return only elements with a metaid set * @author Sarah Keating * Modified: trunk/libsbml/src/sbml/validator/constraints/CompatibilityConstraints.cxx =================================================================== --- trunk/libsbml/src/sbml/validator/constraints/CompatibilityConstraints.cxx 2019-07-29 22:48:29 UTC (rev 26091) +++ trunk/libsbml/src/sbml/validator/constraints/CompatibilityConstraints.cxx 2019-07-30 20:57:35 UTC (rev 26092) @@ -1,7 +1,7 @@ /** * @cond doxygenLibsbmlInternal * - * @file CompatibilityConstraints.cpp + * @file CompatibilityConstraints.cxx * @brief Compability constraint code * @author Sarah Keating * |
From: <luc...@us...> - 2019-07-29 22:48:33
|
Revision: 26091 http://sourceforge.net/p/sbml/code/26091 Author: luciansmith Date: 2019-07-29 22:48:29 +0000 (Mon, 29 Jul 2019) Log Message: ----------- Added explanation of array indexing for Sample, as per Frank's request. Modified Paths: -------------- trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex 2019-07-29 22:37:56 UTC (rev 26090) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex 2019-07-29 22:48:29 UTC (rev 26091) @@ -1178,6 +1178,12 @@ \subsubsection{The \fixttspace\tokenNC{Samples} text child} The \token{Samples} text child of the \SampledField is where the data for the \SampledField resides. It is of type \primtype{arrayData}, which is defined as whitespace-delimited, possibly-compressed numerical values. Whether or not the data is compressed (and how, if so) is stated with the \token{compression} attribute, and the type of numerical values included is stated in the \token{dataType} attribute. The total number of entries in the array can be derived from the \token{numSamples} attributes, by multiplying them together (if present). It is suggested, but not required, that if the data is uncompressed, that the grouped points be separated from each other with the use of a semicolon. If the data is compressed, a semicolon is not to be used. +\begin{blockChanged} +The order of data points in the \token{Samples} should be the same as the dimensionality of the object, that is, first by the first (\token{x}) dimension, then by the second (\token{y}) dimension (if present), and then by the third (\token{z}) dimension (if present). Thus, the array is indexed such that to access data point (\token{x}, \token{y}, \token{z}), one would look in entry: + +$samples[x + numSamples1*y + numsamples1*numSamples2*z]$ +\end{blockChanged} + \subsubsection{A \SampledField example} Here are snippets of an example in which a \SampledField element is used in an initial assignment, where the field's value inside the nucleus (\val{img}) is used in a formula to compute the ATP level: |
From: <luc...@us...> - 2019-07-29 22:38:01
|
Revision: 26090 http://sourceforge.net/p/sbml/code/26090 Author: luciansmith Date: 2019-07-29 22:37:56 +0000 (Mon, 29 Jul 2019) Log Message: ----------- * Remove 'changed' text from previous version, for both the figures and the text. * Add id/name for SpatialPoints. Modified Paths: -------------- trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/AdjacentDomains-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/AnalyticGeometry-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CSGNode-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CSGTransformation-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CSGeometry-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CoordinateComponent-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/Domain-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/DomainType-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/Geometry-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/GeometryDefinition-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/MixedGeometry-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/ParametricGeometry-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/SampledField-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/SampledFieldGeometry-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/extended-compartment-uml.pdf trunk/specifications/sbml-level-3/version-1/spatial/specification/intro.tex trunk/specifications/sbml-level-3/version-1/spatial/specification/main.tex trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/AdjacentDomains-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/AnalyticGeometry-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CSGNode-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CSGTransformation-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CSGeometry-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/CoordinateComponent-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/Domain-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/DomainType-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/Geometry-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/GeometryDefinition-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/MixedGeometry-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/ParametricGeometry-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/SampledField-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/SampledFieldGeometry-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/figs/extended-compartment-uml.pdf =================================================================== (Binary files differ) Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/intro.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/intro.tex 2019-07-14 08:12:20 UTC (rev 26089) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/intro.tex 2019-07-29 22:37:56 UTC (rev 26090) @@ -35,7 +35,7 @@ \vspace*{1ex} \end{center} -\changed{The Package Working Group for the Spatial package is coordinated on the mailing list \url{https://lists.sourceforge.net/lists/listinfo/sbml-spatial}. More information about the spatial package is available at \url{http://sbml.org/Documents/Specifications/SBML_Level_3/Packages/spatial}.} +The Package Working Group for the Spatial package is coordinated on the mailing list \url{https://lists.sourceforge.net/lists/listinfo/sbml-spatial}. More information about the spatial package is available at \url{http://sbml.org/Documents/Specifications/SBML_Level_3/Packages/spatial}. \subsection{Package dependencies} @@ -66,7 +66,7 @@ equivalent in the SBML Level~3 Core specification. \item[\raisebox{2.75pt}{\colorbox{red}{\rule{0.8pt}{0.8pt}}}] - \emph{\textcolor{red}{Red lines}}: \changed{Classes with red lines in the corner are fully defined in a different figure.} + \emph{\textcolor{red}{Red lines}}: Classes with red lines in the corner are fully defined in a different figure. \end{itemize} Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/main.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/main.tex 2019-07-14 08:12:20 UTC (rev 26089) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/main.tex 2019-07-29 22:37:56 UTC (rev 26090) @@ -5,8 +5,8 @@ \begin{document} \packageTitle{Spatial Processes} -\packageVersion{Version 1, Release \changed{0.93} (Draft)} -\packageVersionDate{\changed{December 2018}} +\packageVersion{Version 1, Release \changed{0.94} (Draft)} +\packageVersionDate{\changed{August 2019}} \packageGeneralURL{http://sbml.org/Documents/Specifications/SBML_Level_3/Packages/spatial} \packageThisVersionURL{TBD} Modified: trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex =================================================================== --- trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex 2019-07-14 08:12:20 UTC (rev 26089) +++ trunk/specifications/sbml-level-3/version-1/spatial/specification/syntax.tex 2019-07-29 22:37:56 UTC (rev 26090) @@ -185,8 +185,8 @@ This mapping need not be one-to-one. In fact, it is common to map er-lumen, er-membrane, and cytosol to the same cell interior volume or 3D \DomainType. The \token{unitSize} attribute specifies the relative quantity of each \Compartment that is mapped to the \DomainType. -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute is a mandatory attribute of type \primtype{SpId} that is used to uniquely identify a \CompartmentMapping in the model. All identifiers of type \primtype{SpId} must be unique within the \Geometry. The mathematical value of a \CompartmentMapping is its \token{unitSize} attribute, and can be bound to a \Parameter by using a \SpatialSymbolReference. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute is a mandatory attribute of type \primtype{SpId} that is used to uniquely identify a \CompartmentMapping in the model. All identifiers of type \primtype{SpId} must be unique within the \Geometry. The mathematical value of a \CompartmentMapping is its \token{unitSize} attribute, and can be bound to a \Parameter by using a \SpatialSymbolReference. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{domainType} attribute} The mandatory \token{domainType} attribute is of type \primtype{SpIdRef} that indicates a \DomainType defined in the \Geometry element. @@ -382,8 +382,8 @@ \label{ListOfSampledFields-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute is of type \primtype{SpId}, uniquely identifies the \Geometry element, and is optional. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute is of type \primtype{SpId}, uniquely identifies the \Geometry element, and is optional. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{coordinateSystem} attribute} The \token{coordinateSystem} attribute is a required attribute and is of type \primtype{GeometryKind}. It represents the coordinate system used by the \Geometry. A value of \val{cartesian} indicates that the geometry is a cartesian coordinate system, with the coordinate components corresponding to the x, y, and z components of that system (which could be 1-, 2-, or 3-dimensional). This is the only coordinate system defined in this version of the specification--in the future, if necessary, \val{cylendrical}, \val{spherical}, and \val{polar} may be added as possibilities, along with n-dimensional cartesian modeling, should there be interest in the modeling community to exchange these types of models. @@ -409,8 +409,8 @@ \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -A \CoordinateComponent is identified with the \token{id} attribute which is of type \primtype{SpId}. The mathematical value of a \CoordinateComponent is its coordinate value \token{unitSize} attribute, and can be bound to a \Parameter by using a \SpatialSymbolReference. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +A \CoordinateComponent is identified with the \token{id} attribute which is of type \primtype{SpId}. The mathematical value of a \CoordinateComponent is its coordinate value \token{unitSize} attribute, and can be bound to a \Parameter by using a \SpatialSymbolReference. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. Because a \CoordinateComponent represents an entire axis, it is not appropriate, should it be connected to a \Parameter via a \SpatialSymbolReference, for that \Parameter to be set via an \InitialAssignment or \Rule. Rather, it is treated like the SBML core \token{csymbol} \val{time}, and can be used as an independent variable in other calculations. @@ -462,8 +462,8 @@ %For \CoordinateComponent elements of coordinateType \val{fixed}, a single \token{boundaryFixed} object defines the value at which the coordinate component is fixed. -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute of the \Boundary object identifies the object. The attribute is required and is of type \primtype{SpId}. This attribute is used when specifying the \BoundaryCondition for a species as an extension of an SBML core \Parameter. The mathematical value of a \Boundary is its \token{value} attribute, and can be bound to a \Parameter by using a \SpatialSymbolReference. The units are the same as its parent \CoordinateComponent, and are not set separately. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute of the \Boundary object identifies the object. The attribute is required and is of type \primtype{SpId}. This attribute is used when specifying the \BoundaryCondition for a species as an extension of an SBML core \Parameter. The mathematical value of a \Boundary is its \token{value} attribute, and can be bound to a \Parameter by using a \SpatialSymbolReference. The units are the same as its parent \CoordinateComponent, and are not set separately. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{value} attribute} The \token{value} attribute is of type \primtype{double}. In a \token{boundaryMin} object, it represents the minimum limit of the \CoordinateComponent. In a \token{boundaryMax} object, it represents the maximum limit of the \CoordinateComponent. @@ -496,8 +496,8 @@ \label{DomainType-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -Each \DomainType is identified with a \token{id} of type \primtype{SpId}. The mathematical value of a \CompartmentMapping is the sum of the sizes of all domains associated with this \DomainType, and can be bound to a \Parameter by using a \SpatialSymbolReference. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +Each \DomainType is identified with a \token{id} of type \primtype{SpId}. The mathematical value of a \CompartmentMapping is the sum of the sizes of all domains associated with this \DomainType, and can be bound to a \Parameter by using a \SpatialSymbolReference. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. As a derived quantity, if connected to a \Parameter via a \SpatialSymbolReference, this value may \emph{not} be overridden by an \InitialAssignment, nor by the use of a \Rule or \Event. Its value is always connected to the size of its component \Domains instead. The units of a \DomainType are the units of the corresponding base units of the SBML \Model for length (for one-dimensional domains), area (for two-dimensional domains), or volume (for three-dimensional domains). It is required to define the corresponding base units for every \DomainType in the \Model. @@ -520,8 +520,8 @@ \label{ListOfInteriorPoints-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -A \Domain is identified with an \token{id} attribute of type \primtype{SpId}. This \token{id} may be used within a \SpatialSymbolReference object that is extended from an SBML core \Parameter and can be used in an expression. The mathematical value of a \Domain is the absolute size of that domain as used by the simulator (the meshed size), and can be bound to a \Parameter by using a \SpatialSymbolReference. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +A \Domain is identified with an \token{id} attribute of type \primtype{SpId}. This \token{id} may be used within a \SpatialSymbolReference object that is extended from an SBML core \Parameter and can be used in an expression. The mathematical value of a \Domain is the absolute size of that domain as used by the simulator (the meshed size), and can be bound to a \Parameter by using a \SpatialSymbolReference. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. As a derived quantity, if connected to a \Parameter via a \SpatialSymbolReference, this value may \emph{not} be overridden by an \InitialAssignment, nor by the use of a \Rule or \Event. Its value is always connected to the size of the corresponding \Geometry instead. The units of the \Domain are the same as the units of the corresponding \DomainType. @@ -555,8 +555,8 @@ \label{AdjacentDomains-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -This attribute identifies an \AdjacentDomains object. The attribute is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +This attribute identifies an \AdjacentDomains object. The attribute is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{domain1} and \tokenNC{domain2} attributes} The \token{domain1} and \token{domain2} attributes, of type \primtype{SpIdRef}, are required attributes. They are the \primtype{SpId}'s of two domains that touch each other (spatially adjacent). These are typically surface-volume contacts. @@ -599,8 +599,8 @@ \label{GeometryDefinition-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute is common to all the \GeometryDefinition types and is used to uniquely identify the \GeometryDefinition. The attribute is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute is common to all the \GeometryDefinition types and is used to uniquely identify the \GeometryDefinition. The attribute is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{isActive} attribute} The \token{isActive} attribute that is common to all the \GeometryDefinition types is used to identify the \GeometryDefinition that is considered the active \GeometryDefinition for the document. When multiple \GeometryDefinition elements define the same underlying geometry, each may set their \token{isActive} attribute to \val{true}. At least one \GeometryDefinition in a \Model must have an \token{isActive} attribute of \val{true}, and any other \GeometryDefinition that does not describe that same underlying physical geometry must have an \token{isActive} value of \val{false}. @@ -623,8 +623,8 @@ \label{analyticvolume-class} The \AnalyticVolume is used to specify the analytic expression of a volumetric (3-dimensional) domain. The analytic expression for the \AnalyticVolume is defined in the Math element. -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute uniquely identifies the \AnalyticVolume. The attribute is required and is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute uniquely identifies the \AnalyticVolume. The attribute is required and is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{functionType} attribute} The \token{functionType} attribute is of type \primtype{FunctionKind} and is currently limited to just \val{layered} (a possibility for future versions of the specification is to allow the value \val{R-function}). A \val{layered} function type implies that the Math child element contains an inequality in the spatial dimensions (e.g. x,y,z) such that evaluation to \val{true} indicates that the point (x,y,z) is within that shape, and "false" indicates that it is not covered by that shape. @@ -691,8 +691,8 @@ \label{sampledvolume-class} A \SampledVolume represents an interval of the sampled field that constitutes one or more contiguous regions. A \SampledVolume is defined for each volumetric (3-dimensional) \Domain in the \Geometry. Volumes are defined as regions within the referenced image that match a particular pixel value (\token{sampledValue}) or that match a range of pixel values (\token{minValue} and \token{maxValue}). A given \SampledVolume must define for itself either a single value or a range of values to which it applies, but not both. Within a \ListOfSampledVolumes, there must be at most one \SampledVolume that corresponds to any given pixel value. That is, any given pixel value may only appear as the \token{sampledVolume} of a single \SampledVolume, or be between the \token{minValue} and \token{maxValue} (inclusive) of a single \SampledVolume. It has the following attributes: -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute identifies a \SampledVolume object. The attribute is of type \primtype{SpId} and is required when specifying a \SampledVolume. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute identifies a \SampledVolume object. The attribute is of type \primtype{SpId} and is required when specifying a \SampledVolume. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{domainType} attribute} The required \token{domainType} attribute is of type \primtype{SpIdRef}. It is the \primtype{SpId} of the \DomainType that represents this class of anatomical features. If there are more than one contiguous regions, then more than one domain will be defined corresponding to each \SampledVolume. @@ -755,8 +755,8 @@ \label{csgobject-class} Each \CSGObject is a scene graph representing a particular geometric object using constructed solid geometry. A node in a tree (scene graph) is made up of \CSGPrimitives, \CSGSetOperators, and \CSGTransformations. Note that the \CSGPrimitives are always leaves in this tree. The \CSGObject is analogous to an \AnalyticVolume element in the sense that it is a constructed geometry (from primitives) used to specify a volumetric (3-dimensional) domain. The \CSGObject element has three attributes : \token{id}, \token{domainType} and \token{ordinal}. The definition of the \CSGObject is completed by defining a \CSGNode which is the root of the \CSGObject scene graph. -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute uniquely identifies the \CSGObject element. The attribute is required and is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute uniquely identifies the \CSGObject element. The attribute is required and is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{domainType} attribute} The \token{domainType} attribute is of type \primtype{SpIdRef} and is a required attribute. It is a reference to the \token{id} of the \DomainType that this \CSGObject represents. @@ -789,8 +789,8 @@ \label{ListOfCSGNodes-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute uniquely identifies the \CSGNode element. The attribute is optional and is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute uniquely identifies the \CSGNode element. The attribute is optional and is of type \primtype{SpId}. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsection{The \class{CSGPrimitive} class} @@ -834,14 +834,14 @@ The \CSGSetOperator element represents the set operations (union, intersection, difference) that can be performed on a set of primitive geometric shapes (\CSGPrimitives) or on a set of \CSGNodes (a transformation or set operation on one or a set of \CSGPrimitives). This element has one attribute of type \primtype{string}. It also contains a required child \ListOfCSGNodes that represents the set of nodes on which the set operation is performed. \subsubsection{The \fixttspace\tokenNC{operationType} attribute} -The \token{operationType} attribute is of type \primtype{SetOperation} and represents an operation that can be performed on a set of \CSGNodes. The possible values that the \token{operationType} attribute can take are \val{union}, \val{intersection}, or \changed{\val{difference}}. The values \val{union} and \val{intersection} are n-ary, meaning they are defined for any number of child nodes of this \CSGSetOperator. The intersection or union of the empty set (zero children) is defined as the empty set, and the intersection or union of a single child is defined as that child. The union of multiple sets is defined as including any element that appears in any of those component sets, and the intersection of multiple sets is defined as including only those elements that appear in all of the component sets. +The \token{operationType} attribute is of type \primtype{SetOperation} and represents an operation that can be performed on a set of \CSGNodes. The possible values that the \token{operationType} attribute can take are \val{union}, \val{intersection}, or \val{difference}. The values \val{union} and \val{intersection} are n-ary, meaning they are defined for any number of child nodes of this \CSGSetOperator. The intersection or union of the empty set (zero children) is defined as the empty set, and the intersection or union of a single child is defined as that child. The union of multiple sets is defined as including any element that appears in any of those component sets, and the intersection of multiple sets is defined as including only those elements that appear in all of the component sets. -The value \changed{\val{difference}} is binary, meaning that it must have exactly two children. Its meaning is defined according to the \token{complement} attributes, below. +The value \val{difference} is binary, meaning that it must have exactly two children. Its meaning is defined according to the \token{complement} attributes, below. \subsubsection{The \fixttspace\tokenNC{complementA} and \tokenNC{complementB} attributes} -The \token{complement} attributes are of type \primtype{SpIdRef}. If the \token{operationType} of the \CSGSetOperator has the value \changed{\val{difference}}, they both must be set to indicate the order in which the complement is to be carried out, and must refer, respectively, to the two \token{csgNode} children of this \CSGSetOperator. The relative complement of the children (and thus the meaning of this node) is defined as the set of elements in \token{complementB}, but not in \token{complementA}. +The \token{complement} attributes are of type \primtype{SpIdRef}. If the \token{operationType} of the \CSGSetOperator has the value \val{difference}, they both must be set to indicate the order in which the complement is to be carried out, and must refer, respectively, to the two \token{csgNode} children of this \CSGSetOperator. The relative complement of the children (and thus the meaning of this node) is defined as the set of elements in \token{complementB}, but not in \token{complementA}. -If the \token{operationType} of the \CSGSetOperator is not \changed{\val{difference}}, neither \token{complement} attribute may be set. +If the \token{operationType} of the \CSGSetOperator is not \val{difference}, neither \token{complement} attribute may be set. @@ -919,7 +919,7 @@ \subsection{The \class{CSGHomogeneousTransformation} class} \label{csghomogeneoustransformation-class} -The \CSGHomogeneousTransformation element represents a homogeneous transformation on a \CSGNode: a transformation or set operation on one or more \CSGPrimitives. This element contains \changed{one required \TransformationComponent element child named \token{forwardTransformation}}. +The \CSGHomogeneousTransformation element represents a homogeneous transformation on a \CSGNode: a transformation or set operation on one or more \CSGPrimitives. This element contains one required \TransformationComponent element child named \token{forwardTransformation}. %{\color{red} Lucian: \notice Still trying to track down whether anyone has implemented 'reverseTransformation'. If not, we'll remove it from the spec as unnecessary, and just leave 'forwardTransformation'.} @@ -929,15 +929,15 @@ The \TransformationComponent element represents an affine transformation that can be applied to a \CSGNode. This element has the following two attributes: \subsubsection{The \fixttspace\tokenNC{components} attribute} -The \token{components} attribute is of type \primtype{doubleArray}, whose values represent the \changed{4x4} affine transformation \changed{matrix}. This attribute is required. +The \token{components} attribute is of type \primtype{doubleArray}, whose values represent the 4x4 affine transformation matrix. This attribute is required. -An affine transformation is essentially a method to transform a shape's scale, rotation, and translation all at once instead of breaking it down into its component tranformations. \changed{For one description of how to transform a model with an affine transformation, see the OpenGL Programming Guide, Chapter 5 \citep{shreiner2013opengl}.} +An affine transformation is essentially a method to transform a shape's scale, rotation, and translation all at once instead of breaking it down into its component tranformations. For one description of how to transform a model with an affine transformation, see the OpenGL Programming Guide, Chapter 5 \citep{shreiner2013opengl}. %{\color{red} Lucian: \notice If someone can concisely explain the algorithm at work here, and can send it to me, I will put it into the spec, because despite reading up on affine transformations on Wikipedia, I don't understand it well enough to explain how you get from a vector of components to a transformed shape.} \subsubsection{The \fixttspace\tokenNC{componentsLength} attribute} -The \token{componentsLength} attribute is of type \primtype{int}, \changed{is required, and must be 16.} It represents the array length of the \token{components} attribute (number of values in the \token{components} array)\changed{, which must be a 4x4 matrix.} +The \token{componentsLength} attribute is of type \primtype{int}, is required, and must be 16. It represents the array length of the \token{components} attribute (number of values in the \token{components} array), which must be a 4x4 matrix. \subsection{CSGObject examples} @@ -1015,13 +1015,18 @@ \subsubsection{The \fixttspace\tokenNC{ArrayData} text child} The \token{ArrayData} text child of the \SpatialPoints is in \token{arrayData} format, and represents an ordered list of sets of coordinates that will be used as the vertices of \ParametricObject elements in this \ParametricGeometry, with \val{0} representing the first such coordinate, \val{1} the second, etc. The list will define vertexes with as many values as there are \CoordinateComponent children of the parent \Geometry: three values for representing the X, Y, and Z coordinates (respectively) of 3-dimensional geometries, or two values for representing the X and Y coordinates (respectively) of 2-dimensional geometries. (\ParametricGeometry elements cannot be created in 1-dimensional geometries.) It is suggested, but not required, that if the data is uncompressed, that the grouped points be separated from each other with the use of a semicolon. If the data is compressed, a semicolon is not to be used. +\begin{blockChanged} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +Each \SpatialPoints is identified with a \token{id} of type \primtype{SpId}. A \SpatialPoints has no mathematical value. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. +\end{blockChanged} + \subsection{The \class{ParametricObject} class} \label{parametricobject-class} The \ParametricObject element represents a single parametric geometry object. It contains a list of point indices from the parent \ParametricGeometry's \SpatialPoints, which collectively define the faces of the object. -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute is a required attribute of type \primtype{SpId}. It uniquely identifies the \ParametricObject element. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute is a required attribute of type \primtype{SpId}. It uniquely identifies the \ParametricObject element. It has no mathematical meaning, and cannot be connected to a \Parameter via a \SpatialSymbolReference element. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. \subsubsection{The \fixttspace\tokenNC{polygonType} attribute} The \token{polygonType} attribute is of type \primtype{PolygonKind} and is a required attribute. It represents the type of polygon that describes the \ParametricObject. \ParametricObject elements of type \val{triangle} have three points, and those of type \val{quadrilateral} have four. @@ -1140,8 +1145,8 @@ \label{sampledfield-uml} \end{figure} -\subsubsection{The \fixttspace\tokenNC{id} \changed{and \fixttspace\tokenNC{name} attributes}} -The \token{id} attribute identifies a \SampledField. It is of type \primtype{SpId} and is a required attribute. The mathematical value of a \SampledField is the value and dimensionality of the field itself, and can be bound to a \Parameter by using a \SpatialSymbolReference. If used in conjunction with the SBML Level~3 \val{arrays} package, it can be used and manipulated as if it was an array of the appropriate dimensions, even though its \emph{meaning} is the value of the field at all points within its borders, not just those at the lattice points. However, even without the use of the \val{arrays} package, it can be used in \sbmlthreecore MathML to set the value of a spatially-distributed SBML symbol such as a \Species or \Parameter, such as through an \InitialAssignment, \Rule, or \EventAssignment. \changed{The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements.} +\subsubsection{The \fixttspace\tokenNC{id} and \fixttspace\tokenNC{name} attributes} +The \token{id} attribute identifies a \SampledField. It is of type \primtype{SpId} and is a required attribute. The mathematical value of a \SampledField is the value and dimensionality of the field itself, and can be bound to a \Parameter by using a \SpatialSymbolReference. If used in conjunction with the SBML Level~3 \val{arrays} package, it can be used and manipulated as if it was an array of the appropriate dimensions, even though its \emph{meaning} is the value of the field at all points within its borders, not just those at the lattice points. However, even without the use of the \val{arrays} package, it can be used in \sbmlthreecore MathML to set the value of a spatially-distributed SBML symbol such as a \Species or \Parameter, such as through an \InitialAssignment, \Rule, or \EventAssignment. The optional \token{name} attribute is of type \primtype{string}, may be used to add a human-readable label to the object, and has no uniqueness requirements. The size of the field is assumed to match the axes (the \CoordinateComponent children) of the parent \Geometry, and is assumed to be regularly spaced in each dimension, but is not required to be spaced the same way in all dimensions. In other words, if the Geometry defines a 10 cm by 10 cm square, and a SampledField is a 10x5 array, the \val{[0,0]} entry in the array will correspond to the point \val{0~cm, 0~cm} in the Geometry, and the \val{[10,5]} entry in the array will correspond to the point \val{10~cm, 10~cm} in the Geometry. Off-latice points (such as the value at \val{9~cm, 9~cm} in this example) have no direct corresponding value in the \SampledField, and are determined according to the \token{interpolationType} attribute, defined below. |
From: <fbe...@us...> - 2019-07-14 08:12:32
|
Revision: 26089 http://sourceforge.net/p/sbml/code/26089 Author: fbergmann Date: 2019-07-14 08:12:20 +0000 (Sun, 14 Jul 2019) Log Message: ----------- - use the correct length Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 14:11:04 UTC (rev 26088) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-14 08:12:20 UTC (rev 26089) @@ -2074,7 +2074,7 @@ if (mCompression == SPATIAL_COMPRESSIONKIND_DEFLATED) { char* csamples = (char*)malloc(sizeof(char) * length); - for (int i = 0; i < mSamplesLength; ++i) + for (int i = 0; i < length; ++i) csamples[i] = (char)samples[i]; SampledField::uncompress_data(csamples, length, mUncompressedSamples, mUncompressedLength); free(csamples); @@ -2103,7 +2103,7 @@ return LIBSBML_OPERATION_SUCCESS; char* csamples = (char*)malloc(sizeof(char) * length); - for (int i = 0; i < mSamplesLength; ++i) + for (int i = 0; i < length; ++i) csamples[i] = (char)samples[i]; mSamples = SampledField::uncompress_data(csamples, length); |
From: <fbe...@us...> - 2019-07-12 14:11:08
|
Revision: 26088 http://sourceforge.net/p/sbml/code/26088 Author: fbergmann Date: 2019-07-12 14:11:04 +0000 (Fri, 12 Jul 2019) Log Message: ----------- - issue #167255390: fix compilation with gcc Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 13:59:30 UTC (rev 26087) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 14:11:04 UTC (rev 26088) @@ -51,11 +51,11 @@ #ifdef __cplusplus -template<typename type> std::string vectorToString(const std::vector<type>& vec) +template<typename type> std::string vectorToString(const std::vector< type >& vec) { std::stringstream str; - std::vector<type>::iterator it = vec.begin(); + typename std::vector< type >::const_iterator it = vec.begin(); for (; it != vec.end(); ++it) { @@ -66,11 +66,11 @@ } -std::string vectorToString(std::vector<double>& vec) +std::string vectorToString(const std::vector<double>& vec) { std::stringstream str; - std::vector<double>::iterator it = vec.begin(); + std::vector<double>::const_iterator it = vec.begin(); for (; it != vec.end(); ++it) { @@ -96,7 +96,7 @@ { stringstream strStream(str); type val; - vector<type> valuesVector; + vector< type> valuesVector; while (strStream >> val) { @@ -161,23 +161,23 @@ * “spatial” package version. */ SampledField::SampledField(unsigned int level, - unsigned int version, - unsigned int pkgVersion) + unsigned int version, + unsigned int pkgVersion) : SBase(level, version) - , mDataType (SPATIAL_DATAKIND_INVALID) - , mNumSamples1 (0) - , mIsSetNumSamples1 (false) - , mNumSamples2 (0) - , mIsSetNumSamples2 (false) - , mNumSamples3 (0) - , mIsSetNumSamples3 (false) - , mInterpolationType (SPATIAL_INTERPOLATIONKIND_INVALID) - , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) - , mSamples () - , mSamplesLength (0) - , mIsSetSamplesLength (false) -, mUncompressedSamples(NULL) -, mUncompressedLength(0) + , mDataType(SPATIAL_DATAKIND_INVALID) + , mNumSamples1(0) + , mIsSetNumSamples1(false) + , mNumSamples2(0) + , mIsSetNumSamples2(false) + , mNumSamples3(0) + , mIsSetNumSamples3(false) + , mInterpolationType(SPATIAL_INTERPOLATIONKIND_INVALID) + , mCompression(SPATIAL_COMPRESSIONKIND_INVALID) + , mSamples() + , mSamplesLength(0) + , mIsSetSamplesLength(false) + , mUncompressedSamples(NULL) + , mUncompressedLength(0) { setSBMLNamespacesAndOwn(new SpatialPkgNamespaces(level, version, pkgVersion)); @@ -187,22 +187,22 @@ /* * Creates a new SampledField using the given SpatialPkgNamespaces object. */ -SampledField::SampledField(SpatialPkgNamespaces *spatialns) +SampledField::SampledField(SpatialPkgNamespaces* spatialns) : SBase(spatialns) - , mDataType (SPATIAL_DATAKIND_INVALID) - , mNumSamples1 (0) - , mIsSetNumSamples1 (false) - , mNumSamples2 (0) - , mIsSetNumSamples2 (false) - , mNumSamples3 (0) - , mIsSetNumSamples3 (false) - , mInterpolationType (SPATIAL_INTERPOLATIONKIND_INVALID) - , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) - , mSamples () - , mSamplesLength (0) - , mIsSetSamplesLength (false) -, mUncompressedSamples(NULL) -, mUncompressedLength(0) + , mDataType(SPATIAL_DATAKIND_INVALID) + , mNumSamples1(0) + , mIsSetNumSamples1(false) + , mNumSamples2(0) + , mIsSetNumSamples2(false) + , mNumSamples3(0) + , mIsSetNumSamples3(false) + , mInterpolationType(SPATIAL_INTERPOLATIONKIND_INVALID) + , mCompression(SPATIAL_COMPRESSIONKIND_INVALID) + , mSamples() + , mSamplesLength(0) + , mIsSetSamplesLength(false) + , mUncompressedSamples(NULL) + , mUncompressedLength(0) { setElementNamespace(spatialns->getURI()); // connect to child objects @@ -216,21 +216,21 @@ * Copy constructor for SampledField. */ SampledField::SampledField(const SampledField& orig) - : SBase( orig ) - , mDataType ( orig.mDataType ) - , mNumSamples1 ( orig.mNumSamples1 ) - , mIsSetNumSamples1 ( orig.mIsSetNumSamples1 ) - , mNumSamples2 ( orig.mNumSamples2 ) - , mIsSetNumSamples2 ( orig.mIsSetNumSamples2 ) - , mNumSamples3 ( orig.mNumSamples3 ) - , mIsSetNumSamples3 ( orig.mIsSetNumSamples3 ) - , mInterpolationType ( orig.mInterpolationType ) - , mCompression ( orig.mCompression ) - , mSamples ( orig.mSamples ) - , mSamplesLength ( orig.mSamplesLength ) - , mIsSetSamplesLength ( orig.mIsSetSamplesLength ) - , mUncompressedSamples ( NULL) - , mUncompressedLength ( 0) + : SBase(orig) + , mDataType(orig.mDataType) + , mNumSamples1(orig.mNumSamples1) + , mIsSetNumSamples1(orig.mIsSetNumSamples1) + , mNumSamples2(orig.mNumSamples2) + , mIsSetNumSamples2(orig.mIsSetNumSamples2) + , mNumSamples3(orig.mNumSamples3) + , mIsSetNumSamples3(orig.mIsSetNumSamples3) + , mInterpolationType(orig.mInterpolationType) + , mCompression(orig.mCompression) + , mSamples(orig.mSamples) + , mSamplesLength(orig.mSamplesLength) + , mIsSetSamplesLength(orig.mIsSetSamplesLength) + , mUncompressedSamples(NULL) + , mUncompressedLength(0) { // connect to child objects connectToChild(); @@ -282,7 +282,7 @@ * Destructor for SampledField. */ SampledField::~SampledField() -{ +{ freeUncompressed(); } @@ -414,7 +414,7 @@ unsigned int length; int* samples = readSamplesFromString<int>(mSamples, length); - memcpy(outArray, samples, sizeof(int)*length); + memcpy(outArray, samples, sizeof(int) * length); } void SampledField::getSamples(std::vector<int>& outVector) const @@ -1192,8 +1192,8 @@ */ void SampledField::enablePackageInternal(const std::string& pkgURI, - const std::string& pkgPrefix, - bool flag) + const std::string& pkgPrefix, + bool flag) { SBase::enablePackageInternal(pkgURI, pkgPrefix, flag); } @@ -1209,7 +1209,7 @@ */ int SampledField::getAttribute(const std::string& attributeName, - bool& value) const + bool& value) const { int return_value = SBase::getAttribute(attributeName, value); @@ -1270,7 +1270,7 @@ */ int SampledField::getAttribute(const std::string& attributeName, - double& value) const + double& value) const { int return_value = SBase::getAttribute(attributeName, value); @@ -1288,7 +1288,7 @@ */ int SampledField::getAttribute(const std::string& attributeName, - unsigned int& value) const + unsigned int& value) const { int return_value = SBase::getAttribute(attributeName, value); @@ -1306,7 +1306,7 @@ */ int SampledField::getAttribute(const std::string& attributeName, - std::string& value) const + std::string& value) const { int return_value = SBase::getAttribute(attributeName, value); @@ -1482,7 +1482,7 @@ */ int SampledField::setAttribute(const std::string& attributeName, - unsigned int value) + unsigned int value) { int return_value = SBase::setAttribute(attributeName, value); @@ -1500,7 +1500,7 @@ */ int SampledField::setAttribute(const std::string& attributeName, - const std::string& value) + const std::string& value) { int return_value = SBase::setAttribute(attributeName, value); @@ -1630,7 +1630,7 @@ */ void SampledField::readAttributes(const XMLAttributes& attributes, - const ExpectedAttributes& expectedAttributes) + const ExpectedAttributes& expectedAttributes) { unsigned int level = getLevel(); unsigned int version = getVersion(); @@ -1643,7 +1643,7 @@ static_cast<ListOfSampledFields*>(getParentSBMLObject())->size() < 2) { numErrs = log->getNumErrors(); - for (int n = numErrs-1; n >= 0; n--) + for (int n = numErrs - 1; n >= 0; n--) { if (log->getError(n)->getErrorId() == UnknownPackageAttribute) { @@ -1658,7 +1658,7 @@ log->remove(UnknownCoreAttribute); log->logPackageError("spatial", SpatialGeometryLOSampledFieldsAllowedCoreAttributes, pkgVersion, level, - version, details); + version, details); } } } @@ -1669,7 +1669,7 @@ { numErrs = log->getNumErrors(); - for (int n = numErrs-1; n >= 0; n--) + for (int n = numErrs - 1; n >= 0; n--) { if (log->getError(n)->getErrorId() == UnknownPackageAttribute) { @@ -1684,7 +1684,7 @@ log->remove(UnknownCoreAttribute); log->logPackageError("spatial", SpatialSampledFieldAllowedCoreAttributes, pkgVersion, level, version, - details); + details); } } } @@ -1705,7 +1705,7 @@ { log->logPackageError("spatial", SpatialIdSyntaxRule, pkgVersion, level, version, "The id on the <" + getElementName() + "> is '" + mId + "', " - "which does not conform to the syntax.", getLine(), getColumn()); + "which does not conform to the syntax.", getLine(), getColumn()); } } else if (log) @@ -1760,11 +1760,11 @@ log->logPackageError("spatial", SpatialSampledFieldDataTypeMustBeDataKindEnum, pkgVersion, level, - version, msg); + version, msg); } } } - else if(log) + else if (log) { std::string message = "Spatial attribute 'dataType' is missing."; log->logPackageError("spatial", SpatialSampledFieldAllowedAttributes, @@ -1778,7 +1778,7 @@ numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetNumSamples1 = attributes.readInto("numSamples1", mNumSamples1); - if ( mIsSetNumSamples1 == false && log) + if (mIsSetNumSamples1 == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1788,7 +1788,7 @@ "<SampledField> element must be an integer."; log->logPackageError("spatial", SpatialSampledFieldNumSamples1MustBeInteger, pkgVersion, level, version, - message); + message); } else { @@ -1806,7 +1806,7 @@ numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetNumSamples2 = attributes.readInto("numSamples2", mNumSamples2); - if ( mIsSetNumSamples2 == false && log) + if (mIsSetNumSamples2 == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1816,7 +1816,7 @@ "<SampledField> element must be an integer."; log->logPackageError("spatial", SpatialSampledFieldNumSamples2MustBeInteger, pkgVersion, level, version, - message); + message); } } @@ -1827,7 +1827,7 @@ numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetNumSamples3 = attributes.readInto("numSamples3", mNumSamples3); - if ( mIsSetNumSamples3 == false && log) + if (mIsSetNumSamples3 == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1837,7 +1837,7 @@ "<SampledField> element must be an integer."; log->logPackageError("spatial", SpatialSampledFieldNumSamples3MustBeInteger, pkgVersion, level, version, - message); + message); } } @@ -1872,11 +1872,11 @@ log->logPackageError("spatial", SpatialSampledFieldInterpolationTypeMustBeInterpolationKindEnum, - pkgVersion, level, version, msg); + pkgVersion, level, version, msg); } } } - else if(log) + else if (log) { std::string message = "Spatial attribute 'interpolationType' is missing."; log->logPackageError("spatial", SpatialSampledFieldAllowedAttributes, @@ -1913,11 +1913,11 @@ log->logPackageError("spatial", SpatialSampledFieldCompressionMustBeCompressionKindEnum, pkgVersion, - level, version, msg); + level, version, msg); } } } - else if(log) + else if (log) { std::string message = "Spatial attribute 'compression' is missing."; log->logPackageError("spatial", SpatialSampledFieldAllowedAttributes, @@ -1931,7 +1931,7 @@ numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetSamplesLength = attributes.readInto("samplesLength", mSamplesLength); - if ( mIsSetSamplesLength == false && log) + if (mIsSetSamplesLength == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1941,7 +1941,7 @@ "<SampledField> element must be an integer."; log->logPackageError("spatial", SpatialSampledFieldSamplesLengthMustBeInteger, pkgVersion, level, - version, message); + version, message); } else { @@ -2042,16 +2042,16 @@ #include <zlib.h> #endif -/** +/** * Returns the data of this image as uncompressed array of integers - * + * * @param data the output array of integers (it will be allocated using * malloc and will have to be freed using free) * @param length the output length of the array * */ -void -SampledField::getUncompressedData(int* &data, int& length) +void +SampledField::getUncompressedData(int*& data, int& length) { if (mUncompressedSamples == NULL) { @@ -2063,7 +2063,7 @@ } -void +void SampledField::uncompressLegacy() { freeUncompressed(); @@ -2091,7 +2091,7 @@ } -int +int SampledField::uncompress() { if (mCompression != SPATIAL_COMPRESSIONKIND_DEFLATED) @@ -2099,18 +2099,20 @@ unsigned int length; int* samples = readSamplesFromString<int>(mSamples, length); - if (samples == NULL) + if (samples == NULL) return LIBSBML_OPERATION_SUCCESS; char* csamples = (char*)malloc(sizeof(char) * length); for (int i = 0; i < mSamplesLength; ++i) csamples[i] = (char)samples[i]; - + mSamples = SampledField::uncompress_data(csamples, length); mCompression = SPATIAL_COMPRESSIONKIND_UNCOMPRESSED; free(csamples); delete[] samples; + return LIBSBML_OPERATION_SUCCESS; + } int SampledField::compress(int level) @@ -2125,7 +2127,7 @@ return 0; } -unsigned int +unsigned int SampledField::getUncompressedLength() { if (mUncompressedSamples == NULL) @@ -2133,7 +2135,7 @@ return mUncompressedLength; } -void +void SampledField::getUncompressed(int* outputSamples) { if (outputSamples == NULL) return; @@ -2141,10 +2143,10 @@ uncompressLegacy(); if (mUncompressedSamples == NULL) return; - memcpy(outputSamples , mUncompressedSamples, sizeof(int)*mUncompressedLength); + memcpy(outputSamples, mUncompressedSamples, sizeof(int) * mUncompressedLength); } -void +void SampledField::freeUncompressed() { if (mUncompressedSamples == NULL) return; @@ -2154,8 +2156,8 @@ } -std::string -SampledField::uncompress_data(void *data, size_t length) +std::string +SampledField::uncompress_data(void* data, size_t length) { std::stringstream str; #ifndef USE_ZLIB @@ -2163,64 +2165,64 @@ // throw ZlibNotLinked(); return ""; #else - const size_t BUFSIZE = 128 * 1024; - Bytef temp_buffer[BUFSIZE]; + const size_t BUFSIZE = 128 * 1024; + Bytef temp_buffer[BUFSIZE]; - z_stream strm; - strm.zalloc = 0; - strm.zfree = 0; - strm.next_in = reinterpret_cast<Bytef *>(data); - strm.avail_in = length; - strm.next_out = reinterpret_cast<Bytef *>(temp_buffer); - strm.avail_out = BUFSIZE; + z_stream strm; + strm.zalloc = 0; + strm.zfree = 0; + strm.next_in = reinterpret_cast<Bytef*>(data); + strm.avail_in = length; + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; - int res = inflateInit(&strm); + int res = inflateInit(&strm); - while (strm.avail_in != 0) - { - res = inflate(&strm, Z_NO_FLUSH); - if (res < 0) + while (strm.avail_in != 0) { - return ""; + res = inflate(&strm, Z_NO_FLUSH); + if (res < 0) + { + return ""; + } + if (strm.avail_out == 0) + { + str << std::string(temp_buffer, temp_buffer + BUFSIZE); + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + } } - if (strm.avail_out == 0) - { - str << std::string(temp_buffer, temp_buffer + BUFSIZE); - strm.next_out = reinterpret_cast<Bytef *>(temp_buffer); - strm.avail_out = BUFSIZE; - } - } - res = Z_OK; - while (res == Z_OK) - { - if (strm.avail_out == 0) + res = Z_OK; + while (res == Z_OK) { - str << std::string(temp_buffer, temp_buffer + BUFSIZE); - strm.next_out = reinterpret_cast<Bytef *>(temp_buffer); - strm.avail_out = BUFSIZE; + if (strm.avail_out == 0) + { + str << std::string(temp_buffer, temp_buffer + BUFSIZE); + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + } + res = inflate(&strm, Z_FINISH); + if (res < 0) + { + return ""; + } } - res = inflate(&strm, Z_FINISH); - if (res < 0) - { - return ""; - } - } - str << std::string(temp_buffer, temp_buffer + BUFSIZE - strm.avail_out); - inflateEnd(&strm); + str << std::string(temp_buffer, temp_buffer + BUFSIZE - strm.avail_out); + inflateEnd(&strm); - return str.str(); + return str.str(); #endif } -void -SampledField::copySampleArrays(int* &target, int& targetLength, int* source, int sourceLength) +void +SampledField::copySampleArrays(int*& target, int& targetLength, int* source, int sourceLength) { - targetLength = sourceLength; - target = (int*)malloc(sizeof(int)*sourceLength); - memset(target, 0, sizeof(int)*sourceLength); - memcpy(target, source, sizeof(int)*sourceLength); + targetLength = sourceLength; + target = (int*)malloc(sizeof(int) * sourceLength); + memset(target, 0, sizeof(int) * sourceLength); + memcpy(target, source, sizeof(int) * sourceLength); } void SampledField::uncompress_data(void* data, size_t length, int*& result, int& outLength) @@ -2293,7 +2295,7 @@ } -void SampledField::compress_data(void* data, size_t length,int level, unsigned char*& result, int& outLength) +void SampledField::compress_data(void* data, size_t length, int level, unsigned char*& result, int& outLength) { #ifndef USE_ZLIB // throwing an exception won't help our users, better set the result array and length to NULL. @@ -2358,7 +2360,7 @@ if (result == NULL) return; for (int i = 0; i < outLength; i++) - result[i] = (unsigned char) buffer[i]; + result[i] = (unsigned char)buffer[i]; #endif } @@ -2371,10 +2373,10 @@ * “spatial” package version. */ LIBSBML_EXTERN -SampledField_t * +SampledField_t* SampledField_create(unsigned int level, - unsigned int version, - unsigned int pkgVersion) + unsigned int version, + unsigned int pkgVersion) { return new SampledField(level, version, pkgVersion); } @@ -2416,8 +2418,8 @@ * Returns the value of the "id" attribute of this SampledField_t. */ LIBSBML_EXTERN -char * -SampledField_getId(const SampledField_t * sf) +char* +SampledField_getId(const SampledField_t* sf) { if (sf == NULL) { @@ -2432,8 +2434,8 @@ * Returns the value of the "name" attribute of this SampledField_t. */ LIBSBML_EXTERN -char * -SampledField_getName(const SampledField_t * sf) +char* +SampledField_getName(const SampledField_t* sf) { if (sf == NULL) { @@ -2449,7 +2451,7 @@ */ LIBSBML_EXTERN DataKind_t -SampledField_getDataType(const SampledField_t * sf) +SampledField_getDataType(const SampledField_t* sf) { if (sf == NULL) { @@ -2464,8 +2466,8 @@ * Returns the value of the "dataType" attribute of this SampledField_t. */ LIBSBML_EXTERN -char * -SampledField_getDataTypeAsString(const SampledField_t * sf) +char* +SampledField_getDataTypeAsString(const SampledField_t* sf) { return (char*)(DataKind_toString(sf->getDataType())); } @@ -2476,7 +2478,7 @@ */ LIBSBML_EXTERN int -SampledField_getNumSamples1(const SampledField_t * sf) +SampledField_getNumSamples1(const SampledField_t* sf) { return (sf != NULL) ? sf->getNumSamples1() : SBML_INT_MAX; } @@ -2487,7 +2489,7 @@ */ LIBSBML_EXTERN int -SampledField_getNumSamples2(const SampledField_t * sf) +SampledField_getNumSamples2(const SampledField_t* sf) { return (sf != NULL) ? sf->getNumSamples2() : SBML_INT_MAX; } @@ -2498,7 +2500,7 @@ */ LIBSBML_EXTERN int -SampledField_getNumSamples3(const SampledField_t * sf) +SampledField_getNumSamples3(const SampledField_t* sf) { return (sf != NULL) ? sf->getNumSamples3() : SBML_INT_MAX; } @@ -2510,7 +2512,7 @@ */ LIBSBML_EXTERN InterpolationKind_t -SampledField_getInterpolationType(const SampledField_t * sf) +SampledField_getInterpolationType(const SampledField_t* sf) { if (sf == NULL) { @@ -2526,8 +2528,8 @@ * SampledField_t. */ LIBSBML_EXTERN -char * -SampledField_getInterpolationTypeAsString(const SampledField_t * sf) +char* +SampledField_getInterpolationTypeAsString(const SampledField_t* sf) { return (char*)(InterpolationKind_toString(sf->getInterpolationType())); } @@ -2538,7 +2540,7 @@ */ LIBSBML_EXTERN CompressionKind_t -SampledField_getCompression(const SampledField_t * sf) +SampledField_getCompression(const SampledField_t* sf) { if (sf == NULL) { @@ -2553,8 +2555,8 @@ * Returns the value of the "compression" attribute of this SampledField_t. */ LIBSBML_EXTERN -char * -SampledField_getCompressionAsString(const SampledField_t * sf) +char* +SampledField_getCompressionAsString(const SampledField_t* sf) { return (char*)(CompressionKind_toString(sf->getCompression())); } @@ -2565,7 +2567,7 @@ */ LIBSBML_EXTERN int -SampledField_getSamplesLength(const SampledField_t * sf) +SampledField_getSamplesLength(const SampledField_t* sf) { return (sf != NULL) ? sf->getSamplesLength() : SBML_INT_MAX; } @@ -2577,7 +2579,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetId(const SampledField_t * sf) +SampledField_isSetId(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetId()) : 0; } @@ -2589,7 +2591,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetName(const SampledField_t * sf) +SampledField_isSetName(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetName()) : 0; } @@ -2601,7 +2603,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetDataType(const SampledField_t * sf) +SampledField_isSetDataType(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetDataType()) : 0; } @@ -2613,7 +2615,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetNumSamples1(const SampledField_t * sf) +SampledField_isSetNumSamples1(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetNumSamples1()) : 0; } @@ -2625,7 +2627,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetNumSamples2(const SampledField_t * sf) +SampledField_isSetNumSamples2(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetNumSamples2()) : 0; } @@ -2637,7 +2639,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetNumSamples3(const SampledField_t * sf) +SampledField_isSetNumSamples3(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetNumSamples3()) : 0; } @@ -2649,7 +2651,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetInterpolationType(const SampledField_t * sf) +SampledField_isSetInterpolationType(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetInterpolationType()) : 0; } @@ -2661,7 +2663,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetCompression(const SampledField_t * sf) +SampledField_isSetCompression(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetCompression()) : 0; } @@ -2673,7 +2675,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetSamples(const SampledField_t * sf) +SampledField_isSetSamples(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetSamples()) : 0; } @@ -2685,7 +2687,7 @@ */ LIBSBML_EXTERN int -SampledField_isSetSamplesLength(const SampledField_t * sf) +SampledField_isSetSamplesLength(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->isSetSamplesLength()) : 0; } @@ -2696,7 +2698,7 @@ */ LIBSBML_EXTERN int -SampledField_setId(SampledField_t * sf, const char * id) +SampledField_setId(SampledField_t* sf, const char* id) { return (sf != NULL) ? sf->setId(id) : LIBSBML_INVALID_OBJECT; } @@ -2707,7 +2709,7 @@ */ LIBSBML_EXTERN int -SampledField_setName(SampledField_t * sf, const char * name) +SampledField_setName(SampledField_t* sf, const char* name) { return (sf != NULL) ? sf->setName(name) : LIBSBML_INVALID_OBJECT; } @@ -2718,7 +2720,7 @@ */ LIBSBML_EXTERN int -SampledField_setDataType(SampledField_t * sf, DataKind_t dataType) +SampledField_setDataType(SampledField_t* sf, DataKind_t dataType) { return (sf != NULL) ? sf->setDataType(dataType) : LIBSBML_INVALID_OBJECT; } @@ -2729,9 +2731,9 @@ */ LIBSBML_EXTERN int -SampledField_setDataTypeAsString(SampledField_t * sf, const char * dataType) +SampledField_setDataTypeAsString(SampledField_t* sf, const char* dataType) { - return (sf != NULL) ? sf->setDataType(dataType): LIBSBML_INVALID_OBJECT; + return (sf != NULL) ? sf->setDataType(dataType) : LIBSBML_INVALID_OBJECT; } @@ -2740,7 +2742,7 @@ */ LIBSBML_EXTERN int -SampledField_setNumSamples1(SampledField_t * sf, int numSamples1) +SampledField_setNumSamples1(SampledField_t* sf, int numSamples1) { return (sf != NULL) ? sf->setNumSamples1(numSamples1) : LIBSBML_INVALID_OBJECT; @@ -2752,7 +2754,7 @@ */ LIBSBML_EXTERN int -SampledField_setNumSamples2(SampledField_t * sf, int numSamples2) +SampledField_setNumSamples2(SampledField_t* sf, int numSamples2) { return (sf != NULL) ? sf->setNumSamples2(numSamples2) : LIBSBML_INVALID_OBJECT; @@ -2764,7 +2766,7 @@ */ LIBSBML_EXTERN int -SampledField_setNumSamples3(SampledField_t * sf, int numSamples3) +SampledField_setNumSamples3(SampledField_t* sf, int numSamples3) { return (sf != NULL) ? sf->setNumSamples3(numSamples3) : LIBSBML_INVALID_OBJECT; @@ -2776,8 +2778,8 @@ */ LIBSBML_EXTERN int -SampledField_setInterpolationType(SampledField_t * sf, - InterpolationKind_t interpolationType) +SampledField_setInterpolationType(SampledField_t* sf, + InterpolationKind_t interpolationType) { return (sf != NULL) ? sf->setInterpolationType(interpolationType) : LIBSBML_INVALID_OBJECT; @@ -2789,10 +2791,10 @@ */ LIBSBML_EXTERN int -SampledField_setInterpolationTypeAsString(SampledField_t * sf, - const char * interpolationType) +SampledField_setInterpolationTypeAsString(SampledField_t* sf, + const char* interpolationType) { - return (sf != NULL) ? sf->setInterpolationType(interpolationType): + return (sf != NULL) ? sf->setInterpolationType(interpolationType) : LIBSBML_INVALID_OBJECT; } @@ -2802,8 +2804,8 @@ */ LIBSBML_EXTERN int -SampledField_setCompression(SampledField_t * sf, - CompressionKind_t compression) +SampledField_setCompression(SampledField_t* sf, + CompressionKind_t compression) { return (sf != NULL) ? sf->setCompression(compression) : LIBSBML_INVALID_OBJECT; @@ -2815,10 +2817,10 @@ */ LIBSBML_EXTERN int -SampledField_setCompressionAsString(SampledField_t * sf, - const char * compression) +SampledField_setCompressionAsString(SampledField_t* sf, + const char* compression) { - return (sf != NULL) ? sf->setCompression(compression): + return (sf != NULL) ? sf->setCompression(compression) : LIBSBML_INVALID_OBJECT; } @@ -2840,7 +2842,7 @@ */ LIBSBML_EXTERN int -SampledField_setSamplesLength(SampledField_t * sf, int samplesLength) +SampledField_setSamplesLength(SampledField_t* sf, int samplesLength) { return (sf != NULL) ? sf->setSamplesLength(samplesLength) : LIBSBML_INVALID_OBJECT; @@ -2852,7 +2854,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetId(SampledField_t * sf) +SampledField_unsetId(SampledField_t* sf) { return (sf != NULL) ? sf->unsetId() : LIBSBML_INVALID_OBJECT; } @@ -2863,7 +2865,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetName(SampledField_t * sf) +SampledField_unsetName(SampledField_t* sf) { return (sf != NULL) ? sf->unsetName() : LIBSBML_INVALID_OBJECT; } @@ -2874,7 +2876,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetDataType(SampledField_t * sf) +SampledField_unsetDataType(SampledField_t* sf) { return (sf != NULL) ? sf->unsetDataType() : LIBSBML_INVALID_OBJECT; } @@ -2885,7 +2887,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetNumSamples1(SampledField_t * sf) +SampledField_unsetNumSamples1(SampledField_t* sf) { return (sf != NULL) ? sf->unsetNumSamples1() : LIBSBML_INVALID_OBJECT; } @@ -2896,7 +2898,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetNumSamples2(SampledField_t * sf) +SampledField_unsetNumSamples2(SampledField_t* sf) { return (sf != NULL) ? sf->unsetNumSamples2() : LIBSBML_INVALID_OBJECT; } @@ -2907,7 +2909,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetNumSamples3(SampledField_t * sf) +SampledField_unsetNumSamples3(SampledField_t* sf) { return (sf != NULL) ? sf->unsetNumSamples3() : LIBSBML_INVALID_OBJECT; } @@ -2919,7 +2921,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetInterpolationType(SampledField_t * sf) +SampledField_unsetInterpolationType(SampledField_t* sf) { return (sf != NULL) ? sf->unsetInterpolationType() : LIBSBML_INVALID_OBJECT; } @@ -2930,7 +2932,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetCompression(SampledField_t * sf) +SampledField_unsetCompression(SampledField_t* sf) { return (sf != NULL) ? sf->unsetCompression() : LIBSBML_INVALID_OBJECT; } @@ -2941,7 +2943,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetSamples(SampledField_t * sf) +SampledField_unsetSamples(SampledField_t* sf) { return (sf != NULL) ? sf->unsetSamples() : LIBSBML_INVALID_OBJECT; } @@ -2952,7 +2954,7 @@ */ LIBSBML_EXTERN int -SampledField_unsetSamplesLength(SampledField_t * sf) +SampledField_unsetSamplesLength(SampledField_t* sf) { return (sf != NULL) ? sf->unsetSamplesLength() : LIBSBML_INVALID_OBJECT; } @@ -2964,7 +2966,7 @@ */ LIBSBML_EXTERN int -SampledField_hasRequiredAttributes(const SampledField_t * sf) +SampledField_hasRequiredAttributes(const SampledField_t* sf) { return (sf != NULL) ? static_cast<int>(sf->hasRequiredAttributes()) : 0; } |
From: <fbe...@us...> - 2019-07-12 13:59:40
|
Revision: 26087 http://sourceforge.net/p/sbml/code/26087 Author: fbergmann Date: 2019-07-12 13:59:30 +0000 (Fri, 12 Jul 2019) Log Message: ----------- - issue #167255390: fix compilation with gcc (remove const iterators) Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 13:56:26 UTC (rev 26086) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 13:59:30 UTC (rev 26087) @@ -55,7 +55,7 @@ { std::stringstream str; - std::vector<type>::const_iterator it = vec.begin(); + std::vector<type>::iterator it = vec.begin(); for (; it != vec.end(); ++it) { @@ -66,11 +66,11 @@ } -std::string vectorToString(const std::vector<double>& vec) +std::string vectorToString(std::vector<double>& vec) { std::stringstream str; - std::vector<double>::const_iterator it = vec.begin(); + std::vector<double>::iterator it = vec.begin(); for (; it != vec.end(); ++it) { |
From: <fbe...@us...> - 2019-07-12 13:56:36
|
Revision: 26086 http://sourceforge.net/p/sbml/code/26086 Author: fbergmann Date: 2019-07-12 13:56:26 +0000 (Fri, 12 Jul 2019) Log Message: ----------- - issue #167255390: fix compilation with gcc Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 13:52:24 UTC (rev 26085) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 13:56:26 UTC (rev 26086) @@ -55,9 +55,9 @@ { std::stringstream str; - std::vector<type>::const_iterator it = vec.cbegin(); + std::vector<type>::const_iterator it = vec.begin(); - for (; it != vec.cend(); ++it) + for (; it != vec.end(); ++it) { str << *it << " "; } @@ -70,9 +70,9 @@ { std::stringstream str; - std::vector<double>::const_iterator it = vec.cbegin(); + std::vector<double>::const_iterator it = vec.begin(); - for (; it != vec.cend(); ++it) + for (; it != vec.end(); ++it) { str << setprecision(17) << *it << " "; } |
From: <fbe...@us...> - 2019-07-12 13:52:35
|
Revision: 26085 http://sourceforge.net/p/sbml/code/26085 Author: fbergmann Date: 2019-07-12 13:52:24 +0000 (Fri, 12 Jul 2019) Log Message: ----------- - issue #167255390: sample field needs to store different datatypes, additionally we allow to store / retrieve them as strings. compression / uncompression is now based on strings rather than on the integer representation of the array. Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.h Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-11 11:11:48 UTC (rev 26084) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp 2019-07-12 13:52:24 UTC (rev 26085) @@ -51,6 +51,111 @@ #ifdef __cplusplus +template<typename type> std::string vectorToString(const std::vector<type>& vec) +{ + std::stringstream str; + + std::vector<type>::const_iterator it = vec.cbegin(); + + for (; it != vec.cend(); ++it) + { + str << *it << " "; + } + + return str.str(); +} + + +std::string vectorToString(const std::vector<double>& vec) +{ + std::stringstream str; + + std::vector<double>::const_iterator it = vec.cbegin(); + + for (; it != vec.cend(); ++it) + { + str << setprecision(17) << *it << " "; + } + + return str.str(); +} + +template<typename type> void readSamplesFromString(const std::string& str, std::vector<type>& valuesVector) +{ + valuesVector.clear(); + stringstream strStream(str); + type val; + + while (strStream >> val) + { + valuesVector.push_back(val); + } +} + +template<typename type> type* readSamplesFromString(const std::string& str, unsigned int& length) +{ + stringstream strStream(str); + type val; + vector<type> valuesVector; + + while (strStream >> val) + { + valuesVector.push_back(val); + } + + length = (unsigned int)valuesVector.size(); + + if (length > 0) + { + type* data = new type[length]; + for (unsigned int i = 0; i < length; ++i) + { + data[i] = valuesVector.at(i); + } + return data; + } + + return NULL; +} + +template<typename type> std::string arrayToString(const type* array, unsigned int length) +{ + std::stringstream str; + + for (unsigned int i = 0; i < length; ++i) + { + str << (type)array[i] << " "; + } + + return str.str(); +} + + +std::string arrayToString(const unsigned char* array, unsigned int length) +{ + std::stringstream str; + + for (unsigned int i = 0; i < length; ++i) + { + str << (int)array[i] << " "; + } + + return str.str(); +} + + +std::string arrayToString(const double* array, unsigned int length) +{ + std::stringstream str; + + for (unsigned int i = 0; i < length; ++i) + { + str << std::setprecision(17) << (double)array[i] << " "; + } + + return str.str(); +} + /* * Creates a new SampledField using the given SBML Level, Version and * “spatial” package version. @@ -60,16 +165,16 @@ unsigned int pkgVersion) : SBase(level, version) , mDataType (SPATIAL_DATAKIND_INVALID) - , mNumSamples1 (SBML_INT_MAX) + , mNumSamples1 (0) , mIsSetNumSamples1 (false) - , mNumSamples2 (SBML_INT_MAX) + , mNumSamples2 (0) , mIsSetNumSamples2 (false) - , mNumSamples3 (SBML_INT_MAX) + , mNumSamples3 (0) , mIsSetNumSamples3 (false) , mInterpolationType (SPATIAL_INTERPOLATIONKIND_INVALID) , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) - , mSamples (NULL) - , mSamplesLength (SBML_INT_MAX) + , mSamples () + , mSamplesLength (0) , mIsSetSamplesLength (false) , mUncompressedSamples(NULL) , mUncompressedLength(0) @@ -85,16 +190,16 @@ SampledField::SampledField(SpatialPkgNamespaces *spatialns) : SBase(spatialns) , mDataType (SPATIAL_DATAKIND_INVALID) - , mNumSamples1 (SBML_INT_MAX) + , mNumSamples1 (0) , mIsSetNumSamples1 (false) - , mNumSamples2 (SBML_INT_MAX) + , mNumSamples2 (0) , mIsSetNumSamples2 (false) - , mNumSamples3 (SBML_INT_MAX) + , mNumSamples3 (0) , mIsSetNumSamples3 (false) , mInterpolationType (SPATIAL_INTERPOLATIONKIND_INVALID) , mCompression (SPATIAL_COMPRESSIONKIND_INVALID) - , mSamples (NULL) - , mSamplesLength (SBML_INT_MAX) + , mSamples () + , mSamplesLength (0) , mIsSetSamplesLength (false) , mUncompressedSamples(NULL) , mUncompressedLength(0) @@ -121,14 +226,12 @@ , mIsSetNumSamples3 ( orig.mIsSetNumSamples3 ) , mInterpolationType ( orig.mInterpolationType ) , mCompression ( orig.mCompression ) - , mSamples ( NULL ) + , mSamples ( orig.mSamples ) , mSamplesLength ( orig.mSamplesLength ) , mIsSetSamplesLength ( orig.mIsSetSamplesLength ) , mUncompressedSamples ( NULL) , mUncompressedLength ( 0) { - setSamples(orig.mSamples, orig.mSamplesLength); - // connect to child objects connectToChild(); } @@ -152,8 +255,7 @@ mIsSetNumSamples3 = rhs.mIsSetNumSamples3; mInterpolationType = rhs.mInterpolationType; mCompression = rhs.mCompression; - mSamples = NULL; - setSamples(rhs.mSamples, rhs.mSamplesLength); + mSamples = rhs.mSamples; mSamplesLength = rhs.mSamplesLength; mIsSetSamplesLength = rhs.mIsSetSamplesLength; mUncompressedSamples = NULL; @@ -180,14 +282,7 @@ * Destructor for SampledField. */ SampledField::~SampledField() -{ - if (mSamples != NULL) - { - delete [] mSamples; - } - - mSamples = NULL; - +{ freeUncompressed(); } @@ -311,15 +406,65 @@ void SampledField::getSamples(int* outArray) const { - if (outArray == NULL || mSamples == NULL) + if (outArray == NULL) { return; } - memcpy(outArray, mSamples, sizeof(int)*mSamplesLength); + unsigned int length; + int* samples = readSamplesFromString<int>(mSamples, length); + + memcpy(outArray, samples, sizeof(int)*length); } +void SampledField::getSamples(std::vector<int>& outVector) const +{ + readSamplesFromString<int>(mSamples, outVector); +} +void SampledField::getSamples(std::vector<float>& outVector) const +{ + readSamplesFromString<float>(mSamples, outVector); +} + +void SampledField::getSamples(std::vector<double>& outVector) const +{ + readSamplesFromString<double>(mSamples, outVector); +} + +const std::string& SampledField::getSamples() const +{ + return mSamples; +} + +void +SampledField::getSamples(double* outArray) const +{ + if (outArray == NULL) + { + return; + } + + unsigned int length; + double* samples = readSamplesFromString<double>(mSamples, length); + + memcpy(outArray, samples, sizeof(double) * length); +} + + +void +SampledField::getSamples(float* outArray) const +{ + if (outArray == NULL) + { + return; + } + + unsigned int length; + float* samples = readSamplesFromString<float>(mSamples, length); + + memcpy(outArray, samples, sizeof(float) * length); +} /* * Returns the value of the "samplesLength" attribute of this SampledField. */ @@ -423,7 +568,7 @@ bool SampledField::isSetSamples() const { - return (mSamples != NULL); + return (!mSamples.empty()); } @@ -623,13 +768,21 @@ return LIBSBML_INVALID_ATTRIBUTE_VALUE; } - if (mSamples != NULL) + mSamples = arrayToString(inArray, arrayLength); + mIsSetSamplesLength = true; + mSamplesLength = arrayLength; + + return LIBSBML_OPERATION_SUCCESS; +} + +int SampledField::setSamples(unsigned int* inArray, int arrayLength) +{ + if (inArray == NULL) { - delete[] mSamples; + return LIBSBML_INVALID_ATTRIBUTE_VALUE; } - mSamples = new int[arrayLength]; - memcpy(mSamples, inArray, sizeof(int)*arrayLength); + mSamples = arrayToString(inArray, arrayLength); mIsSetSamplesLength = true; mSamplesLength = arrayLength; @@ -636,7 +789,82 @@ return LIBSBML_OPERATION_SUCCESS; } +int SampledField::setSamples(unsigned char* inArray, int arrayLength) +{ + if (inArray == NULL) + { + return LIBSBML_INVALID_ATTRIBUTE_VALUE; + } + mSamples = arrayToString(inArray, arrayLength); + mIsSetSamplesLength = true; + mSamplesLength = arrayLength; + + return LIBSBML_OPERATION_SUCCESS; +} + + +int +SampledField::setSamples(double* inArray, int arrayLength) +{ + if (inArray == NULL) + { + return LIBSBML_INVALID_ATTRIBUTE_VALUE; + } + + mSamples = arrayToString(inArray, arrayLength); + mIsSetSamplesLength = true; + mSamplesLength = arrayLength; + + return LIBSBML_OPERATION_SUCCESS; +} + + +int +SampledField::setSamples(float* inArray, int arrayLength) +{ + if (inArray == NULL) + { + return LIBSBML_INVALID_ATTRIBUTE_VALUE; + } + + mSamples = arrayToString(inArray, arrayLength); + mIsSetSamplesLength = true; + mSamplesLength = arrayLength; + + return LIBSBML_OPERATION_SUCCESS; +} + +int SampledField::setSamples(const std::string& samples) +{ + mSamples = samples; + return LIBSBML_OPERATION_SUCCESS; +} + +int SampledField::setSamples(const std::vector<double>& samples) +{ + mSamples = vectorToString(samples); + mIsSetSamplesLength = true; + mSamplesLength = samples.size(); + return LIBSBML_OPERATION_SUCCESS; +} + +int SampledField::setSamples(const std::vector<int>& samples) +{ + mSamples = vectorToString(samples); + mIsSetSamplesLength = true; + mSamplesLength = samples.size(); + return LIBSBML_OPERATION_SUCCESS; +} + +int SampledField::setSamples(const std::vector<float>& samples) +{ + mSamples = vectorToString(samples); + mIsSetSamplesLength = true; + mSamplesLength = samples.size(); + return LIBSBML_OPERATION_SUCCESS; +} + /* * Sets the value of the "samplesLength" attribute of this SampledField. */ @@ -786,13 +1014,8 @@ int SampledField::unsetSamples() { - if (mSamples != NULL) - { - delete[] mSamples; - } + mSamples.clear(); - mSamples = NULL; - return unsetSamplesLength(); } @@ -947,10 +1170,12 @@ if (isSetSamples()) { - for (int i = 0; i < mSamplesLength; ++i) - { - stream << (long)mSamples[i] << " "; - } + //for (int i = 0; i < mSamplesLength; ++i) + //{ + // stream << (long)mSamples[i] << " "; + //} + + stream << mSamples; } stream.endElement(getElementName(), getPrefix()); @@ -1470,7 +1695,7 @@ assigned = attributes.readInto("id", mId); - if (assigned == true) + if (assigned == true && log) { if (mId.empty() == true) { @@ -1483,7 +1708,7 @@ "which does not conform to the syntax.", getLine(), getColumn()); } } - else + else if (log) { std::string message = "Spatial attribute 'id' is missing from the " "<SampledField> element."; @@ -1497,7 +1722,7 @@ assigned = attributes.readInto("name", mName); - if (assigned == true) + if (assigned == true && log) { if (mName.empty() == true) { @@ -1512,7 +1737,7 @@ std::string dataType; assigned = attributes.readInto("dataType", dataType); - if (assigned == true) + if (assigned == true && log) { if (dataType.empty() == true) { @@ -1539,7 +1764,7 @@ } } } - else + else if(log) { std::string message = "Spatial attribute 'dataType' is missing."; log->logPackageError("spatial", SpatialSampledFieldAllowedAttributes, @@ -1550,10 +1775,10 @@ // numSamples1 int (use = "required" ) // - numErrs = log->getNumErrors(); + numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetNumSamples1 = attributes.readInto("numSamples1", mNumSamples1); - if ( mIsSetNumSamples1 == false) + if ( mIsSetNumSamples1 == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1578,10 +1803,10 @@ // numSamples2 int (use = "optional" ) // - numErrs = log->getNumErrors(); + numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetNumSamples2 = attributes.readInto("numSamples2", mNumSamples2); - if ( mIsSetNumSamples2 == false) + if ( mIsSetNumSamples2 == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1599,10 +1824,10 @@ // numSamples3 int (use = "optional" ) // - numErrs = log->getNumErrors(); + numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetNumSamples3 = attributes.readInto("numSamples3", mNumSamples3); - if ( mIsSetNumSamples3 == false) + if ( mIsSetNumSamples3 == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1623,7 +1848,7 @@ std::string interpolationType; assigned = attributes.readInto("interpolationType", interpolationType); - if (assigned == true) + if (assigned == true && log) { if (interpolationType.empty() == true) { @@ -1651,7 +1876,7 @@ } } } - else + else if(log) { std::string message = "Spatial attribute 'interpolationType' is missing."; log->logPackageError("spatial", SpatialSampledFieldAllowedAttributes, @@ -1665,7 +1890,7 @@ std::string compression; assigned = attributes.readInto("compression", compression); - if (assigned == true) + if (assigned == true && log) { if (compression.empty() == true) { @@ -1692,7 +1917,7 @@ } } } - else + else if(log) { std::string message = "Spatial attribute 'compression' is missing."; log->logPackageError("spatial", SpatialSampledFieldAllowedAttributes, @@ -1703,10 +1928,10 @@ // samplesLength int (use = "required" ) // - numErrs = log->getNumErrors(); + numErrs = log == NULL ? 0 : log->getNumErrors(); mIsSetSamplesLength = attributes.readInto("samplesLength", mSamplesLength); - if ( mIsSetSamplesLength == false) + if ( mIsSetSamplesLength == false && log) { if (log->getNumErrors() == numErrs + 1 && log->contains(XMLAttributeTypeMismatch)) @@ -1805,28 +2030,7 @@ void SampledField::setElementText(const std::string& text) { - stringstream strStream(text); - int val; - vector<int> valuesVector; - - while (strStream >> val) - { - valuesVector.push_back(val); - } - - unsigned int length = (unsigned int)valuesVector.size(); - - if (length > 0) - { - int* data = new int[length]; - for (unsigned int i = 0; i < length; ++i) - { - data[i] = valuesVector.at(i); - } - - setSamples(data, length); - delete[] data; - } + setSamples(text); } /** @endcond */ @@ -1851,7 +2055,7 @@ { if (mUncompressedSamples == NULL) { - uncompress(); + uncompressLegacy(); } copySampleArrays(data, length, mUncompressedSamples, mUncompressedLength); @@ -1860,32 +2064,72 @@ } void -SampledField::uncompress() +SampledField::uncompressLegacy() { freeUncompressed(); + + unsigned int length; + int* samples = readSamplesFromString<int>(mSamples, length); + if (samples == NULL) return; if (mCompression == SPATIAL_COMPRESSIONKIND_DEFLATED) { - char* csamples = (char*)malloc(sizeof(char)*mSamplesLength); - for (int i = 0 ; i < mSamplesLength; ++i) - csamples[i] = mSamples[i]; - SampledField::uncompress_data(csamples, mSamplesLength, mUncompressedSamples, mUncompressedLength); + char* csamples = (char*)malloc(sizeof(char) * length); + for (int i = 0; i < mSamplesLength; ++i) + csamples[i] = (char)samples[i]; + SampledField::uncompress_data(csamples, length, mUncompressedSamples, mUncompressedLength); free(csamples); if (mUncompressedSamples == 0) - copySampleArrays(mUncompressedSamples, mUncompressedLength, mSamples, mSamplesLength); + copySampleArrays(mUncompressedSamples, mUncompressedLength, samples, length); } else { - copySampleArrays(mUncompressedSamples, mUncompressedLength, mSamples, mSamplesLength); + copySampleArrays(mUncompressedSamples, mUncompressedLength, samples, mSamplesLength); } + delete[] samples; + } +int +SampledField::uncompress() +{ + if (mCompression != SPATIAL_COMPRESSIONKIND_DEFLATED) + return LIBSBML_OPERATION_SUCCESS; + + unsigned int length; + int* samples = readSamplesFromString<int>(mSamples, length); + if (samples == NULL) + return LIBSBML_OPERATION_SUCCESS; + + char* csamples = (char*)malloc(sizeof(char) * length); + for (int i = 0; i < mSamplesLength; ++i) + csamples[i] = (char)samples[i]; + + mSamples = SampledField::uncompress_data(csamples, length); + mCompression = SPATIAL_COMPRESSIONKIND_UNCOMPRESSED; + free(csamples); + delete[] samples; + +} + +int SampledField::compress(int level) +{ + unsigned char* result; int length; + compress_data(const_cast<char*>(mSamples.c_str()), mSamples.length(), level, result, length); + + setSamples(result, length); + free(result); + + mCompression = SPATIAL_COMPRESSIONKIND_DEFLATED; + return 0; +} + unsigned int SampledField::getUncompressedLength() { if (mUncompressedSamples == NULL) - uncompress(); + uncompressLegacy(); return mUncompressedLength; } @@ -1894,7 +2138,9 @@ { if (outputSamples == NULL) return; if (mUncompressedSamples == NULL) - uncompress(); + uncompressLegacy(); + if (mUncompressedSamples == NULL) + return; memcpy(outputSamples , mUncompressedSamples, sizeof(int)*mUncompressedLength); } @@ -1908,17 +2154,15 @@ } -void -SampledField::uncompress_data(void *data, size_t length, int*& result, int& outLength) +std::string +SampledField::uncompress_data(void *data, size_t length) { + std::stringstream str; #ifndef USE_ZLIB // throwing an exception won't help our users, better set the result array and length to NULL. // throw ZlibNotLinked(); - outLength = 0; - result = NULL; + return ""; #else - std::vector<char> buffer; - const size_t BUFSIZE = 128 * 1024; Bytef temp_buffer[BUFSIZE]; @@ -1937,13 +2181,11 @@ res = inflate(&strm, Z_NO_FLUSH); if (res < 0) { - outLength = 0; - result = NULL; - break; + return ""; } if (strm.avail_out == 0) { - buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE); + str << std::string(temp_buffer, temp_buffer + BUFSIZE); strm.next_out = reinterpret_cast<Bytef *>(temp_buffer); strm.avail_out = BUFSIZE; } @@ -1954,7 +2196,7 @@ { if (strm.avail_out == 0) { - buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE); + str << std::string(temp_buffer, temp_buffer + BUFSIZE); strm.next_out = reinterpret_cast<Bytef *>(temp_buffer); strm.avail_out = BUFSIZE; } @@ -1961,18 +2203,14 @@ res = inflate(&strm, Z_FINISH); if (res < 0) { - outLength = 0; - result = NULL; + return ""; } } - buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE - strm.avail_out); + str << std::string(temp_buffer, temp_buffer + BUFSIZE - strm.avail_out); inflateEnd(&strm); - outLength = buffer.size(); - result = (int*) malloc(sizeof(int)*outLength); - for (int i = 0; i < outLength; i++) - result[i] = buffer[i]; + return str.str(); #endif } @@ -1985,8 +2223,146 @@ memcpy(target, source, sizeof(int)*sourceLength); } +void SampledField::uncompress_data(void* data, size_t length, int*& result, int& outLength) +{ +#ifndef USE_ZLIB + // throwing an exception won't help our users, better set the result array and length to NULL. + // throw ZlibNotLinked(); + outLength = 0; + result = NULL; +#else + std::vector<char> buffer; + const size_t BUFSIZE = 128 * 1024; + Bytef temp_buffer[BUFSIZE]; + z_stream strm; + strm.zalloc = 0; + strm.zfree = 0; + strm.next_in = reinterpret_cast<Bytef*>(data); + strm.avail_in = length; + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + + int res = inflateInit(&strm); + + while (strm.avail_in != 0) + { + res = inflate(&strm, Z_NO_FLUSH); + if (res < 0) + { + outLength = 0; + result = NULL; + break; + } + if (strm.avail_out == 0) + { + buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE); + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + } + } + + res = Z_OK; + while (res == Z_OK) + { + if (strm.avail_out == 0) + { + buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE); + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + } + res = inflate(&strm, Z_FINISH); + if (res < 0) + { + outLength = 0; + result = NULL; + } + } + + buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE - strm.avail_out); + inflateEnd(&strm); + + outLength = buffer.size(); + result = (int*)malloc(sizeof(int) * outLength); + if (result == NULL) + return; + for (int i = 0; i < outLength; i++) + result[i] = buffer[i]; +#endif +} + + +void SampledField::compress_data(void* data, size_t length,int level, unsigned char*& result, int& outLength) +{ +#ifndef USE_ZLIB + // throwing an exception won't help our users, better set the result array and length to NULL. + // throw ZlibNotLinked(); + outLength = 0; + result = NULL; +#else + std::vector<char> buffer; + + const size_t BUFSIZE = 128 * 1024; + Bytef temp_buffer[BUFSIZE]; + + z_stream strm; + strm.zalloc = 0; + strm.zfree = 0; + strm.next_in = reinterpret_cast<Bytef*>(data); + strm.avail_in = length; + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + + int res = deflateInit(&strm, level); + + while (strm.avail_in != 0) + { + res = deflate(&strm, Z_NO_FLUSH); + if (res < 0) + { + outLength = 0; + result = NULL; + break; + } + if (strm.avail_out == 0) + { + buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE); + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + } + } + + res = Z_OK; + while (res == Z_OK) + { + if (strm.avail_out == 0) + { + buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE); + strm.next_out = reinterpret_cast<Bytef*>(temp_buffer); + strm.avail_out = BUFSIZE; + } + res = deflate(&strm, Z_FINISH); + if (res < 0) + { + outLength = 0; + result = NULL; + } + } + + buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE - strm.avail_out); + deflateEnd(&strm); + + outLength = buffer.size(); + result = (unsigned char*)malloc(sizeof(int) * outLength); + if (result == NULL) + return; + for (int i = 0; i < outLength; i++) + result[i] = (unsigned char) buffer[i]; +#endif +} + + #endif /* __cplusplus */ Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.h 2019-07-11 11:11:48 UTC (rev 26084) +++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.h 2019-07-12 13:52:24 UTC (rev 26085) @@ -116,8 +116,8 @@ #include <string> +#include <vector> - #include <sbml/SBase.h> #include <sbml/packages/spatial/extension/SpatialExtension.h> @@ -140,7 +140,7 @@ bool mIsSetNumSamples3; InterpolationKind_t mInterpolationType; CompressionKind_t mCompression; - int* mSamples; + std::string mSamples; int mSamplesLength; bool mIsSetSamplesLength; @@ -371,8 +371,38 @@ */ void getSamples(int* outArray) const; + void getSamples(std::vector<int>& outVector) const; + void getSamples(std::vector<float>& outVector) const; + + void getSamples(std::vector<double>& outVector) const; + + + const std::string& getSamples() const; + /** + * Returns the value of the "samples" attribute of this SampledField. + * + * @param outArray double* array that will be used to return the value of the + * "samples" attribute of this SampledField. + * + * @note the value of the "samples" attribute of this SampledField is + * returned in the argument array. + */ + void getSamples(double* outArray) const; + + /** + * Returns the value of the "samples" attribute of this SampledField. + * + * @param outArray float* array that will be used to return the value of the + * "samples" attribute of this SampledField. + * + * @note the value of the "samples" attribute of this SampledField is + * returned in the argument array. + */ + void getSamples(float* outArray) const; + + /** * Returns the value of the "samplesLength" attribute of this SampledField. * * @return the value of the "samplesLength" attribute of this SampledField as @@ -664,8 +694,60 @@ */ int setSamples(int* inArray, int arrayLength); + int setSamples(unsigned int* inArray, int arrayLength); + int setSamples(unsigned char* inArray, int arrayLength); + /** + * Sets the value of the "samples" attribute of this SampledField. + * + * @param samples the preformatted samples string to be set + * + * @copydetails doc_returns_success_code + * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, + * OperationReturnValues_t} + */ + int setSamples(const std::string& samples); + + int setSamples(const std::vector<double>& samples); + + int setSamples(const std::vector<float>& samples); + + int setSamples(const std::vector<int>& samples); + + /** + * Sets the value of the "samples" attribute of this SampledField. + * + * @param inArray double* array value of the "samples" attribute to be set. + * + * @param arrayLength int value for the length of the "samples" attribute to + * be set. + * + * @copydetails doc_returns_success_code + * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, + * OperationReturnValues_t} + */ + int setSamples(double* inArray, int arrayLength); + + /** + * Sets the value of the "samples" attribute of this SampledField. + * + * @param inArray float* array value of the "samples" attribute to be set. + * + * @param arrayLength int value for the length of the "samples" attribute to + * be set. + * + * @copydetails doc_returns_success_code + * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, + * OperationReturnValues_t} + */ + int setSamples(float* inArray, int arrayLength); + + + /** * Sets the value of the "samplesLength" attribute of this SampledField. * * @param samplesLength int value of the "samplesLength" attribute to be set. @@ -1177,7 +1259,9 @@ int mUncompressedLength; static void copySampleArrays(int* &target, int& targetLength, int* source, int sourceLength); - static void uncompress_data(void *data, size_t length, int*& result, int& outLength); + static std::string uncompress_data(void *data, size_t length); + static void compress_data(void* data, size_t length, int level, unsigned char*& result, int& outLength); + static void uncompress_data(void* data, size_t length, int*& result, int& outLength); public: @@ -1204,15 +1288,39 @@ /** * utility function uncompressing samples + * + * WARNING: this function assumes that the input data is unit8, and decompresses + * that data for direct access for getUncompressed / getUncompressedData + * */ - void uncompress(); + void uncompressLegacy(); + /** + * if the samples stored are compressed (i.e: the flag set to DEFLATED), then + * this function decompresses the samples and alters the samples, changing the + * compression flag to uncompressed. + * + * @copydetails doc_returns_success_code + * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} + */ + int uncompress(); + + /** + * compresses the samples stored, if the flag is set to UNCOMPRESSED, then + * changes the flag to compressed. + * + * @param compression level 0 (store) ... 9 (max compression) + * + */ + int compress(int level); + /** * Returns the data of this image as uncompressed array of integers * * @param data the output array of integers (it will be allocated using * malloc and will have to be freed using free) - * @param length the output lenght of the array + * @param length the output length of the array * */ void getUncompressedData(int* &data, int& length); |
From: <sar...@us...> - 2019-07-11 11:11:53
|
Revision: 26084 http://sourceforge.net/p/sbml/code/26084 Author: sarahkeating Date: 2019-07-11 11:11:48 +0000 (Thu, 11 Jul 2019) Log Message: ----------- Merged revision(s) 26081-26083 from trunk/libsbml: Modified Paths: -------------- branches/libsbml-experimental/NEWS.txt branches/libsbml-experimental/VERSION.txt branches/libsbml-experimental/configure branches/libsbml-experimental/src/bindings/swig/libsbml.i branches/libsbml-experimental/src/sbml/common/libsbml-version.h Modified: branches/libsbml-experimental/NEWS.txt =================================================================== --- branches/libsbml-experimental/NEWS.txt 2019-07-11 11:09:31 UTC (rev 26083) +++ branches/libsbml-experimental/NEWS.txt 2019-07-11 11:11:48 UTC (rev 26084) @@ -1,21 +1,9 @@ libSBML NEWS -- History of user-visible changes ==================================================================== -5.18.2-experimental (2019-07-18) +5.18.1 (Current svn) ==================================================================== -*** Experimental only release *** - -This is an experimental only release, that is, a release of those -files provided in the experimental folder of a full release. - -This includes updates to all the SBML L3 packages that are not yet -accepted and undergoing development. - -NOTE: An experimental release is not as rigorously tested as a -full release. Any changes/fixes listed as either referring to -stable or experimental code may change before the next full release. - STABLE RELEASE * New features Modified: branches/libsbml-experimental/VERSION.txt =================================================================== --- branches/libsbml-experimental/VERSION.txt 2019-07-11 11:09:31 UTC (rev 26083) +++ branches/libsbml-experimental/VERSION.txt 2019-07-11 11:11:48 UTC (rev 26084) @@ -1 +1 @@ -5.18.2 +5.18.1 Modified: branches/libsbml-experimental/configure =================================================================== --- branches/libsbml-experimental/configure 2019-07-11 11:09:31 UTC (rev 26083) +++ branches/libsbml-experimental/configure 2019-07-11 11:11:48 UTC (rev 26084) @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 25690 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libSBML 5.18.2. +# Generated by GNU Autoconf 2.69 for libSBML 5.18.1. # # Report bugs to <lib...@go...>. # @@ -735,8 +735,8 @@ # Identity of this package. PACKAGE_NAME='libSBML' PACKAGE_TARNAME='libsbml' -PACKAGE_VERSION='5.18.2' -PACKAGE_STRING='libSBML 5.18.2' +PACKAGE_VERSION='5.18.1' +PACKAGE_STRING='libSBML 5.18.1' PACKAGE_BUGREPORT='lib...@go...' PACKAGE_URL='http://sbml.org/Software/libSBML' @@ -1618,7 +1618,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libSBML 5.18.2 to adapt to many kinds of systems. +\`configure' configures libSBML 5.18.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1683,7 +1683,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libSBML 5.18.2:";; + short | recursive ) echo "Configuration of libSBML 5.18.1:";; esac cat <<\_ACEOF @@ -1839,7 +1839,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libSBML configure 5.18.2 +libSBML configure 5.18.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2558,7 +2558,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libSBML $as_me 5.18.2, which was +It was created by libSBML $as_me 5.18.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2948,7 +2948,7 @@ ac_config_headers="$ac_config_headers src/sbml/common/libsbml-namespace.h" -LIBSBML_VERSION_NUMERIC=51802 +LIBSBML_VERSION_NUMERIC=51801 @@ -2960,7 +2960,7 @@ -LIBSBML_REVISION_VERSION=2 +LIBSBML_REVISION_VERSION=1 @@ -27742,7 +27742,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libSBML $as_me 5.18.2, which was +This file was extended by libSBML $as_me 5.18.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -27805,7 +27805,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libSBML config.status 5.18.2 +libSBML config.status 5.18.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: branches/libsbml-experimental/src/bindings/swig/libsbml.i =================================================================== --- branches/libsbml-experimental/src/bindings/swig/libsbml.i 2019-07-11 11:09:31 UTC (rev 26083) +++ branches/libsbml-experimental/src/bindings/swig/libsbml.i 2019-07-11 11:11:48 UTC (rev 26084) @@ -340,9 +340,9 @@ * Ignore internal implementation methods and some other methods * on SBMLNamespces. */ -%ignore SBMLNamespaces::setLevel; -%ignore SBMLNamespaces::setVersion; -%ignore SBMLNamespaces::setNamespaces; +//%ignore SBMLNamespaces::setLevel; +//%ignore SBMLNamespaces::setVersion; +//%ignore SBMLNamespaces::setNamespaces; /** * Ignore internal implementation methods and some other methods Modified: branches/libsbml-experimental/src/sbml/common/libsbml-version.h =================================================================== --- branches/libsbml-experimental/src/sbml/common/libsbml-version.h 2019-07-11 11:09:31 UTC (rev 26083) +++ branches/libsbml-experimental/src/sbml/common/libsbml-version.h 2019-07-11 11:11:48 UTC (rev 26084) @@ -46,7 +46,7 @@ * * A version string of the form "1.2.3". */ -#define LIBSBML_DOTTED_VERSION "5.18.2" +#define LIBSBML_DOTTED_VERSION "5.18.1" /** @@ -57,7 +57,7 @@ * libSBML is released, making it easy to use less-than and greater-than * comparisons when testing versions numbers. */ -#define LIBSBML_VERSION 51802 +#define LIBSBML_VERSION 51801 /** @@ -65,7 +65,7 @@ * * The numeric version as a string: version 1.2.3 becomes "10203". */ -#define LIBSBML_VERSION_STRING "51802" +#define LIBSBML_VERSION_STRING "51801" LIBSBML_CPP_NAMESPACE_BEGIN |
From: <sar...@us...> - 2019-07-11 11:09:57
|
Revision: 26083 http://sourceforge.net/p/sbml/code/26083 Author: sarahkeating Date: 2019-07-11 11:09:31 +0000 (Thu, 11 Jul 2019) Log Message: ----------- revert version number change Modified Paths: -------------- trunk/libsbml/NEWS.txt trunk/libsbml/VERSION.txt trunk/libsbml/configure trunk/libsbml/src/sbml/common/libsbml-version.h Modified: trunk/libsbml/NEWS.txt =================================================================== --- trunk/libsbml/NEWS.txt 2019-07-11 07:43:44 UTC (rev 26082) +++ trunk/libsbml/NEWS.txt 2019-07-11 11:09:31 UTC (rev 26083) @@ -1,21 +1,9 @@ libSBML NEWS -- History of user-visible changes ==================================================================== -5.18.2-experimental (2019-07-18) +5.18.1 (Current svn) ==================================================================== -*** Experimental only release *** - -This is an experimental only release, that is, a release of those -files provided in the experimental folder of a full release. - -This includes updates to all the SBML L3 packages that are not yet -accepted and undergoing development. - -NOTE: An experimental release is not as rigorously tested as a -full release. Any changes/fixes listed as either referring to -stable or experimental code may change before the next full release. - STABLE RELEASE * New features Modified: trunk/libsbml/VERSION.txt =================================================================== --- trunk/libsbml/VERSION.txt 2019-07-11 07:43:44 UTC (rev 26082) +++ trunk/libsbml/VERSION.txt 2019-07-11 11:09:31 UTC (rev 26083) @@ -1 +1 @@ -5.18.2 +5.18.1 Modified: trunk/libsbml/configure =================================================================== --- trunk/libsbml/configure 2019-07-11 07:43:44 UTC (rev 26082) +++ trunk/libsbml/configure 2019-07-11 11:09:31 UTC (rev 26083) @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 25690 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libSBML 5.18.2. +# Generated by GNU Autoconf 2.69 for libSBML 5.18.1. # # Report bugs to <lib...@go...>. # @@ -735,8 +735,8 @@ # Identity of this package. PACKAGE_NAME='libSBML' PACKAGE_TARNAME='libsbml' -PACKAGE_VERSION='5.18.2' -PACKAGE_STRING='libSBML 5.18.2' +PACKAGE_VERSION='5.18.1' +PACKAGE_STRING='libSBML 5.18.1' PACKAGE_BUGREPORT='lib...@go...' PACKAGE_URL='http://sbml.org/Software/libSBML' @@ -1618,7 +1618,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libSBML 5.18.2 to adapt to many kinds of systems. +\`configure' configures libSBML 5.18.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1683,7 +1683,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libSBML 5.18.2:";; + short | recursive ) echo "Configuration of libSBML 5.18.1:";; esac cat <<\_ACEOF @@ -1839,7 +1839,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libSBML configure 5.18.2 +libSBML configure 5.18.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2558,7 +2558,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libSBML $as_me 5.18.2, which was +It was created by libSBML $as_me 5.18.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2948,7 +2948,7 @@ ac_config_headers="$ac_config_headers src/sbml/common/libsbml-namespace.h" -LIBSBML_VERSION_NUMERIC=51802 +LIBSBML_VERSION_NUMERIC=51801 @@ -2960,7 +2960,7 @@ -LIBSBML_REVISION_VERSION=2 +LIBSBML_REVISION_VERSION=1 @@ -27742,7 +27742,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libSBML $as_me 5.18.2, which was +This file was extended by libSBML $as_me 5.18.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -27805,7 +27805,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libSBML config.status 5.18.2 +libSBML config.status 5.18.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: trunk/libsbml/src/sbml/common/libsbml-version.h =================================================================== --- trunk/libsbml/src/sbml/common/libsbml-version.h 2019-07-11 07:43:44 UTC (rev 26082) +++ trunk/libsbml/src/sbml/common/libsbml-version.h 2019-07-11 11:09:31 UTC (rev 26083) @@ -46,7 +46,7 @@ * * A version string of the form "1.2.3". */ -#define LIBSBML_DOTTED_VERSION "5.18.2" +#define LIBSBML_DOTTED_VERSION "5.18.1" /** @@ -57,7 +57,7 @@ * libSBML is released, making it easy to use less-than and greater-than * comparisons when testing versions numbers. */ -#define LIBSBML_VERSION 51802 +#define LIBSBML_VERSION 51801 /** @@ -65,7 +65,7 @@ * * The numeric version as a string: version 1.2.3 becomes "10203". */ -#define LIBSBML_VERSION_STRING "51802" +#define LIBSBML_VERSION_STRING "51801" LIBSBML_CPP_NAMESPACE_BEGIN |
From: <fbe...@us...> - 2019-07-11 07:44:23
|
Revision: 26082 http://sourceforge.net/p/sbml/code/26082 Author: fbergmann Date: 2019-07-11 07:43:44 +0000 (Thu, 11 Jul 2019) Log Message: ----------- - allow to change level /version of elements from language bindings Modified Paths: -------------- trunk/libsbml/src/bindings/swig/libsbml.i Modified: trunk/libsbml/src/bindings/swig/libsbml.i =================================================================== --- trunk/libsbml/src/bindings/swig/libsbml.i 2019-07-10 14:39:38 UTC (rev 26081) +++ trunk/libsbml/src/bindings/swig/libsbml.i 2019-07-11 07:43:44 UTC (rev 26082) @@ -340,9 +340,9 @@ * Ignore internal implementation methods and some other methods * on SBMLNamespces. */ -%ignore SBMLNamespaces::setLevel; -%ignore SBMLNamespaces::setVersion; -%ignore SBMLNamespaces::setNamespaces; +//%ignore SBMLNamespaces::setLevel; +//%ignore SBMLNamespaces::setVersion; +//%ignore SBMLNamespaces::setNamespaces; /** * Ignore internal implementation methods and some other methods |
From: <sar...@us...> - 2019-07-10 14:39:41
|
Revision: 26081 http://sourceforge.net/p/sbml/code/26081 Author: sarahkeating Date: 2019-07-10 14:39:38 +0000 (Wed, 10 Jul 2019) Log Message: ----------- Merged revision(s) 26078-26080 from trunk/libsbml: Modified Paths: -------------- branches/libsbml-experimental/NEWS.txt branches/libsbml-experimental/VERSION.txt branches/libsbml-experimental/configure branches/libsbml-experimental/src/sbml/common/libsbml-version.h Modified: branches/libsbml-experimental/NEWS.txt =================================================================== --- branches/libsbml-experimental/NEWS.txt 2019-07-10 14:34:39 UTC (rev 26080) +++ branches/libsbml-experimental/NEWS.txt 2019-07-10 14:39:38 UTC (rev 26081) @@ -1,6 +1,84 @@ libSBML NEWS -- History of user-visible changes ==================================================================== +5.18.2-experimental (2019-07-18) +==================================================================== + +*** Experimental only release *** + +This is an experimental only release, that is, a release of those +files provided in the experimental folder of a full release. + +This includes updates to all the SBML L3 packages that are not yet +accepted and undergoing development. + +NOTE: An experimental release is not as rigorously tested as a +full release. Any changes/fixes listed as either referring to +stable or experimental code may change before the next full release. + +STABLE RELEASE + +* New features + + - Functions get/set/isSetMath have been added to the SBase class. + These do not allow interacting with a non-existant <math> element + but may facilitate using more generic functions. + + - 'comp' package-specific updates: + - 'fbc' package-specific updates: + - 'groups' package-specific updates: + - 'layout' package-specific updates: + - 'multi' package-specific updates: + - 'qual' package-specific updates: + - 'render' package-specific updates: + +* Bug fixes + + - The L3 infix parser has been improved to recognize the use of a + name without parentheses as a misused function name or a csymbol, + if appropriate. + + - There was an anomaly when using the addCVTerm() and + appendAnnotation() functions which meant that if used in a certain + order information could be lost. This has been corrected. Thanks + to Colin Halupczok for the detailed report. + + - Converting a <localParameter> to a global <parameter> object was + failing if the metaid attribute was set. This has been changed to + produce the correct behavior. + + - 'render' package-specific bug fixes: + + - Some render classes were not handled correctly by language + bindings. This has been fixed. + +* Configuration/build system changes + + - Import of the python library has been sorted in line with recent Linux + changes to the location of the shared file. + +EXPERIMENTAL RELEASE + +* New features + + - 'distrib' package-specific updates: + + - A new converter, AnnotationToDistribConverter, has been added + to allow conversion from the existing annotation format used + with <functionDefinitions> to the new 'distrib' format. This + complements the existing DistribToAnnotationConverter that converts + 'distrib' to annotations. + + + * Bug fixes + + - 'distrib' package-specific bug fixes: + + - There was unfortunately an infinite loop in the code using + the <uncertainty> element. This has been removed. + + +==================================================================== 5.18.0 (2019-04-18) ==================================================================== Modified: branches/libsbml-experimental/VERSION.txt =================================================================== --- branches/libsbml-experimental/VERSION.txt 2019-07-10 14:34:39 UTC (rev 26080) +++ branches/libsbml-experimental/VERSION.txt 2019-07-10 14:39:38 UTC (rev 26081) @@ -1 +1 @@ -5.18.1 +5.18.2 Modified: branches/libsbml-experimental/configure =================================================================== --- branches/libsbml-experimental/configure 2019-07-10 14:34:39 UTC (rev 26080) +++ branches/libsbml-experimental/configure 2019-07-10 14:39:38 UTC (rev 26081) @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 25690 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libSBML 5.18.1. +# Generated by GNU Autoconf 2.69 for libSBML 5.18.2. # # Report bugs to <lib...@go...>. # @@ -735,8 +735,8 @@ # Identity of this package. PACKAGE_NAME='libSBML' PACKAGE_TARNAME='libsbml' -PACKAGE_VERSION='5.18.1' -PACKAGE_STRING='libSBML 5.18.1' +PACKAGE_VERSION='5.18.2' +PACKAGE_STRING='libSBML 5.18.2' PACKAGE_BUGREPORT='lib...@go...' PACKAGE_URL='http://sbml.org/Software/libSBML' @@ -1618,7 +1618,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libSBML 5.18.1 to adapt to many kinds of systems. +\`configure' configures libSBML 5.18.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1683,7 +1683,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libSBML 5.18.1:";; + short | recursive ) echo "Configuration of libSBML 5.18.2:";; esac cat <<\_ACEOF @@ -1839,7 +1839,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libSBML configure 5.18.1 +libSBML configure 5.18.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2558,7 +2558,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libSBML $as_me 5.18.1, which was +It was created by libSBML $as_me 5.18.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2948,7 +2948,7 @@ ac_config_headers="$ac_config_headers src/sbml/common/libsbml-namespace.h" -LIBSBML_VERSION_NUMERIC=51801 +LIBSBML_VERSION_NUMERIC=51802 @@ -2960,7 +2960,7 @@ -LIBSBML_REVISION_VERSION=1 +LIBSBML_REVISION_VERSION=2 @@ -27742,7 +27742,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libSBML $as_me 5.18.1, which was +This file was extended by libSBML $as_me 5.18.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -27805,7 +27805,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libSBML config.status 5.18.1 +libSBML config.status 5.18.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: branches/libsbml-experimental/src/sbml/common/libsbml-version.h =================================================================== --- branches/libsbml-experimental/src/sbml/common/libsbml-version.h 2019-07-10 14:34:39 UTC (rev 26080) +++ branches/libsbml-experimental/src/sbml/common/libsbml-version.h 2019-07-10 14:39:38 UTC (rev 26081) @@ -46,7 +46,7 @@ * * A version string of the form "1.2.3". */ -#define LIBSBML_DOTTED_VERSION "5.18.1" +#define LIBSBML_DOTTED_VERSION "5.18.2" /** @@ -57,7 +57,7 @@ * libSBML is released, making it easy to use less-than and greater-than * comparisons when testing versions numbers. */ -#define LIBSBML_VERSION 51801 +#define LIBSBML_VERSION 51802 /** @@ -65,7 +65,7 @@ * * The numeric version as a string: version 1.2.3 becomes "10203". */ -#define LIBSBML_VERSION_STRING "51801" +#define LIBSBML_VERSION_STRING "51802" LIBSBML_CPP_NAMESPACE_BEGIN |
From: <sar...@us...> - 2019-07-10 14:35:09
|
Revision: 26080 http://sourceforge.net/p/sbml/code/26080 Author: sarahkeating Date: 2019-07-10 14:34:39 +0000 (Wed, 10 Jul 2019) Log Message: ----------- changed the name of DistribAnnotationConverter to AnnotationToDistribConverter to 1) avoid ambiguity 2) be more consistent with DistribToAnnotationConverter Modified Paths: -------------- branches/libsbml-experimental/src/sbml/packages/distrib/extension/DistribExtension.cpp Added Paths: ----------- branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.cpp branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.h Removed Paths: ------------- branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.cpp branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.h Modified: branches/libsbml-experimental/src/sbml/packages/distrib/extension/DistribExtension.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/distrib/extension/DistribExtension.cpp 2019-07-10 14:25:13 UTC (rev 26079) +++ branches/libsbml-experimental/src/sbml/packages/distrib/extension/DistribExtension.cpp 2019-07-10 14:34:39 UTC (rev 26080) @@ -44,7 +44,7 @@ #include <sbml/packages/distrib/validator/DistribSBMLErrorTable.h> #include <sbml/packages/distrib/extension/DistribSBasePlugin.h> #include <sbml/packages/distrib/extension/DistribASTPlugin.h> -#include <sbml/packages/distrib/util/DistribAnnotationConverter.h> +#include <sbml/packages/distrib/util/AnnotationToDistribConverter.h> #include <sbml/packages/distrib/util/DistribToAnnotationConverter.h> #include <sbml/conversion/SBMLConverterRegistry.h> @@ -402,7 +402,7 @@ SBMLExtensionRegistry::getInstance().addExtension(&distribExtension); - DistribAnnotationConverter c1; + AnnotationToDistribConverter c1; SBMLConverterRegistry::getInstance().addConverter(&c1); DistribToAnnotationConverter c2; Copied: branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.cpp (from rev 26078, branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.cpp) =================================================================== --- branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.cpp (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.cpp 2019-07-10 14:34:39 UTC (rev 26080) @@ -0,0 +1,337 @@ +/** + * @file AnnotationToDistribConverter.cpp + * @brief Implementation of a first flattening converter. + * @author Sarah M Keating + * + * <!-------------------------------------------------------------------------- + * This file is part of libSBML. Please visit http://sbml.org for more + * information about SBML, and the latest version of libSBML. + * + * Copyright (C) 2019 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. University of Heidelberg, Heidelberg, Germany + * + * Copyright (C) 2013-2018 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK + * 3. University of Heidelberg, Heidelberg, Germany + * + * Copyright 2011-2012 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as http://sbml.org/software/libsbml/license.html + * ---------------------------------------------------------------------- --> + */ + + +#include <sbml/packages/distrib/util/AnnotationToDistribConverter.h> +#include <sbml/conversion/SBMLConverterRegistry.h> +#include <sbml/packages/distrib/extension/DistribExtension.h> +#include <sbml/util/MathFilter.h> + +#ifdef USE_COMP +#include <sbml/packages/comp/extension/CompSBMLDocumentPlugin.h> +#endif + +#ifdef __cplusplus + +#include <algorithm> +#include <string> + +using namespace std; +LIBSBML_CPP_NAMESPACE_BEGIN + +/** @cond doxygenLibsbmlInternal */ +/* + * SBML Converter stuff below + */ + +void AnnotationToDistribConverter::init() +{ + //'addConverter' adds a clone, not the original. + AnnotationToDistribConverter dac; + SBMLConverterRegistry::getInstance().addConverter(&dac); +} +/** @endcond */ + + +AnnotationToDistribConverter::AnnotationToDistribConverter() + : SBMLConverter("SBML Distributions Annotations Converter") + , mKeepFunctions() +{ +} + + +AnnotationToDistribConverter::AnnotationToDistribConverter + (const AnnotationToDistribConverter& orig) : +SBMLConverter(orig) +, mKeepFunctions() +{ +} + +AnnotationToDistribConverter* +AnnotationToDistribConverter::clone() const +{ + return new AnnotationToDistribConverter(*this); +} + + +/* + * Destroy this object. + */ +AnnotationToDistribConverter::~AnnotationToDistribConverter () +{ +} + + +ConversionProperties +AnnotationToDistribConverter::getDefaultProperties() const +{ + static ConversionProperties prop; + prop.addOption("convert distrib annotations", true, "convert distrib annotations"); + return prop; +} + + +bool +AnnotationToDistribConverter::matchesProperties + (const ConversionProperties &props) const +{ + if (!props.hasOption("convert distrib annotations")) + return false; + return true; +} + +int +AnnotationToDistribConverter::convert() +{ + + int result = performConversion(); + return result; + +} + +/** @cond doxygenLibsbmlInternal */ +int +AnnotationToDistribConverter::performConversion() +{ + Model* model = mDocument->getModel(); + bool converted = convertModel(model); + +#ifdef USE_COMP + CompSBMLDocumentPlugin* csdp = static_cast<CompSBMLDocumentPlugin*>(mDocument->getPlugin("comp")); + if (csdp != NULL) + { + for (unsigned int md = 0; md < csdp->getNumModelDefinitions(); md++) + { + ModelDefinition* modeldef = csdp->getModelDefinition(md); + if (convertModel(modeldef)) + { + converted = true; + } + } + } +#endif + if (!converted) + { + return LIBSBML_OPERATION_SUCCESS; + } + + int result = LIBSBML_OPERATION_SUCCESS; + if (mDocument->getLevel() < 3) { + if (!mDocument->setLevelAndVersion(3, 1, false)) + { + return LIBSBML_OPERATION_FAILED; + } + } + + DistribExtension de; + string uri = de.getURI(mDocument->getLevel(), mDocument->getVersion(), 1); + result = mDocument->enablePackage(uri, "distrib", true); + if (result != LIBSBML_OPERATION_SUCCESS) + { + return result; + } + + return mDocument->setPackageRequired("distrib", true); +} + + +bool +AnnotationToDistribConverter::convertModel(Model* model) +{ + if (model == NULL) + { + return false; + } + map<string, ASTNodeType_t> replacements; + mKeepFunctions.clear(); + for (unsigned int fd = 0; fd < model->getNumFunctionDefinitions(); fd++) + { + FunctionDefinition* funcdef = model->getFunctionDefinition(fd); + XMLNode* annot = funcdef->getAnnotation(); + if (annot==NULL || annot->getNumChildren() == 0) + { + continue; + } + XMLNode distrib = annot->getChild(0); + if (distrib.getName() != "distribution") + { + continue; + } + XMLAttributes attrs = distrib.getAttributes(); + //For some reason, the XMLAttributes object ignores the 'xmlns' attribute, so this doesn't work: + //int defindex = attrs.getIndex("definition", "http://sbml.org/annotations/distribution"); + int defindex = attrs.getIndex("definition"); + if (defindex == -1) + { + continue; + } + string value = attrs.getValue(defindex); + if (value == "http://en.wikipedia.org/wiki/Normal_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_NORMAL; + } + else if (value == "http://en.wikipedia.org/wiki/Truncated_normal_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_NORMAL; + } + else if (value == "http://en.wikipedia.org/wiki/Uniform_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_UNIFORM; + } + else if (value == "http://en.wikipedia.org/wiki/Uniform_distribution_(continuous)") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_UNIFORM; + } + else if (value == "http://en.wikipedia.org/wiki/Exponential_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_EXPONENTIAL; + } + else if (value == "http://en.wikipedia.org/wiki/Gamma_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_GAMMA; + } + else if (value == "http://en.wikipedia.org/wiki/Poisson_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_POISSON; + } + else if (value == "http://en.wikipedia.org/wiki/Log-normal_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_LOGNORMAL; + } + else if (value == "http://en.wikipedia.org/wiki/Chi-squared_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_CHISQUARE; + } + else if (value == "http://en.wikipedia.org/wiki/Laplace_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_LAPLACE; + } + else if (value == "http://en.wikipedia.org/wiki/Cauchy_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_CAUCHY; + } + else if (value == "http://en.wikipedia.org/wiki/Rayleigh_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_RAYLEIGH; + } + else if (value == "http://en.wikipedia.org/wiki/Binomial_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_BINOMIAL; + } + else if (value == "http://en.wikipedia.org/wiki/Bernoulli_distribution") + { + replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_BERNOULLI; + } + } + + if (replacements.empty()) + { + return false; + } + MathFilter *mfilter = new MathFilter(); + + List* allelements = model->getAllElements(mfilter); + for (unsigned int e = 0; e < allelements->getSize(); e++) + { + SBase* element = static_cast<SBase*>(allelements->get(e)); + for (map<string, ASTNodeType_t>::iterator rep = replacements.begin(); rep != replacements.end(); rep++) + { + adjustMath(element, rep->first, rep->second); + } + } + delete mfilter; + delete allelements; + + for (map<string, ASTNodeType_t>::iterator rep = replacements.begin(); rep != replacements.end(); rep++) + { + if (mKeepFunctions.find(rep->first) == mKeepFunctions.end()) + { + model->removeFunctionDefinition(rep->first); + } + } + + if (model->getNumFunctionDefinitions() == 0) + { + model->getListOfFunctionDefinitions()->setExplicitlyListed(false); + } + return true; +} +/** @endcond */ + +void +AnnotationToDistribConverter::adjustMath(SBase* element, const string& function, ASTNodeType_t type) +{ + const ASTNode* astn = element->getMath(); + if (astn == NULL) { + return; + } + ASTNode newastn(*astn); + if (replaceAnnotatedFunctionWith(&newastn, function, type)) + { + element->setMath(&newastn); + } +} + +bool +AnnotationToDistribConverter::replaceAnnotatedFunctionWith(ASTNode * astn, const std::string & function, ASTNodeType_t type) +{ + bool replaced = false; + if (astn->getType() == AST_FUNCTION && function == astn->getName()) + { + if (astn->setType(type) != LIBSBML_OPERATION_SUCCESS || !astn->hasCorrectNumberArguments()) + { + astn->setType(AST_FUNCTION); + mKeepFunctions.insert(astn->getName()); + } + else + { + replaced = true; + } + } + for (unsigned int c = 0; c < astn->getNumChildren(); c++) + { + if (replaceAnnotatedFunctionWith(astn->getChild(c), function, type)) + { + replaced = true; + } + } + return replaced; +} + + + +/** @cond doxygenIgnored */ +/** @endcond */ + +LIBSBML_CPP_NAMESPACE_END + +#endif /* __cplusplus */ + + Copied: branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.h (from rev 26078, branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.h) =================================================================== --- branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.h (rev 0) +++ branches/libsbml-experimental/src/sbml/packages/distrib/util/AnnotationToDistribConverter.h 2019-07-10 14:34:39 UTC (rev 26080) @@ -0,0 +1,193 @@ +/** + * @file AnnotationToDistribConverter.h + * @brief Converts Frank's distrib annotation scheme to the Distributions package. + * @author Lucian Smith + * + * <!-------------------------------------------------------------------------- + * This file is part of libSBML. Please visit http://sbml.org for more + * information about SBML, and the latest version of libSBML. + * + * Copyright (C) 2019 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. University of Heidelberg, Heidelberg, Germany + * + * Copyright (C) 2013-2018 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK + * 3. University of Heidelberg, Heidelberg, Germany + * + * Copyright 2011-2012 jointly by the following organizations: + * 1. California Institute of Technology, Pasadena, CA, USA + * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as http://sbml.org/software/libsbml/license.html + * ---------------------------------------------------------------------- --> + * + * @class AnnotationToDistribConverter + * @sbmlbrief{arrays} Converts a model with custom annotations for distributions into distrib. + * + * @htmlinclude libsbml-facility-only-warning.html + * + */ + + +#ifndef AnnotationToDistribConverter_h +#define AnnotationToDistribConverter_h + +#include <sbml/math/ASTNode.h> +#include <sbml/SBMLNamespaces.h> +#include <sbml/conversion/SBMLConverter.h> +#include <sbml/conversion/SBMLConverterRegister.h> + +#include <set> + +#ifdef __cplusplus + + +LIBSBML_CPP_NAMESPACE_BEGIN + +class LIBSBML_EXTERN AnnotationToDistribConverter : public SBMLConverter +{ +public: + + /** @cond doxygenLibsbmlInternal */ + /** + * Register with the ConversionRegistry. + */ + static void init(); + + /** @endcond */ + + + /** + * Creates a new AnnotationToDistribConverter object. + */ + AnnotationToDistribConverter(); + + + /** + * Copy constructor. + * + * This creates a copy of a AnnotationToDistribConverter object. + * + * @param orig the AnnotationToDistribConverter instance to copy. + */ + AnnotationToDistribConverter(const AnnotationToDistribConverter& orig); + + + /** + * Creates and returns a deep copy of this AnnotationToDistribConverter. + * + * @return a (deep) copy of this AnnotationToDistribConverter. + */ + virtual AnnotationToDistribConverter* clone() const; + + + /** + * Destroy this AnnotationToDistribConverter object. + */ + virtual ~AnnotationToDistribConverter (); + + + /** + * Returns @c true if this converter matches the given properties. + * + * Given a ConversionProperties object @p props, this method checks that @p + * props possesses an option value to enable the AnnotationToDistribConverter. If + * it does, this method returns @c true. + * + * @param props the properties to match. + * + * @return @c true if the properties @p props would match the necessary + * properties for AnnotationToDistribConverter type of converter, @c false + * otherwise. + */ + virtual bool matchesProperties(const ConversionProperties &props) const; + + + /** + * Performs the conversion. + * + * This method causes AnnotationToDistribConverter to do the actual conversion + * work, that is, to convert the SBMLDocument object set by + * SBMLConverter::setDocument(@if java const SBMLDocument@endif) and with + * the configuration options set by SBMLConverter::setProperties(@if java + * const ConversionProperties@endif). + * + * @copydetails doc_returns_success_code + * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t} + */ + virtual int convert(); + + + /** @cond doxygenLibsbmlInternal */ + /** + * Performs the conversion. + * + * This method causes AnnotationToDistribConverter to do the actual conversion + * work, that is, to convert the SBMLDocument object set by + * SBMLConverter::setDocument(@if java const SBMLDocument@endif) and with + * the configuration options set by SBMLConverter::setProperties(@if java + * const ConversionProperties@endif). + * + * @copydetails doc_returns_success_code + * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} + * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t} + */ + virtual int performConversion(); + /** @endcond */ + + + /** + * Returns the default properties of this converter. + * + * A given converter exposes one or more properties that can be adjusted in + * order to influence the behavior of the converter. This method returns + * the @em default property settings for AnnotationToDistribConverter. It is + * meant to be called in order to be able to programmatically discover all + * the settings for the converter object. + * + * @return the ConversionProperties object describing the default properties + * for this converter. + * + * @note Previously, AnnotationToDistribConverter also offered an @em + * "ignorePackages" option, whose name proved to be confusing. This option + * has been deprecated and replaced by the @em "stripUnflattenablePackages" + * option. + */ + virtual ConversionProperties getDefaultProperties() const; + + +private: + bool convertModel(Model* model); + void adjustMath(SBase* element, const std::string& function, ASTNodeType_t type); + bool replaceAnnotatedFunctionWith(ASTNode * astn, const std::string & function, ASTNodeType_t type); + + std::set<std::string> mKeepFunctions; + +}; + +LIBSBML_CPP_NAMESPACE_END + +#endif /* __cplusplus */ + + +#ifndef SWIG + +LIBSBML_CPP_NAMESPACE_BEGIN +BEGIN_C_DECLS + + +END_C_DECLS +LIBSBML_CPP_NAMESPACE_END + +#endif /* !SWIG */ +#endif /* AnnotationToDistribConverter_h*/ + Deleted: branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.cpp 2019-07-10 14:25:13 UTC (rev 26079) +++ branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.cpp 2019-07-10 14:34:39 UTC (rev 26080) @@ -1,337 +0,0 @@ -/** - * @file DistribAnnotationConverter.cpp - * @brief Implementation of a first flattening converter. - * @author Sarah M Keating - * - * <!-------------------------------------------------------------------------- - * This file is part of libSBML. Please visit http://sbml.org for more - * information about SBML, and the latest version of libSBML. - * - * Copyright (C) 2019 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. University of Heidelberg, Heidelberg, Germany - * - * Copyright (C) 2013-2018 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK - * 3. University of Heidelberg, Heidelberg, Germany - * - * Copyright 2011-2012 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as http://sbml.org/software/libsbml/license.html - * ---------------------------------------------------------------------- --> - */ - - -#include <sbml/packages/distrib/util/DistribAnnotationConverter.h> -#include <sbml/conversion/SBMLConverterRegistry.h> -#include <sbml/packages/distrib/extension/DistribExtension.h> -#include <sbml/util/MathFilter.h> - -#ifdef USE_COMP -#include <sbml/packages/comp/extension/CompSBMLDocumentPlugin.h> -#endif - -#ifdef __cplusplus - -#include <algorithm> -#include <string> - -using namespace std; -LIBSBML_CPP_NAMESPACE_BEGIN - -/** @cond doxygenLibsbmlInternal */ -/* - * SBML Converter stuff below - */ - -void DistribAnnotationConverter::init() -{ - //'addConverter' adds a clone, not the original. - DistribAnnotationConverter dac; - SBMLConverterRegistry::getInstance().addConverter(&dac); -} -/** @endcond */ - - -DistribAnnotationConverter::DistribAnnotationConverter() - : SBMLConverter("SBML Distributions Annotations Converter") - , mKeepFunctions() -{ -} - - -DistribAnnotationConverter::DistribAnnotationConverter - (const DistribAnnotationConverter& orig) : -SBMLConverter(orig) -, mKeepFunctions() -{ -} - -DistribAnnotationConverter* -DistribAnnotationConverter::clone() const -{ - return new DistribAnnotationConverter(*this); -} - - -/* - * Destroy this object. - */ -DistribAnnotationConverter::~DistribAnnotationConverter () -{ -} - - -ConversionProperties -DistribAnnotationConverter::getDefaultProperties() const -{ - static ConversionProperties prop; - prop.addOption("convert distrib annotations", true, "convert distrib annotations"); - return prop; -} - - -bool -DistribAnnotationConverter::matchesProperties - (const ConversionProperties &props) const -{ - if (!props.hasOption("convert distrib annotations")) - return false; - return true; -} - -int -DistribAnnotationConverter::convert() -{ - - int result = performConversion(); - return result; - -} - -/** @cond doxygenLibsbmlInternal */ -int -DistribAnnotationConverter::performConversion() -{ - Model* model = mDocument->getModel(); - bool converted = convertModel(model); - -#ifdef USE_COMP - CompSBMLDocumentPlugin* csdp = static_cast<CompSBMLDocumentPlugin*>(mDocument->getPlugin("comp")); - if (csdp != NULL) - { - for (unsigned int md = 0; md < csdp->getNumModelDefinitions(); md++) - { - ModelDefinition* modeldef = csdp->getModelDefinition(md); - if (convertModel(modeldef)) - { - converted = true; - } - } - } -#endif - if (!converted) - { - return LIBSBML_OPERATION_SUCCESS; - } - - int result = LIBSBML_OPERATION_SUCCESS; - if (mDocument->getLevel() < 3) { - if (!mDocument->setLevelAndVersion(3, 1, false)) - { - return LIBSBML_OPERATION_FAILED; - } - } - - DistribExtension de; - string uri = de.getURI(mDocument->getLevel(), mDocument->getVersion(), 1); - result = mDocument->enablePackage(uri, "distrib", true); - if (result != LIBSBML_OPERATION_SUCCESS) - { - return result; - } - - return mDocument->setPackageRequired("distrib", true); -} - - -bool -DistribAnnotationConverter::convertModel(Model* model) -{ - if (model == NULL) - { - return false; - } - map<string, ASTNodeType_t> replacements; - mKeepFunctions.clear(); - for (unsigned int fd = 0; fd < model->getNumFunctionDefinitions(); fd++) - { - FunctionDefinition* funcdef = model->getFunctionDefinition(fd); - XMLNode* annot = funcdef->getAnnotation(); - if (annot==NULL || annot->getNumChildren() == 0) - { - continue; - } - XMLNode distrib = annot->getChild(0); - if (distrib.getName() != "distribution") - { - continue; - } - XMLAttributes attrs = distrib.getAttributes(); - //For some reason, the XMLAttributes object ignores the 'xmlns' attribute, so this doesn't work: - //int defindex = attrs.getIndex("definition", "http://sbml.org/annotations/distribution"); - int defindex = attrs.getIndex("definition"); - if (defindex == -1) - { - continue; - } - string value = attrs.getValue(defindex); - if (value == "http://en.wikipedia.org/wiki/Normal_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_NORMAL; - } - else if (value == "http://en.wikipedia.org/wiki/Truncated_normal_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_NORMAL; - } - else if (value == "http://en.wikipedia.org/wiki/Uniform_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_UNIFORM; - } - else if (value == "http://en.wikipedia.org/wiki/Uniform_distribution_(continuous)") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_UNIFORM; - } - else if (value == "http://en.wikipedia.org/wiki/Exponential_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_EXPONENTIAL; - } - else if (value == "http://en.wikipedia.org/wiki/Gamma_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_GAMMA; - } - else if (value == "http://en.wikipedia.org/wiki/Poisson_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_POISSON; - } - else if (value == "http://en.wikipedia.org/wiki/Log-normal_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_LOGNORMAL; - } - else if (value == "http://en.wikipedia.org/wiki/Chi-squared_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_CHISQUARE; - } - else if (value == "http://en.wikipedia.org/wiki/Laplace_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_LAPLACE; - } - else if (value == "http://en.wikipedia.org/wiki/Cauchy_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_CAUCHY; - } - else if (value == "http://en.wikipedia.org/wiki/Rayleigh_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_RAYLEIGH; - } - else if (value == "http://en.wikipedia.org/wiki/Binomial_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_BINOMIAL; - } - else if (value == "http://en.wikipedia.org/wiki/Bernoulli_distribution") - { - replacements[funcdef->getId()] = AST_DISTRIB_FUNCTION_BERNOULLI; - } - } - - if (replacements.empty()) - { - return false; - } - MathFilter *mfilter = new MathFilter(); - - List* allelements = model->getAllElements(mfilter); - for (unsigned int e = 0; e < allelements->getSize(); e++) - { - SBase* element = static_cast<SBase*>(allelements->get(e)); - for (map<string, ASTNodeType_t>::iterator rep = replacements.begin(); rep != replacements.end(); rep++) - { - adjustMath(element, rep->first, rep->second); - } - } - delete mfilter; - delete allelements; - - for (map<string, ASTNodeType_t>::iterator rep = replacements.begin(); rep != replacements.end(); rep++) - { - if (mKeepFunctions.find(rep->first) == mKeepFunctions.end()) - { - model->removeFunctionDefinition(rep->first); - } - } - - if (model->getNumFunctionDefinitions() == 0) - { - model->getListOfFunctionDefinitions()->setExplicitlyListed(false); - } - return true; -} -/** @endcond */ - -void -DistribAnnotationConverter::adjustMath(SBase* element, const string& function, ASTNodeType_t type) -{ - const ASTNode* astn = element->getMath(); - if (astn == NULL) { - return; - } - ASTNode newastn(*astn); - if (replaceAnnotatedFunctionWith(&newastn, function, type)) - { - element->setMath(&newastn); - } -} - -bool -DistribAnnotationConverter::replaceAnnotatedFunctionWith(ASTNode * astn, const std::string & function, ASTNodeType_t type) -{ - bool replaced = false; - if (astn->getType() == AST_FUNCTION && function == astn->getName()) - { - if (astn->setType(type) != LIBSBML_OPERATION_SUCCESS || !astn->hasCorrectNumberArguments()) - { - astn->setType(AST_FUNCTION); - mKeepFunctions.insert(astn->getName()); - } - else - { - replaced = true; - } - } - for (unsigned int c = 0; c < astn->getNumChildren(); c++) - { - if (replaceAnnotatedFunctionWith(astn->getChild(c), function, type)) - { - replaced = true; - } - } - return replaced; -} - - - -/** @cond doxygenIgnored */ -/** @endcond */ - -LIBSBML_CPP_NAMESPACE_END - -#endif /* __cplusplus */ - - Deleted: branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.h =================================================================== --- branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.h 2019-07-10 14:25:13 UTC (rev 26079) +++ branches/libsbml-experimental/src/sbml/packages/distrib/util/DistribAnnotationConverter.h 2019-07-10 14:34:39 UTC (rev 26080) @@ -1,193 +0,0 @@ -/** - * @file DistribAnnotationConverter.h - * @brief Converts Frank's distrib annotation scheme to the Distributions package. - * @author Lucian Smith - * - * <!-------------------------------------------------------------------------- - * This file is part of libSBML. Please visit http://sbml.org for more - * information about SBML, and the latest version of libSBML. - * - * Copyright (C) 2019 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. University of Heidelberg, Heidelberg, Germany - * - * Copyright (C) 2013-2018 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK - * 3. University of Heidelberg, Heidelberg, Germany - * - * Copyright 2011-2012 jointly by the following organizations: - * 1. California Institute of Technology, Pasadena, CA, USA - * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation. A copy of the license agreement is provided - * in the file named "LICENSE.txt" included with this software distribution - * and also available online as http://sbml.org/software/libsbml/license.html - * ---------------------------------------------------------------------- --> - * - * @class DistribAnnotationConverter - * @sbmlbrief{arrays} Converts a model with custom annotations for distributions into distrib. - * - * @htmlinclude libsbml-facility-only-warning.html - * - */ - - -#ifndef DistribAnnotationConverter_h -#define DistribAnnotationConverter_h - -#include <sbml/math/ASTNode.h> -#include <sbml/SBMLNamespaces.h> -#include <sbml/conversion/SBMLConverter.h> -#include <sbml/conversion/SBMLConverterRegister.h> - -#include <set> - -#ifdef __cplusplus - - -LIBSBML_CPP_NAMESPACE_BEGIN - -class LIBSBML_EXTERN DistribAnnotationConverter : public SBMLConverter -{ -public: - - /** @cond doxygenLibsbmlInternal */ - /** - * Register with the ConversionRegistry. - */ - static void init(); - - /** @endcond */ - - - /** - * Creates a new DistribAnnotationConverter object. - */ - DistribAnnotationConverter(); - - - /** - * Copy constructor. - * - * This creates a copy of a DistribAnnotationConverter object. - * - * @param orig the DistribAnnotationConverter instance to copy. - */ - DistribAnnotationConverter(const DistribAnnotationConverter& orig); - - - /** - * Creates and returns a deep copy of this DistribAnnotationConverter. - * - * @return a (deep) copy of this DistribAnnotationConverter. - */ - virtual DistribAnnotationConverter* clone() const; - - - /** - * Destroy this DistribAnnotationConverter object. - */ - virtual ~DistribAnnotationConverter (); - - - /** - * Returns @c true if this converter matches the given properties. - * - * Given a ConversionProperties object @p props, this method checks that @p - * props possesses an option value to enable the DistribAnnotationConverter. If - * it does, this method returns @c true. - * - * @param props the properties to match. - * - * @return @c true if the properties @p props would match the necessary - * properties for DistribAnnotationConverter type of converter, @c false - * otherwise. - */ - virtual bool matchesProperties(const ConversionProperties &props) const; - - - /** - * Performs the conversion. - * - * This method causes DistribAnnotationConverter to do the actual conversion - * work, that is, to convert the SBMLDocument object set by - * SBMLConverter::setDocument(@if java const SBMLDocument@endif) and with - * the configuration options set by SBMLConverter::setProperties(@if java - * const ConversionProperties@endif). - * - * @copydetails doc_returns_success_code - * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} - * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} - * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t} - */ - virtual int convert(); - - - /** @cond doxygenLibsbmlInternal */ - /** - * Performs the conversion. - * - * This method causes DistribAnnotationConverter to do the actual conversion - * work, that is, to convert the SBMLDocument object set by - * SBMLConverter::setDocument(@if java const SBMLDocument@endif) and with - * the configuration options set by SBMLConverter::setProperties(@if java - * const ConversionProperties@endif). - * - * @copydetails doc_returns_success_code - * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} - * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} - * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t} - */ - virtual int performConversion(); - /** @endcond */ - - - /** - * Returns the default properties of this converter. - * - * A given converter exposes one or more properties that can be adjusted in - * order to influence the behavior of the converter. This method returns - * the @em default property settings for DistribAnnotationConverter. It is - * meant to be called in order to be able to programmatically discover all - * the settings for the converter object. - * - * @return the ConversionProperties object describing the default properties - * for this converter. - * - * @note Previously, DistribAnnotationConverter also offered an @em - * "ignorePackages" option, whose name proved to be confusing. This option - * has been deprecated and replaced by the @em "stripUnflattenablePackages" - * option. - */ - virtual ConversionProperties getDefaultProperties() const; - - -private: - bool convertModel(Model* model); - void adjustMath(SBase* element, const std::string& function, ASTNodeType_t type); - bool replaceAnnotatedFunctionWith(ASTNode * astn, const std::string & function, ASTNodeType_t type); - - std::set<std::string> mKeepFunctions; - -}; - -LIBSBML_CPP_NAMESPACE_END - -#endif /* __cplusplus */ - - -#ifndef SWIG - -LIBSBML_CPP_NAMESPACE_BEGIN -BEGIN_C_DECLS - - -END_C_DECLS -LIBSBML_CPP_NAMESPACE_END - -#endif /* !SWIG */ -#endif /* DistribAnnotationConverter_h*/ - |
From: <sar...@us...> - 2019-07-10 14:25:20
|
Revision: 26079 http://sourceforge.net/p/sbml/code/26079 Author: sarahkeating Date: 2019-07-10 14:25:13 +0000 (Wed, 10 Jul 2019) Log Message: ----------- updated NEWS for release Modified Paths: -------------- trunk/libsbml/NEWS.txt Modified: trunk/libsbml/NEWS.txt =================================================================== --- trunk/libsbml/NEWS.txt 2019-07-10 12:59:48 UTC (rev 26078) +++ trunk/libsbml/NEWS.txt 2019-07-10 14:25:13 UTC (rev 26079) @@ -1,6 +1,84 @@ libSBML NEWS -- History of user-visible changes ==================================================================== +5.18.2-experimental (2019-07-18) +==================================================================== + +*** Experimental only release *** + +This is an experimental only release, that is, a release of those +files provided in the experimental folder of a full release. + +This includes updates to all the SBML L3 packages that are not yet +accepted and undergoing development. + +NOTE: An experimental release is not as rigorously tested as a +full release. Any changes/fixes listed as either referring to +stable or experimental code may change before the next full release. + +STABLE RELEASE + +* New features + + - Functions get/set/isSetMath have been added to the SBase class. + These do not allow interacting with a non-existant <math> element + but may facilitate using more generic functions. + + - 'comp' package-specific updates: + - 'fbc' package-specific updates: + - 'groups' package-specific updates: + - 'layout' package-specific updates: + - 'multi' package-specific updates: + - 'qual' package-specific updates: + - 'render' package-specific updates: + +* Bug fixes + + - The L3 infix parser has been improved to recognize the use of a + name without parentheses as a misused function name or a csymbol, + if appropriate. + + - There was an anomaly when using the addCVTerm() and + appendAnnotation() functions which meant that if used in a certain + order information could be lost. This has been corrected. Thanks + to Colin Halupczok for the detailed report. + + - Converting a <localParameter> to a global <parameter> object was + failing if the metaid attribute was set. This has been changed to + produce the correct behavior. + + - 'render' package-specific bug fixes: + + - Some render classes were not handled correctly by language + bindings. This has been fixed. + +* Configuration/build system changes + + - Import of the python library has been sorted in line with recent Linux + changes to the location of the shared file. + +EXPERIMENTAL RELEASE + +* New features + + - 'distrib' package-specific updates: + + - A new converter, AnnotationToDistribConverter, has been added + to allow conversion from the existing annotation format used + with <functionDefinitions> to the new 'distrib' format. This + complements the existing DistribToAnnotationConverter that converts + 'distrib' to annotations. + + + * Bug fixes + + - 'distrib' package-specific bug fixes: + + - There was unfortunately an infinite loop in the code using + the <uncertainty> element. This has been removed. + + +==================================================================== 5.18.0 (2019-04-18) ==================================================================== |
From: <fbe...@us...> - 2019-07-10 12:59:54
|
Revision: 26078 http://sourceforge.net/p/sbml/code/26078 Author: fbergmann Date: 2019-07-10 12:59:48 +0000 (Wed, 10 Jul 2019) Log Message: ----------- update version number for release Modified Paths: -------------- trunk/libsbml/VERSION.txt trunk/libsbml/configure trunk/libsbml/src/sbml/common/libsbml-version.h Modified: trunk/libsbml/VERSION.txt =================================================================== --- trunk/libsbml/VERSION.txt 2019-07-09 13:19:22 UTC (rev 26077) +++ trunk/libsbml/VERSION.txt 2019-07-10 12:59:48 UTC (rev 26078) @@ -1 +1 @@ -5.18.1 +5.18.2 Modified: trunk/libsbml/configure =================================================================== --- trunk/libsbml/configure 2019-07-09 13:19:22 UTC (rev 26077) +++ trunk/libsbml/configure 2019-07-10 12:59:48 UTC (rev 26078) @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 25690 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libSBML 5.18.1. +# Generated by GNU Autoconf 2.69 for libSBML 5.18.2. # # Report bugs to <lib...@go...>. # @@ -735,8 +735,8 @@ # Identity of this package. PACKAGE_NAME='libSBML' PACKAGE_TARNAME='libsbml' -PACKAGE_VERSION='5.18.1' -PACKAGE_STRING='libSBML 5.18.1' +PACKAGE_VERSION='5.18.2' +PACKAGE_STRING='libSBML 5.18.2' PACKAGE_BUGREPORT='lib...@go...' PACKAGE_URL='http://sbml.org/Software/libSBML' @@ -1618,7 +1618,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libSBML 5.18.1 to adapt to many kinds of systems. +\`configure' configures libSBML 5.18.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1683,7 +1683,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libSBML 5.18.1:";; + short | recursive ) echo "Configuration of libSBML 5.18.2:";; esac cat <<\_ACEOF @@ -1839,7 +1839,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libSBML configure 5.18.1 +libSBML configure 5.18.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2558,7 +2558,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libSBML $as_me 5.18.1, which was +It was created by libSBML $as_me 5.18.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2948,7 +2948,7 @@ ac_config_headers="$ac_config_headers src/sbml/common/libsbml-namespace.h" -LIBSBML_VERSION_NUMERIC=51801 +LIBSBML_VERSION_NUMERIC=51802 @@ -2960,7 +2960,7 @@ -LIBSBML_REVISION_VERSION=1 +LIBSBML_REVISION_VERSION=2 @@ -27742,7 +27742,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libSBML $as_me 5.18.1, which was +This file was extended by libSBML $as_me 5.18.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -27805,7 +27805,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libSBML config.status 5.18.1 +libSBML config.status 5.18.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: trunk/libsbml/src/sbml/common/libsbml-version.h =================================================================== --- trunk/libsbml/src/sbml/common/libsbml-version.h 2019-07-09 13:19:22 UTC (rev 26077) +++ trunk/libsbml/src/sbml/common/libsbml-version.h 2019-07-10 12:59:48 UTC (rev 26078) @@ -46,7 +46,7 @@ * * A version string of the form "1.2.3". */ -#define LIBSBML_DOTTED_VERSION "5.18.1" +#define LIBSBML_DOTTED_VERSION "5.18.2" /** @@ -57,7 +57,7 @@ * libSBML is released, making it easy to use less-than and greater-than * comparisons when testing versions numbers. */ -#define LIBSBML_VERSION 51801 +#define LIBSBML_VERSION 51802 /** @@ -65,7 +65,7 @@ * * The numeric version as a string: version 1.2.3 becomes "10203". */ -#define LIBSBML_VERSION_STRING "51801" +#define LIBSBML_VERSION_STRING "51802" LIBSBML_CPP_NAMESPACE_BEGIN |
From: <fbe...@us...> - 2019-07-09 13:19:27
|
Revision: 26077 http://sourceforge.net/p/sbml/code/26077 Author: fbergmann Date: 2019-07-09 13:19:22 +0000 (Tue, 09 Jul 2019) Log Message: ----------- Merged revision(s) 26075-26076 from trunk/libsbml: Modified Paths: -------------- branches/libsbml-experimental/src/bindings/csharp/local.i Modified: branches/libsbml-experimental/src/bindings/csharp/local.i =================================================================== --- branches/libsbml-experimental/src/bindings/csharp/local.i 2019-07-09 13:14:42 UTC (rev 26076) +++ branches/libsbml-experimental/src/bindings/csharp/local.i 2019-07-09 13:19:22 UTC (rev 26077) @@ -91,15 +91,17 @@ ) TYPENAME "string" %enddef -//SWIGCSHARP_IMTYPE_WSTRING(std::string) SWIGCSHARP_IMTYPE_WSTRING(std::string&) SWIGCSHARP_IMTYPE_WSTRING(const std::string&) -//SWIGCSHARP_IMTYPE_WSTRING(const std::string) SWIGCSHARP_IMTYPE_WSTRING(std::string*) SWIGCSHARP_IMTYPE_WSTRING(const std::string*) SWIGCSHARP_IMTYPE_WSTRING(char*) SWIGCSHARP_IMTYPE_WSTRING(const char*) +SWIGCSHARP_IMTYPE_WSTRING(const std::string) +SWIGCSHARP_IMTYPE_WSTRING(std::string) + + // // In SWIG-1.3.35, a callback function for a returned wide string (implemented in // SWIGWStringHelper class) doesn't work when the given Unicode string converted |
From: <fbe...@us...> - 2019-07-09 13:14:53
|
Revision: 26076 http://sourceforge.net/p/sbml/code/26076 Author: fbergmann Date: 2019-07-09 13:14:42 +0000 (Tue, 09 Jul 2019) Log Message: ----------- - fix C# bindings Modified Paths: -------------- trunk/libsbml/src/bindings/csharp/local.i Modified: trunk/libsbml/src/bindings/csharp/local.i =================================================================== --- trunk/libsbml/src/bindings/csharp/local.i 2019-07-09 11:43:37 UTC (rev 26075) +++ trunk/libsbml/src/bindings/csharp/local.i 2019-07-09 13:14:42 UTC (rev 26076) @@ -91,15 +91,17 @@ ) TYPENAME "string" %enddef -//SWIGCSHARP_IMTYPE_WSTRING(std::string) SWIGCSHARP_IMTYPE_WSTRING(std::string&) SWIGCSHARP_IMTYPE_WSTRING(const std::string&) -//SWIGCSHARP_IMTYPE_WSTRING(const std::string) SWIGCSHARP_IMTYPE_WSTRING(std::string*) SWIGCSHARP_IMTYPE_WSTRING(const std::string*) SWIGCSHARP_IMTYPE_WSTRING(char*) SWIGCSHARP_IMTYPE_WSTRING(const char*) +SWIGCSHARP_IMTYPE_WSTRING(const std::string) +SWIGCSHARP_IMTYPE_WSTRING(std::string) + + // // In SWIG-1.3.35, a callback function for a returned wide string (implemented in // SWIGWStringHelper class) doesn't work when the given Unicode string converted |
From: <fbe...@us...> - 2019-07-09 11:43:46
|
Revision: 26075 http://sourceforge.net/p/sbml/code/26075 Author: fbergmann Date: 2019-07-09 11:43:37 +0000 (Tue, 09 Jul 2019) Log Message: ----------- Merged revision(s) 26072-26074 from trunk/libsbml: Modified Paths: -------------- branches/libsbml-experimental/src/sbml/common/libsbml-version.h Modified: branches/libsbml-experimental/src/sbml/common/libsbml-version.h =================================================================== --- branches/libsbml-experimental/src/sbml/common/libsbml-version.h 2019-07-09 11:37:29 UTC (rev 26074) +++ branches/libsbml-experimental/src/sbml/common/libsbml-version.h 2019-07-09 11:43:37 UTC (rev 26075) @@ -46,7 +46,7 @@ * * A version string of the form "1.2.3". */ -#define LIBSBML_DOTTED_VERSION "5.18.0" +#define LIBSBML_DOTTED_VERSION "5.18.1" /** @@ -57,7 +57,7 @@ * libSBML is released, making it easy to use less-than and greater-than * comparisons when testing versions numbers. */ -#define LIBSBML_VERSION 51800 +#define LIBSBML_VERSION 51801 /** @@ -65,7 +65,7 @@ * * The numeric version as a string: version 1.2.3 becomes "10203". */ -#define LIBSBML_VERSION_STRING "51800" +#define LIBSBML_VERSION_STRING "51801" LIBSBML_CPP_NAMESPACE_BEGIN |
From: <fbe...@us...> - 2019-07-09 11:37:35
|
Revision: 26074 http://sourceforge.net/p/sbml/code/26074 Author: fbergmann Date: 2019-07-09 11:37:29 +0000 (Tue, 09 Jul 2019) Log Message: ----------- - update gnumake version number to be consistent Modified Paths: -------------- trunk/libsbml/src/sbml/common/libsbml-version.h Modified: trunk/libsbml/src/sbml/common/libsbml-version.h =================================================================== --- trunk/libsbml/src/sbml/common/libsbml-version.h 2019-07-09 09:05:09 UTC (rev 26073) +++ trunk/libsbml/src/sbml/common/libsbml-version.h 2019-07-09 11:37:29 UTC (rev 26074) @@ -46,7 +46,7 @@ * * A version string of the form "1.2.3". */ -#define LIBSBML_DOTTED_VERSION "5.18.0" +#define LIBSBML_DOTTED_VERSION "5.18.1" /** @@ -57,7 +57,7 @@ * libSBML is released, making it easy to use less-than and greater-than * comparisons when testing versions numbers. */ -#define LIBSBML_VERSION 51800 +#define LIBSBML_VERSION 51801 /** @@ -65,7 +65,7 @@ * * The numeric version as a string: version 1.2.3 becomes "10203". */ -#define LIBSBML_VERSION_STRING "51800" +#define LIBSBML_VERSION_STRING "51801" LIBSBML_CPP_NAMESPACE_BEGIN |
From: <fbe...@us...> - 2019-07-09 09:05:28
|
Revision: 26073 http://sourceforge.net/p/sbml/code/26073 Author: fbergmann Date: 2019-07-09 09:05:09 +0000 (Tue, 09 Jul 2019) Log Message: ----------- Merged revision(s) 26069-26072 from trunk/libsbml: Modified Paths: -------------- branches/libsbml-experimental/examples/sample-models/render/simple-L2-layout.xml branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-global.xml branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-local.xml branches/libsbml-experimental/src/bindings/swig/libsbml.i branches/libsbml-experimental/src/sbml/SBase.cpp branches/libsbml-experimental/src/sbml/extension/SBMLExtension.h Modified: branches/libsbml-experimental/examples/sample-models/render/simple-L2-layout.xml =================================================================== --- branches/libsbml-experimental/examples/sample-models/render/simple-L2-layout.xml 2019-07-09 08:20:13 UTC (rev 26072) +++ branches/libsbml-experimental/examples/sample-models/render/simple-L2-layout.xml 2019-07-09 09:05:09 UTC (rev 26073) @@ -1,120 +1,114 @@ -<?xml version="1.0" encoding="utf-8"?> -<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" > - <model> - <notes> - <p xmlns="http://www.w3.org/1999/xhtml"> - Simple Model one compartment, with two species, and a reaction. - It also contains one Layout for the model, but no render - information and so tools are free to display it as needed. - </p> - </notes> - <annotation> - <listOfLayouts xmlns="http://projects.eml.org/bcb/sbml/level2"> - <layout id="JDesigner2_0" xmlns="http://projects.eml.org/bcb/sbml/level2"> - <!--Created by SBW SBML LayoutViewer/Manipulator--> - <dimensions width="436" height="232" /> - <listOfCompartmentGlyphs> - <compartmentGlyph id="cGlyph_0" compartment="vol1"> - <boundingBox> - <position x="48" y="21" /> - <dimensions width="340" height="190" /> - </boundingBox> - </compartmentGlyph> - </listOfCompartmentGlyphs> - <listOfSpeciesGlyphs> - <speciesGlyph id="sGlyph_0" species="Node0"> - <boundingBox> - <position x="79" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </speciesGlyph> - <speciesGlyph id="sGlyph_1" species="Node1"> - <boundingBox> - <position x="297" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </speciesGlyph> - </listOfSpeciesGlyphs> - <listOfReactionGlyphs> - <reactionGlyph id="rGlyph_0" reaction="J0"> - <boundingBox> - <position x="0" y="0" /> - <dimensions width="0" height="0" /> - </boundingBox> - <curve> - <listOfCurveSegments /> - </curve> - <listOfSpeciesReferenceGlyphs> - <speciesReferenceGlyph id="SpeciesReference_J0_0" speciesReference="Node1" speciesGlyph="sGlyph_1" role="product" objectRole="product"> - <curve> - <listOfCurveSegments> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="149" y="111" /> - <end x="289" y="111" /> - <basePoint1 x="219" y="111" /> - <basePoint2 x="219" y="111" /> - </curveSegment> - </listOfCurveSegments> - </curve> - </speciesReferenceGlyph> - <speciesReferenceGlyph id="SpeciesReference_J0_2" speciesReference="Node0" speciesGlyph="sGlyph_0" role="substrate" objectRole="substrate"> - <curve> - <listOfCurveSegments /> - </curve> - </speciesReferenceGlyph> - </listOfSpeciesReferenceGlyphs> - </reactionGlyph> - </listOfReactionGlyphs> - <listOfTextGlyphs> - <textGlyph id="tGlyph_0" graphicalObject="sGlyph_0" text="Node0"> - <boundingBox> - <position x="79" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </textGlyph> - <textGlyph id="tGlyph_1" graphicalObject="sGlyph_1" text="Node1"> - <boundingBox> - <position x="297" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </textGlyph> - </listOfTextGlyphs> - </layout> - </listOfLayouts> - </annotation> - <listOfCompartments> - <compartment id="compartment" size="1" /> - <compartment id="vol1" size="1" /> - </listOfCompartments> - <listOfSpecies> - <species id="Node0" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> - <species id="Node1" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> - </listOfSpecies> - <listOfParameters> - <parameter id="J0_k" value="0.1" /> - </listOfParameters> - <listOfReactions> - <reaction id="J0" reversible="false"> - <listOfReactants> - <speciesReference species="Node0" stoichiometry="1" /> - </listOfReactants> - <listOfProducts> - <speciesReference species="Node1" stoichiometry="1" /> - </listOfProducts> - <kineticLaw> - <math xmlns="http://www.w3.org/1998/Math/MathML"> - <apply> - <times /> - <ci> - J0_k - </ci> - <ci> - Node0 - </ci> - </apply> - </math> - </kineticLaw> - </reaction> - </listOfReactions> - </model> +<?xml version="1.0" encoding="utf-8"?> +<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" > + <model> + <notes> + <p xmlns="http://www.w3.org/1999/xhtml"> + Simple Model one compartment, with two species, and a reaction. + It also contains one Layout for the model, but no render + information and so tools are free to display it as needed. + </p> + </notes> + <annotation> + <listOfLayouts xmlns="http://projects.eml.org/bcb/sbml/level2"> + <layout id="JDesigner2_0" xmlns="http://projects.eml.org/bcb/sbml/level2"> + <!--Created by SBW SBML LayoutViewer/Manipulator--> + <dimensions width="436" height="232" /> + <listOfCompartmentGlyphs> + <compartmentGlyph id="cGlyph_0" compartment="vol1"> + <boundingBox> + <position x="48" y="21" /> + <dimensions width="340" height="190" /> + </boundingBox> + </compartmentGlyph> + </listOfCompartmentGlyphs> + <listOfSpeciesGlyphs> + <speciesGlyph id="sGlyph_0" species="Node0"> + <boundingBox> + <position x="79" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </speciesGlyph> + <speciesGlyph id="sGlyph_1" species="Node1"> + <boundingBox> + <position x="297" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </speciesGlyph> + </listOfSpeciesGlyphs> + <listOfReactionGlyphs> + <reactionGlyph id="rGlyph_0" reaction="J0"> + <boundingBox> + <position x="0" y="0" /> + <dimensions width="0" height="0" /> + </boundingBox> + <listOfSpeciesReferenceGlyphs> + <speciesReferenceGlyph id="SpeciesReference_J0_0" speciesReference="Node1" speciesGlyph="sGlyph_1" role="product" objectRole="product"> + <curve> + <listOfCurveSegments> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="149" y="111" /> + <end x="289" y="111" /> + <basePoint1 x="219" y="111" /> + <basePoint2 x="219" y="111" /> + </curveSegment> + </listOfCurveSegments> + </curve> + </speciesReferenceGlyph> + <speciesReferenceGlyph id="SpeciesReference_J0_2" speciesReference="Node0" speciesGlyph="sGlyph_0" role="substrate" objectRole="substrate"> + </speciesReferenceGlyph> + </listOfSpeciesReferenceGlyphs> + </reactionGlyph> + </listOfReactionGlyphs> + <listOfTextGlyphs> + <textGlyph id="tGlyph_0" graphicalObject="sGlyph_0" text="Node0"> + <boundingBox> + <position x="79" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </textGlyph> + <textGlyph id="tGlyph_1" graphicalObject="sGlyph_1" text="Node1"> + <boundingBox> + <position x="297" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </textGlyph> + </listOfTextGlyphs> + </layout> + </listOfLayouts> + </annotation> + <listOfCompartments> + <compartment id="compartment" size="1" /> + <compartment id="vol1" size="1" /> + </listOfCompartments> + <listOfSpecies> + <species id="Node0" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> + <species id="Node1" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> + </listOfSpecies> + <listOfParameters> + <parameter id="J0_k" value="0.1" /> + </listOfParameters> + <listOfReactions> + <reaction id="J0" reversible="false"> + <listOfReactants> + <speciesReference species="Node0" stoichiometry="1" /> + </listOfReactants> + <listOfProducts> + <speciesReference species="Node1" stoichiometry="1" /> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times /> + <ci> + J0_k + </ci> + <ci> + Node0 + </ci> + </apply> + </math> + </kineticLaw> + </reaction> + </listOfReactions> + </model> </sbml> Modified: branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-global.xml =================================================================== --- branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-global.xml 2019-07-09 08:20:13 UTC (rev 26072) +++ branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-global.xml 2019-07-09 09:05:09 UTC (rev 26073) @@ -1,229 +1,223 @@ -<?xml version="1.0" encoding="utf-8"?> -<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" > - <model> - <notes> - <p xmlns="http://www.w3.org/1999/xhtml"> - Simple Model one compartment, with two species, and a reaction. - It also contains one Layout for the model along with a global - Render information object that describes how the layout glyphs - should be rendered. - </p> - </notes> - <annotation> - <listOfLayouts xmlns="http://projects.eml.org/bcb/sbml/level2"> - <annotation xmlns="http://www.sbml.org/sbml/level2"> - <listOfGlobalRenderInformation xmlns="http://projects.eml.org/bcb/sbml/render/level2"> - <renderInformation id="ConvertedRenderStyle" programName="SBML Layout Viewer - SBW version" programVersion="2.7.4344.16022 Compiled on: 11/23/2011 8:54:04 AM"> - <listOfColorDefinitions> - <colorDefinition id="Color_0" value="#ff9900" /> - <colorDefinition id="Color_1" value="#ffeeee" /> - <colorDefinition id="Color_2" value="#ffa500" /> - <colorDefinition id="Color_3" value="#008000" /> - <colorDefinition id="Color_4" value="#000000" /> - </listOfColorDefinitions> - <listOfGradientDefinitions> - <linearGradient x1="0%" y1="0%" z1="0%" x2="0%" y2="100%" z2="100%" id="LinearGradient_0" spreadMethod="reflect"> - <stop offset="0%" stop-color="#ffffff" /> - <stop offset="100%" stop-color="#ffcc99" /> - </linearGradient> - </listOfGradientDefinitions> - <listOfLineEndings> - <lineEnding id="product" enableRotationalMapping="true"> - <boundingBox> - <position x="-10" y="-5" /> - <dimensions width="10" height="10" /> - </boundingBox> - <g stroke="Color_3" stroke-width="0.001" fill="Color_3" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <polygon fill="Color_3"> - <listOfCurveSegments> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0%" y="0%" /> - <end x="100%" y="50%" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="100%" y="50%" /> - <end x="0%" y="100%" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0%" y="100%" /> - <end x="33%" y="50%" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="33%" y="50%" /> - <end x="0%" y="0%" /> - </curveSegment> - </listOfCurveSegments> - </polygon> - </g> - </lineEnding> - </listOfLineEndings> - <listOfStyles> - <style typeList="SPECIESGLYPH"> - <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <curve stroke="Color_0" stroke-width="2" fill="LinearGradient_0"> - <listOfCurveSegments> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="20" y="0" /> - <end x="0" y="20" /> - <basePoint1 x="8.95430500338413" y="0" /> - <basePoint2 x="0" y="8.95430500338413" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0" y="20" /> - <end x="20" y="40" /> - <basePoint1 x="0" y="31.0456949966159" /> - <basePoint2 x="8.95430500338413" y="40" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="20" y="40" /> - <end x="42" y="40" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="42" y="40" /> - <end x="62" y="20" /> - <basePoint1 x="53.0456949966159" y="40" /> - <basePoint2 x="62" y="31.0456949966159" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="62" y="20" /> - <end x="42" y="0" /> - <basePoint1 x="62" y="8.95430500338413" /> - <basePoint2 x="53.0456949966159" y="0" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="42" y="0" /> - <end x="20" y="0" /> - </curveSegment> - </listOfCurveSegments> - </curve> - </g> - </style> - <style typeList="COMPARTMENTGLYPH"> - <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <rectangle stroke="Color_2" stroke-width="12" fill="Color_1" x="0.0" y="0.0" width="100%" height="100%" rx="5" ry="5" /> - </g> - </style> - <style roleList="substrate sidesubstrate" typeList="REACTIONGLYPH"> - <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" /> - </style> - <style roleList=" product"> - <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" endHead="product" /> - </style> - <style typeList="TEXTGLYPH"> - <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> - </style> - <style typeList="TEXTGLYPH"> - <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> - </style> - </listOfStyles> - </renderInformation> - </listOfGlobalRenderInformation> - </annotation> - <layout id="JDesigner2_0" xmlns="http://projects.eml.org/bcb/sbml/level2"> - <!--Created by SBW SBML LayoutViewer/Manipulator--> - <dimensions width="436" height="232" /> - <listOfCompartmentGlyphs> - <compartmentGlyph id="cGlyph_0" compartment="vol1"> - <boundingBox> - <position x="48" y="21" /> - <dimensions width="340" height="190" /> - </boundingBox> - </compartmentGlyph> - </listOfCompartmentGlyphs> - <listOfSpeciesGlyphs> - <speciesGlyph id="sGlyph_0" species="Node0"> - <boundingBox> - <position x="79" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </speciesGlyph> - <speciesGlyph id="sGlyph_1" species="Node1"> - <boundingBox> - <position x="297" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </speciesGlyph> - </listOfSpeciesGlyphs> - <listOfReactionGlyphs> - <reactionGlyph id="rGlyph_0" reaction="J0"> - <boundingBox> - <position x="0" y="0" /> - <dimensions width="0" height="0" /> - </boundingBox> - <curve> - <listOfCurveSegments /> - </curve> - <listOfSpeciesReferenceGlyphs> - <speciesReferenceGlyph id="SpeciesReference_J0_0" speciesReference="Node1" speciesGlyph="sGlyph_1" role="product" objectRole="product"> - <curve> - <listOfCurveSegments> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="149" y="111" /> - <end x="289" y="111" /> - <basePoint1 x="219" y="111" /> - <basePoint2 x="219" y="111" /> - </curveSegment> - </listOfCurveSegments> - </curve> - </speciesReferenceGlyph> - <speciesReferenceGlyph id="SpeciesReference_J0_2" speciesReference="Node0" speciesGlyph="sGlyph_0" role="substrate" objectRole="substrate"> - <curve> - <listOfCurveSegments /> - </curve> - </speciesReferenceGlyph> - </listOfSpeciesReferenceGlyphs> - </reactionGlyph> - </listOfReactionGlyphs> - <listOfTextGlyphs> - <textGlyph id="tGlyph_0" graphicalObject="sGlyph_0" text="Node0"> - <boundingBox> - <position x="79" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </textGlyph> - <textGlyph id="tGlyph_1" graphicalObject="sGlyph_1" text="Node1"> - <boundingBox> - <position x="297" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </textGlyph> - </listOfTextGlyphs> - </layout> - </listOfLayouts> - </annotation> - <listOfCompartments> - <compartment id="compartment" size="1" /> - <compartment id="vol1" size="1" /> - </listOfCompartments> - <listOfSpecies> - <species id="Node0" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> - <species id="Node1" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> - </listOfSpecies> - <listOfParameters> - <parameter id="J0_k" value="0.1" /> - </listOfParameters> - <listOfReactions> - <reaction id="J0" reversible="false"> - <listOfReactants> - <speciesReference species="Node0" stoichiometry="1" /> - </listOfReactants> - <listOfProducts> - <speciesReference species="Node1" stoichiometry="1" /> - </listOfProducts> - <kineticLaw> - <math xmlns="http://www.w3.org/1998/Math/MathML"> - <apply> - <times /> - <ci> - J0_k - </ci> - <ci> - Node0 - </ci> - </apply> - </math> - </kineticLaw> - </reaction> - </listOfReactions> - </model> +<?xml version="1.0" encoding="utf-8"?> +<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" > + <model> + <notes> + <p xmlns="http://www.w3.org/1999/xhtml"> + Simple Model one compartment, with two species, and a reaction. + It also contains one Layout for the model along with a global + Render information object that describes how the layout glyphs + should be rendered. + </p> + </notes> + <annotation> + <listOfLayouts xmlns="http://projects.eml.org/bcb/sbml/level2"> + <annotation xmlns="http://www.sbml.org/sbml/level2"> + <listOfGlobalRenderInformation xmlns="http://projects.eml.org/bcb/sbml/render/level2"> + <renderInformation id="ConvertedRenderStyle" programName="SBML Layout Viewer - SBW version" programVersion="2.7.4344.16022 Compiled on: 11/23/2011 8:54:04 AM"> + <listOfColorDefinitions> + <colorDefinition id="Color_0" value="#ff9900" /> + <colorDefinition id="Color_1" value="#ffeeee" /> + <colorDefinition id="Color_2" value="#ffa500" /> + <colorDefinition id="Color_3" value="#008000" /> + <colorDefinition id="Color_4" value="#000000" /> + </listOfColorDefinitions> + <listOfGradientDefinitions> + <linearGradient x1="0%" y1="0%" z1="0%" x2="0%" y2="100%" z2="100%" id="LinearGradient_0" spreadMethod="reflect"> + <stop offset="0%" stop-color="#ffffff" /> + <stop offset="100%" stop-color="#ffcc99" /> + </linearGradient> + </listOfGradientDefinitions> + <listOfLineEndings> + <lineEnding id="product" enableRotationalMapping="true"> + <boundingBox> + <position x="-10" y="-5" /> + <dimensions width="10" height="10" /> + </boundingBox> + <g stroke="Color_3" stroke-width="0.001" fill="Color_3" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <polygon fill="Color_3"> + <listOfCurveSegments> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0%" y="0%" /> + <end x="100%" y="50%" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="100%" y="50%" /> + <end x="0%" y="100%" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0%" y="100%" /> + <end x="33%" y="50%" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="33%" y="50%" /> + <end x="0%" y="0%" /> + </curveSegment> + </listOfCurveSegments> + </polygon> + </g> + </lineEnding> + </listOfLineEndings> + <listOfStyles> + <style typeList="SPECIESGLYPH"> + <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <polygon stroke="Color_0" stroke-width="2" fill="LinearGradient_0"> + <listOfCurveSegments> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="20" y="0" /> + <end x="0" y="20" /> + <basePoint1 x="8.95430500338413" y="0" /> + <basePoint2 x="0" y="8.95430500338413" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0" y="20" /> + <end x="20" y="40" /> + <basePoint1 x="0" y="31.0456949966159" /> + <basePoint2 x="8.95430500338413" y="40" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="20" y="40" /> + <end x="42" y="40" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="42" y="40" /> + <end x="62" y="20" /> + <basePoint1 x="53.0456949966159" y="40" /> + <basePoint2 x="62" y="31.0456949966159" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="62" y="20" /> + <end x="42" y="0" /> + <basePoint1 x="62" y="8.95430500338413" /> + <basePoint2 x="53.0456949966159" y="0" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="42" y="0" /> + <end x="20" y="0" /> + </curveSegment> + </listOfCurveSegments> + </polygon> + </g> + </style> + <style typeList="COMPARTMENTGLYPH"> + <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <rectangle stroke="Color_2" stroke-width="12" fill="Color_1" x="0.0" y="0.0" width="100%" height="100%" rx="5" ry="5" /> + </g> + </style> + <style roleList="substrate sidesubstrate" typeList="REACTIONGLYPH"> + <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" /> + </style> + <style roleList=" product"> + <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" endHead="product" /> + </style> + <style typeList="TEXTGLYPH"> + <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> + </style> + <style typeList="TEXTGLYPH"> + <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> + </style> + </listOfStyles> + </renderInformation> + </listOfGlobalRenderInformation> + </annotation> + <layout id="JDesigner2_0" xmlns="http://projects.eml.org/bcb/sbml/level2"> + <!--Created by SBW SBML LayoutViewer/Manipulator--> + <dimensions width="436" height="232" /> + <listOfCompartmentGlyphs> + <compartmentGlyph id="cGlyph_0" compartment="vol1"> + <boundingBox> + <position x="48" y="21" /> + <dimensions width="340" height="190" /> + </boundingBox> + </compartmentGlyph> + </listOfCompartmentGlyphs> + <listOfSpeciesGlyphs> + <speciesGlyph id="sGlyph_0" species="Node0"> + <boundingBox> + <position x="79" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </speciesGlyph> + <speciesGlyph id="sGlyph_1" species="Node1"> + <boundingBox> + <position x="297" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </speciesGlyph> + </listOfSpeciesGlyphs> + <listOfReactionGlyphs> + <reactionGlyph id="rGlyph_0" reaction="J0"> + <boundingBox> + <position x="0" y="0" /> + <dimensions width="0" height="0" /> + </boundingBox> + <listOfSpeciesReferenceGlyphs> + <speciesReferenceGlyph id="SpeciesReference_J0_0" speciesReference="Node1" speciesGlyph="sGlyph_1" role="product" objectRole="product"> + <curve> + <listOfCurveSegments> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="149" y="111" /> + <end x="289" y="111" /> + <basePoint1 x="219" y="111" /> + <basePoint2 x="219" y="111" /> + </curveSegment> + </listOfCurveSegments> + </curve> + </speciesReferenceGlyph> + <speciesReferenceGlyph id="SpeciesReference_J0_2" speciesReference="Node0" speciesGlyph="sGlyph_0" role="substrate" objectRole="substrate"> + </speciesReferenceGlyph> + </listOfSpeciesReferenceGlyphs> + </reactionGlyph> + </listOfReactionGlyphs> + <listOfTextGlyphs> + <textGlyph id="tGlyph_0" graphicalObject="sGlyph_0" text="Node0"> + <boundingBox> + <position x="79" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </textGlyph> + <textGlyph id="tGlyph_1" graphicalObject="sGlyph_1" text="Node1"> + <boundingBox> + <position x="297" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </textGlyph> + </listOfTextGlyphs> + </layout> + </listOfLayouts> + </annotation> + <listOfCompartments> + <compartment id="compartment" size="1" /> + <compartment id="vol1" size="1" /> + </listOfCompartments> + <listOfSpecies> + <species id="Node0" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> + <species id="Node1" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> + </listOfSpecies> + <listOfParameters> + <parameter id="J0_k" value="0.1" /> + </listOfParameters> + <listOfReactions> + <reaction id="J0" reversible="false"> + <listOfReactants> + <speciesReference species="Node0" stoichiometry="1" /> + </listOfReactants> + <listOfProducts> + <speciesReference species="Node1" stoichiometry="1" /> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times /> + <ci> + J0_k + </ci> + <ci> + Node0 + </ci> + </apply> + </math> + </kineticLaw> + </reaction> + </listOfReactions> + </model> </sbml> Modified: branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-local.xml =================================================================== --- branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-local.xml 2019-07-09 08:20:13 UTC (rev 26072) +++ branches/libsbml-experimental/examples/sample-models/render/simple-L2-render-local.xml 2019-07-09 09:05:09 UTC (rev 26073) @@ -1,269 +1,263 @@ -<?xml version="1.0" encoding="utf-8"?> -<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" > - <model> - <notes> - <p xmlns="http://www.w3.org/1999/xhtml"> - Simple Model one compartment, with two species, and a reaction. - It also contains one Layout for the model along with a local - Render information object that describes how the layout glyphs - should be rendered. - </p> - </notes> - <annotation> - <listOfLayouts xmlns="http://projects.eml.org/bcb/sbml/level2"> - <layout id="JDesigner2_0" xmlns="http://projects.eml.org/bcb/sbml/level2"> - <!--Created by SBW SBML LayoutViewer/Manipulator--> - <annotation xmlns="http://www.sbml.org/sbml/level2"> - <listOfRenderInformation xmlns="http://projects.eml.org/bcb/sbml/render/level2"> - <renderInformation id="ConvertedRenderStyle" programName="SBML Layout Viewer - SBW version" programVersion="2.7.4344.16022 Compiled on: 11/23/2011 8:54:04 AM"> - <listOfColorDefinitions> - <colorDefinition id="Color_0" value="#ff9900" /> - <colorDefinition id="Color_1" value="#ffeeee" /> - <colorDefinition id="Color_2" value="#ffa500" /> - <colorDefinition id="Color_3" value="#008000" /> - <colorDefinition id="Color_4" value="#000000" /> - </listOfColorDefinitions> - <listOfGradientDefinitions> - <linearGradient x1="0%" y1="0%" z1="0%" x2="0%" y2="100%" z2="100%" id="LinearGradient_0" spreadMethod="reflect"> - <stop offset="0%" stop-color="#ffffff" /> - <stop offset="100%" stop-color="#ffcc99" /> - </linearGradient> - </listOfGradientDefinitions> - <listOfLineEndings> - <lineEnding id="product" enableRotationalMapping="true"> - <boundingBox> - <position x="-10" y="-5" /> - <dimensions width="10" height="10" /> - </boundingBox> - <g stroke="Color_3" stroke-width="0.001" fill="Color_3" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <polygon fill="Color_3"> - <listOfCurveSegments> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0%" y="0%" /> - <end x="100%" y="50%" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="100%" y="50%" /> - <end x="0%" y="100%" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0%" y="100%" /> - <end x="33%" y="50%" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="33%" y="50%" /> - <end x="0%" y="0%" /> - </curveSegment> - </listOfCurveSegments> - </polygon> - </g> - </lineEnding> - </listOfLineEndings> - <listOfStyles> - <style idList="sGlyph_0"> - <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <curve stroke="Color_0" stroke-width="2" fill="LinearGradient_0"> - <listOfCurveSegments> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="20" y="0" /> - <end x="0" y="20" /> - <basePoint1 x="8.95430500338413" y="0" /> - <basePoint2 x="0" y="8.95430500338413" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0" y="20" /> - <end x="20" y="40" /> - <basePoint1 x="0" y="31.0456949966159" /> - <basePoint2 x="8.95430500338413" y="40" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="20" y="40" /> - <end x="42" y="40" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="42" y="40" /> - <end x="62" y="20" /> - <basePoint1 x="53.0456949966159" y="40" /> - <basePoint2 x="62" y="31.0456949966159" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="62" y="20" /> - <end x="42" y="0" /> - <basePoint1 x="62" y="8.95430500338413" /> - <basePoint2 x="53.0456949966159" y="0" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="42" y="0" /> - <end x="20" y="0" /> - </curveSegment> - </listOfCurveSegments> - </curve> - </g> - </style> - <style idList="sGlyph_1"> - <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <curve stroke="Color_0" stroke-width="2" fill="LinearGradient_0"> - <listOfCurveSegments> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="20" y="0" /> - <end x="0" y="20" /> - <basePoint1 x="8.95430500338413" y="0" /> - <basePoint2 x="0" y="8.95430500338413" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="0" y="20" /> - <end x="20" y="40" /> - <basePoint1 x="0" y="31.0456949966159" /> - <basePoint2 x="8.95430500338413" y="40" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="20" y="40" /> - <end x="42" y="40" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="42" y="40" /> - <end x="62" y="20" /> - <basePoint1 x="53.0456949966159" y="40" /> - <basePoint2 x="62" y="31.0456949966159" /> - </curveSegment> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="62" y="20" /> - <end x="42" y="0" /> - <basePoint1 x="62" y="8.95430500338413" /> - <basePoint2 x="53.0456949966159" y="0" /> - </curveSegment> - <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="42" y="0" /> - <end x="20" y="0" /> - </curveSegment> - </listOfCurveSegments> - </curve> - </g> - </style> - <style idList="cGlyph_0"> - <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> - <rectangle stroke="Color_2" stroke-width="12" fill="Color_1" x="0.0" y="0.0" width="100%" height="100%" rx="5" ry="5" /> - </g> - </style> - <style roleList="substrate sidesubstrate" idList="rGlyph_0"> - <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" /> - </style> - <style roleList=" product"> - <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" endHead="product" /> - </style> - <style idList="tGlyph_0"> - <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> - </style> - <style idList="tGlyph_1"> - <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> - </style> - </listOfStyles> - </renderInformation> - </listOfRenderInformation> - </annotation> - <dimensions width="436" height="232" /> - <listOfCompartmentGlyphs> - <compartmentGlyph id="cGlyph_0" compartment="vol1"> - <boundingBox> - <position x="48" y="21" /> - <dimensions width="340" height="190" /> - </boundingBox> - </compartmentGlyph> - </listOfCompartmentGlyphs> - <listOfSpeciesGlyphs> - <speciesGlyph id="sGlyph_0" species="Node0"> - <boundingBox> - <position x="79" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </speciesGlyph> - <speciesGlyph id="sGlyph_1" species="Node1"> - <boundingBox> - <position x="297" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </speciesGlyph> - </listOfSpeciesGlyphs> - <listOfReactionGlyphs> - <reactionGlyph id="rGlyph_0" reaction="J0"> - <boundingBox> - <position x="0" y="0" /> - <dimensions width="0" height="0" /> - </boundingBox> - <curve> - <listOfCurveSegments /> - </curve> - <listOfSpeciesReferenceGlyphs> - <speciesReferenceGlyph id="SpeciesReference_J0_0" speciesReference="Node1" speciesGlyph="sGlyph_1" role="product" objectRole="product"> - <curve> - <listOfCurveSegments> - <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <start x="149" y="111" /> - <end x="289" y="111" /> - <basePoint1 x="219" y="111" /> - <basePoint2 x="219" y="111" /> - </curveSegment> - </listOfCurveSegments> - </curve> - </speciesReferenceGlyph> - <speciesReferenceGlyph id="SpeciesReference_J0_2" speciesReference="Node0" speciesGlyph="sGlyph_0" role="substrate" objectRole="substrate"> - <curve> - <listOfCurveSegments /> - </curve> - </speciesReferenceGlyph> - </listOfSpeciesReferenceGlyphs> - </reactionGlyph> - </listOfReactionGlyphs> - <listOfTextGlyphs> - <textGlyph id="tGlyph_0" graphicalObject="sGlyph_0" text="Node0"> - <boundingBox> - <position x="79" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </textGlyph> - <textGlyph id="tGlyph_1" graphicalObject="sGlyph_1" text="Node1"> - <boundingBox> - <position x="297" y="91" /> - <dimensions width="62" height="40" /> - </boundingBox> - </textGlyph> - </listOfTextGlyphs> - </layout> - </listOfLayouts> - </annotation> - <listOfCompartments> - <compartment id="compartment" size="1" /> - <compartment id="vol1" size="1" /> - </listOfCompartments> - <listOfSpecies> - <species id="Node0" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> - <species id="Node1" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> - </listOfSpecies> - <listOfParameters> - <parameter id="J0_k" value="0.1" /> - </listOfParameters> - <listOfReactions> - <reaction id="J0" reversible="false"> - <listOfReactants> - <speciesReference species="Node0" stoichiometry="1" /> - </listOfReactants> - <listOfProducts> - <speciesReference species="Node1" stoichiometry="1" /> - </listOfProducts> - <kineticLaw> - <math xmlns="http://www.w3.org/1998/Math/MathML"> - <apply> - <times /> - <ci> - J0_k - </ci> - <ci> - Node0 - </ci> - </apply> - </math> - </kineticLaw> - </reaction> - </listOfReactions> - </model> +<?xml version="1.0" encoding="utf-8"?> +<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1" > + <model> + <notes> + <p xmlns="http://www.w3.org/1999/xhtml"> + Simple Model one compartment, with two species, and a reaction. + It also contains one Layout for the model along with a local + Render information object that describes how the layout glyphs + should be rendered. + </p> + </notes> + <annotation> + <listOfLayouts xmlns="http://projects.eml.org/bcb/sbml/level2"> + <layout id="JDesigner2_0" xmlns="http://projects.eml.org/bcb/sbml/level2"> + <!--Created by SBW SBML LayoutViewer/Manipulator--> + <annotation xmlns="http://www.sbml.org/sbml/level2"> + <listOfRenderInformation xmlns="http://projects.eml.org/bcb/sbml/render/level2"> + <renderInformation id="ConvertedRenderStyle" programName="SBML Layout Viewer - SBW version" programVersion="2.7.4344.16022 Compiled on: 11/23/2011 8:54:04 AM"> + <listOfColorDefinitions> + <colorDefinition id="Color_0" value="#ff9900" /> + <colorDefinition id="Color_1" value="#ffeeee" /> + <colorDefinition id="Color_2" value="#ffa500" /> + <colorDefinition id="Color_3" value="#008000" /> + <colorDefinition id="Color_4" value="#000000" /> + </listOfColorDefinitions> + <listOfGradientDefinitions> + <linearGradient x1="0%" y1="0%" z1="0%" x2="0%" y2="100%" z2="100%" id="LinearGradient_0" spreadMethod="reflect"> + <stop offset="0%" stop-color="#ffffff" /> + <stop offset="100%" stop-color="#ffcc99" /> + </linearGradient> + </listOfGradientDefinitions> + <listOfLineEndings> + <lineEnding id="product" enableRotationalMapping="true"> + <boundingBox> + <position x="-10" y="-5" /> + <dimensions width="10" height="10" /> + </boundingBox> + <g stroke="Color_3" stroke-width="0.001" fill="Color_3" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <polygon fill="Color_3"> + <listOfCurveSegments> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0%" y="0%" /> + <end x="100%" y="50%" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="100%" y="50%" /> + <end x="0%" y="100%" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0%" y="100%" /> + <end x="33%" y="50%" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="33%" y="50%" /> + <end x="0%" y="0%" /> + </curveSegment> + </listOfCurveSegments> + </polygon> + </g> + </lineEnding> + </listOfLineEndings> + <listOfStyles> + <style idList="sGlyph_0"> + <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <polygon stroke="Color_0" stroke-width="2" fill="LinearGradient_0"> + <listOfCurveSegments> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="20" y="0" /> + <end x="0" y="20" /> + <basePoint1 x="8.95430500338413" y="0" /> + <basePoint2 x="0" y="8.95430500338413" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0" y="20" /> + <end x="20" y="40" /> + <basePoint1 x="0" y="31.0456949966159" /> + <basePoint2 x="8.95430500338413" y="40" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="20" y="40" /> + <end x="42" y="40" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="42" y="40" /> + <end x="62" y="20" /> + <basePoint1 x="53.0456949966159" y="40" /> + <basePoint2 x="62" y="31.0456949966159" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="62" y="20" /> + <end x="42" y="0" /> + <basePoint1 x="62" y="8.95430500338413" /> + <basePoint2 x="53.0456949966159" y="0" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="42" y="0" /> + <end x="20" y="0" /> + </curveSegment> + </listOfCurveSegments> + </polygon> + </g> + </style> + <style idList="sGlyph_1"> + <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <polygon stroke="Color_0" stroke-width="2" fill="LinearGradient_0"> + <listOfCurveSegments> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="20" y="0" /> + <end x="0" y="20" /> + <basePoint1 x="8.95430500338413" y="0" /> + <basePoint2 x="0" y="8.95430500338413" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="0" y="20" /> + <end x="20" y="40" /> + <basePoint1 x="0" y="31.0456949966159" /> + <basePoint2 x="8.95430500338413" y="40" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="20" y="40" /> + <end x="42" y="40" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="42" y="40" /> + <end x="62" y="20" /> + <basePoint1 x="53.0456949966159" y="40" /> + <basePoint2 x="62" y="31.0456949966159" /> + </curveSegment> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="62" y="20" /> + <end x="42" y="0" /> + <basePoint1 x="62" y="8.95430500338413" /> + <basePoint2 x="53.0456949966159" y="0" /> + </curveSegment> + <curveSegment xsi:type="LineSegment" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="42" y="0" /> + <end x="20" y="0" /> + </curveSegment> + </listOfCurveSegments> + </polygon> + </g> + </style> + <style idList="cGlyph_0"> + <g font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top"> + <rectangle stroke="Color_2" stroke-width="12" fill="Color_1" x="0.0" y="0.0" width="100%" height="100%" rx="5" ry="5" /> + </g> + </style> + <style roleList="substrate sidesubstrate" idList="rGlyph_0"> + <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" /> + </style> + <style roleList=" product"> + <g stroke="Color_3" stroke-width="2" font-size="0" font-style="normal" font-weight="normal" text-anchor="start" vtext-anchor="top" endHead="product" /> + </style> + <style idList="tGlyph_0"> + <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> + </style> + <style idList="tGlyph_1"> + <g stroke="Color_4" font-family="Arial" font-size="11" font-style="normal" font-weight="normal" text-anchor="middle" vtext-anchor="top" /> + </style> + </listOfStyles> + </renderInformation> + </listOfRenderInformation> + </annotation> + <dimensions width="436" height="232" /> + <listOfCompartmentGlyphs> + <compartmentGlyph id="cGlyph_0" compartment="vol1"> + <boundingBox> + <position x="48" y="21" /> + <dimensions width="340" height="190" /> + </boundingBox> + </compartmentGlyph> + </listOfCompartmentGlyphs> + <listOfSpeciesGlyphs> + <speciesGlyph id="sGlyph_0" species="Node0"> + <boundingBox> + <position x="79" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </speciesGlyph> + <speciesGlyph id="sGlyph_1" species="Node1"> + <boundingBox> + <position x="297" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </speciesGlyph> + </listOfSpeciesGlyphs> + <listOfReactionGlyphs> + <reactionGlyph id="rGlyph_0" reaction="J0"> + <boundingBox> + <position x="0" y="0" /> + <dimensions width="0" height="0" /> + </boundingBox> + <listOfSpeciesReferenceGlyphs> + <speciesReferenceGlyph id="SpeciesReference_J0_0" speciesReference="Node1" speciesGlyph="sGlyph_1" role="product" objectRole="product"> + <curve> + <listOfCurveSegments> + <curveSegment xsi:type="CubicBezier" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <start x="149" y="111" /> + <end x="289" y="111" /> + <basePoint1 x="219" y="111" /> + <basePoint2 x="219" y="111" /> + </curveSegment> + </listOfCurveSegments> + </curve> + </speciesReferenceGlyph> + <speciesReferenceGlyph id="SpeciesReference_J0_2" speciesReference="Node0" speciesGlyph="sGlyph_0" role="substrate" objectRole="substrate"> + </speciesReferenceGlyph> + </listOfSpeciesReferenceGlyphs> + </reactionGlyph> + </listOfReactionGlyphs> + <listOfTextGlyphs> + <textGlyph id="tGlyph_0" graphicalObject="sGlyph_0" text="Node0"> + <boundingBox> + <position x="79" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </textGlyph> + <textGlyph id="tGlyph_1" graphicalObject="sGlyph_1" text="Node1"> + <boundingBox> + <position x="297" y="91" /> + <dimensions width="62" height="40" /> + </boundingBox> + </textGlyph> + </listOfTextGlyphs> + </layout> + </listOfLayouts> + </annotation> + <listOfCompartments> + <compartment id="compartment" size="1" /> + <compartment id="vol1" size="1" /> + </listOfCompartments> + <listOfSpecies> + <species id="Node0" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> + <species id="Node1" boundaryCondition="false" initialConcentration="0" compartment="vol1" /> + </listOfSpecies> + <listOfParameters> + <parameter id="J0_k" value="0.1" /> + </listOfParameters> + <listOfReactions> + <reaction id="J0" reversible="false"> + <listOfReactants> + <speciesReference species="Node0" stoichiometry="1" /> + </listOfReactants> + <listOfProducts> + <speciesReference species="Node1" stoichiometry="1" /> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times /> + <ci> + J0_k + </ci> + <ci> + Node0 + </ci> + </apply> + </math> + </kineticLaw> + </reaction> + </listOfReactions> + </model> </sbml> Modified: branches/libsbml-experimental/src/bindings/swig/libsbml.i =================================================================== --- branches/libsbml-experimental/src/bindings/swig/libsbml.i 2019-07-09 08:20:13 UTC (rev 26072) +++ branches/libsbml-experimental/src/bindings/swig/libsbml.i 2019-07-09 09:05:09 UTC (rev 26073) @@ -224,11 +224,13 @@ /** * Ignore internal methods on SBase */ -%ignore SBase::removeDuplicateAnnotations; +//ignore SBase::removeDuplicateAnnotations; %ignore SBase::setSBMLNamespaces; //%ignore SBase::getSBMLNamespaces; -%ignore SBase::read; -%ignore SBase::write; +//%ignore SBase::read; +%catches(SBMLConstructorException,SBMLExtensionException,XMLConstructorException,...) SBase::read; +//%ignore SBase::write; +%catches(SBMLConstructorException,SBMLExtensionException,XMLConstructorException,...) SBase::write; /** * Ignore internal methods on Model Modified: branches/libsbml-experimental/src/sbml/SBase.cpp =================================================================== --- branches/libsbml-experimental/src/sbml/SBase.cpp 2019-07-09 08:20:13 UTC (rev 26072) +++ branches/libsbml-experimental/src/sbml/SBase.cpp 2019-07-09 09:05:09 UTC (rev 26073) @@ -5823,7 +5823,7 @@ { return false; } - else if (mSBML->isIgnoredPackage(uri)) + else if (mSBML != NULL && mSBML->isIgnoredPackage(uri)) { // // Checks if the extension package with the uri is unknown Modified: branches/libsbml-experimental/src/sbml/extension/SBMLExtension.h =================================================================== --- branches/libsbml-experimental/src/sbml/extension/SBMLExtension.h 2019-07-09 08:20:13 UTC (rev 26072) +++ branches/libsbml-experimental/src/sbml/extension/SBMLExtension.h 2019-07-09 09:05:09 UTC (rev 26073) @@ -117,7 +117,7 @@ {\ variable = new type(sbmlns->getLevel(), 1, version);\ }\ - for (int i = 0; i < xmlns->getNumNamespaces(); i++)\ + for (int i = 0; xmlns != NULL && i < xmlns->getNumNamespaces(); ++i)\ {\ if (!variable->getNamespaces()->hasURI(xmlns->getURI(i)))\ variable->getNamespaces()->add(xmlns->getURI(i), xmlns->getPrefix(i));\ |
From: <fbe...@us...> - 2019-07-09 08:20:17
|
Revision: 26072 http://sourceforge.net/p/sbml/code/26072 Author: fbergmann Date: 2019-07-09 08:20:13 +0000 (Tue, 09 Jul 2019) Log Message: ----------- - allow access to SBase::read / SBase::write Modified Paths: -------------- trunk/libsbml/src/bindings/swig/libsbml.i Modified: trunk/libsbml/src/bindings/swig/libsbml.i =================================================================== --- trunk/libsbml/src/bindings/swig/libsbml.i 2019-07-09 08:19:43 UTC (rev 26071) +++ trunk/libsbml/src/bindings/swig/libsbml.i 2019-07-09 08:20:13 UTC (rev 26072) @@ -224,11 +224,13 @@ /** * Ignore internal methods on SBase */ -%ignore SBase::removeDuplicateAnnotations; +//ignore SBase::removeDuplicateAnnotations; %ignore SBase::setSBMLNamespaces; //%ignore SBase::getSBMLNamespaces; -%ignore SBase::read; -%ignore SBase::write; +//%ignore SBase::read; +%catches(SBMLConstructorException,SBMLExtensionException,XMLConstructorException,...) SBase::read; +//%ignore SBase::write; +%catches(SBMLConstructorException,SBMLExtensionException,XMLConstructorException,...) SBase::write; /** * Ignore internal methods on Model |
From: <fbe...@us...> - 2019-07-09 08:19:47
|
Revision: 26071 http://sourceforge.net/p/sbml/code/26071 Author: fbergmann Date: 2019-07-09 08:19:43 +0000 (Tue, 09 Jul 2019) Log Message: ----------- - catch crashes when no namespaces or document is defined Modified Paths: -------------- trunk/libsbml/src/sbml/SBase.cpp trunk/libsbml/src/sbml/extension/SBMLExtension.h Modified: trunk/libsbml/src/sbml/SBase.cpp =================================================================== --- trunk/libsbml/src/sbml/SBase.cpp 2019-07-09 06:40:02 UTC (rev 26070) +++ trunk/libsbml/src/sbml/SBase.cpp 2019-07-09 08:19:43 UTC (rev 26071) @@ -5823,7 +5823,7 @@ { return false; } - else if (mSBML->isIgnoredPackage(uri)) + else if (mSBML != NULL && mSBML->isIgnoredPackage(uri)) { // // Checks if the extension package with the uri is unknown Modified: trunk/libsbml/src/sbml/extension/SBMLExtension.h =================================================================== --- trunk/libsbml/src/sbml/extension/SBMLExtension.h 2019-07-09 06:40:02 UTC (rev 26070) +++ trunk/libsbml/src/sbml/extension/SBMLExtension.h 2019-07-09 08:19:43 UTC (rev 26071) @@ -117,7 +117,7 @@ {\ variable = new type(sbmlns->getLevel(), 1, version);\ }\ - for (int i = 0; i < xmlns->getNumNamespaces(); i++)\ + for (int i = 0; xmlns != NULL && i < xmlns->getNumNamespaces(); ++i)\ {\ if (!variable->getNamespaces()->hasURI(xmlns->getURI(i)))\ variable->getNamespaces()->add(xmlns->getURI(i), xmlns->getPrefix(i));\ |