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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(1) |
2
|
|
3
|
4
|
5
|
6
(4) |
7
|
8
(1) |
9
|
|
10
|
11
|
12
|
13
(3) |
14
(11) |
15
(6) |
16
(2) |
|
17
|
18
|
19
|
20
(1) |
21
|
22
|
23
|
|
24
|
25
|
26
|
27
|
28
(6) |
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: <fbe...@us...> - 2015-05-28 16:10:33
|
Revision: 22275
http://sourceforge.net/p/sbml/code/22275
Author: fbergmann
Date: 2015-05-28 16:10:30 +0000 (Thu, 28 May 2015)
Log Message:
-----------
- this cannot be null
Modified Paths:
--------------
branches/libsbml-experimental/src/sbml/packages/render/sbml/Transformation.cpp
Modified: branches/libsbml-experimental/src/sbml/packages/render/sbml/Transformation.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/render/sbml/Transformation.cpp 2015-05-28 16:08:27 UTC (rev 22274)
+++ branches/libsbml-experimental/src/sbml/packages/render/sbml/Transformation.cpp 2015-05-28 16:10:30 UTC (rev 22275)
@@ -186,14 +186,13 @@
*/
bool Transformation::isSetMatrix() const
{
- if (this == NULL) return false;
- bool result=true;
- unsigned int i;
- for(i=0;result && i<12;++i)
- {
- result=(mMatrix[i]==mMatrix[i]);
- }
- return result;
+ bool result=true;
+ unsigned int i;
+ for(i=0;result && i<12;++i)
+ {
+ result=(mMatrix[i]==mMatrix[i]);
+ }
+ return result;
}
/** @endcond */
|
|
From: <fbe...@us...> - 2015-05-28 16:08:30
|
Revision: 22274
http://sourceforge.net/p/sbml/code/22274
Author: fbergmann
Date: 2015-05-28 16:08:27 +0000 (Thu, 28 May 2015)
Log Message:
-----------
- missed a couple of files
Modified Paths:
--------------
branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/PossibleSpeciesFeatureValue.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledFieldGeometry.cpp
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp 2015-05-28 15:25:41 UTC (rev 22273)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp 2015-05-28 16:08:27 UTC (rev 22274)
@@ -242,7 +242,7 @@
virtual bool visit(const SBase &x)
{
- if (&x == NULL || x.getPackageName() != "dyn")
+ if (x.getPackageName() != "dyn")
{
return SBMLVisitor::visit(x);
}
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/PossibleSpeciesFeatureValue.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/PossibleSpeciesFeatureValue.cpp 2015-05-28 15:25:41 UTC (rev 22273)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/PossibleSpeciesFeatureValue.cpp 2015-05-28 16:08:27 UTC (rev 22274)
@@ -73,17 +73,10 @@
*/
PossibleSpeciesFeatureValue::PossibleSpeciesFeatureValue (const PossibleSpeciesFeatureValue& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mNumericValue ( orig.mNumericValue)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mNumericValue = orig.mNumericValue;
- }
}
@@ -93,12 +86,8 @@
PossibleSpeciesFeatureValue&
PossibleSpeciesFeatureValue::operator=(const PossibleSpeciesFeatureValue& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -202,15 +191,8 @@
int
PossibleSpeciesFeatureValue::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -220,14 +202,10 @@
int
PossibleSpeciesFeatureValue::setNumericValue(const std::string& numericValue)
{
- if (&(numericValue) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(numericValue)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(numericValue)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mNumericValue = numericValue;
Modified: branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledFieldGeometry.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledFieldGeometry.cpp 2015-05-28 15:25:41 UTC (rev 22273)
+++ branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledFieldGeometry.cpp 2015-05-28 16:08:27 UTC (rev 22274)
@@ -97,12 +97,8 @@
SampledFieldGeometry&
SampledFieldGeometry::operator=(const SampledFieldGeometry& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
GeometryDefinition::operator=(rhs);
mSampledVolumes = rhs.mSampledVolumes;
mSampledField = rhs.mSampledField;
|
|
From: <fbe...@us...> - 2015-05-28 15:25:44
|
Revision: 22273
http://sourceforge.net/p/sbml/code/22273
Author: fbergmann
Date: 2015-05-28 15:25:41 +0000 (Thu, 28 May 2015)
Log Message:
-----------
- first sweep for NULL reference checks in experimental
Modified Paths:
--------------
branches/libsbml-experimental/src/sbml/packages/arrays/math/ASTArraysVectorFunctionNode.cpp
branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Dimension.cpp
branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Index.cpp
branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysValidator.cpp
branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DistribInput.cpp
branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DrawFromDistribution.cpp
branches/libsbml-experimental/src/sbml/packages/distrib/sbml/Uncertainty.cpp
branches/libsbml-experimental/src/sbml/packages/distrib/util/UncertMLNode.cpp
branches/libsbml-experimental/src/sbml/packages/distrib/validator/DistribValidator.cpp
branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynCompartmentPlugin.cpp
branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynEventPlugin.cpp
branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBasePlugin.cpp
branches/libsbml-experimental/src/sbml/packages/dyn/sbml/DynElement.cpp
branches/libsbml-experimental/src/sbml/packages/dyn/sbml/SpatialComponent.cpp
branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp
branches/libsbml-experimental/src/sbml/packages/groups/sbml/Group.cpp
branches/libsbml-experimental/src/sbml/packages/groups/sbml/Member.cpp
branches/libsbml-experimental/src/sbml/packages/groups/sbml/MemberConstraint.cpp
branches/libsbml-experimental/src/sbml/packages/groups/validator/GroupsValidator.cpp
branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiCompartmentPlugin.cpp
branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSimpleSpeciesReferencePlugin.cpp
branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSpeciesPlugin.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/BindingSiteSpeciesType.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/CompartmentReference.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/DenotedSpeciesTypeComponentIndex.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/InSpeciesTypeBond.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/IntraSpeciesReaction.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/MultiSpeciesType.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/OutwardBindingSite.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeature.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureChange.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureType.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureValue.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesTypeComponentIndex.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesTypeComponentMapInProduct.cpp
branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesTypeInstance.cpp
branches/libsbml-experimental/src/sbml/packages/multi/validator/MultiValidator.cpp
branches/libsbml-experimental/src/sbml/packages/render/util/RenderLayoutConverter.cpp
branches/libsbml-experimental/src/sbml/packages/req/sbml/ChangedMath.cpp
branches/libsbml-experimental/src/sbml/packages/req/validator/ReqValidator.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/AdjacentDomains.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/AdvectionCoefficient.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/AnalyticGeometry.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/AnalyticVolume.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/Boundary.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/BoundaryCondition.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGHomogeneousTransformation.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGNode.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGObject.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGPrimitive.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGPseudoPrimitive.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGRotation.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGScale.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGSetOperator.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTransformation.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGTranslation.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CSGeometry.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CompartmentMapping.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateComponent.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/CoordinateReference.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/DiffusionCoefficient.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/Domain.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/DomainType.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/Geometry.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/GeometryDefinition.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/InteriorPoint.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/MixedGeometry.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/OrdinalMapping.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricGeometry.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/ParametricObject.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledField.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledFieldGeometry.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SampledVolume.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialPoints.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/SpatialSymbolReference.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/sbml/TransformationComponents.cpp
branches/libsbml-experimental/src/sbml/packages/spatial/validator/SpatialValidator.cpp
Modified: branches/libsbml-experimental/src/sbml/packages/arrays/math/ASTArraysVectorFunctionNode.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/arrays/math/ASTArraysVectorFunctionNode.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/arrays/math/ASTArraysVectorFunctionNode.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -93,7 +93,6 @@
void
ASTArraysVectorFunctionNode::write(XMLOutputStream& stream) const
{
- if (&stream == NULL) return;
std::string name = getNameFromType(this->getExtendedType());
stream.startElement(name);
Modified: branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Dimension.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Dimension.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Dimension.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -82,19 +82,12 @@
*/
Dimension::Dimension (const Dimension& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mSize ( orig.mSize)
+ , mArrayDimension ( orig.mArrayDimension)
+ , mIsSetArrayDimension ( orig.mIsSetArrayDimension)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mSize = orig.mSize;
- mArrayDimension = orig.mArrayDimension;
- mIsSetArrayDimension = orig.mIsSetArrayDimension;
- }
}
@@ -104,12 +97,8 @@
Dimension&
Dimension::operator=(const Dimension& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -235,15 +224,8 @@
int
Dimension::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -253,14 +235,10 @@
int
Dimension::setSize(const std::string& size)
{
- if (&(size) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(size)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(size)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mSize = size;
Modified: branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Index.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Index.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/arrays/sbml/Index.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -84,25 +84,15 @@
*/
Index::Index (const Index& orig)
: SBase(orig)
+ , mReferencedAttribute ( orig.mReferencedAttribute)
+ , mArrayDimension ( orig.mArrayDimension)
+ , mIsSetArrayDimension ( orig.mIsSetArrayDimension)
+ , mMath(NULL)
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
}
- else
- {
- mReferencedAttribute = orig.mReferencedAttribute;
- mArrayDimension = orig.mArrayDimension;
- mIsSetArrayDimension = orig.mIsSetArrayDimension;
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- }
- else
- {
- mMath = NULL;
- }
- }
}
@@ -112,12 +102,8 @@
Index&
Index::operator=(const Index& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mReferencedAttribute = rhs.mReferencedAttribute;
mArrayDimension = rhs.mArrayDimension;
@@ -227,15 +213,8 @@
int
Index::setReferencedAttribute(const std::string& referencedAttribute)
{
- if (&(referencedAttribute) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mReferencedAttribute = referencedAttribute;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mReferencedAttribute = referencedAttribute;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysValidator.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysValidator.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/arrays/validator/ArraysValidator.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -245,7 +245,7 @@
virtual bool visit(const SBase &x)
{
- if (&x == NULL || x.getPackageName() != "arrays")
+ if (x.getPackageName() != "arrays")
{
return SBMLVisitor::visit(x);
}
@@ -324,7 +324,6 @@
unsigned int
ArraysValidator::validate (const SBMLDocument& d)
{
- if (&d == NULL) return 0;
const Model* m = d.getModel();
@@ -356,7 +355,6 @@
unsigned int
ArraysValidator::validate (const std::string& filename)
{
- if (&filename == NULL) return 0;
SBMLReader reader;
SBMLDocument& d = *reader.readSBML(filename);
Modified: branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DistribInput.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DistribInput.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DistribInput.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -88,21 +88,13 @@
*/
DistribInput::DistribInput (const DistribInput& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mIndex ( orig.mIndex)
+ , mIsSetIndex ( orig.mIsSetIndex)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mIndex = orig.mIndex;
- mIsSetIndex = orig.mIsSetIndex;
-
- // connect to child objects
- connectToChild();
- }
+ // connect to child objects
+ connectToChild();
}
@@ -112,12 +104,8 @@
DistribInput&
DistribInput::operator=(const DistribInput& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -225,15 +213,8 @@
int
DistribInput::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DrawFromDistribution.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DrawFromDistribution.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/distrib/sbml/DrawFromDistribution.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -84,26 +84,16 @@
*/
DrawFromDistribution::DrawFromDistribution (const DrawFromDistribution& orig)
: SBase(orig)
+ , mDistribInputs ( orig.mDistribInputs)
+ , mUncertML ( NULL)
{
- if (&orig == NULL)
+ if (orig.mUncertML != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mUncertML = orig.mUncertML->clone();
}
- else
- {
- mDistribInputs = orig.mDistribInputs;
- if (orig.mUncertML != NULL)
- {
- mUncertML = orig.mUncertML->clone();
- }
- else
- {
- mUncertML = NULL;
- }
- // connect to child objects
- connectToChild();
- }
+ // connect to child objects
+ connectToChild();
}
@@ -113,12 +103,8 @@
DrawFromDistribution&
DrawFromDistribution::operator=(const DrawFromDistribution& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mDistribInputs = rhs.mDistribInputs;
if (rhs.mUncertML != NULL)
Modified: branches/libsbml-experimental/src/sbml/packages/distrib/sbml/Uncertainty.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/distrib/sbml/Uncertainty.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/distrib/sbml/Uncertainty.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -86,27 +86,17 @@
*/
Uncertainty::Uncertainty (const Uncertainty& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mUncertML ( NULL)
{
- if (&orig == NULL)
+ if (orig.mUncertML != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mUncertML = orig.mUncertML->clone();
}
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- if (orig.mUncertML != NULL)
- {
- mUncertML = orig.mUncertML->clone();
- }
- else
- {
- mUncertML = NULL;
- }
- // connect to child objects
- connectToChild();
- }
+ // connect to child objects
+ connectToChild();
}
@@ -116,12 +106,8 @@
Uncertainty&
Uncertainty::operator=(const Uncertainty& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -236,15 +222,8 @@
int
Uncertainty::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/distrib/util/UncertMLNode.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/distrib/util/UncertMLNode.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/distrib/util/UncertMLNode.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -66,22 +66,15 @@
* Copy constructor for UncertMLNode.
*/
UncertMLNode::UncertMLNode (const UncertMLNode& orig)
+ : mElementName ( orig.mElementName)
+ , mText ( orig.mText)
+ , mAttributes ( orig.mAttributes)
+ , mChildren ( orig.mChildren.size())
{
- if (&orig == NULL)
+ for (unsigned int c = 0; c < orig.getNumChildren(); ++c)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ addChild( orig.getChild(c)->clone() );
}
- else
- {
- mElementName = orig.mElementName;
- mText = orig.mText;
- mAttributes = orig.mAttributes;
-
- for (unsigned int c = 0; c < orig.getNumChildren(); ++c)
- {
- addChild( orig.getChild(c)->clone() );
- }
- }
}
@@ -91,12 +84,8 @@
UncertMLNode&
UncertMLNode::operator=(const UncertMLNode& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
mElementName = rhs.mElementName;
mText = rhs.mText;
mAttributes = rhs.mAttributes;
@@ -210,15 +199,8 @@
int
UncertMLNode::setElementName(const std::string& elementName)
{
- if (&(elementName) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mElementName = elementName;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mElementName = elementName;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -228,15 +210,8 @@
int
UncertMLNode::setText(const std::string& text)
{
- if (&(text) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mText = text;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mText = text;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -246,15 +221,8 @@
int
UncertMLNode::setAttributes(const XMLAttributes & attr)
{
- if (&(attr) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mAttributes = XMLAttributes(attr);
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mAttributes = XMLAttributes(attr);
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/distrib/validator/DistribValidator.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/distrib/validator/DistribValidator.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/distrib/validator/DistribValidator.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -258,7 +258,7 @@
virtual bool visit(const SBase &x)
{
- if (&x == NULL || x.getPackageName() != "distrib")
+ if (x.getPackageName() != "distrib")
{
return SBMLVisitor::visit(x);
}
@@ -341,7 +341,6 @@
unsigned int
DistribValidator::validate (const SBMLDocument& d)
{
- if (&d == NULL) return 0;
const Model* m = d.getModel();
@@ -373,7 +372,6 @@
unsigned int
DistribValidator::validate (const std::string& filename)
{
- if (&filename == NULL) return 0;
SBMLReader reader;
SBMLDocument* d = reader.readSBML(filename);
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynCompartmentPlugin.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynCompartmentPlugin.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynCompartmentPlugin.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -317,15 +317,8 @@
int
DynCompartmentPlugin::setCboTerm(const std::string& cboTerm)
{
- if (&(cboTerm) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mCboTerm = cboTerm;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mCboTerm = cboTerm;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynEventPlugin.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynEventPlugin.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynEventPlugin.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -373,15 +373,8 @@
int
DynEventPlugin::setCboTerm(const std::string& cboTerm)
{
- if (&(cboTerm) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mCboTerm = cboTerm;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mCboTerm = cboTerm;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBasePlugin.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBasePlugin.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/extension/DynSBasePlugin.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -300,15 +300,8 @@
int
DynSBasePlugin::setCboTerm(const std::string& cboTerm)
{
- if (&(cboTerm) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mCboTerm = cboTerm;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mCboTerm = cboTerm;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/sbml/DynElement.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/sbml/DynElement.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/sbml/DynElement.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -81,18 +81,11 @@
*/
DynElement::DynElement (const DynElement& orig)
: SBase(orig)
+ , mIdRef ( orig.mIdRef)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mMetaIdRef ( orig.mMetaIdRef)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mIdRef = orig.mIdRef;
- mId = orig.mId;
- mName = orig.mName;
- mMetaIdRef = orig.mMetaIdRef;
- }
}
@@ -102,12 +95,8 @@
DynElement&
DynElement::operator=(const DynElement& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mIdRef = rhs.mIdRef;
mId = rhs.mId;
@@ -222,14 +211,10 @@
int
DynElement::setIdRef(const std::string& idRef)
{
- if (&(idRef) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(idRef)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(idRef)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mIdRef = idRef;
@@ -254,15 +239,8 @@
int
DynElement::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -272,15 +250,8 @@
int
DynElement::setMetaIdRef(const std::string& metaIdRef)
{
- if (&(metaIdRef) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mMetaIdRef = metaIdRef;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mMetaIdRef = metaIdRef;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/sbml/SpatialComponent.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/sbml/SpatialComponent.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/sbml/SpatialComponent.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -81,18 +81,11 @@
*/
SpatialComponent::SpatialComponent (const SpatialComponent& orig)
: SBase(orig)
+ , mSpatialIndex ( orig.mSpatialIndex)
+ , mVariable ( orig.mVariable)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mSpatialIndex = orig.mSpatialIndex;
- mVariable = orig.mVariable;
- mId = orig.mId;
- mName = orig.mName;
- }
}
@@ -102,12 +95,8 @@
SpatialComponent&
SpatialComponent::operator=(const SpatialComponent& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mSpatialIndex = rhs.mSpatialIndex;
mVariable = rhs.mVariable;
@@ -246,14 +235,10 @@
int
SpatialComponent::setVariable(const std::string& variable)
{
- if (&(variable) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(variable)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(variable)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mVariable = variable;
@@ -278,15 +263,8 @@
int
SpatialComponent::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/dyn/validator/DynValidator.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -321,7 +321,6 @@
unsigned int
DynValidator::validate (const SBMLDocument& d)
{
- if (&d == NULL) return 0;
const Model* m = d.getModel();
@@ -358,7 +357,6 @@
unsigned int
DynValidator::validate (const std::string& filename)
{
- if (&filename == NULL) return 0;
SBMLReader reader;
SBMLDocument& d = *reader.readSBML(filename);
Modified: branches/libsbml-experimental/src/sbml/packages/groups/sbml/Group.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/groups/sbml/Group.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/groups/sbml/Group.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -86,22 +86,12 @@
*/
Group::Group (const Group& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mKind ( orig.mKind)
+ , mMembers ( orig.mMembers)
+ , mMemberConstraints ( orig.mMemberConstraints)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mKind = orig.mKind;
- mMembers = orig.mMembers;
- mMemberConstraints = orig.mMemberConstraints;
-
- // connect to child objects
- connectToChild();
- }
}
@@ -111,12 +101,8 @@
Group&
Group::operator=(const Group& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -203,15 +189,8 @@
int
Group::setName (const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/groups/sbml/Member.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/groups/sbml/Member.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/groups/sbml/Member.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -75,18 +75,11 @@
*/
Member::Member (const Member& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mIdRef ( orig.mIdRef)
+ , mMetaIdRef ( orig.mMetaIdRef)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mIdRef = orig.mIdRef;
- mMetaIdRef = orig.mMetaIdRef;
- }
}
@@ -96,12 +89,8 @@
Member&
Member::operator=(const Member& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -226,15 +215,8 @@
int
Member::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -244,14 +226,10 @@
int
Member::setIdRef(const std::string& idRef)
{
- if (&(idRef) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(idRef)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(idRef)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mIdRef = idRef;
@@ -266,15 +244,8 @@
int
Member::setMetaIdRef(const std::string& metaIdRef)
{
- if (&(metaIdRef) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mMetaIdRef = metaIdRef;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mMetaIdRef = metaIdRef;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/groups/sbml/MemberConstraint.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/groups/sbml/MemberConstraint.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/groups/sbml/MemberConstraint.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -75,18 +75,11 @@
*/
MemberConstraint::MemberConstraint (const MemberConstraint& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mDistinctAttribute ( orig.mDistinctAttribute)
+ , mIdenticalAttribute ( orig.mIdenticalAttribute)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mDistinctAttribute = orig.mDistinctAttribute;
- mIdenticalAttribute = orig.mIdenticalAttribute;
- }
}
@@ -96,12 +89,8 @@
MemberConstraint&
MemberConstraint::operator=(const MemberConstraint& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -226,15 +215,8 @@
int
MemberConstraint::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -244,15 +226,8 @@
int
MemberConstraint::setDistinctAttribute(const std::string& distinctAttribute)
{
- if (&(distinctAttribute) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mDistinctAttribute = distinctAttribute;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mDistinctAttribute = distinctAttribute;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -262,15 +237,8 @@
int
MemberConstraint::setIdenticalAttribute(const std::string& identicalAttribute)
{
- if (&(identicalAttribute) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mIdenticalAttribute = identicalAttribute;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mIdenticalAttribute = identicalAttribute;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -830,15 +798,8 @@
int
ListOfMemberConstraints::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/groups/validator/GroupsValidator.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/groups/validator/GroupsValidator.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/groups/validator/GroupsValidator.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -253,7 +253,7 @@
virtual bool visit(const SBase &x)
{
- if (&x == NULL || x.getPackageName() != "groups")
+ if (x.getPackageName() != "groups")
{
return SBMLVisitor::visit(x);
}
@@ -336,8 +336,6 @@
unsigned int
GroupsValidator::validate (const SBMLDocument& d)
{
- if (&d == NULL) return 0;
-
const Model* m = d.getModel();
if (m != NULL)
@@ -368,8 +366,6 @@
unsigned int
GroupsValidator::validate (const std::string& filename)
{
- if (&filename == NULL) return 0;
-
SBMLReader reader;
SBMLDocument* d = reader.readSBML(filename);
Modified: branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiCompartmentPlugin.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiCompartmentPlugin.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiCompartmentPlugin.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -64,13 +64,10 @@
MultiCompartmentPlugin::MultiCompartmentPlugin(const MultiCompartmentPlugin& orig) :
SBasePlugin(orig)
, mCompartmentReferences ( orig.mCompartmentReferences)
+ , mCompartmentType ( orig.mCompartmentType)
+ , mIsType ( orig.mIsType)
+ , mIsSetIsType ( orig.mIsSetIsType)
{
- if (&orig == NULL)
- {
- mCompartmentType = orig.mCompartmentType;
- mIsType = orig.mIsType;
- mIsSetIsType = orig.mIsSetIsType;
- }
}
@@ -360,14 +357,10 @@
int
MultiCompartmentPlugin::setCompartmentType(const std::string& compartmentType)
{
- if (&(compartmentType) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(compartmentType)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(compartmentType)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mCompartmentType = compartmentType;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSimpleSpeciesReferencePlugin.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSimpleSpeciesReferencePlugin.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSimpleSpeciesReferencePlugin.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -59,11 +59,8 @@
*/
MultiSimpleSpeciesReferencePlugin::MultiSimpleSpeciesReferencePlugin(const MultiSimpleSpeciesReferencePlugin& orig) :
SBasePlugin(orig)
-{
- if (&orig == NULL)
- {
- mCompartmentReference = orig.mCompartmentReference;
- }
+ , mCompartmentReference ( orig.mCompartmentReference)
+{
}
@@ -286,14 +283,10 @@
int
MultiSimpleSpeciesReferencePlugin::setCompartmentReference(const std::string& compartmentReference)
{
- if (&(compartmentReference) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(compartmentReference)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(compartmentReference)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mCompartmentReference = compartmentReference;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSpeciesPlugin.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSpeciesPlugin.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/extension/MultiSpeciesPlugin.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -64,11 +64,8 @@
SBasePlugin(orig)
, mOutwardBindingSites ( orig.mOutwardBindingSites)
, mSpeciesFeatures ( orig.mSpeciesFeatures)
+ , mSpeciesType ( orig.mSpeciesType)
{
- if (&orig == NULL)
- {
- mSpeciesType = orig.mSpeciesType;
- }
}
@@ -319,14 +316,10 @@
int
MultiSpeciesPlugin::setSpeciesType(const std::string& speciesType)
{
- if (&(speciesType) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(speciesType)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(speciesType)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mSpeciesType = speciesType;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/BindingSiteSpeciesType.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/BindingSiteSpeciesType.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/BindingSiteSpeciesType.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -74,13 +74,6 @@
BindingSiteSpeciesType::BindingSiteSpeciesType (const BindingSiteSpeciesType& orig)
: MultiSpeciesType(orig)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- }
}
@@ -90,12 +83,8 @@
BindingSiteSpeciesType&
BindingSiteSpeciesType::operator=(const BindingSiteSpeciesType& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
MultiSpeciesType::operator=(rhs);
}
return *this;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/CompartmentReference.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/CompartmentReference.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/CompartmentReference.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -73,17 +73,10 @@
*/
CompartmentReference::CompartmentReference (const CompartmentReference& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mCompartment ( orig.mCompartment)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mCompartment = orig.mCompartment;
- }
}
@@ -93,12 +86,8 @@
CompartmentReference&
CompartmentReference::operator=(const CompartmentReference& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -202,15 +191,8 @@
int
CompartmentReference::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -220,14 +202,10 @@
int
CompartmentReference::setCompartment(const std::string& compartment)
{
- if (&(compartment) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(compartment)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(compartment)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mCompartment = compartment;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/DenotedSpeciesTypeComponentIndex.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/DenotedSpeciesTypeComponentIndex.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/DenotedSpeciesTypeComponentIndex.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -69,15 +69,8 @@
*/
DenotedSpeciesTypeComponentIndex::DenotedSpeciesTypeComponentIndex (const DenotedSpeciesTypeComponentIndex& orig)
: SBase(orig)
+ , mSpeciesTypeComponentIndex ( orig.mSpeciesTypeComponentIndex)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mSpeciesTypeComponentIndex = orig.mSpeciesTypeComponentIndex;
- }
}
@@ -87,12 +80,8 @@
DenotedSpeciesTypeComponentIndex&
DenotedSpeciesTypeComponentIndex::operator=(const DenotedSpeciesTypeComponentIndex& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mSpeciesTypeComponentIndex = rhs.mSpeciesTypeComponentIndex;
}
@@ -144,14 +133,10 @@
int
DenotedSpeciesTypeComponentIndex::setSpeciesTypeComponentIndex(const std::string& speciesTypeComponentIndex)
{
- if (&(speciesTypeComponentIndex) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(speciesTypeComponentIndex)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(speciesTypeComponentIndex)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mSpeciesTypeComponentIndex = speciesTypeComponentIndex;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/InSpeciesTypeBond.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/InSpeciesTypeBond.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/InSpeciesTypeBond.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -75,18 +75,11 @@
*/
InSpeciesTypeBond::InSpeciesTypeBond (const InSpeciesTypeBond& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mBindingSite1 ( orig.mBindingSite1)
+ , mBindingSite2 ( orig.mBindingSite2)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mBindingSite1 = orig.mBindingSite1;
- mBindingSite2 = orig.mBindingSite2;
- }
}
@@ -96,12 +89,8 @@
InSpeciesTypeBond&
InSpeciesTypeBond::operator=(const InSpeciesTypeBond& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -226,15 +215,8 @@
int
InSpeciesTypeBond::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -244,14 +226,10 @@
int
InSpeciesTypeBond::setBindingSite1(const std::string& bindingSite1)
{
- if (&(bindingSite1) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(bindingSite1)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(bindingSite1)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mBindingSite1 = bindingSite1;
@@ -266,14 +244,10 @@
int
InSpeciesTypeBond::setBindingSite2(const std::string& bindingSite2)
{
- if (&(bindingSite2) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(bindingSite2)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(bindingSite2)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mBindingSite2 = bindingSite2;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/IntraSpeciesReaction.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/IntraSpeciesReaction.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/IntraSpeciesReaction.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -74,13 +74,6 @@
IntraSpeciesReaction::IntraSpeciesReaction (const IntraSpeciesReaction& orig)
: Reaction(orig)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- }
}
@@ -90,12 +83,8 @@
IntraSpeciesReaction&
IntraSpeciesReaction::operator=(const IntraSpeciesReaction& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
Reaction::operator=(rhs);
}
return *this;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/MultiSpeciesType.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/MultiSpeciesType.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/MultiSpeciesType.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -89,24 +89,16 @@
*/
MultiSpeciesType::MultiSpeciesType (const MultiSpeciesType& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mCompartment ( orig.mCompartment)
+ , mSpeciesFeatureTypes ( orig.mSpeciesFeatureTypes)
+ , mSpeciesTypeInstances ( orig.mSpeciesTypeInstances)
+ , mSpeciesTypeComponentIndexes ( orig.mSpeciesTypeComponentIndexes)
+ , mInSpeciesTypeBonds ( orig.mInSpeciesTypeBonds)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mCompartment = orig.mCompartment;
- mSpeciesFeatureTypes = orig.mSpeciesFeatureTypes;
- mSpeciesTypeInstances = orig.mSpeciesTypeInstances;
- mSpeciesTypeComponentIndexes = orig.mSpeciesTypeComponentIndexes;
- mInSpeciesTypeBonds = orig.mInSpeciesTypeBonds;
-
- // connect to child objects
- connectToChild();
- }
+ // connect to child objects
+ connectToChild();
}
@@ -116,12 +108,8 @@
MultiSpeciesType&
MultiSpeciesType::operator=(const MultiSpeciesType& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -236,15 +224,8 @@
int
MultiSpeciesType::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
@@ -256,14 +237,10 @@
int
MultiSpeciesType::setCompartment(const std::string& compartment)
{
- if (&(compartment) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(compartment)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(compartment)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mCompartment = compartment;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/OutwardBindingSite.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/OutwardBindingSite.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/OutwardBindingSite.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -71,16 +71,9 @@
*/
OutwardBindingSite::OutwardBindingSite (const OutwardBindingSite& orig)
: SBase(orig)
+ , mBindingStatus ( orig.mBindingStatus)
+ , mComponent ( orig.mComponent)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mBindingStatus = orig.mBindingStatus;
- mComponent = orig.mComponent;
- }
}
@@ -90,12 +83,8 @@
OutwardBindingSite&
OutwardBindingSite::operator=(const OutwardBindingSite& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mBindingStatus = rhs.mBindingStatus;
mComponent = rhs.mComponent;
@@ -187,14 +176,10 @@
int
OutwardBindingSite::setComponent(const std::string& component)
{
- if (&(component) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(component)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(component)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mComponent = component;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeature.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeature.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeature.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -87,23 +87,13 @@
*/
SpeciesFeature::SpeciesFeature (const SpeciesFeature& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mSpeciesFeatureType ( orig.mSpeciesFeatureType)
+ , mOccur ( orig.mOccur)
+ , mIsSetOccur ( orig.mIsSetOccur)
+ , mComponent ( orig.mComponent)
+ , mSpeciesFeatureValues ( orig.mSpeciesFeatureValues)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mSpeciesFeatureType = orig.mSpeciesFeatureType;
- mOccur = orig.mOccur;
- mIsSetOccur = orig.mIsSetOccur;
- mComponent = orig.mComponent;
- mSpeciesFeatureValues = orig.mSpeciesFeatureValues;
-
- // connect to child objects
- connectToChild();
- }
}
@@ -113,12 +103,8 @@
SpeciesFeature&
SpeciesFeature::operator=(const SpeciesFeature& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mSpeciesFeatureType = rhs.mSpeciesFeatureType;
@@ -248,14 +234,10 @@
int
SpeciesFeature::setSpeciesFeatureType(const std::string& speciesFeatureType)
{
- if (&(speciesFeatureType) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(speciesFeatureType)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(speciesFeatureType)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mSpeciesFeatureType = speciesFeatureType;
@@ -282,14 +264,10 @@
int
SpeciesFeature::setComponent(const std::string& component)
{
- if (&(component) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(component)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(component)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mComponent = component;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureChange.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureChange.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureChange.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -73,17 +73,10 @@
*/
SpeciesFeatureChange::SpeciesFeatureChange (const SpeciesFeatureChange& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mReactantSpeciesFeature ( orig.mReactantSpeciesFeature)
+ , mProductSpeciesFeature ( orig.mProductSpeciesFeature)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mReactantSpeciesFeature = orig.mReactantSpeciesFeature;
- mProductSpeciesFeature = orig.mProductSpeciesFeature;
- }
}
@@ -93,12 +86,8 @@
SpeciesFeatureChange&
SpeciesFeatureChange::operator=(const SpeciesFeatureChange& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mReactantSpeciesFeature = rhs.mReactantSpeciesFeature;
@@ -202,14 +191,10 @@
int
SpeciesFeatureChange::setReactantSpeciesFeature(const std::string& reactantSpeciesFeature)
{
- if (&(reactantSpeciesFeature) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(reactantSpeciesFeature)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(reactantSpeciesFeature)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mReactantSpeciesFeature = reactantSpeciesFeature;
@@ -224,14 +209,10 @@
int
SpeciesFeatureChange::setProductSpeciesFeature(const std::string& productSpeciesFeature)
{
- if (&(productSpeciesFeature) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(productSpeciesFeature)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(productSpeciesFeature)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mProductSpeciesFeature = productSpeciesFeature;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureType.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureType.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureType.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -85,22 +85,14 @@
*/
SpeciesFeatureType::SpeciesFeatureType (const SpeciesFeatureType& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mName ( orig.mName)
+ , mOccur ( orig.mOccur)
+ , mIsSetOccur ( orig.mIsSetOccur)
+ , mPossibleSpeciesFeatureValues ( orig.mPossibleSpeciesFeatureValues)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mOccur = orig.mOccur;
- mIsSetOccur = orig.mIsSetOccur;
- mPossibleSpeciesFeatureValues = orig.mPossibleSpeciesFeatureValues;
-
- // connect to child objects
- connectToChild();
- }
+ // connect to child objects
+ connectToChild();
}
@@ -110,12 +102,8 @@
SpeciesFeatureType&
SpeciesFeatureType::operator=(const SpeciesFeatureType& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -224,15 +212,8 @@
int
SpeciesFeatureType::setName(const std::string& name)
{
- if (&(name) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else
- {
- mName = name;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ mName = name;
+ return LIBSBML_OPERATION_SUCCESS;
}
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureValue.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureValue.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesFeatureValue.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -69,15 +69,8 @@
*/
SpeciesFeatureValue::SpeciesFeatureValue (const SpeciesFeatureValue& orig)
: SBase(orig)
+ , mValue ( orig.mValue)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mValue = orig.mValue;
- }
}
@@ -87,12 +80,8 @@
SpeciesFeatureValue&
SpeciesFeatureValue::operator=(const SpeciesFeatureValue& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mValue = rhs.mValue;
}
@@ -144,14 +133,10 @@
int
SpeciesFeatureValue::setValue(const std::string& value)
{
- if (&(value) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(value)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(value)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mValue = value;
Modified: branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesTypeComponentIndex.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesTypeComponentIndex.cpp 2015-05-28 08:49:12 UTC (rev 22272)
+++ branches/libsbml-experimental/src/sbml/packages/multi/sbml/SpeciesTypeComponentIndex.cpp 2015-05-28 15:25:41 UTC (rev 22273)
@@ -86,23 +86,15 @@
*/
SpeciesTypeComponentIndex::SpeciesTypeComponentIndex (const SpeciesTypeComponentIndex& orig)
: SBase(orig)
+ , mId ( orig.mId)
+ , mComponent ( orig.mComponent)
+ , mOccur ( orig.mOccur)
+ , mIsSetOccur ( orig.mIsSetOccur)
+ , mIdentifyingParent ( orig.mIdentifyingParent)
+ , mDenotedSpeciesTypeComponentIndexes ( orig.mDenotedSpeciesTypeComponentIndexes)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mComponent = orig.mComponent;
- mOccur = orig.mOccur;
- mIsSetOccur = orig.mIsSetOccur;
- mIdentifyingParent = orig.mIdentifyingParent;
- mDenotedSpeciesTypeComponentIndexes = orig.mDenotedSpeciesTypeComponentIndexes;
-
- // connect to child objects
- connectToChild();
- }
+ // connect to child objects
+ connectToChild();
}
@@ -112,12 +104,8 @@
SpeciesTypeComponentIndex&
SpeciesTypeComponentIndex::operator=(const SpeciesTypeComponentIndex& rhs)
{
- if (&rhs == NULL)
+ if (&rhs != this)
{
- throw SBMLConstructorException("Null argument to assignment");
- }
- else if (&rhs != this)
- {
SBase::operator=(rhs);
mId = rhs.mId;
mComponent = rhs.mComponent;
@@ -247,14 +235,10 @@
int
SpeciesTypeComponentIndex::setComponent(const std::string& component)
{
- if (&(component) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(component)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(component)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mComponent = component;
@@ -281,14 +265,10 @@
int
SpeciesTypeComponentIndex::setIdentifyingParent(const std::string& identifyingParent)
{
- if (&(identifyingParent) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(identifyingParent)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(identifyingParent)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mIdentifyingParent = identifyingParent;
Modified: branc...
[truncated message content] |
|
From: <sar...@us...> - 2015-05-28 08:49:17
|
Revision: 22272
http://sourceforge.net/p/sbml/code/22272
Author: sarahkeating
Date: 2015-05-28 08:49:12 +0000 (Thu, 28 May 2015)
Log Message:
-----------
Merged revision(s) 22187-22271 from trunk/libsbml:
Modified Paths:
--------------
branches/libsbml-experimental/Makefile.in
branches/libsbml-experimental/examples/c++/CMakeLists.txt
branches/libsbml-experimental/src/sbml/Compartment.cpp
branches/libsbml-experimental/src/sbml/CompartmentType.cpp
branches/libsbml-experimental/src/sbml/Constraint.cpp
branches/libsbml-experimental/src/sbml/Delay.cpp
branches/libsbml-experimental/src/sbml/Event.cpp
branches/libsbml-experimental/src/sbml/EventAssignment.cpp
branches/libsbml-experimental/src/sbml/FunctionDefinition.cpp
branches/libsbml-experimental/src/sbml/InitialAssignment.cpp
branches/libsbml-experimental/src/sbml/KineticLaw.cpp
branches/libsbml-experimental/src/sbml/LocalParameter.cpp
branches/libsbml-experimental/src/sbml/Model.cpp
branches/libsbml-experimental/src/sbml/Parameter.cpp
branches/libsbml-experimental/src/sbml/Priority.cpp
branches/libsbml-experimental/src/sbml/Reaction.cpp
branches/libsbml-experimental/src/sbml/Rule.cpp
branches/libsbml-experimental/src/sbml/SBMLDocument.cpp
branches/libsbml-experimental/src/sbml/SBMLErrorTable.h
branches/libsbml-experimental/src/sbml/SBMLNamespaces.cpp
branches/libsbml-experimental/src/sbml/SBMLReader.cpp
branches/libsbml-experimental/src/sbml/SBMLWriter.cpp
branches/libsbml-experimental/src/sbml/SBase.cpp
branches/libsbml-experimental/src/sbml/SimpleSpeciesReference.cpp
branches/libsbml-experimental/src/sbml/Species.cpp
branches/libsbml-experimental/src/sbml/SpeciesReference.cpp
branches/libsbml-experimental/src/sbml/SpeciesType.cpp
branches/libsbml-experimental/src/sbml/StoichiometryMath.cpp
branches/libsbml-experimental/src/sbml/Trigger.cpp
branches/libsbml-experimental/src/sbml/Unit.cpp
branches/libsbml-experimental/src/sbml/UnitDefinition.cpp
branches/libsbml-experimental/src/sbml/annotation/CVTerm.cpp
branches/libsbml-experimental/src/sbml/annotation/Date.cpp
branches/libsbml-experimental/src/sbml/annotation/ModelCreator.cpp
branches/libsbml-experimental/src/sbml/annotation/ModelHistory.cpp
branches/libsbml-experimental/src/sbml/annotation/RDFAnnotationParser.cpp
branches/libsbml-experimental/src/sbml/annotation/test/TestCopyAndClone.cpp
branches/libsbml-experimental/src/sbml/conversion/ConversionOption.cpp
branches/libsbml-experimental/src/sbml/conversion/ConversionProperties.cpp
branches/libsbml-experimental/src/sbml/conversion/Makefile.in
branches/libsbml-experimental/src/sbml/conversion/RegisterConverters.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLFunctionDefinitionConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLIdConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLInferUnitsConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLInitialAssignmentConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLLevelVersionConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLLocalParameterConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLReactionConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLRuleConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLStripPackageConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLUnitsConverter.cpp
branches/libsbml-experimental/src/sbml/conversion/test/TestConversionOption.cpp
branches/libsbml-experimental/src/sbml/conversion/test/TestConversionProperties.cpp
branches/libsbml-experimental/src/sbml/conversion/test/TestLevelVersionConverter.cpp
branches/libsbml-experimental/src/sbml/extension/SBMLDocumentPlugin.cpp
branches/libsbml-experimental/src/sbml/extension/SBMLDocumentPluginNotRequired.cpp
branches/libsbml-experimental/src/sbml/extension/SBMLExtension.cpp
branches/libsbml-experimental/src/sbml/extension/SBMLExtensionRegistry.cpp
branches/libsbml-experimental/src/sbml/extension/SBaseExtensionPoint.cpp
branches/libsbml-experimental/src/sbml/extension/SBasePlugin.cpp
branches/libsbml-experimental/src/sbml/extension/SBasePluginCreatorBase.cpp
branches/libsbml-experimental/src/sbml/extension/test/TestSBMLExtension.cpp
branches/libsbml-experimental/src/sbml/extension/test/TestSBMLExtensionRegistry.cpp
branches/libsbml-experimental/src/sbml/math/ASTBase.cpp
branches/libsbml-experimental/src/sbml/math/ASTBinaryFunctionNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTCSymbolAvogadroNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTCSymbolDelayNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTCSymbolTimeNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTCiFunctionNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTCiNumberNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTCnBase.cpp
branches/libsbml-experimental/src/sbml/math/ASTConstantNumberNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTFunction.cpp
branches/libsbml-experimental/src/sbml/math/ASTFunctionBase.cpp
branches/libsbml-experimental/src/sbml/math/ASTLambdaFunctionNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTNaryFunctionNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTPiecewiseFunctionNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTQualifierNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTSemanticsNode.cpp
branches/libsbml-experimental/src/sbml/math/ASTTypes.cpp
branches/libsbml-experimental/src/sbml/math/ASTUnaryFunctionNode.cpp
branches/libsbml-experimental/src/sbml/math/MathML.cpp
branches/libsbml-experimental/src/sbml/math-legacy/MathML.cpp
branches/libsbml-experimental/src/sbml/packages/comp/extension/CompSBasePlugin.cpp
branches/libsbml-experimental/src/sbml/packages/comp/sbml/CompBase.cpp
branches/libsbml-experimental/src/sbml/packages/comp/sbml/ListOfDeletions.cpp
branches/libsbml-experimental/src/sbml/packages/comp/sbml/ListOfPorts.cpp
branches/libsbml-experimental/src/sbml/packages/comp/sbml/ListOfSubmodels.cpp
branches/libsbml-experimental/src/sbml/packages/comp/util/CompFlatteningConverter.cpp
branches/libsbml-experimental/src/sbml/packages/comp/util/SBMLFileResolver.cpp
branches/libsbml-experimental/src/sbml/packages/comp/util/SBMLResolver.cpp
branches/libsbml-experimental/src/sbml/packages/comp/util/SBMLUri.cpp
branches/libsbml-experimental/src/sbml/packages/comp/validator/CompValidator.cpp
branches/libsbml-experimental/src/sbml/packages/fbc/util/CobraToFbcConverter.cpp
branches/libsbml-experimental/src/sbml/packages/fbc/util/FbcToCobraConverter.cpp
branches/libsbml-experimental/src/sbml/packages/fbc/validator/FbcValidator.cpp
branches/libsbml-experimental/src/sbml/packages/layout/sbml/GraphicalObject.cpp
branches/libsbml-experimental/src/sbml/packages/layout/sbml/Layout.cpp
branches/libsbml-experimental/src/sbml/packages/layout/validator/LayoutValidator.cpp
branches/libsbml-experimental/src/sbml/packages/qual/sbml/DefaultTerm.cpp
branches/libsbml-experimental/src/sbml/packages/qual/sbml/FunctionTerm.cpp
branches/libsbml-experimental/src/sbml/packages/qual/sbml/Input.cpp
branches/libsbml-experimental/src/sbml/packages/qual/sbml/Output.cpp
branches/libsbml-experimental/src/sbml/packages/qual/sbml/QualitativeSpecies.cpp
branches/libsbml-experimental/src/sbml/packages/qual/sbml/Transition.cpp
branches/libsbml-experimental/src/sbml/packages/qual/validator/QualValidator.cpp
branches/libsbml-experimental/src/sbml/packages/qual/validator/constraints/QualCSymbolMathCheck.cpp
branches/libsbml-experimental/src/sbml/test/TestSBMLConstructorException.cpp
branches/libsbml-experimental/src/sbml/units/FormulaUnitsData.cpp
branches/libsbml-experimental/src/sbml/units/test/TestUtilsUnitDefinition.cpp
branches/libsbml-experimental/src/sbml/util/ElementFilter.h
branches/libsbml-experimental/src/sbml/util/IdList.cpp
branches/libsbml-experimental/src/sbml/validator/SBMLValidator.cpp
branches/libsbml-experimental/src/sbml/validator/VConstraint.cpp
branches/libsbml-experimental/src/sbml/validator/Validator.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/CiElementMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/CiElementNot0DComp.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/EqualityArgsMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/FunctionApplyMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/FunctionNoArgsMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/LambdaMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/LocalParameterMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/LogicalArgsMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/NumberArgsMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/NumericArgsMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/NumericReturnMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/PieceBooleanMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/PiecewiseValueMathCheck.cpp
branches/libsbml-experimental/src/sbml/validator/constraints/ValidCnUnitsValue.cpp
branches/libsbml-experimental/src/sbml/xml/XMLAttributes.cpp
branches/libsbml-experimental/src/sbml/xml/XMLError.cpp
branches/libsbml-experimental/src/sbml/xml/XMLErrorLog.cpp
branches/libsbml-experimental/src/sbml/xml/XMLFileBuffer.cpp
branches/libsbml-experimental/src/sbml/xml/XMLNamespaces.cpp
branches/libsbml-experimental/src/sbml/xml/XMLNode.cpp
branches/libsbml-experimental/src/sbml/xml/XMLNode.h
branches/libsbml-experimental/src/sbml/xml/XMLOutputStream.cpp
branches/libsbml-experimental/src/sbml/xml/XMLToken.cpp
branches/libsbml-experimental/src/sbml/xml/XMLTokenizer.cpp
branches/libsbml-experimental/src/sbml/xml/XMLTriple.cpp
branches/libsbml-experimental/src/sbml/xml/test/TestXMLExceptions.cpp
Added Paths:
-----------
branches/libsbml-experimental/examples/c++/convertToL1V1.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLLevel1Version1Converter.cpp
branches/libsbml-experimental/src/sbml/conversion/SBMLLevel1Version1Converter.h
Removed Paths:
-------------
branches/libsbml-experimental/src/sbml/validator/test/test-data/sbml-general-consistency-constraints/21121-fail-01-04.xml
branches/libsbml-experimental/src/sbml/validator/test/test-data/sbml-general-consistency-constraints/21121-fail-01-05.xml
Property Changed:
----------------
branches/libsbml-experimental/
branches/libsbml-experimental/examples/c++/
Index: branches/libsbml-experimental
===================================================================
--- branches/libsbml-experimental 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental 2015-05-28 08:49:12 UTC (rev 22272)
Property changes on: branches/libsbml-experimental
___________________________________________________________________
Modified: svn:mergeinfo
## -2,4 +2,4 ##
/branches/libsbml-4:9056-10118
/branches/libsbml-5-conversion:14155-14227
/branches/libsbml-ast-plugin:16251-19654
-/trunk/libsbml:18168-18171,18174-18194,18196-18201,18204,18207-18209,18211-18213,18215-18216,18226,18228-18292,18294-18388,18390-18443,18450-18454,18456-18458,18460-18462,18464,18466,18469-18520,18523-18561,18563,18565-18584,18586-18638,18640-18641,18644-18715,18717-18844,18846-19128,19130-19829,19831-22186
+/trunk/libsbml:18168-18171,18174-18194,18196-18201,18204,18207-18209,18211-18213,18215-18216,18226,18228-18292,18294-18388,18390-18443,18450-18454,18456-18458,18460-18462,18464,18466,18469-18520,18523-18561,18563,18565-18584,18586-18638,18640-18641,18644-18715,18717-18844,18846-19128,19130-19829,19831-22271
\ No newline at end of property
Modified: branches/libsbml-experimental/Makefile.in
===================================================================
--- branches/libsbml-experimental/Makefile.in 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/Makefile.in 2015-05-28 08:49:12 UTC (rev 22272)
@@ -102,6 +102,7 @@
examples/c++/addingEvidenceCodes_2.cpp \
examples/c++/appendAnnotation.cpp \
examples/c++/callExternalValidator.cpp \
+ examples/c++/convertToL1V1.cpp \
examples/c++/convertSBML.cpp \
examples/c++/createExampleSBML.cpp \
examples/c++/echoSBML.cpp \
Index: branches/libsbml-experimental/examples/c++
===================================================================
--- branches/libsbml-experimental/examples/c++ 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/examples/c++ 2015-05-28 08:49:12 UTC (rev 22272)
Property changes on: branches/libsbml-experimental/examples/c++
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
/branches/L3Parser/examples/c++:15528-15625,15656-15673
/branches/libsbml-5-conversion/examples/c++:14155-14227
-/trunk/libsbml/examples/c++:2142-12017,18174-18194,18196-18201,18204,18207-18209,18211-18213,18215-18216,18226,18294-18310,18312-18353,18390-18443,18450-18454,18456-18458,18586-18638,18644-18715,18921-18944,18976-19112,19193-19195,19538-19551,19709-19749,19765-19793,19797-19821,19851-19866,19881-19905,19927-19949,21137-21154,21312-21360,21376-21423,21711-21734,21999-22003
+/trunk/libsbml/examples/c++:2142-12017,18174-18194,18196-18201,18204,18207-18209,18211-18213,18215-18216,18226,18294-18310,18312-18353,18390-18443,18450-18454,18456-18458,18586-18638,18644-18715,18921-18944,18976-19112,19193-19195,19538-19551,19709-19749,19765-19793,19797-19821,19851-19866,19881-19905,19927-19949,21137-21154,21312-21360,21376-21423,21711-21734,21999-22003,22187-22271
\ No newline at end of property
Modified: branches/libsbml-experimental/examples/c++/CMakeLists.txt
===================================================================
--- branches/libsbml-experimental/examples/c++/CMakeLists.txt 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/examples/c++/CMakeLists.txt 2015-05-28 08:49:12 UTC (rev 22272)
@@ -49,6 +49,7 @@
appendAnnotation
callExternalValidator
convertSBML
+ convertToL1V1
createExampleSBML
echoSBML
inferUnits
Copied: branches/libsbml-experimental/examples/c++/convertToL1V1.cpp (from rev 22271, trunk/libsbml/examples/c++/convertToL1V1.cpp)
===================================================================
--- branches/libsbml-experimental/examples/c++/convertToL1V1.cpp (rev 0)
+++ branches/libsbml-experimental/examples/c++/convertToL1V1.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -0,0 +1,122 @@
+/**
+* @file convertToL1V1.cpp
+* @brief Converts SBML documents to L1 V1
+* @author Frank Bergmann
+*
+* <!--------------------------------------------------------------------------
+* This sample program is distributed under a different license than the rest
+* of libSBML. This program uses the open-source MIT license, as follows:
+*
+* Copyright (c) 2013-2015 by the California Institute of Technology
+* (California, USA), the European Bioinformatics Institute (EMBL-EBI, UK)
+* and the University of Heidelberg (Germany), with support from the National
+* Institutes of Health (USA) under grant R01GM070923. All rights reserved.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*
+* Neither the name of the California Institute of Technology (Caltech), nor
+* of the European Bioinformatics Institute (EMBL-EBI), nor of the University
+* of Heidelberg, nor the names of any contributors, may be used to endorse
+* or promote products derived from this software without specific prior
+* written permission.
+* ------------------------------------------------------------------------ -->
+*/
+
+
+#include <iostream>
+#include <vector>
+#include <map>
+#include <string>
+
+#include <sbml/SBMLTypes.h>
+#include <sbml/conversion/ConversionProperties.h>
+
+using namespace std;
+LIBSBML_CPP_NAMESPACE_USE
+
+
+int
+main (int argc, char *argv[])
+{
+
+ if (argc != 3)
+ {
+ cout << "Usage: convertToL1V1 input-filename output-filename" << endl
+ << "This program will attempt to convert a model either to" << endl
+ << "SBML Level 1 Version 1."
+ << endl;
+ return 1;
+ }
+
+ const char* inputFile = argv[1];
+ const char* outputFile = argv[2];
+
+ SBMLDocument* document = readSBML(inputFile);
+ unsigned int errors = document->getNumErrors();
+
+ if (errors > 0)
+ {
+ cerr << "Encountered the following SBML errors:" << endl;
+ document->printErrors(cerr);
+ cerr << "Conversion skipped. Please correct the problems above first."
+ << endl;
+ return errors;
+ }
+
+ ConversionProperties prop;
+ prop.addOption("convertToL1V1", true,
+ "convert the document to SBML Level 1 Version 1");
+ prop.addOption("changePow", true,
+ "change pow expressions to the (^) hat notation");
+ prop.addOption("inlineCompartmentSizes", true,
+ "if true, occurrances of compartment ids in expressions will be replaced with their initial size");
+ int conversionResult = document->convert(prop);
+
+ errors = document->getNumErrors();
+
+ if (conversionResult != LIBSBML_OPERATION_SUCCESS)
+ {
+ cerr << "Unable to perform conversion due to the following:" << endl;
+ document->printErrors(cerr);
+ cout << endl;
+ cout << "Conversion skipped. Either libSBML does not (yet)" << endl
+ << "have the ability to convert this model or (automatic)" << endl
+ << "conversion is not possible in this case." << endl;
+
+ delete document;
+ return errors;
+ }
+ else if (errors > 0)
+ {
+ cout << "Information may have been lost in conversion; but a valid model ";
+ cout << "was produced by the conversion.\nThe following information ";
+ cout << "was provided:\n";
+ document->printErrors(cout);
+ writeSBML(document, outputFile);
+ }
+ else
+ {
+ cout << "Conversion completed." << endl;
+ writeSBML(document, outputFile);
+ }
+
+ delete document;
+ return 0;
+}
+
Modified: branches/libsbml-experimental/src/sbml/Compartment.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Compartment.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/Compartment.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -143,12 +143,7 @@
Compartment::Compartment(const Compartment& orig) :
SBase ( orig )
{
- if (&orig == NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
mSpatialDimensions = orig.mSpatialDimensions;
mSpatialDimensionsDouble = orig.mSpatialDimensionsDouble;
mSize = orig.mSize;
@@ -172,12 +167,8 @@
*/
Compartment& Compartment::operator=(const Compartment& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mSpatialDimensions= rhs.mSpatialDimensions ;
mSpatialDimensionsDouble= rhs.mSpatialDimensionsDouble ;
@@ -497,14 +488,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -522,12 +509,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -552,11 +535,7 @@
int
Compartment::setCompartmentType (const std::string& sid)
{
- if (&(sid) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if ( (getLevel() < 2)
+ if ( (getLevel() < 2)
|| (getLevel() == 2 && getVersion() == 1))
{
return LIBSBML_UNEXPECTED_ATTRIBUTE;
@@ -674,14 +653,10 @@
int
Compartment::setUnits (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalUnitSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalUnitSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mUnits = sid;
@@ -696,14 +671,10 @@
int
Compartment::setOutside (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mOutside = sid;
@@ -1570,12 +1541,7 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
{
- return NULL;
- }
- else
- {
result = find_if( mItems.begin(), mItems.end(), IdEq<Compartment>(sid) );
return (result == mItems.end()) ? NULL :
static_cast <Compartment*> (*result);
@@ -1598,15 +1564,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEq<Compartment>(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEq<Compartment>(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Compartment*> (item);
Modified: branches/libsbml-experimental/src/sbml/CompartmentType.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/CompartmentType.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/CompartmentType.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -86,19 +86,11 @@
/*
* Copy constructor. Creates a copy of this CompartmentType.
*/
-CompartmentType::CompartmentType(const CompartmentType& orig) :
- SBase ( orig )
+CompartmentType::CompartmentType(const CompartmentType& orig)
+ : SBase ( orig )
+ , mId (orig.mId)
+ , mName (orig.mName)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- }
-
}
@@ -107,12 +99,8 @@
*/
CompartmentType& CompartmentType::operator=(const CompartmentType& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -204,14 +192,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -229,12 +213,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -566,16 +546,9 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <CompartmentType*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <CompartmentType*> (*result);
}
@@ -594,15 +567,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <CompartmentType*> (item);
Modified: branches/libsbml-experimental/src/sbml/Constraint.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Constraint.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/Constraint.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -98,19 +98,13 @@
, mMath ( NULL )
, mMessage( NULL )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- if (orig.mMessage != NULL) mMessage = new XMLNode(*orig.mMessage);
- }
+ if (orig.mMessage != NULL) mMessage = new XMLNode(*orig.mMessage);
+
}
@@ -119,12 +113,8 @@
*/
Constraint& Constraint::operator=(const Constraint& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
delete mMath;
@@ -297,12 +287,8 @@
bool addXHTMLMarkup)
{
int success = LIBSBML_OPERATION_FAILED;
- if (&(message) == NULL)
+ if (message.empty())
{
- success = LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (message.empty())
- {
success = unsetMessage();
}
else
Modified: branches/libsbml-experimental/src/sbml/Delay.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Delay.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/Delay.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -93,24 +93,18 @@
/*
* Copy constructor. Creates a copy of this Delay.
*/
-Delay::Delay (const Delay& orig) :
- SBase ( orig )
- , mMath ( NULL )
+Delay::Delay (const Delay& orig)
+ : SBase ( orig )
+ , mMath ( NULL )
+ , mInternalId ( orig.mInternalId )
{
- if (&orig == NULL)
+
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mInternalId = orig.mInternalId;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
}
@@ -119,12 +113,8 @@
*/
Delay& Delay::operator=(const Delay& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mInternalId = rhs.mInternalId;
Modified: branches/libsbml-experimental/src/sbml/Event.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Event.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/Event.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -125,40 +125,36 @@
* Copy constructor. Creates a copy of this Event.
*/
Event::Event (const Event& orig) :
- SBase ( orig )
- , mTrigger ( NULL )
- , mDelay ( NULL )
- , mPriority ( NULL )
- , mEventAssignments ( orig.mEventAssignments )
+ SBase ( orig )
+ , mId ( orig.mId )
+ , mName ( orig.mName )
+ , mTrigger ( NULL )
+ , mDelay ( NULL )
+ , mPriority ( NULL )
+ , mTimeUnits ( orig.mTimeUnits )
+ , mUseValuesFromTriggerTime ( orig.mUseValuesFromTriggerTime )
+ , mIsSetUseValuesFromTriggerTime ( orig.mIsSetUseValuesFromTriggerTime )
+ , mInternalIdOnly ( orig.mInternalIdOnly )
+ , mExplicitlySetUVFTT ( orig.mExplicitlySetUVFTT )
+ , mEventAssignments ( orig.mEventAssignments )
{
- if (&orig == NULL)
+
+ if (orig.mTrigger != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mTrigger = new Trigger(*orig.getTrigger());
}
- else
+
+ if (orig.mDelay != NULL)
{
- mId = orig.mId;
- mName = orig.mName;
- mTimeUnits = orig.mTimeUnits;
- mUseValuesFromTriggerTime = orig.mUseValuesFromTriggerTime ;
- mIsSetUseValuesFromTriggerTime = orig.mIsSetUseValuesFromTriggerTime ;
- mExplicitlySetUVFTT = orig.mExplicitlySetUVFTT;
- mInternalIdOnly = orig.mInternalIdOnly;
-
- if (orig.mTrigger != NULL)
- {
- mTrigger = new Trigger(*orig.getTrigger());
- }
- if (orig.mDelay != NULL)
- {
- mDelay = new Delay(*orig.getDelay());
- }
- if (orig.mPriority != NULL)
- {
- mPriority = new Priority(*orig.getPriority());
- }
+ mDelay = new Delay(*orig.getDelay());
}
+ if (orig.mPriority != NULL)
+ {
+ mPriority = new Priority(*orig.getPriority());
+ }
+
+
connectToChild();
}
@@ -168,12 +164,8 @@
*/
Event& Event::operator=(const Event& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mId = rhs.mId;
@@ -535,14 +527,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -561,12 +549,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -709,12 +693,8 @@
int
Event::setTimeUnits (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (getLevel() == 2 && getVersion() > 2)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 2 && getVersion() > 2)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalSId(sid)))
@@ -1108,8 +1088,7 @@
const EventAssignment*
Event::getEventAssignment (const std::string& variable) const
{
- return (&variable != NULL ) ?
- static_cast<const EventAssignment*>( mEventAssignments.get(variable) ) : NULL;
+ return static_cast<const EventAssignment*>( mEventAssignments.get(variable) );
}
@@ -1120,8 +1099,7 @@
EventAssignment*
Event::getEventAssignment (const std::string& variable)
{
- return (&variable != NULL ) ?
- static_cast<EventAssignment*>( mEventAssignments.get(variable) ) : NULL;
+ return static_cast<EventAssignment*>( mEventAssignments.get(variable) );
}
@@ -1153,7 +1131,7 @@
EventAssignment*
Event::removeEventAssignment (const std::string& variable)
{
- return (&variable != NULL) ? mEventAssignments.remove(variable) : NULL;
+ return mEventAssignments.remove(variable);
}
@@ -1786,8 +1764,8 @@
Event*
ListOfEvents::get (const std::string& sid)
{
- return (&sid != NULL) ? const_cast<Event*>(
- static_cast<const ListOfEvents&>(*this).get(sid) ) : NULL;
+ return const_cast<Event*>(
+ static_cast<const ListOfEvents&>(*this).get(sid) );
}
@@ -1795,7 +1773,6 @@
const Event*
ListOfEvents::get (const std::string& sid) const
{
- if (&sid == NULL) return NULL;
vector<SBase*>::const_iterator result;
result = find_if( mItems.begin(), mItems.end(), IdEqE(sid) );
@@ -1818,15 +1795,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqE(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqE(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Event*> (item);
Modified: branches/libsbml-experimental/src/sbml/EventAssignment.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/EventAssignment.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/EventAssignment.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -94,23 +94,16 @@
* Copy constructor. Creates a copy of this EventAssignment.
*/
EventAssignment::EventAssignment (const EventAssignment& orig) :
- SBase ( orig )
- , mMath ( NULL )
+ SBase ( orig )
+ , mVariable ( orig.mVariable )
+ , mMath ( NULL )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mVariable = orig.mVariable;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
}
@@ -119,12 +112,8 @@
*/
EventAssignment& EventAssignment::operator=(const EventAssignment& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mVariable = rhs.mVariable;
@@ -216,14 +205,10 @@
int
EventAssignment::setVariable (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mVariable = sid;
@@ -885,16 +870,9 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <EventAssignment*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <EventAssignment*> (*result);
}
@@ -913,15 +891,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <EventAssignment*> (item);
Modified: branches/libsbml-experimental/src/sbml/FunctionDefinition.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/FunctionDefinition.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/FunctionDefinition.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -97,23 +97,17 @@
*/
FunctionDefinition::FunctionDefinition (const FunctionDefinition& orig) :
SBase ( orig )
- , mMath ( NULL )
+ , mId ( orig.mId )
+ , mName ( orig.mName )
+ , mMath ( NULL )
{
- if (&orig == NULL)
+
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
}
@@ -122,12 +116,8 @@
*/
FunctionDefinition& FunctionDefinition::operator=(const FunctionDefinition& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -250,14 +240,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -275,12 +261,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -1020,16 +1002,10 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <FunctionDefinition*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <FunctionDefinition*> (*result);
+
}
@@ -1048,15 +1024,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <FunctionDefinition*> (item);
Modified: branches/libsbml-experimental/src/sbml/InitialAssignment.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/InitialAssignment.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/InitialAssignment.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -92,22 +92,15 @@
*/
InitialAssignment::InitialAssignment (const InitialAssignment& orig) :
SBase ( orig )
+ , mSymbol ( orig.mSymbol)
, mMath ( NULL )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mSymbol = orig.mSymbol;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
}
@@ -116,15 +109,10 @@
*/
InitialAssignment& InitialAssignment::operator=(const InitialAssignment& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mSymbol = rhs.mSymbol;
-
delete mMath;
if (rhs.mMath != NULL)
{
@@ -229,14 +217,10 @@
int
InitialAssignment::setSymbol (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mSymbol = sid;
@@ -883,16 +867,10 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <InitialAssignment*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <InitialAssignment*> (*result);
+
}
@@ -911,15 +889,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <InitialAssignment*> (item);
Modified: branches/libsbml-experimental/src/sbml/KineticLaw.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/KineticLaw.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/KineticLaw.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -109,28 +109,22 @@
* Copy constructor. Creates a copy of this KineticLaw.
*/
KineticLaw::KineticLaw (const KineticLaw& orig) :
- SBase ( orig )
- , mMath ( NULL )
- , mParameters ( orig.mParameters )
- , mLocalParameters ( orig.mLocalParameters )
+ SBase ( orig )
+ , mFormula ( orig.mFormula )
+ , mMath ( NULL )
+ , mParameters ( orig.mParameters )
+ , mLocalParameters ( orig.mLocalParameters )
+ , mTimeUnits ( orig.mTimeUnits )
+ , mSubstanceUnits ( orig.mSubstanceUnits )
+ , mInternalId ( orig.mInternalId )
{
- if (&orig == NULL)
+
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mFormula = orig.mFormula;
- mTimeUnits = orig.mTimeUnits;
- mSubstanceUnits = orig.mSubstanceUnits;
- mInternalId = orig.mInternalId;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
connectToChild();
}
@@ -140,12 +134,8 @@
*/
KineticLaw& KineticLaw::operator=(const KineticLaw& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mFormula = rhs.mFormula ;
mTimeUnits = rhs.mTimeUnits ;
@@ -360,38 +350,32 @@
int
KineticLaw::setFormula (const std::string& formula)
{
- if (&(formula) == NULL)
+ if (formula == "")
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
+ mFormula.erase();
+ delete mMath;
+ mMath = NULL;
+ return LIBSBML_OPERATION_SUCCESS;
}
+ ASTNode * math = SBML_parseFormula(formula.c_str());
+ if (math == NULL || !(math->isWellFormedASTNode()))
+ {
+ delete math;
+ return LIBSBML_INVALID_OBJECT;
+ }
else
{
- if (formula == "")
+ mFormula = formula;
+
+ if (mMath != NULL)
{
- mFormula.erase();
delete mMath;
mMath = NULL;
- return LIBSBML_OPERATION_SUCCESS;
}
- ASTNode * math = SBML_parseFormula(formula.c_str());
- if (math == NULL || !(math->isWellFormedASTNode()))
- {
- delete math;
- return LIBSBML_INVALID_OBJECT;
- }
- else
- {
- mFormula = formula;
-
- if (mMath != NULL)
- {
- delete mMath;
- mMath = NULL;
- }
- delete math;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ delete math;
+ return LIBSBML_OPERATION_SUCCESS;
}
+
}
@@ -434,11 +418,7 @@
KineticLaw::setTimeUnits (const std::string& sid)
{
/* only in L1 and L2V1 */
- if (&(sid) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if ((getLevel() == 2 && getVersion() > 1)
+ if ((getLevel() == 2 && getVersion() > 1)
|| getLevel() > 2)
{
return LIBSBML_UNEXPECTED_ATTRIBUTE;
@@ -462,11 +442,7 @@
KineticLaw::setSubstanceUnits (const std::string& sid)
{
/* only in L1 and L2V1 */
- if (&(sid) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if ((getLevel() == 2 && getVersion() > 1)
+ if ((getLevel() == 2 && getVersion() > 1)
|| getLevel() > 2)
{
return LIBSBML_UNEXPECTED_ATTRIBUTE;
@@ -1031,7 +1007,7 @@
Parameter*
KineticLaw::removeParameter (const std::string& sid)
{
- return (&sid != NULL) ? mParameters.remove(sid) : NULL;
+ return mParameters.remove(sid);
}
@@ -1042,7 +1018,7 @@
LocalParameter*
KineticLaw::removeLocalParameter (const std::string& sid)
{
- return (&sid != NULL) ? mLocalParameters.remove(sid) : NULL;
+ return mLocalParameters.remove(sid);
}
Modified: branches/libsbml-experimental/src/sbml/LocalParameter.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/LocalParameter.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/LocalParameter.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -100,10 +100,6 @@
LocalParameter::LocalParameter(const LocalParameter& orig) :
Parameter ( orig )
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
}
@@ -112,23 +108,15 @@
*/
LocalParameter::LocalParameter(const Parameter& orig) :
Parameter ( orig )
-{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
+{
}
/*
* Assignment operator.
*/
LocalParameter& LocalParameter::operator=(const LocalParameter& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->Parameter::operator =(rhs);
}
@@ -415,16 +403,10 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <LocalParameter*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <LocalParameter*> (*result);
+
}
@@ -457,15 +439,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <LocalParameter*> (item);
Modified: branches/libsbml-experimental/src/sbml/Model.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Model.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/Model.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -157,53 +157,44 @@
/*
* Copy constructor.
*/
-Model::Model(const Model& orig) :
- SBase (orig )
- , mFunctionDefinitions (orig.mFunctionDefinitions)
- , mUnitDefinitions (orig.mUnitDefinitions)
- , mCompartmentTypes (orig.mCompartmentTypes)
- , mSpeciesTypes (orig.mSpeciesTypes)
- , mCompartments (orig.mCompartments)
- , mSpecies (orig.mSpecies)
- , mParameters (orig.mParameters)
- , mInitialAssignments (orig.mInitialAssignments)
- , mRules (orig.mRules)
- , mConstraints (orig.mConstraints)
- , mReactions (orig.mReactions)
- , mEvents (orig.mEvents)
+Model::Model(const Model& orig)
+ : SBase (orig)
+ , mId (orig.mId)
+ , mName (orig.mName)
+ , mSubstanceUnits (orig.mSubstanceUnits)
+ , mTimeUnits (orig.mTimeUnits)
+ , mVolumeUnits (orig.mVolumeUnits)
+ , mAreaUnits (orig.mAreaUnits)
+ , mLengthUnits (orig.mLengthUnits)
+ , mExtentUnits (orig.mExtentUnits)
+ , mConversionFactor (orig.mConversionFactor)
+ , mFunctionDefinitions (orig.mFunctionDefinitions)
+ , mUnitDefinitions (orig.mUnitDefinitions)
+ , mCompartmentTypes (orig.mCompartmentTypes)
+ , mSpeciesTypes (orig.mSpeciesTypes)
+ , mCompartments (orig.mCompartments)
+ , mSpecies (orig.mSpecies)
+ , mParameters (orig.mParameters)
+ , mInitialAssignments (orig.mInitialAssignments)
+ , mRules (orig.mRules)
+ , mConstraints (orig.mConstraints)
+ , mReactions (orig.mReactions)
+ , mEvents (orig.mEvents)
+ , mFormulaUnitsData (NULL)
{
- if (&orig == NULL)
+
+ if(orig.mFormulaUnitsData != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mSubstanceUnits = orig.mSubstanceUnits ;
- mTimeUnits = orig.mTimeUnits ;
- mVolumeUnits = orig.mVolumeUnits ;
- mAreaUnits = orig.mAreaUnits ;
- mLengthUnits = orig.mLengthUnits ;
- mExtentUnits = orig.mExtentUnits ;
- mConversionFactor = orig.mConversionFactor ;
-
- if(orig.mFormulaUnitsData != NULL)
+ this->mFormulaUnitsData = new List();
+ unsigned int i,iMax = orig.mFormulaUnitsData->getSize();
+ for(i = 0; i < iMax; ++i)
{
- this->mFormulaUnitsData = new List();
- unsigned int i,iMax = orig.mFormulaUnitsData->getSize();
- for(i = 0; i < iMax; ++i)
- {
- this->mFormulaUnitsData
- ->add(static_cast<FormulaUnitsData*>
- (orig.mFormulaUnitsData->get(i))->clone());
- }
+ this->mFormulaUnitsData
+ ->add(static_cast<FormulaUnitsData*>
+ (orig.mFormulaUnitsData->get(i))->clone());
}
- else
- {
- this->mFormulaUnitsData = NULL;
- }
}
+
connectToChild();
}
@@ -213,12 +204,8 @@
*/
Model& Model::operator=(const Model& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator = (rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -715,14 +702,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -740,12 +723,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -770,12 +749,8 @@
int
Model::setSubstanceUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -796,12 +771,8 @@
int
Model::setTimeUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -822,12 +793,8 @@
int
Model::setVolumeUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -848,12 +815,8 @@
int
Model::setAreaUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -874,12 +837,8 @@
int
Model::setLengthUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -900,12 +859,8 @@
int
Model::setExtentUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -926,12 +881,8 @@
int
Model::setConversionFactor (const std::string& id)
{
- if (&(id) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalSId(id)))
Modified: branches/libsbml-experimental/src/sbml/Parameter.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Parameter.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbml/Parameter.cpp 2015-05-28 08:49:12 UTC (rev 22272)
@@ -149,25 +149,19 @@
/*
* Copy constructor. Creates a copy of this Parameter.
*/
-Parameter::Parameter(const Parameter& orig) :
- SBase ( orig )
+Parameter::Parameter(const Parameter& orig)
+ : SBase ( orig )
+ , mId (orig.mId)
+ , mName (orig.mName)
+ , mValue (orig.mValue)
+ , mUnits (orig.mUnits)
+ , mConstant (orig.mConstant)
+ , mIsSetValue (orig.mIsSetValue)
+ , mIsSetConstant (orig.mIsSetConstant)
+ , mExplicitlySetConstant (orig.mExplicitlySetConstant)
+ , mCalculatingUnits (false) // only set by units converter
+
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mValue = orig.mValue ;
- mUnits = orig.mUnits ;
- mConstant = orig.mConstant ;
- mIsSetValue = orig.mIsSetValue;
- mId = orig.mId;
- mName = orig.mName;
- mIsSetConstant = orig.mIsSetConstant;
- mExplicitlySetConstant = orig.mExplicitlySetConstant;
- mCalculatingUnits = false; // only set by units converter
- }
}
@@ -176,12 +170,8 @@
*/
Parameter& Parameter::operator=(const Parameter& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mValue = rhs.mValue ;
mUnits = rhs.mUnits ;
@@ -361,14 +351,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -386,12 +372,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -428,14 +410,10 @@
int
Parameter::setUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (!(SyntaxChecker::isValidInternalUnitSId(units)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mUnits = units;
@@ -1578,15 +1556,8 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
- return (result == mItems.end()) ? NULL : static_cast <Parameter*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+ return (result == mItems.end()) ? NULL : static_cast <Parameter*> (*result);
}
@@ -1605,15 +1576,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Parameter*> (item);
Modified: branches/libsbml-experimental/src/sbml/Priority.cpp
===================================================================
--- branches/libsbml-experimental/src/sbml/Priority.cpp 2015-05-28 08:23:58 UTC (rev 22271)
+++ branches/libsbml-experimental/src/sbm...
[truncated message content] |
|
From: <fbe...@us...> - 2015-05-28 08:24:00
|
Revision: 22271
http://sourceforge.net/p/sbml/code/22271
Author: fbergmann
Date: 2015-05-28 08:23:58 +0000 (Thu, 28 May 2015)
Log Message:
-----------
- missed one
Modified Paths:
--------------
trunk/libsbml/src/sbml/extension/SBasePlugin.cpp
Modified: trunk/libsbml/src/sbml/extension/SBasePlugin.cpp
===================================================================
--- trunk/libsbml/src/sbml/extension/SBasePlugin.cpp 2015-05-28 08:08:59 UTC (rev 22270)
+++ trunk/libsbml/src/sbml/extension/SBasePlugin.cpp 2015-05-28 08:23:58 UTC (rev 22271)
@@ -720,7 +720,6 @@
const unsigned int pkgVersion,
const std::string& element)
{
- if (&attribute == NULL || &element == NULL) return;
std::ostringstream msg;
|
|
From: <fbe...@us...> - 2015-05-28 08:09:02
|
Revision: 22270
http://sourceforge.net/p/sbml/code/22270
Author: fbergmann
Date: 2015-05-28 08:08:59 +0000 (Thu, 28 May 2015)
Log Message:
-----------
- first batch of NULL reference checks (and tests) removed
Modified Paths:
--------------
trunk/libsbml/src/sbml/Compartment.cpp
trunk/libsbml/src/sbml/CompartmentType.cpp
trunk/libsbml/src/sbml/Constraint.cpp
trunk/libsbml/src/sbml/Delay.cpp
trunk/libsbml/src/sbml/Event.cpp
trunk/libsbml/src/sbml/EventAssignment.cpp
trunk/libsbml/src/sbml/FunctionDefinition.cpp
trunk/libsbml/src/sbml/InitialAssignment.cpp
trunk/libsbml/src/sbml/KineticLaw.cpp
trunk/libsbml/src/sbml/LocalParameter.cpp
trunk/libsbml/src/sbml/Model.cpp
trunk/libsbml/src/sbml/Parameter.cpp
trunk/libsbml/src/sbml/Priority.cpp
trunk/libsbml/src/sbml/Reaction.cpp
trunk/libsbml/src/sbml/Rule.cpp
trunk/libsbml/src/sbml/SBMLDocument.cpp
trunk/libsbml/src/sbml/SBMLNamespaces.cpp
trunk/libsbml/src/sbml/SBMLReader.cpp
trunk/libsbml/src/sbml/SBMLWriter.cpp
trunk/libsbml/src/sbml/SBase.cpp
trunk/libsbml/src/sbml/SimpleSpeciesReference.cpp
trunk/libsbml/src/sbml/Species.cpp
trunk/libsbml/src/sbml/SpeciesReference.cpp
trunk/libsbml/src/sbml/SpeciesType.cpp
trunk/libsbml/src/sbml/StoichiometryMath.cpp
trunk/libsbml/src/sbml/Trigger.cpp
trunk/libsbml/src/sbml/Unit.cpp
trunk/libsbml/src/sbml/UnitDefinition.cpp
trunk/libsbml/src/sbml/annotation/CVTerm.cpp
trunk/libsbml/src/sbml/annotation/Date.cpp
trunk/libsbml/src/sbml/annotation/ModelCreator.cpp
trunk/libsbml/src/sbml/annotation/ModelHistory.cpp
trunk/libsbml/src/sbml/annotation/RDFAnnotationParser.cpp
trunk/libsbml/src/sbml/annotation/test/TestCopyAndClone.cpp
trunk/libsbml/src/sbml/conversion/ConversionOption.cpp
trunk/libsbml/src/sbml/conversion/ConversionProperties.cpp
trunk/libsbml/src/sbml/conversion/SBMLConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLFunctionDefinitionConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLIdConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLInferUnitsConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLInitialAssignmentConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLLevel1Version1Converter.cpp
trunk/libsbml/src/sbml/conversion/SBMLLevelVersionConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLLocalParameterConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLReactionConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLRuleConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLStripPackageConverter.cpp
trunk/libsbml/src/sbml/conversion/SBMLUnitsConverter.cpp
trunk/libsbml/src/sbml/conversion/test/TestConversionOption.cpp
trunk/libsbml/src/sbml/conversion/test/TestConversionProperties.cpp
trunk/libsbml/src/sbml/extension/SBMLDocumentPlugin.cpp
trunk/libsbml/src/sbml/extension/SBMLDocumentPluginNotRequired.cpp
trunk/libsbml/src/sbml/extension/SBMLExtension.cpp
trunk/libsbml/src/sbml/extension/SBMLExtensionRegistry.cpp
trunk/libsbml/src/sbml/extension/SBaseExtensionPoint.cpp
trunk/libsbml/src/sbml/extension/SBasePlugin.cpp
trunk/libsbml/src/sbml/extension/SBasePluginCreatorBase.cpp
trunk/libsbml/src/sbml/extension/test/TestSBMLExtension.cpp
trunk/libsbml/src/sbml/extension/test/TestSBMLExtensionRegistry.cpp
trunk/libsbml/src/sbml/math/ASTBase.cpp
trunk/libsbml/src/sbml/math/ASTBinaryFunctionNode.cpp
trunk/libsbml/src/sbml/math/ASTCSymbolAvogadroNode.cpp
trunk/libsbml/src/sbml/math/ASTCSymbolDelayNode.cpp
trunk/libsbml/src/sbml/math/ASTCSymbolTimeNode.cpp
trunk/libsbml/src/sbml/math/ASTCiFunctionNode.cpp
trunk/libsbml/src/sbml/math/ASTCiNumberNode.cpp
trunk/libsbml/src/sbml/math/ASTCnBase.cpp
trunk/libsbml/src/sbml/math/ASTConstantNumberNode.cpp
trunk/libsbml/src/sbml/math/ASTFunction.cpp
trunk/libsbml/src/sbml/math/ASTFunctionBase.cpp
trunk/libsbml/src/sbml/math/ASTLambdaFunctionNode.cpp
trunk/libsbml/src/sbml/math/ASTNaryFunctionNode.cpp
trunk/libsbml/src/sbml/math/ASTPiecewiseFunctionNode.cpp
trunk/libsbml/src/sbml/math/ASTQualifierNode.cpp
trunk/libsbml/src/sbml/math/ASTSemanticsNode.cpp
trunk/libsbml/src/sbml/math/ASTTypes.cpp
trunk/libsbml/src/sbml/math/ASTUnaryFunctionNode.cpp
trunk/libsbml/src/sbml/math/MathML.cpp
trunk/libsbml/src/sbml/math-legacy/MathML.cpp
trunk/libsbml/src/sbml/packages/comp/extension/CompSBasePlugin.cpp
trunk/libsbml/src/sbml/packages/comp/sbml/CompBase.cpp
trunk/libsbml/src/sbml/packages/comp/sbml/ListOfDeletions.cpp
trunk/libsbml/src/sbml/packages/comp/sbml/ListOfPorts.cpp
trunk/libsbml/src/sbml/packages/comp/sbml/ListOfSubmodels.cpp
trunk/libsbml/src/sbml/packages/comp/util/CompFlatteningConverter.cpp
trunk/libsbml/src/sbml/packages/comp/util/SBMLFileResolver.cpp
trunk/libsbml/src/sbml/packages/comp/util/SBMLResolver.cpp
trunk/libsbml/src/sbml/packages/comp/util/SBMLUri.cpp
trunk/libsbml/src/sbml/packages/comp/validator/CompValidator.cpp
trunk/libsbml/src/sbml/packages/fbc/util/CobraToFbcConverter.cpp
trunk/libsbml/src/sbml/packages/fbc/util/FbcToCobraConverter.cpp
trunk/libsbml/src/sbml/packages/fbc/validator/FbcValidator.cpp
trunk/libsbml/src/sbml/packages/layout/sbml/GraphicalObject.cpp
trunk/libsbml/src/sbml/packages/layout/sbml/Layout.cpp
trunk/libsbml/src/sbml/packages/layout/validator/LayoutValidator.cpp
trunk/libsbml/src/sbml/packages/qual/sbml/DefaultTerm.cpp
trunk/libsbml/src/sbml/packages/qual/sbml/FunctionTerm.cpp
trunk/libsbml/src/sbml/packages/qual/sbml/Input.cpp
trunk/libsbml/src/sbml/packages/qual/sbml/Output.cpp
trunk/libsbml/src/sbml/packages/qual/sbml/QualitativeSpecies.cpp
trunk/libsbml/src/sbml/packages/qual/sbml/Transition.cpp
trunk/libsbml/src/sbml/packages/qual/validator/QualValidator.cpp
trunk/libsbml/src/sbml/packages/qual/validator/constraints/QualCSymbolMathCheck.cpp
trunk/libsbml/src/sbml/test/TestSBMLConstructorException.cpp
trunk/libsbml/src/sbml/units/FormulaUnitsData.cpp
trunk/libsbml/src/sbml/util/ElementFilter.h
trunk/libsbml/src/sbml/util/IdList.cpp
trunk/libsbml/src/sbml/validator/SBMLValidator.cpp
trunk/libsbml/src/sbml/validator/VConstraint.cpp
trunk/libsbml/src/sbml/validator/Validator.cpp
trunk/libsbml/src/sbml/validator/constraints/CiElementMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/CiElementNot0DComp.cpp
trunk/libsbml/src/sbml/validator/constraints/EqualityArgsMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/FunctionApplyMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/FunctionNoArgsMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/LambdaMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/LocalParameterMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/LogicalArgsMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/NumberArgsMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/NumericArgsMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/NumericReturnMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/PieceBooleanMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/PiecewiseValueMathCheck.cpp
trunk/libsbml/src/sbml/validator/constraints/ValidCnUnitsValue.cpp
trunk/libsbml/src/sbml/xml/XMLAttributes.cpp
trunk/libsbml/src/sbml/xml/XMLError.cpp
trunk/libsbml/src/sbml/xml/XMLErrorLog.cpp
trunk/libsbml/src/sbml/xml/XMLFileBuffer.cpp
trunk/libsbml/src/sbml/xml/XMLNamespaces.cpp
trunk/libsbml/src/sbml/xml/XMLNode.cpp
trunk/libsbml/src/sbml/xml/XMLNode.h
trunk/libsbml/src/sbml/xml/XMLOutputStream.cpp
trunk/libsbml/src/sbml/xml/XMLToken.cpp
trunk/libsbml/src/sbml/xml/XMLTokenizer.cpp
trunk/libsbml/src/sbml/xml/XMLTriple.cpp
trunk/libsbml/src/sbml/xml/test/TestXMLExceptions.cpp
Modified: trunk/libsbml/src/sbml/Compartment.cpp
===================================================================
--- trunk/libsbml/src/sbml/Compartment.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Compartment.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -143,12 +143,7 @@
Compartment::Compartment(const Compartment& orig) :
SBase ( orig )
{
- if (&orig == NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
mSpatialDimensions = orig.mSpatialDimensions;
mSpatialDimensionsDouble = orig.mSpatialDimensionsDouble;
mSize = orig.mSize;
@@ -172,12 +167,8 @@
*/
Compartment& Compartment::operator=(const Compartment& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mSpatialDimensions= rhs.mSpatialDimensions ;
mSpatialDimensionsDouble= rhs.mSpatialDimensionsDouble ;
@@ -497,14 +488,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -522,12 +509,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -552,11 +535,7 @@
int
Compartment::setCompartmentType (const std::string& sid)
{
- if (&(sid) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if ( (getLevel() < 2)
+ if ( (getLevel() < 2)
|| (getLevel() == 2 && getVersion() == 1))
{
return LIBSBML_UNEXPECTED_ATTRIBUTE;
@@ -674,14 +653,10 @@
int
Compartment::setUnits (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalUnitSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalUnitSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mUnits = sid;
@@ -696,14 +671,10 @@
int
Compartment::setOutside (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mOutside = sid;
@@ -1570,12 +1541,7 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
{
- return NULL;
- }
- else
- {
result = find_if( mItems.begin(), mItems.end(), IdEq<Compartment>(sid) );
return (result == mItems.end()) ? NULL :
static_cast <Compartment*> (*result);
@@ -1598,15 +1564,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEq<Compartment>(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEq<Compartment>(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Compartment*> (item);
Modified: trunk/libsbml/src/sbml/CompartmentType.cpp
===================================================================
--- trunk/libsbml/src/sbml/CompartmentType.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/CompartmentType.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -86,19 +86,11 @@
/*
* Copy constructor. Creates a copy of this CompartmentType.
*/
-CompartmentType::CompartmentType(const CompartmentType& orig) :
- SBase ( orig )
+CompartmentType::CompartmentType(const CompartmentType& orig)
+ : SBase ( orig )
+ , mId (orig.mId)
+ , mName (orig.mName)
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- }
-
}
@@ -107,12 +99,8 @@
*/
CompartmentType& CompartmentType::operator=(const CompartmentType& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -204,14 +192,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -229,12 +213,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -566,16 +546,9 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <CompartmentType*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <CompartmentType*> (*result);
}
@@ -594,15 +567,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqCT(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <CompartmentType*> (item);
Modified: trunk/libsbml/src/sbml/Constraint.cpp
===================================================================
--- trunk/libsbml/src/sbml/Constraint.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Constraint.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -98,19 +98,13 @@
, mMath ( NULL )
, mMessage( NULL )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- if (orig.mMessage != NULL) mMessage = new XMLNode(*orig.mMessage);
- }
+ if (orig.mMessage != NULL) mMessage = new XMLNode(*orig.mMessage);
+
}
@@ -119,12 +113,8 @@
*/
Constraint& Constraint::operator=(const Constraint& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
delete mMath;
@@ -297,12 +287,8 @@
bool addXHTMLMarkup)
{
int success = LIBSBML_OPERATION_FAILED;
- if (&(message) == NULL)
+ if (message.empty())
{
- success = LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (message.empty())
- {
success = unsetMessage();
}
else
Modified: trunk/libsbml/src/sbml/Delay.cpp
===================================================================
--- trunk/libsbml/src/sbml/Delay.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Delay.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -93,24 +93,18 @@
/*
* Copy constructor. Creates a copy of this Delay.
*/
-Delay::Delay (const Delay& orig) :
- SBase ( orig )
- , mMath ( NULL )
+Delay::Delay (const Delay& orig)
+ : SBase ( orig )
+ , mMath ( NULL )
+ , mInternalId ( orig.mInternalId )
{
- if (&orig == NULL)
+
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mInternalId = orig.mInternalId;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
}
@@ -119,12 +113,8 @@
*/
Delay& Delay::operator=(const Delay& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mInternalId = rhs.mInternalId;
Modified: trunk/libsbml/src/sbml/Event.cpp
===================================================================
--- trunk/libsbml/src/sbml/Event.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Event.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -125,40 +125,36 @@
* Copy constructor. Creates a copy of this Event.
*/
Event::Event (const Event& orig) :
- SBase ( orig )
- , mTrigger ( NULL )
- , mDelay ( NULL )
- , mPriority ( NULL )
- , mEventAssignments ( orig.mEventAssignments )
+ SBase ( orig )
+ , mId ( orig.mId )
+ , mName ( orig.mName )
+ , mTrigger ( NULL )
+ , mDelay ( NULL )
+ , mPriority ( NULL )
+ , mTimeUnits ( orig.mTimeUnits )
+ , mUseValuesFromTriggerTime ( orig.mUseValuesFromTriggerTime )
+ , mIsSetUseValuesFromTriggerTime ( orig.mIsSetUseValuesFromTriggerTime )
+ , mInternalIdOnly ( orig.mInternalIdOnly )
+ , mExplicitlySetUVFTT ( orig.mExplicitlySetUVFTT )
+ , mEventAssignments ( orig.mEventAssignments )
{
- if (&orig == NULL)
+
+ if (orig.mTrigger != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mTrigger = new Trigger(*orig.getTrigger());
}
- else
+
+ if (orig.mDelay != NULL)
{
- mId = orig.mId;
- mName = orig.mName;
- mTimeUnits = orig.mTimeUnits;
- mUseValuesFromTriggerTime = orig.mUseValuesFromTriggerTime ;
- mIsSetUseValuesFromTriggerTime = orig.mIsSetUseValuesFromTriggerTime ;
- mExplicitlySetUVFTT = orig.mExplicitlySetUVFTT;
- mInternalIdOnly = orig.mInternalIdOnly;
-
- if (orig.mTrigger != NULL)
- {
- mTrigger = new Trigger(*orig.getTrigger());
- }
- if (orig.mDelay != NULL)
- {
- mDelay = new Delay(*orig.getDelay());
- }
- if (orig.mPriority != NULL)
- {
- mPriority = new Priority(*orig.getPriority());
- }
+ mDelay = new Delay(*orig.getDelay());
}
+ if (orig.mPriority != NULL)
+ {
+ mPriority = new Priority(*orig.getPriority());
+ }
+
+
connectToChild();
}
@@ -168,12 +164,8 @@
*/
Event& Event::operator=(const Event& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mId = rhs.mId;
@@ -535,14 +527,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -561,12 +549,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -709,12 +693,8 @@
int
Event::setTimeUnits (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (getLevel() == 2 && getVersion() > 2)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 2 && getVersion() > 2)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalSId(sid)))
@@ -1108,8 +1088,7 @@
const EventAssignment*
Event::getEventAssignment (const std::string& variable) const
{
- return (&variable != NULL ) ?
- static_cast<const EventAssignment*>( mEventAssignments.get(variable) ) : NULL;
+ return static_cast<const EventAssignment*>( mEventAssignments.get(variable) );
}
@@ -1120,8 +1099,7 @@
EventAssignment*
Event::getEventAssignment (const std::string& variable)
{
- return (&variable != NULL ) ?
- static_cast<EventAssignment*>( mEventAssignments.get(variable) ) : NULL;
+ return static_cast<EventAssignment*>( mEventAssignments.get(variable) );
}
@@ -1153,7 +1131,7 @@
EventAssignment*
Event::removeEventAssignment (const std::string& variable)
{
- return (&variable != NULL) ? mEventAssignments.remove(variable) : NULL;
+ return mEventAssignments.remove(variable);
}
@@ -1786,8 +1764,8 @@
Event*
ListOfEvents::get (const std::string& sid)
{
- return (&sid != NULL) ? const_cast<Event*>(
- static_cast<const ListOfEvents&>(*this).get(sid) ) : NULL;
+ return const_cast<Event*>(
+ static_cast<const ListOfEvents&>(*this).get(sid) );
}
@@ -1795,7 +1773,6 @@
const Event*
ListOfEvents::get (const std::string& sid) const
{
- if (&sid == NULL) return NULL;
vector<SBase*>::const_iterator result;
result = find_if( mItems.begin(), mItems.end(), IdEqE(sid) );
@@ -1818,15 +1795,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqE(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqE(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Event*> (item);
Modified: trunk/libsbml/src/sbml/EventAssignment.cpp
===================================================================
--- trunk/libsbml/src/sbml/EventAssignment.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/EventAssignment.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -94,23 +94,16 @@
* Copy constructor. Creates a copy of this EventAssignment.
*/
EventAssignment::EventAssignment (const EventAssignment& orig) :
- SBase ( orig )
- , mMath ( NULL )
+ SBase ( orig )
+ , mVariable ( orig.mVariable )
+ , mMath ( NULL )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mVariable = orig.mVariable;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
}
@@ -119,12 +112,8 @@
*/
EventAssignment& EventAssignment::operator=(const EventAssignment& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mVariable = rhs.mVariable;
@@ -216,14 +205,10 @@
int
EventAssignment::setVariable (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mVariable = sid;
@@ -885,16 +870,9 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <EventAssignment*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <EventAssignment*> (*result);
}
@@ -913,15 +891,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqEA(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <EventAssignment*> (item);
Modified: trunk/libsbml/src/sbml/FunctionDefinition.cpp
===================================================================
--- trunk/libsbml/src/sbml/FunctionDefinition.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/FunctionDefinition.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -97,23 +97,17 @@
*/
FunctionDefinition::FunctionDefinition (const FunctionDefinition& orig) :
SBase ( orig )
- , mMath ( NULL )
+ , mId ( orig.mId )
+ , mName ( orig.mName )
+ , mMath ( NULL )
{
- if (&orig == NULL)
+
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
}
@@ -122,12 +116,8 @@
*/
FunctionDefinition& FunctionDefinition::operator=(const FunctionDefinition& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -250,14 +240,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -275,12 +261,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -1020,16 +1002,10 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <FunctionDefinition*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <FunctionDefinition*> (*result);
+
}
@@ -1048,15 +1024,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqFD(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <FunctionDefinition*> (item);
Modified: trunk/libsbml/src/sbml/InitialAssignment.cpp
===================================================================
--- trunk/libsbml/src/sbml/InitialAssignment.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/InitialAssignment.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -92,22 +92,15 @@
*/
InitialAssignment::InitialAssignment (const InitialAssignment& orig) :
SBase ( orig )
+ , mSymbol ( orig.mSymbol)
, mMath ( NULL )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mSymbol = orig.mSymbol;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
}
@@ -116,15 +109,10 @@
*/
InitialAssignment& InitialAssignment::operator=(const InitialAssignment& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mSymbol = rhs.mSymbol;
-
delete mMath;
if (rhs.mMath != NULL)
{
@@ -229,14 +217,10 @@
int
InitialAssignment::setSymbol (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mSymbol = sid;
@@ -883,16 +867,10 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <InitialAssignment*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <InitialAssignment*> (*result);
+
}
@@ -911,15 +889,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqIA(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <InitialAssignment*> (item);
Modified: trunk/libsbml/src/sbml/KineticLaw.cpp
===================================================================
--- trunk/libsbml/src/sbml/KineticLaw.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/KineticLaw.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -109,28 +109,22 @@
* Copy constructor. Creates a copy of this KineticLaw.
*/
KineticLaw::KineticLaw (const KineticLaw& orig) :
- SBase ( orig )
- , mMath ( NULL )
- , mParameters ( orig.mParameters )
- , mLocalParameters ( orig.mLocalParameters )
+ SBase ( orig )
+ , mFormula ( orig.mFormula )
+ , mMath ( NULL )
+ , mParameters ( orig.mParameters )
+ , mLocalParameters ( orig.mLocalParameters )
+ , mTimeUnits ( orig.mTimeUnits )
+ , mSubstanceUnits ( orig.mSubstanceUnits )
+ , mInternalId ( orig.mInternalId )
{
- if (&orig == NULL)
+
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mFormula = orig.mFormula;
- mTimeUnits = orig.mTimeUnits;
- mSubstanceUnits = orig.mSubstanceUnits;
- mInternalId = orig.mInternalId;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
+
connectToChild();
}
@@ -140,12 +134,8 @@
*/
KineticLaw& KineticLaw::operator=(const KineticLaw& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mFormula = rhs.mFormula ;
mTimeUnits = rhs.mTimeUnits ;
@@ -360,38 +350,32 @@
int
KineticLaw::setFormula (const std::string& formula)
{
- if (&(formula) == NULL)
+ if (formula == "")
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
+ mFormula.erase();
+ delete mMath;
+ mMath = NULL;
+ return LIBSBML_OPERATION_SUCCESS;
}
+ ASTNode * math = SBML_parseFormula(formula.c_str());
+ if (math == NULL || !(math->isWellFormedASTNode()))
+ {
+ delete math;
+ return LIBSBML_INVALID_OBJECT;
+ }
else
{
- if (formula == "")
+ mFormula = formula;
+
+ if (mMath != NULL)
{
- mFormula.erase();
delete mMath;
mMath = NULL;
- return LIBSBML_OPERATION_SUCCESS;
}
- ASTNode * math = SBML_parseFormula(formula.c_str());
- if (math == NULL || !(math->isWellFormedASTNode()))
- {
- delete math;
- return LIBSBML_INVALID_OBJECT;
- }
- else
- {
- mFormula = formula;
-
- if (mMath != NULL)
- {
- delete mMath;
- mMath = NULL;
- }
- delete math;
- return LIBSBML_OPERATION_SUCCESS;
- }
+ delete math;
+ return LIBSBML_OPERATION_SUCCESS;
}
+
}
@@ -434,11 +418,7 @@
KineticLaw::setTimeUnits (const std::string& sid)
{
/* only in L1 and L2V1 */
- if (&(sid) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if ((getLevel() == 2 && getVersion() > 1)
+ if ((getLevel() == 2 && getVersion() > 1)
|| getLevel() > 2)
{
return LIBSBML_UNEXPECTED_ATTRIBUTE;
@@ -462,11 +442,7 @@
KineticLaw::setSubstanceUnits (const std::string& sid)
{
/* only in L1 and L2V1 */
- if (&(sid) == NULL)
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if ((getLevel() == 2 && getVersion() > 1)
+ if ((getLevel() == 2 && getVersion() > 1)
|| getLevel() > 2)
{
return LIBSBML_UNEXPECTED_ATTRIBUTE;
@@ -1031,7 +1007,7 @@
Parameter*
KineticLaw::removeParameter (const std::string& sid)
{
- return (&sid != NULL) ? mParameters.remove(sid) : NULL;
+ return mParameters.remove(sid);
}
@@ -1042,7 +1018,7 @@
LocalParameter*
KineticLaw::removeLocalParameter (const std::string& sid)
{
- return (&sid != NULL) ? mLocalParameters.remove(sid) : NULL;
+ return mLocalParameters.remove(sid);
}
Modified: trunk/libsbml/src/sbml/LocalParameter.cpp
===================================================================
--- trunk/libsbml/src/sbml/LocalParameter.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/LocalParameter.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -100,10 +100,6 @@
LocalParameter::LocalParameter(const LocalParameter& orig) :
Parameter ( orig )
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
}
@@ -112,23 +108,15 @@
*/
LocalParameter::LocalParameter(const Parameter& orig) :
Parameter ( orig )
-{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
+{
}
/*
* Assignment operator.
*/
LocalParameter& LocalParameter::operator=(const LocalParameter& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->Parameter::operator =(rhs);
}
@@ -415,16 +403,10 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
- return (result == mItems.end()) ? NULL :
- static_cast <LocalParameter*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+ return (result == mItems.end()) ? NULL :
+ static_cast <LocalParameter*> (*result);
+
}
@@ -457,15 +439,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <LocalParameter*> (item);
Modified: trunk/libsbml/src/sbml/Model.cpp
===================================================================
--- trunk/libsbml/src/sbml/Model.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Model.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -157,53 +157,44 @@
/*
* Copy constructor.
*/
-Model::Model(const Model& orig) :
- SBase (orig )
- , mFunctionDefinitions (orig.mFunctionDefinitions)
- , mUnitDefinitions (orig.mUnitDefinitions)
- , mCompartmentTypes (orig.mCompartmentTypes)
- , mSpeciesTypes (orig.mSpeciesTypes)
- , mCompartments (orig.mCompartments)
- , mSpecies (orig.mSpecies)
- , mParameters (orig.mParameters)
- , mInitialAssignments (orig.mInitialAssignments)
- , mRules (orig.mRules)
- , mConstraints (orig.mConstraints)
- , mReactions (orig.mReactions)
- , mEvents (orig.mEvents)
+Model::Model(const Model& orig)
+ : SBase (orig)
+ , mId (orig.mId)
+ , mName (orig.mName)
+ , mSubstanceUnits (orig.mSubstanceUnits)
+ , mTimeUnits (orig.mTimeUnits)
+ , mVolumeUnits (orig.mVolumeUnits)
+ , mAreaUnits (orig.mAreaUnits)
+ , mLengthUnits (orig.mLengthUnits)
+ , mExtentUnits (orig.mExtentUnits)
+ , mConversionFactor (orig.mConversionFactor)
+ , mFunctionDefinitions (orig.mFunctionDefinitions)
+ , mUnitDefinitions (orig.mUnitDefinitions)
+ , mCompartmentTypes (orig.mCompartmentTypes)
+ , mSpeciesTypes (orig.mSpeciesTypes)
+ , mCompartments (orig.mCompartments)
+ , mSpecies (orig.mSpecies)
+ , mParameters (orig.mParameters)
+ , mInitialAssignments (orig.mInitialAssignments)
+ , mRules (orig.mRules)
+ , mConstraints (orig.mConstraints)
+ , mReactions (orig.mReactions)
+ , mEvents (orig.mEvents)
+ , mFormulaUnitsData (NULL)
{
- if (&orig == NULL)
+
+ if(orig.mFormulaUnitsData != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mId = orig.mId;
- mName = orig.mName;
- mSubstanceUnits = orig.mSubstanceUnits ;
- mTimeUnits = orig.mTimeUnits ;
- mVolumeUnits = orig.mVolumeUnits ;
- mAreaUnits = orig.mAreaUnits ;
- mLengthUnits = orig.mLengthUnits ;
- mExtentUnits = orig.mExtentUnits ;
- mConversionFactor = orig.mConversionFactor ;
-
- if(orig.mFormulaUnitsData != NULL)
+ this->mFormulaUnitsData = new List();
+ unsigned int i,iMax = orig.mFormulaUnitsData->getSize();
+ for(i = 0; i < iMax; ++i)
{
- this->mFormulaUnitsData = new List();
- unsigned int i,iMax = orig.mFormulaUnitsData->getSize();
- for(i = 0; i < iMax; ++i)
- {
- this->mFormulaUnitsData
- ->add(static_cast<FormulaUnitsData*>
- (orig.mFormulaUnitsData->get(i))->clone());
- }
+ this->mFormulaUnitsData
+ ->add(static_cast<FormulaUnitsData*>
+ (orig.mFormulaUnitsData->get(i))->clone());
}
- else
- {
- this->mFormulaUnitsData = NULL;
- }
}
+
connectToChild();
}
@@ -213,12 +204,8 @@
*/
Model& Model::operator=(const Model& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator = (rhs);
mId = rhs.mId;
mName = rhs.mName;
@@ -715,14 +702,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -740,12 +723,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -770,12 +749,8 @@
int
Model::setSubstanceUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -796,12 +771,8 @@
int
Model::setTimeUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -822,12 +793,8 @@
int
Model::setVolumeUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -848,12 +815,8 @@
int
Model::setAreaUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -874,12 +837,8 @@
int
Model::setLengthUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -900,12 +859,8 @@
int
Model::setExtentUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
@@ -926,12 +881,8 @@
int
Model::setConversionFactor (const std::string& id)
{
- if (&(id) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalSId(id)))
Modified: trunk/libsbml/src/sbml/Parameter.cpp
===================================================================
--- trunk/libsbml/src/sbml/Parameter.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Parameter.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -149,25 +149,19 @@
/*
* Copy constructor. Creates a copy of this Parameter.
*/
-Parameter::Parameter(const Parameter& orig) :
- SBase ( orig )
+Parameter::Parameter(const Parameter& orig)
+ : SBase ( orig )
+ , mId (orig.mId)
+ , mName (orig.mName)
+ , mValue (orig.mValue)
+ , mUnits (orig.mUnits)
+ , mConstant (orig.mConstant)
+ , mIsSetValue (orig.mIsSetValue)
+ , mIsSetConstant (orig.mIsSetConstant)
+ , mExplicitlySetConstant (orig.mExplicitlySetConstant)
+ , mCalculatingUnits (false) // only set by units converter
+
{
- if (&orig == NULL)
- {
- throw SBMLConstructorException("Null argument to copy constructor");
- }
- else
- {
- mValue = orig.mValue ;
- mUnits = orig.mUnits ;
- mConstant = orig.mConstant ;
- mIsSetValue = orig.mIsSetValue;
- mId = orig.mId;
- mName = orig.mName;
- mIsSetConstant = orig.mIsSetConstant;
- mExplicitlySetConstant = orig.mExplicitlySetConstant;
- mCalculatingUnits = false; // only set by units converter
- }
}
@@ -176,12 +170,8 @@
*/
Parameter& Parameter::operator=(const Parameter& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mValue = rhs.mValue ;
mUnits = rhs.mUnits ;
@@ -361,14 +351,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -386,12 +372,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -428,14 +410,10 @@
int
Parameter::setUnits (const std::string& units)
{
- if (&(units) == NULL)
+ if (!(SyntaxChecker::isValidInternalUnitSId(units)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalUnitSId(units)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mUnits = units;
@@ -1578,15 +1556,8 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
- return (result == mItems.end()) ? NULL : static_cast <Parameter*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+ return (result == mItems.end()) ? NULL : static_cast <Parameter*> (*result);
}
@@ -1605,15 +1576,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqP(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Parameter*> (item);
Modified: trunk/libsbml/src/sbml/Priority.cpp
===================================================================
--- trunk/libsbml/src/sbml/Priority.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Priority.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -94,23 +94,15 @@
* Copy constructor. Creates a copy of this Priority.
*/
Priority::Priority (const Priority& orig) :
- SBase ( orig )
- , mMath ( NULL )
+ SBase ( orig )
+ , mMath ( NULL )
+ , mInternalId ( orig.mInternalId )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mInternalId = orig.mInternalId;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
}
@@ -119,12 +111,8 @@
*/
Priority& Priority::operator=(const Priority& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
this->mInternalId = rhs.mInternalId;
Modified: trunk/libsbml/src/sbml/Reaction.cpp
===================================================================
--- trunk/libsbml/src/sbml/Reaction.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Reaction.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -175,34 +175,26 @@
/*
* Copy constructor. Creates a copy of this Reaction.
*/
-Reaction::Reaction (const Reaction& orig) :
- SBase ( orig )
+Reaction::Reaction (const Reaction& orig)
+ : SBase ( orig )
+ , mId ( orig.mId )
+ , mName ( orig.mName )
, mReactants ( orig.mReactants )
, mProducts ( orig.mProducts )
, mModifiers ( orig.mModifiers )
, mKineticLaw( NULL )
-{
- if (&orig == NULL)
+ , mReversible( orig.mReversible )
+ , mFast ( orig.mFast )
+ , mIsSetFast ( orig.mIsSetFast )
+ , mCompartment ( orig.mCompartment )
+ , mIsSetReversible ( orig.mIsSetReversible )
+ , mExplicitlySetReversible ( orig.mExplicitlySetReversible )
+ , mExplicitlySetFast ( orig.mExplicitlySetFast )
+{
+ if (orig.mKineticLaw != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mKineticLaw = static_cast<KineticLaw*>( orig.mKineticLaw->clone() );
}
- else
- {
- mReversible = orig.mReversible ;
- mFast = orig.mFast ;
- mIsSetFast = orig.mIsSetFast ;
- mId = orig.mId;
- mName = orig.mName;
- mCompartment = orig.mCompartment;
- mIsSetReversible = orig.mIsSetReversible;
- mExplicitlySetReversible = orig.mExplicitlySetReversible;
- mExplicitlySetFast = orig.mExplicitlySetFast;
-
- if (orig.mKineticLaw != NULL)
- {
- mKineticLaw = static_cast<KineticLaw*>( orig.mKineticLaw->clone() );
- }
- }
connectToChild();
}
@@ -212,12 +204,8 @@
*/
Reaction& Reaction::operator=(const Reaction& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mReversible = rhs.mReversible ;
mFast = rhs.mFast ;
@@ -546,14 +534,10 @@
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
*/
- if (&(sid) == NULL)
+ if (!(SyntaxChecker::isValidInternalSId(sid)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
}
- else if (!(SyntaxChecker::isValidInternalSId(sid)))
- {
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
else
{
mId = sid;
@@ -571,12 +555,8 @@
/* if this is setting an L2 name the type is string
* whereas if it is setting an L1 name its type is SId
*/
- if (&(name) == NULL)
+ if (getLevel() == 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() == 1)
- {
if (!(SyntaxChecker::isValidInternalSId(name)))
{
return LIBSBML_INVALID_ATTRIBUTE_VALUE;
@@ -662,12 +642,8 @@
int
Reaction::setCompartment (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (getLevel() < 3)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() < 3)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
@@ -1930,15 +1906,8 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEq<Reaction>(sid) );
- return (result == mItems.end()) ? NULL : static_cast <Reaction*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEq<Reaction>(sid) );
+ return (result == mItems.end()) ? NULL : static_cast <Reaction*> (*result);
}
@@ -1957,17 +1926,15 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEq<Reaction>(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEq<Reaction>(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
+
return static_cast <Reaction*> (item);
}
Modified: trunk/libsbml/src/sbml/Rule.cpp
===================================================================
--- trunk/libsbml/src/sbml/Rule.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/Rule.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -103,29 +103,21 @@
/*
* Copy constructor. Creates a copy of this Rule.
*/
-Rule::Rule (const Rule& orig) :
- SBase ( orig )
- , mMath ( NULL )
+Rule::Rule (const Rule& orig)
+ : SBase ( orig )
+ , mVariable ( orig.mVariable )
+ , mFormula ( orig.mFormula )
+ , mMath ( NULL )
+ , mUnits ( orig.mUnits )
+ , mType ( orig.mType )
+ , mL1Type ( orig.mL1Type )
+ , mInternalId ( orig.mInternalId )
{
- if (&orig == NULL)
+ if (orig.mMath != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mMath = orig.mMath->deepCopy();
+ mMath->setParentSBMLObject(this);
}
- else
- {
- mVariable = orig.mVariable;
- mFormula = orig.mFormula ;
- mUnits = orig.mUnits ;
- mType = orig.mType ;
- mL1Type = orig.mL1Type ;
- mInternalId = orig.mInternalId;
-
- if (orig.mMath != NULL)
- {
- mMath = orig.mMath->deepCopy();
- mMath->setParentSBMLObject(this);
- }
- }
}
@@ -134,12 +126,8 @@
*/
Rule& Rule::operator=(const Rule& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
mVariable = rhs.mVariable;
mFormula = rhs.mFormula ;
@@ -323,38 +311,34 @@
int
Rule::setFormula (const std::string& formula)
{
- if (&(formula) == NULL)
+
+
+ if (formula == "")
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
+ mFormula.erase();
+ delete mMath;
+ mMath = NULL;
+ return LIBSBML_OPERATION_SUCCESS;
}
- else
+ ASTNode * math = SBML_parseFormula(formula.c_str());
+ if (math == NULL || !(math->isWellFormedASTNode()))
{
- if (formula == "")
+ delete math;
+ return LIBSBML_INVALID_OBJECT;
+ }
+ else
+ {
+ delete math;
+ mFormula = formula;
+
+ if (mMath != NULL)
{
- mFormula.erase();
delete mMath;
mMath = NULL;
- return LIBSBML_OPERATION_SUCCESS;
}
- ASTNode * math = SBML_parseFormula(formula.c_str());
- if (math == NULL || !(math->isWellFormedASTNode()))
- {
- delete math;
- return LIBSBML_INVALID_OBJECT;
- }
- else
- {
- delete math;
- mFormula = formula;
-
- if (mMath != NULL)
- {
- delete mMath;
- mMath = NULL;
- }
- return LIBSBML_OPERATION_SUCCESS;
- }
+ return LIBSBML_OPERATION_SUCCESS;
}
+
}
@@ -396,12 +380,8 @@
int
Rule::setVariable (const std::string& sid)
{
- if (&(sid) == NULL)
+ if (isAlgebraic())
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (isAlgebraic())
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if (!(SyntaxChecker::isValidInternalSId(sid)))
@@ -424,12 +404,8 @@
Rule::setUnits (const std::string& sname)
{
/* only in L1 ParameterRule */
- if (&(sname) == NULL)
+ if (getLevel() > 1)
{
- return LIBSBML_INVALID_ATTRIBUTE_VALUE;
- }
- else if (getLevel() > 1)
- {
return LIBSBML_UNEXPECTED_ATTRIBUTE;
}
else if ( !isParameter())
@@ -1478,15 +1454,8 @@
{
vector<SBase*>::const_iterator result;
- if (&(sid) == NULL)
- {
- return NULL;
- }
- else
- {
- result = find_if( mItems.begin(), mItems.end(), IdEqRule(sid) );
- return (result == mItems.end()) ? NULL : static_cast <Rule*> (*result);
- }
+ result = find_if( mItems.begin(), mItems.end(), IdEqRule(sid) );
+ return (result == mItems.end()) ? NULL : static_cast <Rule*> (*result);
}
@@ -1519,15 +1488,12 @@
SBase* item = NULL;
vector<SBase*>::iterator result;
- if (&(sid) != NULL)
+ result = find_if( mItems.begin(), mItems.end(), IdEqRule(sid) );
+
+ if (result != mItems.end())
{
- result = find_if( mItems.begin(), mItems.end(), IdEqRule(sid) );
-
- if (result != mItems.end())
- {
- item = *result;
- mItems.erase(result);
- }
+ item = *result;
+ mItems.erase(result);
}
return static_cast <Rule*> (item);
Modified: trunk/libsbml/src/sbml/SBMLDocument.cpp
===================================================================
--- trunk/libsbml/src/sbml/SBMLDocument.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/SBMLDocument.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -251,37 +251,33 @@
/*
* Creates a copy of this SBMLDocument.
*/
-SBMLDocument::SBMLDocument (const SBMLDocument& orig) :
- SBase ( orig )
+SBMLDocument::SBMLDocument (const SBMLDocument& orig)
+ : SBase ( orig )
+ , mLevel ( orig.mLevel )
+ , mVersion ( orig.mVersion )
, mModel ( NULL )
, mLocationURI (orig.mLocationURI )
+ , mErrorLog()
+ , mValidators ()
+ , mInternalValidator(new SBMLInternalValidator())
+ , mRequiredAttrOfUnknownPkg(orig.mRequiredAttrOfUnknownPkg)
+ , mRequiredAttrOfUnknownDisabledPkg(orig.mRequiredAttrOfUnknownDisabledPkg)
+ , mPkgUseDefaultNSMap()
{
- if (&orig == NULL)
+
+
+ setSBMLDocument(this);
+
+ mInternalValidator->setDocument(this);
+ mInternalValidator->setApplicableValidators(orig.getApplicableValidators());
+ mInternalValidator->setConversionValidators(orig.getConversionValidators());
+
+ if (orig.mModel != NULL)
{
- throw SBMLConstructorException("Null argument to copy constructor");
+ mModel = static_cast<Model*>( orig.mModel->clone() );
+ mModel->setSBMLDocument(this);
}
- else
- {
- mLevel = orig.mLevel;
- mVersion = orig.mVersion;
-
- setSBMLDocument(this);
-
- mInternalValidator = new SBMLInternalValidator();
- mInternalValidator->setDocument(this);
- mInternalValidator->setApplicableValidators(orig.getApplicableValidators());
- mInternalValidator->setConversionValidators(orig.getConversionValidators());
- mRequiredAttrOfUnknownPkg = orig.mRequiredAttrOfUnknownPkg;
- mRequiredAttrOfUnknownDisabledPkg = orig.mRequiredAttrOfUnknownDisabledPkg;
-
- if (orig.mModel != NULL)
- {
- mModel = static_cast<Model*>( orig.mModel->clone() );
- mModel->setSBMLDocument(this);
- }
-
- }
-
+
connectToChild();
//if(orig.mNamespaces)
// this->mNamespaces =
@@ -297,12 +293,8 @@
*/
SBMLDocument& SBMLDocument::operator=(const SBMLDocument& rhs)
{
- if (&rhs == NULL)
+ if(&rhs!=this)
{
- throw SBMLConstructorException("Null argument to assignment operator");
- }
- else if(&rhs!=this)
- {
this->SBase::operator =(rhs);
setSBMLDocument(this);
Modified: trunk/libsbml/src/sbml/SBMLNamespaces.cpp
===================================================================
--- trunk/libsbml/src/sbml/SBMLNamespaces.cpp 2015-05-20 10:21:59 UTC (rev 22269)
+++ trunk/libsbml/src/sbml/SBMLNamespaces.cpp 2015-05-28 08:08:59 UTC (rev 22270)
@@ -174,22 +174,13 @@
* Copy constructor; creates a copy of a SBMLNamespaces.
*/
SBMLNamespaces::SBMLNamespaces(const SBMLNamespaces& orig)
+ : mLevel(orig.mLevel)
+ , mVersion...
[truncated message content] |
|
From: <sar...@us...> - 2015-05-20 10:22:02
|
Revision: 22269
http://sourceforge.net/p/sbml/code/22269
Author: sarahkeating
Date: 2015-05-20 10:21:59 +0000 (Wed, 20 May 2015)
Log Message:
-----------
Fixed bug reported by Matthias Konig about reorder units when there is more than one of the same kind
Modified Paths:
--------------
trunk/libsbml/src/sbml/UnitDefinition.cpp
trunk/libsbml/src/sbml/units/test/TestUtilsUnitDefinition.cpp
Modified: trunk/libsbml/src/sbml/UnitDefinition.cpp
===================================================================
--- trunk/libsbml/src/sbml/UnitDefinition.cpp 2015-05-16 04:24:54 UTC (rev 22268)
+++ trunk/libsbml/src/sbml/UnitDefinition.cpp 2015-05-20 10:21:59 UTC (rev 22269)
@@ -48,6 +48,8 @@
#include <sbml/util/ElementFilter.h>
+#include <math.h>
+
/** @cond doxygenIgnored */
using namespace std;
@@ -898,10 +900,14 @@
int *initialIndexArray = NULL;
initialIndexArray = new int[units->size()];
+ std::vector<unsigned int> used;
+
for (n = 0; n < numUnits; n++)
{
- indexArray[n] = ((Unit *)units->get(n))->getKind();
- initialIndexArray[n] = ((Unit *)units->get(n))->getKind();
+ Unit * unit = (Unit *)(units->get(n));
+ int value = unit->getKind();
+ indexArray[n] = value;
+ initialIndexArray[n] = value;
}
qsort(indexArray, numUnits, sizeof(int), compareKinds);
@@ -913,9 +919,13 @@
{
if (indexArray[n] == initialIndexArray[p])
{
- unit = (Unit *) units->get(p);
- units->append(unit);
- break;
+ if (used.end() == std::find(used.begin(), used.end(), p))
+ {
+ unit = (Unit *) units->get(p);
+ units->append(unit);
+ used.push_back(p);
+ break;
+ }
}
}
}
Modified: trunk/libsbml/src/sbml/units/test/TestUtilsUnitDefinition.cpp
===================================================================
--- trunk/libsbml/src/sbml/units/test/TestUtilsUnitDefinition.cpp 2015-05-16 04:24:54 UTC (rev 22268)
+++ trunk/libsbml/src/sbml/units/test/TestUtilsUnitDefinition.cpp 2015-05-20 10:21:59 UTC (rev 22269)
@@ -165,6 +165,46 @@
}
END_TEST
+START_TEST(test_unitdefinition_order1)
+{
+ UnitDefinition* ud = new UnitDefinition(2, 4);
+
+ Unit* u = new Unit(2, 4);
+ u->setKind(UNIT_KIND_METRE);
+ Unit* u1 = new Unit(2, 4);
+ u1->setKind(UNIT_KIND_AMPERE);
+ Unit* u2 = new Unit(2, 4);
+ u2->setKind(UNIT_KIND_METRE);
+ u2->setScale(3);
+
+ ud->addUnit(u);
+ ud->addUnit(u1);
+ ud->addUnit(u2);
+
+ UnitDefinition::reorder(ud);
+
+ fail_unless(ud->getNumUnits() == 3);
+ fail_unless(ud->getUnit(0)->getKind() == UNIT_KIND_AMPERE);
+ fail_unless(ud->getUnit(1)->getKind() == UNIT_KIND_METRE);
+ fail_unless(ud->getUnit(1)->getScale() == 0);
+ fail_unless(ud->getUnit(2)->getKind() == UNIT_KIND_METRE);
+ fail_unless(ud->getUnit(2)->getScale() == 3);
+
+ /* NULL case*/
+ delete ud;
+ ud = NULL;
+
+ UnitDefinition::reorder(ud);
+
+ fail_unless(ud == NULL);
+
+ delete u;
+ delete u1;
+ delete u2;
+ delete ud;
+}
+END_TEST
+
START_TEST(test_unitdefinition_convert_SI)
{
UnitDefinition* ud = new UnitDefinition(2, 4);
@@ -1142,6 +1182,7 @@
tcase_add_test( tcase, test_unitdefinition_simplify );
tcase_add_test( tcase, test_unitdefinition_simplify1 );
tcase_add_test( tcase, test_unitdefinition_order );
+ tcase_add_test( tcase, test_unitdefinition_order1 );
tcase_add_test( tcase, test_unitdefinition_convert_SI );
tcase_add_test( tcase, test_unitdefinition_convert_SI1 );
tcase_add_test( tcase, test_unitdefinition_convert_SI2 );
|
|
From: <luc...@us...> - 2015-05-16 04:24:56
|
Revision: 22268
http://sourceforge.net/p/sbml/code/22268
Author: luciansmith
Date: 2015-05-16 04:24:54 +0000 (Sat, 16 May 2015)
Log Message:
-----------
Now that Mike fixed the hanging-compile problem, I can check this in again! This version of the PDF has all the changes agreed on for L3V2.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/sbml-level-3-version-2-core.pdf
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/sbml-level-3-version-2-core.pdf
===================================================================
(Binary files differ)
|
|
From: <mh...@us...> - 2015-05-16 03:47:22
|
Revision: 22267
http://sourceforge.net/p/sbml/code/22267
Author: mhucka
Date: 2015-05-16 03:47:20 +0000 (Sat, 16 May 2015)
Log Message:
-----------
Something about the page layout caused LaTeX to enter a loop. Some
fiddling with page breaks seems to have fixed it.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex 2015-05-15 19:57:14 UTC (rev 22266)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex 2015-05-16 03:47:20 UTC (rev 22267)
@@ -139,7 +139,7 @@
\newcommand{\nestedContentNS} {\colorbox[gray]{.7}{\texttt{[NESTED CONTENT]}}}
\newcommand{\nestedContent} {\nestedContentNS\xspace}
-\vspace*{-0.5ex}
+\vspace*{-0.75ex}
\begin{example}
<\sbmlElement \otherContentTall metaid="\sbmlMetaNS" \otherContentTall>
\otherContent
@@ -149,7 +149,7 @@
\changed{xmlns:dcterms="http://purl.org/dc/terms/"}
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0\#"
xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"
- xmlns:bqmodel="http://biomodels.net/model-qualifiers/" >\vspace*{0.5ex}
+ xmlns:bqmodel="http://biomodels.net/model-qualifiers/" >\vspace*{0.75ex}
<rdf:Description rdf:about="#\sbmlMetaNS">
\history
<\relationElementNS>
@@ -168,7 +168,7 @@
\otherContent
</\sbmlElementNS>
\end{example}
-\vspace*{-0.5ex}
+\vspace*{-0.75ex}
The outline above shows the expected order of the elements. The
capitalized identifiers refer to generic strings of specific
@@ -187,7 +187,7 @@
\begin{blockChanged}
\nestedContent has the same format and restrictions as \relationElement:
-\vspace*{-0.5ex}
+\vspace*{-0.75ex}
\begin{example}
<\relationElementNS>
<rdf:Bag>
@@ -197,7 +197,7 @@
</rdf:Bag>
</\relationElementNS>
\end{example}
-\vspace*{-0.5ex}
+\vspace*{-0.75ex}
\nestedContent is used to describe a clarification or another annotation about the \relationElement in which it appears, using such elements as \token{bqbiol:isDescribedBy}. Nested content permits, for example, describing protein modifications on species, or adding evidence codes for an annotation. Nested content relates to its containing \relationElement, not the other way around. It qualifies, but does not change, its meaning. Ignoring a \nestedContent does not affect the information provided by the containing \relationElement. These elements may be nested arbitrarily deep, with each successive layer describing or clarifying the annotation it is embedded within.
@@ -283,7 +283,7 @@
``accession'' is perennial, and that is what should be used.
SBML does not define how to interpret URIs. There may be several
-ways of transforming a URI into a physical URL. For example,
+ways of transforming a URI into a physical URL; e.g.,
\changed{\uri{http://identifiers.org/go/GO:0007268}} can be translated into any
of the following:
\begin{itemize}\setlength{\parskip}{-0.7ex}
@@ -295,7 +295,7 @@
\end{itemize}
\vspace*{-1ex}
-Similarly, the URI \changed{\uri{http://identifiers.org/ec-code/3.5.4.4}} can refer to
+Similarly, \changed{\uri{http://identifiers.org/ec-code/3.5.4.4}} can refer to
any of the following (among many):
\begin{itemize}\setlength{\parskip}{-0.7ex}
@@ -468,6 +468,8 @@
the prefix \token{bqbiol}). The list will only grow; \ie no
element will be removed from the list.
+\clearpage
+
%===============================================================
\subsection{History}
\label{sec:model-history-annotation}
|
|
From: <luc...@us...> - 2015-05-15 19:57:16
|
Revision: 22266
http://sourceforge.net/p/sbml/code/22266
Author: luciansmith
Date: 2015-05-15 19:57:14 +0000 (Fri, 15 May 2015)
Log Message:
-----------
Another wording change for text that spilled into the margin.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/apdx-overdetermined.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/apdx-overdetermined.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/apdx-overdetermined.tex 2015-05-15 19:48:37 UTC (rev 22265)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/apdx-overdetermined.tex 2015-05-15 19:57:14 UTC (rev 22266)
@@ -106,8 +106,8 @@
\begin{enumerate}\setlength{\parskip}{0.2ex}
\item{} [Corresponding to step 1(a) in
- \sec{sec:overdetermined-method}.] \emph{Every \Species
- object having \token{boundaryCondition}=\val{false},
+ \sec{sec:overdetermined-method}.] \emph{For every \Species
+ object which has \token{boundaryCondition}=\val{false},
\token{constant}=\val{false}, and which is referenced as a
reactant or product in one or more \Reaction objects
containing \KineticLaw objects}. This generates two vertices,
|
|
From: <luc...@us...> - 2015-05-15 19:48:39
|
Revision: 22265
http://sourceforge.net/p/sbml/code/22265
Author: luciansmith
Date: 2015-05-15 19:48:37 +0000 (Fri, 15 May 2015)
Log Message:
-----------
Fix for spacing: the table used to drift into the margin, and the URL in the edited sentence also did.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex 2015-05-15 19:47:23 UTC (rev 22264)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex 2015-05-15 19:48:37 UTC (rev 22265)
@@ -82,7 +82,7 @@
\centering
\begin{edtable}{tabular}{lll}
\toprule
- \textbf{Prefix used here} & \textbf{Namespace URI} & \textbf{Reference/description} \\
+ \textbf{Prefix used} & \textbf{Namespace URI} & \textbf{Reference/description} \\
\midrule
\token{rdf} & \uri{http://www.w3.org/1999/02/22-rdf-syntax-ns\#} & \cite{w3c:2004b} \\[1pt]
\token{\changed{dcterms}} & \uri{http://purl.org/dc/terms/} & \cite{kokkelink:2002},\\
@@ -460,8 +460,8 @@
\tab{tab:miriam-qualifiers} lists the elements defined at
the time of this writing. The list is divided into two symbol
-namespaces. One is for model qualifiers, and this one has the URI
-\uri{http://biomodels.net/model-qualifiers/} (for which we use the
+namespaces: \uri{http://biomodels.net/model-qualifiers/} is for model qualifiers
+(for which we use the
prefix \token{bqmodel} in examples shown in this section). The
other namespace is for biological qualifiers; this has the URI
\uri{http://biomodels.net/biology-qualifiers/} (for which we use
|
|
From: <luc...@us...> - 2015-05-15 19:47:25
|
Revision: 22264
http://sourceforge.net/p/sbml/code/22264
Author: luciansmith
Date: 2015-05-15 19:47:23 +0000 (Fri, 15 May 2015)
Log Message:
-----------
Actually removed the validation rules that never made it into L3v1.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/apdx-validation.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/apdx-validation.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/apdx-validation.tex 2015-05-15 19:46:28 UTC (rev 22263)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/apdx-validation.tex 2015-05-15 19:47:23 UTC (rev 22264)
@@ -405,8 +405,6 @@
\validationRule{21201}
\validationRule{21202}
\validationRule{21203}
-% \validationRule{21206} % Removed in RC2
-% \validationRule{21207} % Removed in RC2
\validationRule{21208}
\validationRule{21209}
\validationRule{21210}
|
|
From: <luc...@us...> - 2015-05-15 19:46:32
|
Revision: 22263
http://sourceforge.net/p/sbml/code/22263
Author: luciansmith
Date: 2015-05-15 19:46:28 +0000 (Fri, 15 May 2015)
Log Message:
-----------
Add L3V1 references to all the validation rules that existed in L3v1, as well as to new rules that were missing from L3v1, but were described in the main text. Also removed references to sections from the footnoted 'previous versions' of removed rules.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10101.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10102.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10104.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10201.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10202.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10203.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10204.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10205.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10206.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10207.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10208.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10209.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10211.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10212.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10213.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10214.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10215.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10216.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10217.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10218.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10219.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10220.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10221.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10301.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10302.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10303.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10304.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10305.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10306.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10307.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10308.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10309.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10310.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10311.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10312.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10313.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10401.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10402.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10404.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10501.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10503.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10511.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10512.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10513.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10514.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10521.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10522.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10523.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10524.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10531.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10532.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10533.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10534.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10541.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10542.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10551.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10561.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10562.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10563.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10564.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10565.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10601.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10701.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10702.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10703.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10704.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10705.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10706.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10707.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10708.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10709.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10710.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10711.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10712.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10713.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10716.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10717.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10718.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10801.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10802.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10803.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10805.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20101.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20102.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20103.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20104.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20105.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20106.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20107.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20108.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20201.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20204.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20205.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20206.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20207.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20208.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20209.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20210.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20211.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20212.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20213.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20214.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20215.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20216.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20217.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20218.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20219.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20220.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20221.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20222.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20223.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20224.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20225.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20226.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20227.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20228.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20229.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20230.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20231.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20232.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20233.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20301.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20303.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20304.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20305.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20306.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20307.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20308.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20401.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20410.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20414.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20415.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20416.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20417.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20418.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20419.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20420.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20421.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20507.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20508.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20509.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20511.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20512.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20513.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20514.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20515.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20516.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20517.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20518.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20601.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20608.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20609.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20610.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20611.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20614.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20616.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20617.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20618.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20619.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20620.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20621.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20622.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20623.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20701.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20702.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20703.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20704.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20705.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20706.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20801.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20802.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20803.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20804.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20805.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20901.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20902.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20903.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20904.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20906.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20907.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20908.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20909.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20910.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21001.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21004.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21005.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21007.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21008.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21009.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21104.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21105.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21106.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21107.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21108.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21109.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21110.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21111.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21114.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21115.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21116.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21117.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21121.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21127.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21128.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21129.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21130.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21132.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21150.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21151.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21171.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21172.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21201.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21202.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21208.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21209.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21210.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21211.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21212.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21213.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21214.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21221.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21222.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21223.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21224.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21225.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21226.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21227.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21228.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21229.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21230.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21231.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21232.tex
Removed Paths:
-------------
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20411.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21206.tex
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/21207.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10101.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10101.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10101.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,5 +2,5 @@
precisely, the \token{encoding} attribute of the XML declaration
at the beginning of the XML data stream cannot have a value other
than \val{UTF-8}. An example valid declaration is \token{<?xml
-version="1.0" encoding="UTF-8"?>}. (References: SBML L3V2
+version="1.0" encoding="UTF-8"?>}. (References: SBML L3V1 Section 4.1; SBML L3V2
\sec{sec:sbml}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10102.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10102.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10102.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
An SBML XML document must not contain undefined elements or attributes in
the SBML Level~3 Core namespace or in a SBML Level~3 package namespace.
Documents containing unknown elements or attributes placed in an SBML
-namespace do not conform to the SBML specification. (References: SBML L3V2
+namespace do not conform to the SBML specification. (References: SBML L3V1 Section 4.1; SBML L3V2
\sec{sec:sbml}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10104.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10104.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10104.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
An SBML document must conform to the rules of XML well-formedness defined
in the XML~1.0 specification. These rules define the basic structural and
syntactic constraints with which all XML documents must comply.
-(References: SBML L3V2 \sec{sec:sbml}.)
+(References: SBML L3V1 Section 4.1; SBML L3V2 \sec{sec:sbml}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10201.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10201.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10201.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
Wherever MathML content appears in an SBML document, the MathML content
must be placed within a \token{math} element, and that \token{math} element
must be either explicitly or implicitly declared to be in the XML namespace
-\val{http://www.w3.org/1998/Math/MathML}. (References: SBML L3V2
+\val{http://www.w3.org/1998/Math/MathML}. (References: SBML L3V1 Section 3.4; SBML L3V2
\sec{sec:formulas}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10202.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10202.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10202.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -74,4 +74,4 @@
\token{true}, and
\token{xor}.
\changed{An SBML Package may allow new MathML elements to be added to this list, but must be marked \token{required}=\val{true} if it does so.}
-(References: SBML L3V2 \sec{sec:mathmlsubset}.)
+(References: SBML L3V1 Section 3.4.1; SBML L3V2 \sec{sec:mathmlsubset}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10203.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10203.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10203.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
\token{encoding} is only permitted on \token{csymbol},
\token{annotation} and \token{annotation-xml}. No other
MathML elements may have an \token{encoding} attribute.
-(References: SBML L3V2 \sec{sec:mathmlsubset}.)
+(References: SBML L3V1 Section 3.4.1; SBML L3V2 \sec{sec:mathmlsubset}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10204.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10204.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10204.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
In the SBML subset of MathML~2.0, the MathML attribute
\token{definitionURL} is only permitted on \token{ci}, \token{csymbol} and
\token{semantics}. No other MathML elements may have a
-\token{definitionURL} attribute. (References: SBML L3V2
+\token{definitionURL} attribute. (References: SBML L3V1 Section 3.4.1; SBML L3V2
\sec{sec:mathmlsubset}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10205.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10205.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10205.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -4,4 +4,4 @@
\val{http://www.sbml.org/sbml/symbols/delay},\\
\hspace*{-0.25pt}\val{\textls[-25]{http://www.sbml.org/sbml/symbols/avogadro}}, \changed{and
\val{\textls[-25]{http://www.sbml.org/sbml/symbols/rateOf}}}}.
-(References: SBML L3V2 \sec{sec:csymbol-token}.)
+(References: SBML L3V1 Section 3.4.6; SBML L3V2 \sec{sec:csymbol-token}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10206.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10206.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10206.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
In the SBML subset of MathML~2.0, the MathML attribute
\token{type} is only permitted on the \token{cn} construct.
No other MathML elements may have a \token{type} attribute.
-(References: SBML L3V2 \sec{sec:mathmlsubset}.)
+(References: SBML L3V1 Section 3.4.1; SBML L3V2 \sec{sec:mathmlsubset}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10207.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10207.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10207.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
The only permitted values for the attribute \token{type} on MathML
\token{cn} elements are \val{e-notation}, \val{real}, \val{integer}, and
-\val{rational}. (References: SBML L3V2 \sec{sec:cn-token}.)
+\val{rational}. (References: SBML L3V1 Section 3.4.2; SBML L3V2 \sec{sec:cn-token}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10208.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10208.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10208.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -3,6 +3,6 @@
as the first element of a \token{semantics} element immediately inside the
\token{math} element of a \FunctionDefinition object. MathML
\token{lambda} elements may not be used elsewhere in an SBML model.
-(References: SBML L3V2 \sec{sec:mathmlsubset}
+(References: SBML L3V1 Sections 3.4.1 and 4.3.2; SBML L3V2 \sec{sec:mathmlsubset}
and~\sec{sec:function-definition-math}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10209.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10209.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10209.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,2 @@
\changed{(This validation rule does not apply in SBML \thisLV.)}\footnote{\changed{Original rule: ``The arguments of the MathML logical operators \token{and}, \token{not},
-\token{or}, and \token{xor} must evaluate to boolean values. (References:
-SBML L3V2 \sec{sec:mathmltype}.)''}}
+\token{or}, and \token{xor} must evaluate to boolean values.''}}
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -9,5 +9,4 @@
\token{csc}, \token{divide}, \token{exp}, \token{factorial}, \token{floor},
\token{ln}, \token{log}, \token{minus}, \token{plus}, \token{power},
\token{root}, \token{sech}, \token{sec}, \token{sinh}, \token{sin},
-\token{tanh}, \token{tan}, and \token{times}. (References: SBML L3V2
-\sec{sec:mathmltype}.)''}}
+\token{tanh}, \token{tan}, and \token{times}.''}}
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10211.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10211.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10211.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,2 @@
\changed{(This validation rule does not apply in SBML \thisLV.)}\footnote{\changed{Original rule: ``The values of all arguments to MathML \token{eq} and \token{neq} operators
-must evaluate to the same type, either all boolean or all numeric.
-(References: SBML L3V2 \sec{sec:mathmltype}.)''}}
+must evaluate to the same type, either all boolean or all numeric.''}}
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10212.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10212.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10212.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
be consistent; \ie the set of expressions that make up the first
arguments of the \token{piece} and \token{otherwise} operators within the
same \token{piecewise} operator \changed{should} all return values of the same type.
-(References: SBML L3V2 \sec{sec:mathmltype}.)
+(References: SBML L3V1 Section 3.4.9; SBML L3V2 \sec{sec:mathmltype}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10213.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10213.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10213.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,2 +1,2 @@
\changed{(This validation rule does not apply in SBML \thisLV.)}\footnote{\changed{Original rule: ``The second argument of a MathML \token{piece} operator must evaluate to
-a boolean value. (References: SBML L3V2 \sec{sec:mathmltype}.)''}}
+a boolean value.''}}
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10214.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10214.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10214.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,5 +2,5 @@
the first element within a MathML \token{apply} element, then the
\token{ci} element's value can only be chosen from the set of identifiers
of \FunctionDefinition{} objects defined in the enclosing SBML \Model
-object. (References: SBML L3V2
+object. (References: SBML L3V1 Section 4.3.2; SBML L3V2
\sec{sec:function-definition-math}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10215.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10215.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10215.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1 +1 @@
-Outside of a \FunctionDefinition object, if a MathML \token{ci} element is not the first element within a MathML \token{apply}, then the \token{ci} element's value may only be chosen from \changed{the following set of identifiers: the identifiers of \Species, \Compartment, \Parameter, \SpeciesReference and \Reaction objects defined in the enclosing \Model object; the identifiers of \LocalParameter objects that are children of the \KineticLaw in which the \FunctionDefinition appears (if it appears inside the \Math object of a \KineticLaw); and any identifiers (in the \primtype{SId} namespace of the model) belonging to an object class defined by an \sbmlthree package as having mathematical meaning }. (References: SBML L3V2 \sec{sec:ci-token}.)
+Outside of a \FunctionDefinition object, if a MathML \token{ci} element is not the first element within a MathML \token{apply}, then the \token{ci} element's value may only be chosen from \changed{the following set of identifiers: the identifiers of \Species, \Compartment, \Parameter, \SpeciesReference and \Reaction objects defined in the enclosing \Model object; the identifiers of \LocalParameter objects that are children of the \KineticLaw in which the \FunctionDefinition appears (if it appears inside the \Math object of a \KineticLaw); and any identifiers (in the \primtype{SId} namespace of the model) belonging to an object class defined by an \sbmlthree package as having mathematical meaning }. (References: SBML L3V1 Section 3.4.3; SBML L3V2 \sec{sec:ci-token}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10216.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10216.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10216.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,6 +2,6 @@
\KineticLaw object may only be used in MathML \token{ci} elements within
the \token{math} element of that same \KineticLaw; in other words, the
identifier of the \LocalParameter object is not visible to other parts of
-the model outside of that \KineticLaw instance. (References: SBML L3V2
-\sec{sec:identifiers}, \sec{sec:ci-token}
+the model outside of that \KineticLaw instance. (References: SBML L3V1 Sections 3.3.1, 3.4.3, and 4.11.5; SBML L3V2
+\sec{sec:identifiers}, \sec{sec:ci-token},
and~\sec{subsec:kinetic-law}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10217.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10217.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10217.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -4,7 +4,7 @@
\token{math} in \KineticLaw, \token{math} in
\InitialAssignment, \token{math} in \AssignmentRule, \token{math} in
\RateRule, \token{math} in \AlgebraicRule, \token{math} in \Event
-\Delay, and \token{math} in \EventAssignment. (References: SBML L3V2
+\Delay, and \token{math} in \EventAssignment. (References: SBML L3V1 Sections 4.8, 4.9, 4.11, and 4.12; SBML L3V2
\sec{sec:initialAssignment}, \sec{sec:rules},
\sec{sec:reactions} and~\sec{sec:events}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10218.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10218.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10218.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,2 +1,2 @@
A MathML operator must be supplied the number of arguments appropriate for
-that operator. (References: SBML L3V2 \sec{sec:mathmlsubset}.)
+that operator. (References: SBML L3V1 Section 3.4.1; SBML L3V2 \sec{sec:mathmlsubset}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10219.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10219.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10219.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,5 +2,5 @@
\FunctionDefinition object must equal the number of arguments accepted by
that function, \changed{if defined.} In other words, it must equal the number of MathML
\token{bvar} elements inside the \token{lambda} element of the function
-definition, \changed{if present}. (References: SBML L3V2
+definition, \changed{if present}. (References: SBML L3V1 Section 4.3.4; SBML L3V2
\sec{sec:functiondefinition-calling}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10220.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10220.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10220.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
The SBML attribute \token{units} may only be added to MathML \token{cn}
elements; no other MathML elements are permitted to have the \token{units}
-attribute. (References: SBML L2V3 \sec{sec:units-of-mathml}.)
+attribute. (References: SBML L3V1 Section 3.4.2; SBML L2V3 \sec{sec:units-of-mathml}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10221.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10221.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10221.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
The value of the SBML attribute \token{units} on a MathML \token{cn}
element must be chosen from either the set of identifiers of
\UnitDefinition objects in the model, or the set of base units defined by
-SBML. (References: SBML L3V2 \sec{sec:units-of-mathml}.)
+SBML. (References: SBML L3V1 Section 3.4.2; SBML L3V2 \sec{sec:units-of-mathml}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10301.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10301.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10301.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -38,4 +38,4 @@
\Trigger, and
\Unit
}, plus the \token{id} attribute values of any \sbmlthree package element defined to be in the \primtype{SId} namespace of the model.}
-(References: SBML L3V2 \sec{sec:idnameattribs}.)
+(References: SBML L3V1 Section 3.3; SBML L3V2 \sec{sec:idnameattribs}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10302.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10302.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10302.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
The value of the attribute \token{id} of every \UnitDefinition object must
be unique across the set of all the \UnitDefinition objects in the entire
-model. (References: SBML L3V2 \sec{sec:idnameattribs}
+model. (References: SBML L3V1 Sections 3.3 and 4.4; SBML L3V2 \sec{sec:idnameattribs}
and~\sec{sec:unitdefinitions}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10303.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10303.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10303.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
The value of the attribute \token{id} of every \LocalParameter object
defined within a \KineticLaw object must be unique across the set of all
such parameter definitions within that particular \KineticLaw instance.
-(References: SBML L3V2 \sec{sec:identifiers} and
+(References: SBML L3V1 Sections 3.3.1 and 4.11.5; SBML L3V2 \sec{sec:identifiers} and
\sec{subsec:kinetic-law}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10304.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10304.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10304.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
\RateRule objects must be unique across the set of all \AssignmentRule and
\RateRule objects in a model. In other words, a given model component
cannot be the subject of both an assignment rule and a rate rule
-simultaneously. (References: SBML L3V2 \sec{sec:assignmentrule}.)
+simultaneously. (References: SBML L3V1 Section 4.9.3; SBML L3V2 \sec{sec:assignmentrule}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10305.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10305.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10305.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
each \EventAssignment subobject must be unique across the set of all such
\EventAssignment subobjects within that particular \Event object. In other
words, a single \Event cannot make more than one assignment to the same
-model component. (References: SBML L3V2 ~\sec{sec:eventassignment}.)
+model component. (References: SBML SBML L3V1 Section 4.12.5; L3V2 ~\sec{sec:eventassignment}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10306.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10306.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10306.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,5 +2,5 @@
\EventAssignment object cannot also appear as the value of the
\token{variable} attribute in an \AssignmentRule object. In other words, a
given model component cannot be the subject of both an assignment rule and
-an assignment by an event. (References: SBML L3V2
+an assignment by an event. (References: SBML L3V1 Section 4.12.5; SBML L3V2
\sec{sec:eventassignment}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10307.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10307.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10307.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
Every \token{metaid} attribute value must be unique across the set of all
-\token{metaid} values in a model. (References: SBML L3V2
+\token{metaid} values in a model. (References: SBML L3V1 Sections 3.2.1 and 3.1.6; SBML L3V2
\sec{sec:metaid} and~\sec{sec:id}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10308.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10308.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10308.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
The value of the attribute \token{sboTerm} must always conform to the
syntax of the SBML data type \token{SBOTerm}, which is a string consisting
of the characters `S', `B', `O', ':', followed by exactly seven digits.
-(References: SBML L3V2 \sec{sec:sboterm-type}.)
+(References: SBML L3V1 Section 3.1.11; SBML L3V2 \sec{sec:sboterm-type}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10309.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10309.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10309.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
The value of a \token{metaid} attribute must always conform to the syntax
-of the XML data type \token{ID}. (References: SBML L3V2
+of the XML data type \token{ID}. (References: SBML L3V1 Sections 3.2.1 and 3.1.6; SBML L3V2
\sec{sec:metaid} and~\sec{sec:id}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10310.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10310.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10310.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
The value of an \token{id} attribute must always conform to the syntax of
-the SBML data type \token{SId}. (References: SBML L3V2
+the SBML data type \token{SId}. (References: SBML L3V1 Section 3.1.7; SBML L3V2
\sec{sec:sid}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10311.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10311.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10311.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -5,5 +5,5 @@
elements, and the \token{substanceUnits}, \token{volumeUnits},
\token{areaUnits}, \token{lengthUnits}, \token{timeUnits} and
\token{extentUnits} on \Model) must always conform to the syntax of the
-SBML data type \primtype{UnitSId}. (References: SBML L3V2
+SBML data type \primtype{UnitSId}. (References: SBML L3V1 Section 3.1.9; SBML L3V2
\sec{sec:unitsid}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10312.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10312.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10312.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,2 +1,2 @@
The value of a \token{name} attribute must always conform to the syntax
-of type \token{string}. (References: SBML L3V2 \sec{sec:string}.)
+of type \token{string}. (References: SBML L3V1 Section 3.1.1; SBML L3V2 \sec{sec:string}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10313.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10313.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10313.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -37,5 +37,5 @@
\val{volt},
\val{watt}, or
\val{weber}.
-(References: SBML L3v1 Section 4.4.2; SBML L3V2 \sec{sec:unit-structure}.)
+(References: SBML L3V1 Section 4.4.2; SBML L3V2 \sec{sec:unit-structure}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10401.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10401.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10401.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,2 +1,2 @@
Every top-level XML element within an \Annotation object must have an XML
-namespace declared. (References: SBML L3V2 \sec{sec:annotation-use}.)
+namespace declared. (References: SBML L3V1 Section 3.2.4; SBML L3V2 \sec{sec:annotation-use}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10402.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10402.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10402.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
A given XML namespace cannot be the namespace of more than one top-level
-element within a given \Annotation object. (References: SBML L3V2
+element within a given \Annotation object. (References: SBML L3V1 Section 3.2.4; SBML L3V2
\sec{sec:annotation-use}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10404.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10404.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10404.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
A given SBML element may contain at most one \Annotation subobject.
-(References: SBML L3V2 \sec{sec:sbase}.)
+(References: SBML L3V1 Section 3.2; SBML L3V2 \sec{sec:sbase}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10501.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10501.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10501.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,3 +1,3 @@
The units of the expressions used as arguments to a function call
should match the units expected for the arguments of that function.
-(References: SBML L3V2 \sec{sec:formulas}.)
+(References: SBML L3V1 Section 3.4; SBML L3V2 \sec{sec:formulas}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10503.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10503.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10503.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,4 +1,4 @@
The unit of measurement associated with the mathematical formula in the
MathML \token{math} element of every \KineticLaw object in a model should
-be identical to all \KineticLaw objects in the model. (References: SBML
+be identical to all \KineticLaw objects in the model. (References: SBML L3V1 Section 3.4; SBML
L3V2 \sec{sec:formulas}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10511.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10511.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10511.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
object refers to a \Compartment object, the unit of measurement associated
with the mathematical expression in the rule's MathML \token{math} element
should be consistent with the unit of that compartment's size.
-(References: SBML L3V2 \sec{sec:assignmentrule}.)
+(References: SBML L3V1 Section 4.9.3; SBML L3V2 \sec{sec:assignmentrule}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10512.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10512.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10512.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
object refers to a \Species object, the unit of measurement associated with
the mathematical expression in the rule's MathML \token{math} element
should be consistent with the unit of that species' quantity. (References:
-SBML L3V2 \sec{sec:assignmentrule}.)
+SBML L3V1 Section 4.9.3; SBML L3V2 \sec{sec:assignmentrule}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10513.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10513.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10513.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
object refers to a \Parameter object, the unit of measurement associated
with the mathematical expression in the rule's MathML \token{math} element
should be consistent with the unit declared for that parameter's value.
-(References: SBML L3V2 \sec{sec:assignmentrule}.)
+(References: SBML L3V1 Section 4.9.3; SBML L3V2 \sec{sec:assignmentrule}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10514.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10514.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10514.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
When the value of the attribute \token{variable} in an \AssignmentRule
object refers to a \SpeciesReference object, the unit of measurement
associated with the rule's right-hand side should be consistent with the
-unit of stoichiometry, that is, \token{dimensionless}. (References: SBML
+unit of stoichiometry, that is, \token{dimensionless}. (References: SBML L3V1 Section 4.9.3; SBML
L3V2 \sec{sec:assignmentrule}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10521.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10521.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10521.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
When the value of the attribute \token{variable} in an \InitialAssignment
object refers to a \Compartment object, the unit of measurement associated
with the \InitialAssignment's \token{math} expression should be consistent
-with the unit of that compartment's size. (References: SBML L3V2
+with the unit of that compartment's size. (References: SBML L3V1 Section 4.8; SBML L3V2
\sec{sec:initialAssignment}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10522.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10522.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10522.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
When the value of the attribute \token{variable} in an \InitialAssignment
object refers to a \Species object, the unit of measurement associated with
the \InitialAssignment's \token{math} expression should be consistent with
-the unit of that species' quantity. (References: SBML L3V2
+the unit of that species' quantity. (References: SBML L3V1 Section 4.8; SBML L3V2
\sec{sec:initialAssignment}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10523.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10523.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10523.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,5 +1,5 @@
When the value of the attribute \token{variable} in an \InitialAssignment
object refers to a \Parameter object, the unit of measurement associated
with the \InitialAssignment's \token{math} expression should be consistent
-with the unit declared for that parameter's value. (References: L2V2 SBML
+with the unit declared for that parameter's value. (References: SBML L3V1 Section 4.8; SBML
L3V2 \sec{sec:initialAssignment}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10524.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10524.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10524.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -2,4 +2,4 @@
object refers to a \SpeciesReference object, the unit of measurement
associated with the \InitialAssignment's \token{math} expression should be
consistent with the unit of stoichiometry, that is, \token{dimensionless}.
-(References: SBML L3V2 \sec{sec:initialAssignment}.)
+(References: SBML L3V1 Section 4.8; SBML L3V2 \sec{sec:initialAssignment}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10531.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10531.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10531.tex 2015-05-15 19:46:28 UTC (rev 22263)
@@ -1,6 +1,6 @@
When the value of the attribute \token{variable} in a \RateRule object
refers to a \Compartment object, the unit of measurement associated with
the \RateRule's \token{math} expression should be consistent with \{unit of
-compartment size\}/\{unit of \emph{time}\}. (References: SBML L3V2
+compartment size\}/\{unit of \emph{time}\}. (References: SBML L3V1 Sections 4.5.4, 4.2.4, and 4.9.4; SBML L3V2
\sec{sec:compartment-units}, \sec{sec:timeunits}
and~\sec{sec:raterule}.)
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10532.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10532.tex 2015-05-15 17:45:01 UTC (rev 22262)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10532.tex 2015-0...
[truncated message content] |
|
From: <luc...@us...> - 2015-05-15 17:45:04
|
Revision: 22262
http://sourceforge.net/p/sbml/code/22262
Author: luciansmith
Date: 2015-05-15 17:45:01 +0000 (Fri, 15 May 2015)
Log Message:
-----------
Fix for issue 284 (https://sourceforge.net/p/sbml/sbml-specifications/284/): Change URL for miriam URI list.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex 2015-05-15 03:05:39 UTC (rev 22261)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/annotations.tex 2015-05-15 17:45:01 UTC (rev 22262)
@@ -314,9 +314,9 @@
one may change (for example, to use updated URLs). The form of
the URIs will always have the form \emph{resource:identifier}. An
up-to-date list and explanations of the URIs are available online
-at the address \url{http://biomodels.net/qualifiers}. Each
-entry lists the relation elements in which the given URI can be
-appropriately embedded. The URI rule list will evolve with the
+at the address \changed{\url{http://www.ebi.ac.uk/miriam/main/collections}. Each
+entry lists the database in question, the URI to be used to reference that database, and example URIs for referencing particular entries in those databases.}
+The URI rule list will evolve with the
evolution of databases and resources.
Note this means that all \token{rdf:resource} \emph{must} be
|
|
From: <mh...@us...> - 2015-05-15 03:05:41
|
Revision: 22261
http://sourceforge.net/p/sbml/code/22261
Author: mhucka
Date: 2015-05-15 03:05:39 +0000 (Fri, 15 May 2015)
Log Message:
-----------
Set keyword expansion and removed carriage returns.
Modified Paths:
--------------
trunk/specifications/sbml-level-2/version-5/schema/sbml-mathml.xsd
Property Changed:
----------------
trunk/specifications/sbml-level-2/version-5/schema/sbml-mathml.xsd
Modified: trunk/specifications/sbml-level-2/version-5/schema/sbml-mathml.xsd
===================================================================
--- trunk/specifications/sbml-level-2/version-5/schema/sbml-mathml.xsd 2015-05-14 21:01:17 UTC (rev 22260)
+++ trunk/specifications/sbml-level-2/version-5/schema/sbml-mathml.xsd 2015-05-15 03:05:39 UTC (rev 22261)
@@ -1,273 +1,273 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Filename : sbml-mathml.xsd
- * Description : Schema for the MathML subset used by SBML L2.
- * Author(s) : Andrew Finney, Michael Hucka
- * Organization: SBML Team <sbm...@ca...>
- * Revision : $Id: sbml-mathml.xsd 7734 2008-07-24 23:08:08Z mhucka $
- * $HeadURL: https://svn.code.sf.net/p/sbml/code/trunk/specifications/sbml-level-2/sbml-mathml/sbml-mathml.xsd $
- *
- * Copyright 2003-2006 California Institute of Technology, the Japan Science
- * and Technology Corporation, and the University of Hertfordshire.
- *
- * This software is licensed according to the terms described in the file
- * named "LICENSE.txt" included with this distribution and available
- * online at http://sbml.org/xml-schemas/LICENSE.txt
- *
- * Summary:
- *
- * This is a reduced version of the XML Schema for MathML 2.0. It
- * corresponds to the subset of MathML 2.0 used in SBML Level 2, and
- * should be used by validating XML parsers instead of the actual
- * MathML XML Schema when validating SBML files. To accomplish that,
- * changed the value of the attribute 'schemaLocation' in the SBML
- * XML Schema file (sbml.xsd) to refer to a copy of this Schema file
- * on your computer's local hard disk.
--->
-<xs:schema xmlns="http://www.w3.org/1998/Math/MathML"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.w3.org/1998/Math/MathML"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified">
- <xs:attributeGroup name="MathAttributes">
- <xs:attribute name="class" type="xs:NMTOKENS" use="optional"/>
- <xs:attribute name="style" type="xs:string" use="optional"/>
- <xs:attribute name="id" type="xs:ID" use="optional"/>
- </xs:attributeGroup>
- <xs:complexType name="MathBase">
- <xs:attributeGroup ref="MathAttributes"/>
- </xs:complexType>
- <xs:attributeGroup name="CnAttributes">
- <xs:attribute name="type">
- <xs:simpleType>
- <xs:restriction base="xs:NMTOKEN">
- <xs:enumeration value="e-notation"/>
- <xs:enumeration value="integer"/>
- <xs:enumeration value="rational"/>
- <xs:enumeration value="real"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attributeGroup ref="MathAttributes"/>
- </xs:attributeGroup>
- <xs:complexType name="SepType"/>
- <xs:complexType name="Cn" mixed="true">
- <xs:choice minOccurs="0">
- <xs:element name="sep" type="SepType"/>
- </xs:choice>
- <xs:attributeGroup ref="CnAttributes"/>
- </xs:complexType>
- <xs:complexType name="Ci">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attributeGroup ref="MathAttributes"/>
- <xs:attribute name="definitionURL" type="xs:string"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:simpleType name="CsymbolURI">
- <xs:restriction base="xs:string">
- <xs:enumeration value="http://www.sbml.org/sbml/symbols/time"/>
- <xs:enumeration value="http://www.sbml.org/sbml/symbols/delay"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:complexType name="Csymbol">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="encoding" use="required" fixed="text"/>
- <xs:attribute name="definitionURL" type="CsymbolURI" use="required"/>
- <xs:attributeGroup ref="MathAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="NodeContainer">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:group ref="Node"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="Apply">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:sequence>
- <xs:choice>
- <xs:element name="ci" type="Ci"/>
- <xs:element name="csymbol" type="Csymbol"/>
- <xs:element name="eq" type="MathBase"/>
- <xs:element name="neq" type="MathBase"/>
- <xs:element name="gt" type="MathBase"/>
- <xs:element name="lt" type="MathBase"/>
- <xs:element name="geq" type="MathBase"/>
- <xs:element name="leq" type="MathBase"/>
- <xs:element name="plus" type="MathBase"/>
- <xs:element name="minus" type="MathBase"/>
- <xs:element name="times" type="MathBase"/>
- <xs:element name="divide" type="MathBase"/>
- <xs:element name="power" type="MathBase"/>
- <xs:sequence>
- <xs:element name="root" type="MathBase"/>
- <xs:element name="degree" type="NodeContainer" minOccurs="0"/>
- </xs:sequence>
- <xs:element name="abs" type="MathBase"/>
- <xs:element name="exp" type="MathBase"/>
- <xs:element name="ln" type="MathBase"/>
- <xs:sequence>
- <xs:element name="log" type="MathBase"/>
- <xs:element name="logbase" type="NodeContainer" minOccurs="0"/>
- </xs:sequence>
- <xs:element name="floor" type="MathBase"/>
- <xs:element name="ceiling" type="MathBase"/>
- <xs:element name="factorial" type="MathBase"/>
- <xs:element name="and" type="MathBase"/>
- <xs:element name="or" type="MathBase"/>
- <xs:element name="xor" type="MathBase"/>
- <xs:element name="not" type="MathBase"/>
- <xs:element name="sin" type="MathBase"/>
- <xs:element name="cos" type="MathBase"/>
- <xs:element name="tan" type="MathBase"/>
- <xs:element name="sec" type="MathBase"/>
- <xs:element name="csc" type="MathBase"/>
- <xs:element name="cot" type="MathBase"/>
- <xs:element name="sinh" type="MathBase"/>
- <xs:element name="cosh" type="MathBase"/>
- <xs:element name="tanh" type="MathBase"/>
- <xs:element name="sech" type="MathBase"/>
- <xs:element name="csch" type="MathBase"/>
- <xs:element name="coth" type="MathBase"/>
- <xs:element name="arcsin" type="MathBase"/>
- <xs:element name="arccos" type="MathBase"/>
- <xs:element name="arctan" type="MathBase"/>
- <xs:element name="arcsec" type="MathBase"/>
- <xs:element name="arccsc" type="MathBase"/>
- <xs:element name="arccot" type="MathBase"/>
- <xs:element name="arcsinh" type="MathBase"/>
- <xs:element name="arccosh" type="MathBase"/>
- <xs:element name="arctanh" type="MathBase"/>
- <xs:element name="arcsech" type="MathBase"/>
- <xs:element name="arccsch" type="MathBase"/>
- <xs:element name="arccoth" type="MathBase"/>
- </xs:choice>
- <xs:group ref="Node" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="Piece">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:group ref="Node" minOccurs="2" maxOccurs="2"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="Otherwise">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:group ref="Node"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="Piecewise">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:sequence>
- <xs:element name="piece" type="Piece" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="otherwise" type="Otherwise" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:attributeGroup name="AnnotationAttributes">
- <xs:attributeGroup ref="MathAttributes"/>
- <xs:attribute name="encoding" type="xs:string" use="required"/>
- </xs:attributeGroup>
- <xs:complexType name="Annotation">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attributeGroup ref="AnnotationAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="Annotation-xml">
- <xs:sequence maxOccurs="unbounded">
- <xs:any processContents="skip"/>
- </xs:sequence>
- <xs:attributeGroup ref="AnnotationAttributes"/>
- </xs:complexType>
- <xs:complexType name="Semantics">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:sequence>
- <xs:choice>
- <xs:group ref="Node"/>
- <xs:element name="lambda" type="Lambda"/>
- </xs:choice>
- <xs:sequence maxOccurs="unbounded">
- <xs:choice>
- <xs:element name="annotation" type="Annotation"/>
- <xs:element name="annotation-xml" type="Annotation-xml"/>
- </xs:choice>
- </xs:sequence>
- </xs:sequence>
- <xs:attribute name="definitionURL" type="xs:anyURI" use="optional"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:group name="Node">
- <xs:choice>
- <xs:element name="apply" type="Apply"/>
- <xs:element name="cn" type="Cn"/>
- <xs:element name="ci" type="Ci"/>
- <xs:element name="csymbol" type="Csymbol"/>
- <xs:element name="true" type="MathBase"/>
- <xs:element name="false" type="MathBase"/>
- <xs:element name="notanumber" type="MathBase"/>
- <xs:element name="pi" type="MathBase"/>
- <xs:element name="infinity" type="MathBase"/>
- <xs:element name="exponentiale" type="MathBase"/>
- <xs:element name="semantics" type="Semantics"/>
- <xs:element name="piecewise" type="Piecewise"/>
- </xs:choice>
- </xs:group>
- <xs:complexType name="Bvar">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:sequence>
- <xs:element name="ci" type="Ci"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="Lambda">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:sequence>
- <xs:element name="bvar" type="Bvar"
- minOccurs="0" maxOccurs="unbounded"/>
- <xs:group ref="Node"/>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="Math">
- <xs:complexContent>
- <xs:extension base="MathBase">
- <xs:choice>
- <xs:group ref="Node"/>
- <xs:element name="lambda" type="Lambda"/>
- </xs:choice>
- </xs:extension>
- </xs:complexContent>
- <!-- Most <math> elements in SBML can have a variety of constructs, but in
- the definitions of user-defined functions, <math> elements must contain a
- single <lambda>. The way this is handled in this schema is through the use
- of a group element that permits either a lambda or a more general MathML
- content tree. The latter is expressed in this schema using a complex type
- called "Node". It is called a node because it is a node of a tree
- structure. -->
- </xs:complexType>
- <xs:element name="math" type="Math">
- <!--This is the top-level element for a 'math' container in SBML.-->
- </xs:element>
-</xs:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Filename : sbml-mathml.xsd
+ * Description : Schema for the MathML subset used by SBML L2.
+ * Author(s) : Andrew Finney, Michael Hucka
+ * Organization: SBML Team <sbm...@ca...>
+ * Revision : $Id$
+ * $HeadURL$
+ *
+ * Copyright 2003-2015 California Institute of Technology, the Japan Science
+ * and Technology Corporation, and the University of Hertfordshire.
+ *
+ * This software is licensed according to the terms described in the file
+ * named "LICENSE.txt" included with this distribution and available
+ * online at http://sbml.org/xml-schemas/LICENSE.txt
+ *
+ * Summary:
+ *
+ * This is a reduced version of the XML Schema for MathML 2.0. It
+ * corresponds to the subset of MathML 2.0 used in SBML Level 2, and
+ * should be used by validating XML parsers instead of the actual
+ * MathML XML Schema when validating SBML files. To accomplish that,
+ * changed the value of the attribute 'schemaLocation' in the SBML
+ * XML Schema file (sbml.xsd) to refer to a copy of this Schema file
+ * on your computer's local hard disk.
+-->
+<xs:schema xmlns="http://www.w3.org/1998/Math/MathML"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/1998/Math/MathML"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+ <xs:attributeGroup name="MathAttributes">
+ <xs:attribute name="class" type="xs:NMTOKENS" use="optional"/>
+ <xs:attribute name="style" type="xs:string" use="optional"/>
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
+ </xs:attributeGroup>
+ <xs:complexType name="MathBase">
+ <xs:attributeGroup ref="MathAttributes"/>
+ </xs:complexType>
+ <xs:attributeGroup name="CnAttributes">
+ <xs:attribute name="type">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="e-notation"/>
+ <xs:enumeration value="integer"/>
+ <xs:enumeration value="rational"/>
+ <xs:enumeration value="real"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attributeGroup ref="MathAttributes"/>
+ </xs:attributeGroup>
+ <xs:complexType name="SepType"/>
+ <xs:complexType name="Cn" mixed="true">
+ <xs:choice minOccurs="0">
+ <xs:element name="sep" type="SepType"/>
+ </xs:choice>
+ <xs:attributeGroup ref="CnAttributes"/>
+ </xs:complexType>
+ <xs:complexType name="Ci">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="MathAttributes"/>
+ <xs:attribute name="definitionURL" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:simpleType name="CsymbolURI">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="http://www.sbml.org/sbml/symbols/time"/>
+ <xs:enumeration value="http://www.sbml.org/sbml/symbols/delay"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="Csymbol">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="encoding" use="required" fixed="text"/>
+ <xs:attribute name="definitionURL" type="CsymbolURI" use="required"/>
+ <xs:attributeGroup ref="MathAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="NodeContainer">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:group ref="Node"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="Apply">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:sequence>
+ <xs:choice>
+ <xs:element name="ci" type="Ci"/>
+ <xs:element name="csymbol" type="Csymbol"/>
+ <xs:element name="eq" type="MathBase"/>
+ <xs:element name="neq" type="MathBase"/>
+ <xs:element name="gt" type="MathBase"/>
+ <xs:element name="lt" type="MathBase"/>
+ <xs:element name="geq" type="MathBase"/>
+ <xs:element name="leq" type="MathBase"/>
+ <xs:element name="plus" type="MathBase"/>
+ <xs:element name="minus" type="MathBase"/>
+ <xs:element name="times" type="MathBase"/>
+ <xs:element name="divide" type="MathBase"/>
+ <xs:element name="power" type="MathBase"/>
+ <xs:sequence>
+ <xs:element name="root" type="MathBase"/>
+ <xs:element name="degree" type="NodeContainer" minOccurs="0"/>
+ </xs:sequence>
+ <xs:element name="abs" type="MathBase"/>
+ <xs:element name="exp" type="MathBase"/>
+ <xs:element name="ln" type="MathBase"/>
+ <xs:sequence>
+ <xs:element name="log" type="MathBase"/>
+ <xs:element name="logbase" type="NodeContainer" minOccurs="0"/>
+ </xs:sequence>
+ <xs:element name="floor" type="MathBase"/>
+ <xs:element name="ceiling" type="MathBase"/>
+ <xs:element name="factorial" type="MathBase"/>
+ <xs:element name="and" type="MathBase"/>
+ <xs:element name="or" type="MathBase"/>
+ <xs:element name="xor" type="MathBase"/>
+ <xs:element name="not" type="MathBase"/>
+ <xs:element name="sin" type="MathBase"/>
+ <xs:element name="cos" type="MathBase"/>
+ <xs:element name="tan" type="MathBase"/>
+ <xs:element name="sec" type="MathBase"/>
+ <xs:element name="csc" type="MathBase"/>
+ <xs:element name="cot" type="MathBase"/>
+ <xs:element name="sinh" type="MathBase"/>
+ <xs:element name="cosh" type="MathBase"/>
+ <xs:element name="tanh" type="MathBase"/>
+ <xs:element name="sech" type="MathBase"/>
+ <xs:element name="csch" type="MathBase"/>
+ <xs:element name="coth" type="MathBase"/>
+ <xs:element name="arcsin" type="MathBase"/>
+ <xs:element name="arccos" type="MathBase"/>
+ <xs:element name="arctan" type="MathBase"/>
+ <xs:element name="arcsec" type="MathBase"/>
+ <xs:element name="arccsc" type="MathBase"/>
+ <xs:element name="arccot" type="MathBase"/>
+ <xs:element name="arcsinh" type="MathBase"/>
+ <xs:element name="arccosh" type="MathBase"/>
+ <xs:element name="arctanh" type="MathBase"/>
+ <xs:element name="arcsech" type="MathBase"/>
+ <xs:element name="arccsch" type="MathBase"/>
+ <xs:element name="arccoth" type="MathBase"/>
+ </xs:choice>
+ <xs:group ref="Node" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="Piece">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:group ref="Node" minOccurs="2" maxOccurs="2"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="Otherwise">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:group ref="Node"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="Piecewise">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:sequence>
+ <xs:element name="piece" type="Piece" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="otherwise" type="Otherwise" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:attributeGroup name="AnnotationAttributes">
+ <xs:attributeGroup ref="MathAttributes"/>
+ <xs:attribute name="encoding" type="xs:string" use="required"/>
+ </xs:attributeGroup>
+ <xs:complexType name="Annotation">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="AnnotationAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="Annotation-xml">
+ <xs:sequence maxOccurs="unbounded">
+ <xs:any processContents="skip"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="AnnotationAttributes"/>
+ </xs:complexType>
+ <xs:complexType name="Semantics">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:sequence>
+ <xs:choice>
+ <xs:group ref="Node"/>
+ <xs:element name="lambda" type="Lambda"/>
+ </xs:choice>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:choice>
+ <xs:element name="annotation" type="Annotation"/>
+ <xs:element name="annotation-xml" type="Annotation-xml"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:sequence>
+ <xs:attribute name="definitionURL" type="xs:anyURI" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:group name="Node">
+ <xs:choice>
+ <xs:element name="apply" type="Apply"/>
+ <xs:element name="cn" type="Cn"/>
+ <xs:element name="ci" type="Ci"/>
+ <xs:element name="csymbol" type="Csymbol"/>
+ <xs:element name="true" type="MathBase"/>
+ <xs:element name="false" type="MathBase"/>
+ <xs:element name="notanumber" type="MathBase"/>
+ <xs:element name="pi" type="MathBase"/>
+ <xs:element name="infinity" type="MathBase"/>
+ <xs:element name="exponentiale" type="MathBase"/>
+ <xs:element name="semantics" type="Semantics"/>
+ <xs:element name="piecewise" type="Piecewise"/>
+ </xs:choice>
+ </xs:group>
+ <xs:complexType name="Bvar">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:sequence>
+ <xs:element name="ci" type="Ci"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="Lambda">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:sequence>
+ <xs:element name="bvar" type="Bvar"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xs:group ref="Node"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="Math">
+ <xs:complexContent>
+ <xs:extension base="MathBase">
+ <xs:choice>
+ <xs:group ref="Node"/>
+ <xs:element name="lambda" type="Lambda"/>
+ </xs:choice>
+ </xs:extension>
+ </xs:complexContent>
+ <!-- Most <math> elements in SBML can have a variety of constructs, but in
+ the definitions of user-defined functions, <math> elements must contain a
+ single <lambda>. The way this is handled in this schema is through the use
+ of a group element that permits either a lambda or a more general MathML
+ content tree. The latter is expressed in this schema using a complex type
+ called "Node". It is called a node because it is a node of a tree
+ structure. -->
+ </xs:complexType>
+ <xs:element name="math" type="Math">
+ <!--This is the top-level element for a 'math' container in SBML.-->
+ </xs:element>
+</xs:schema>
Property changes on: trunk/specifications/sbml-level-2/version-5/schema/sbml-mathml.xsd
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id Date Author HeadURL URL Revision
\ No newline at end of property
|
|
From: <luc...@us...> - 2015-05-14 21:01:20
|
Revision: 22260
http://sourceforge.net/p/sbml/code/22260
Author: luciansmith
Date: 2015-05-14 21:01:17 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Fix for issue 275 (https://sourceforge.net/p/sbml/sbml-specifications/275/): mention what version of SBO we are describing in the specification (but make it clear that it can change in the future).
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/sbo.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/sbo.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/sbo.tex 2015-05-14 20:41:52 UTC (rev 22259)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/sbo.tex 2015-05-14 21:01:17 UTC (rev 22260)
@@ -189,7 +189,7 @@
hierarchy of terms underneath them. At this time, we can only
begin to list some initial concepts and terms in SBO; what follows
is not meant to be complete, comprehensive or even necessarily
-consistent with future versions of SBO. The web site for SBO
+consistent with future versions of SBO. \changed{It reflects SBO as it existed in October, 2014.} The web site for SBO
(\sboref) should be consulted for the current version of the
ontology. \sec{sec:sbo-frequency-of-change} describes how
the impact of SBO changes on software applications is minimized.
|
|
From: <luc...@us...> - 2015-05-14 20:41:55
|
Revision: 22259
http://sourceforge.net/p/sbml/code/22259
Author: luciansmith
Date: 2015-05-14 20:41:52 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Small update wrt issue 273 (https://sourceforge.net/p/sbml/sbml-specifications/273/): Recommend that the SBO term 610 be used for parameters always used as booleans, cf. Chris's suggestion on that tracker item.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/components.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/components.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/components.tex 2015-05-14 20:27:56 UTC (rev 22258)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/components.tex 2015-05-14 20:41:52 UTC (rev 22259)
@@ -1951,7 +1951,7 @@
A parameter's identifier (its \token{id} attribute value) may be used in a model's mathematical expressions. The identifier stands for the value of the parameter, with a unit of measurement as described in \sec{sec:parameter-units}. It may be the target of \InitialAssignment, \EventAssignment, or \Rule objects elsewhere in a model, to set or redefine the value of the parameter.
-The type of a \Parameter is considered to be a \primtype{double}, but the identifier may be used in other contexts, most notably as a \primtype{boolean} (see \sec{sec:handling-booleans}). In fact, it is possible to have an essentially boolean \Parameter which is only assigned boolean values, and only used in boolean contexts. The units of such a \Parameter should be \token{dimensionless}.
+The type of a \Parameter is considered to be a \primtype{double}, but the identifier may be used in other contexts, most notably as a \primtype{boolean} (see \sec{sec:handling-booleans}). In fact, it is possible to have an essentially boolean \Parameter which is only assigned boolean values, and only used in boolean contexts. The units of such a \Parameter should be \token{dimensionless}. It would also be appropriate to set the \token{sboTerm} for such a \Parameter to be `logical parameter' (\val{SBO:0000602}).
\end{blockChanged}
|
|
From: <luc...@us...> - 2015-05-14 20:27:59
|
Revision: 22258
http://sourceforge.net/p/sbml/code/22258
Author: luciansmith
Date: 2015-05-14 20:27:56 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Slight update to the wording in the 'rateOf' section, to clarify that you could indeed calculate the derivative of a Reaction rate, but that this is beyond the scope of the 'rateOf' construct. (cf. issue 272, https://sourceforge.net/p/sbml/sbml-specifications/272/).
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex 2015-05-14 19:26:03 UTC (rev 22257)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex 2015-05-14 20:27:56 UTC (rev 22258)
@@ -1404,7 +1404,7 @@
this existing version.)
\begin{blockChanged}
-\item \uri{http://www.sbml.org/sbml/symbols/rateOf}. This represents the instantaneous rate of change, with respect to time, of an entity in the model. It is a function that takes a single argument, an identifier of type \primtype{SId}. The allowable identifiers for use with \emph{rateOf} in SBML \thisLVNC are those of \Compartment, \LocalParameter, \Parameter, \Species, and \SpeciesReference objects in the enclosing model; in addition, SBML Level~3 packages may define entities with mathematical meaning whose \emph{rateOf}'s can be referenced. Note that \emph{rateOf} is not needed for \Reaction objects, because their identifiers already represent the rate of change of the reaction; conversely, there is no sensible meaning to be given to the \emph{rateOf} of a \FunctionDefinition, \Event, \Priority, \Delay, or other SBML entities.
+\item \uri{http://www.sbml.org/sbml/symbols/rateOf}. This represents the instantaneous rate of change, with respect to time, of an entity in the model. It is a function that takes a single argument, an identifier of type \primtype{SId}. The allowable identifiers for use with \emph{rateOf} in SBML \thisLVNC are those of \Compartment, \LocalParameter, \Parameter, \Species, and \SpeciesReference objects in the enclosing model; in addition, SBML Level~3 packages may define entities with mathematical meaning whose \emph{rateOf}'s can be referenced. Note that \emph{rateOf} is not allowed for \Reaction objects, because their identifiers already represent the rate of change of the reaction, and calculating second derivatives is beyond the scope of this construct. Likewise, there is no sensible meaning to be given to the \emph{rateOf} of a \FunctionDefinition, \Event, \Priority, \Delay, or other SBML entities.
The intent of this \token{csymbol} is to provide a means for models to refer to quantities that must be naturally be computed as part of doing a dynamical analysis of a model. The \emph{rateOf} \token{csymbol} is not intended to provide full numerical differentiation capabilities. The value of \emph{rateOf} of a symbol can be determined more straightforwardly as follows:
\begin{enumerate}
|
|
From: <luc...@us...> - 2015-05-14 19:26:05
|
Revision: 22257
http://sourceforge.net/p/sbml/code/22257
Author: luciansmith
Date: 2015-05-14 19:26:03 +0000 (Thu, 14 May 2015)
Log Message:
-----------
'rateOf' was not actually included in the original version of this validation rule.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex 2015-05-14 18:10:23 UTC (rev 22256)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex 2015-05-14 19:26:03 UTC (rev 22257)
@@ -1,7 +1,7 @@
\changed{(This validation rule does not apply in SBML \thisLV.)}\footnote{\changed{Original rule: ``The arguments to the following MathML constructs must evaluate to numeric
values (more specifically, they must evaluate to MathML real, integer,
rational, or ``e-notation'' numbers, or the \emph{time}, \emph{delay},
-\emph{avogadro}, \changed{or \emph{rateOf}} \token{csymbol} elements): \token{abs}, \token{arccosh},
+\emph{avogadro}, \token{csymbol} elements): \token{abs}, \token{arccosh},
\token{arccos}, \token{arccoth}, \token{arccot}, \token{arccsch},
\token{arccsc}, \token{arcsech}, \token{arcsec}, \token{arcsinh},
\token{arcsin}, \token{arctanh}, \token{arctan}, \token{ceiling},
|
|
From: <luc...@us...> - 2015-05-14 18:10:25
|
Revision: 22256
http://sourceforge.net/p/sbml/code/22256
Author: luciansmith
Date: 2015-05-14 18:10:23 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Newly-compiled version of RC2 that incorporates Mike's fix to figure 8.
Modified Paths:
--------------
trunk/specifications/sbml-level-2/version-5/spec/sbml-level-2-version-5-rc2.pdf
Modified: trunk/specifications/sbml-level-2/version-5/spec/sbml-level-2-version-5-rc2.pdf
===================================================================
(Binary files differ)
|
|
From: <luc...@us...> - 2015-05-14 18:06:03
|
Revision: 22255
http://sourceforge.net/p/sbml/code/22255
Author: luciansmith
Date: 2015-05-14 18:06:00 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Update for issue 278 (https://sourceforge.net/p/sbml/sbml-specifications/278/): numerical values used in boolean contexts should have units of 'dimensionless'. When units have to match each other, boolean and dimensionless numbers count as 'matching'.
Also, a couple minor formatting fixes.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex 2015-05-14 17:56:43 UTC (rev 22254)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/preliminary.tex 2015-05-14 18:06:00 UTC (rev 22255)
@@ -1325,7 +1325,7 @@
can never enter into \mathml expressions. Nevertheless, software
authors and users should be aware of the difference.
-\changed{Further lessening the impact is the fact that SBML allows models to use boolean values in numerical contexts, and visa versa. In those cases, the boolean value \token{true} becomes the numerical value \token{1}, and the the boolean value {false} becomes the numerical value \token{0}. In both cases, the units of the resulting value is considered to be dimensionless. In the reverse case, the numerical value \token{0} becomes the boolean value \token{false}, and all other values (positive and negative) become the boolean value \token{true} (though it is suggested for clarity that the numerical value \token{1} be used when possible). Values so converted should be dimensionless before conversion. This means that strict type checking is not possible in some contexts, but the tradeoff is greater flexibility and simplicity for modelers.}
+\changed{Further lessening the impact is the fact that SBML allows models to use boolean values in numerical contexts, and visa versa. In those cases, the boolean value \token{true} becomes the numerical value \token{1}, and the the boolean value \token{false} becomes the numerical value \token{0}. In both cases, the units of the resulting value is considered to be dimensionless. In the reverse case, the numerical value \token{0} becomes the boolean value \token{false}, and all other values (positive and negative) become the boolean value \token{true} (though it is suggested for clarity that the numerical value \token{1} be used when possible). Values so converted should have units of dimensionless before conversion. This means that strict type checking is not possible in some contexts, but the tradeoff is greater flexibility and simplicity for modelers.}
\subsubsection{Handling of whitespace}
@@ -1620,11 +1620,11 @@
\begin{blockChanged}
\item Any element with mathematical meaning with no \InitialAssignment or \Rule that targets it continues to have its initial value, as defined by the relevant attribute.
- \item Any \InitialAssignment definition continues to take effect. Since these contain mathematical formulas, different values may be computed at each time step t in $t_i \leq t \leq 0$.
+ \item Any \InitialAssignment definition continues to take effect. Since these contain mathematical formulas, different values may be computed at each time step $t$ in $t_i \leq t \leq 0$.
- \item Any \AssignmentRule or \AlgebraicRule definition continues to take effect, and may not be overridden. Again, different values may be computed at each time step t in $t_i \leq t \leq 0$.
+ \item Any \AssignmentRule or \AlgebraicRule definition continues to take effect, and may not be overridden. Again, different values may be computed at each time step $t$ in $t_i \leq t \leq 0$.
- \item The identifier of any \Reaction continues to be the value of its \KineticLaw. Again, different values may be computed at each time step t in $t_i \leq t \leq 0$.
+ \item The identifier of any \Reaction continues to be the value of its \KineticLaw. Again, different values may be computed at each time step $t$ in $t_i \leq t \leq 0$.
\item The value of any \Event \Trigger continues to be the value of that \Trigger's \token{initialValue} attribute.
@@ -1802,7 +1802,7 @@
\item All arguments to the following operators should have the same
units (regardless of what those units happen to be):
\token{plus}, \token{minus}, \token{eq}, \token{neq} \token{gt},
- \token{lt}, \token{geq}, \token{leq}, \changed{\token{max}, \token{min}}.
+ \token{lt}, \token{geq}, \token{leq}, \changed{\token{max}, \token{min}}. \changed{If one or more arguments are boolean and one or more numeric, all the numeric arguments should have units of \val{dimensionless}.}
\item The unit\changed{s} associated with each argument in a call to a
\FunctionDefinition should match the unit\changed{s} expected by the
@@ -1816,7 +1816,7 @@
should have the same unit\changed{s}, regardless of what \changed{they are}.
(Without this guideline, the \token{piecewise} expression would
return values having different units depending on which case
- evaluated to true.)
+ evaluated to true.) \changed{If one or more return values are boolean and one or more numeric, all the numeric arguments should have units of \val{dimensionless}.}
\item For the \emph{delay} \token{csymbol}
(\sec{sec:csymbol-token}) function, which has the form
@@ -1833,7 +1833,7 @@
\end{blockChanged}
\item The units of each argument to the following operators should
- be \val{dimensionless}: \token{exp}, \token{ln}, \token{log},
+ be \val{dimensionless} \changed{or be boolean}: \token{exp}, \token{ln}, \token{log},
\token{factorial}, \token{sin}, \token{cos}, \token{tan},
\token{sec}, \token{csc}, \token{cot}, \token{sinh},
\token{cosh}, \token{tanh}, \token{sech}, \token{csch},
@@ -1842,6 +1842,8 @@
\token{arccosh}, \token{arctanh}, \token{arcsech},
\token{arccsch}, \token{arccoth}.
+\item \changed{Numerical values used in boolean contexts should have units of \val{dimensionless}. That is, all the arguments to the MathML logical operators \token{and}, \token{or}, \token{xor}, and \token{not}; the second argument of a MathML \token{piece} operator; the \token{trigger} element of an SBML \Event; and the \token{math} element of an SBML \Constraint, should either be boolean or have units of \token{dimensionless}.}
+
\item The two arguments to \token{power}, which are of the form
$\textit{power}\,(a,b)$ with the meaning $a^b$, should be as
follows: (1) if the second argument is an integer, then the
|
|
From: <luc...@us...> - 2015-05-14 17:56:46
|
Revision: 22254
http://sourceforge.net/p/sbml/code/22254
Author: luciansmith
Date: 2015-05-14 17:56:43 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Added missing comma to Andreas's institution.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/front-page.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/front-page.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/front-page.tex 2015-05-14 17:56:12 UTC (rev 22253)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/front-page.tex 2015-05-14 17:56:43 UTC (rev 22254)
@@ -7,7 +7,7 @@
\author{\begin{tabular}{l>{\hspace*{15pt}}r}
Michael Hucka (Chair) & \emph{California Institute of Technology, US}\\
Frank T. Bergmann & \emph{California Institute of Technology, US}\\
-Andreas Dr{\"a}ger & \emph{University of California San Diego, US}\\
+Andreas Dr{\"a}ger & \emph{University of California, San Diego, US}\\
Stefan Hoops & \emph{Virginia Bioinformatics Institute, US}\\
Sarah M. Keating & \emph{European Bioinformatics Institute, GB}\\
Nicolas Le~Nov\`{e}re & \emph{Babraham Institute, GB}\\
|
|
From: <luc...@us...> - 2015-05-14 17:56:14
|
Revision: 22253
http://sourceforge.net/p/sbml/code/22253
Author: luciansmith
Date: 2015-05-14 17:56:12 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Correction: the old version of this validation rule did not have the newly-added MathML functions listed in it.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex 2015-05-14 17:55:28 UTC (rev 22252)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/10210.tex 2015-05-14 17:56:12 UTC (rev 22253)
@@ -7,7 +7,7 @@
\token{arcsin}, \token{arctanh}, \token{arctan}, \token{ceiling},
\token{cosh}, \token{cos}, \token{coth}, \token{cot}, \token{csch},
\token{csc}, \token{divide}, \token{exp}, \token{factorial}, \token{floor},
-\token{ln}, \token{log}, \changed{\token{max}}, \changed{\token{min}}, \token{minus}, \token{plus}, \token{power},
-\changed{\token{quotient}}, \changed{\token{rem}}, \token{root}, \token{sech}, \token{sec}, \token{sinh}, \token{sin},
+\token{ln}, \token{log}, \token{minus}, \token{plus}, \token{power},
+\token{root}, \token{sech}, \token{sec}, \token{sinh}, \token{sin},
\token{tanh}, \token{tan}, and \token{times}. (References: SBML L3V2
\sec{sec:mathmltype}.)''}}
|
|
From: <luc...@us...> - 2015-05-14 17:55:31
|
Revision: 22252
http://sourceforge.net/p/sbml/code/22252
Author: luciansmith
Date: 2015-05-14 17:55:28 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Adjustment to fix for issue 268 (https://sourceforge.net/p/sbml/sbml-specifications/268/): the added validation rule now reads differently, since recursive function definitions were ultimately voted against.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20308.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20308.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20308.tex 2015-05-14 17:47:57 UTC (rev 22251)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20308.tex 2015-05-14 17:55:28 UTC (rev 22252)
@@ -1,4 +1 @@
-Inside the \token{lambda} MathML element within a \FunctionDefinition
-object, if the identifier of that object (\ie value of the
-\FunctionDefinition's \token{id} attribute) appears as an identifier within a referenced \FunctionDefinition's \token{lambda} MathML element (or as an identifier within another \FunctionDefinition whose identifier is referenced, etc.) the value of its \token{isRecursive} attribute must be \val{true}. Such usage entails a recursive function call, and this useage must be denoted explicitly. (References: SBML L3V2
-\sec{sec:functiondefinition}.)
+Inside the \token{lambda} MathML element within a \FunctionDefinition object, the identifier of that object (\ie value of the \FunctionDefinition's \token{id} attribute) may not appear as an identifier within a referenced \FunctionDefinition's \token{lambda} MathML element (or as an identifier within another \FunctionDefinition whose identifier is referenced, etc.). Such usage entails a recursive function call, which is not permitted. (References: SBML L3V2 \sec{sec:functiondefinition}.)
|
|
From: <luc...@us...> - 2015-05-14 17:48:00
|
Revision: 22251
http://sourceforge.net/p/sbml/code/22251
Author: luciansmith
Date: 2015-05-14 17:47:57 +0000 (Thu, 14 May 2015)
Log Message:
-----------
Reverting the 'isRecursive' proposed change for function definitions.
Modified Paths:
--------------
trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20303.tex
Modified: trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20303.tex
===================================================================
--- trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20303.tex 2015-05-14 01:07:56 UTC (rev 22250)
+++ trunk/specifications/sbml-level-3/version-2/core/spec/validation-rules/20303.tex 2015-05-14 17:47:57 UTC (rev 22251)
@@ -1,5 +1,6 @@
Inside the \token{lambda} MathML element within a \FunctionDefinition
-object, \changed{if} the identifier of that object (\ie value of the
-\FunctionDefinition's \token{id} attribute) \changed{appears} as the value of a
-\token{ci} element, \changed{the value of its \token{isRecursive} attribute must be \val{true}}. Such usage entails a recursive function call, \changed{and this useage must be denoted explicitly}. (References: SBML L3V2
-\sec{sec:ci-token} and~\sec{sec:function-definition-math}.)
+object, the identifier of that object (\ie value of the
+\FunctionDefinition's \token{id} attribute) cannot appear as the value of a
+\token{ci} element. Such usage would entail a recursive function call, but
+SBML functions are not permitted to be recursive. (References: SBML L3V2
+Sections~\ref{sec:ci-token} and~\ref{sec:function-definition-math}.)
|