@@ -59,6 +59,8 @@ SedAxis::SedAxis(unsigned int level, unsigned int version)
59
59
, mIsSetMax (false )
60
60
, mGrid (false )
61
61
, mIsSetGrid (false )
62
+ , mReverse (false )
63
+ , mIsSetReverse (false )
62
64
, mStyle (" " )
63
65
, mElementName(" axis" )
64
66
{
@@ -78,6 +80,8 @@ SedAxis::SedAxis(SedNamespaces *sedmlns)
78
80
, mIsSetMax (false )
79
81
, mGrid (false )
80
82
, mIsSetGrid (false )
83
+ , mReverse (false )
84
+ , mIsSetReverse (false )
81
85
, mStyle (" " )
82
86
, mElementName(" axis" )
83
87
{
@@ -97,6 +101,8 @@ SedAxis::SedAxis(const SedAxis& orig)
97
101
, mIsSetMax ( orig.mIsSetMax )
98
102
, mGrid ( orig.mGrid )
99
103
, mIsSetGrid ( orig.mIsSetGrid )
104
+ , mReverse ( orig.mReverse )
105
+ , mIsSetReverse ( orig.mIsSetReverse )
100
106
, mStyle ( orig.mStyle )
101
107
, mElementName ( orig.mElementName )
102
108
{
@@ -119,6 +125,8 @@ SedAxis::operator=(const SedAxis& rhs)
119
125
mIsSetMax = rhs.mIsSetMax ;
120
126
mGrid = rhs.mGrid ;
121
127
mIsSetGrid = rhs.mIsSetGrid ;
128
+ mReverse = rhs.mReverse ;
129
+ mIsSetReverse = rhs.mIsSetReverse ;
122
130
mStyle = rhs.mStyle ;
123
131
mElementName = rhs.mElementName ;
124
132
}
@@ -196,6 +204,16 @@ SedAxis::getGrid() const
196
204
}
197
205
198
206
207
+ /*
208
+ * Returns the value of the "reverse" attribute of this SedAxis.
209
+ */
210
+ bool
211
+ SedAxis::getReverse () const
212
+ {
213
+ return mReverse ;
214
+ }
215
+
216
+
199
217
/*
200
218
* Returns the value of the "style" attribute of this SedAxis.
201
219
*/
@@ -246,6 +264,16 @@ SedAxis::isSetGrid() const
246
264
}
247
265
248
266
267
+ /*
268
+ * Predicate returning @c true if this SedAxis's "reverse" attribute is set.
269
+ */
270
+ bool
271
+ SedAxis::isSetReverse () const
272
+ {
273
+ return mIsSetReverse ;
274
+ }
275
+
276
+
249
277
/*
250
278
* Predicate returning @c true if this SedAxis's "style" attribute is set.
251
279
*/
@@ -328,6 +356,18 @@ SedAxis::setGrid(bool grid)
328
356
}
329
357
330
358
359
+ /*
360
+ * Sets the value of the "reverse" attribute of this SedAxis.
361
+ */
362
+ int
363
+ SedAxis::setReverse (bool reverse)
364
+ {
365
+ mReverse = reverse;
366
+ mIsSetReverse = true ;
367
+ return LIBSEDML_OPERATION_SUCCESS;
368
+ }
369
+
370
+
331
371
/*
332
372
* Sets the value of the "style" attribute of this SedAxis.
333
373
*/
@@ -417,6 +457,26 @@ SedAxis::unsetGrid()
417
457
}
418
458
419
459
460
+ /*
461
+ * Unsets the value of the "reverse" attribute of this SedAxis.
462
+ */
463
+ int
464
+ SedAxis::unsetReverse ()
465
+ {
466
+ mReverse = false ;
467
+ mIsSetReverse = false ;
468
+
469
+ if (isSetReverse () == false )
470
+ {
471
+ return LIBSEDML_OPERATION_SUCCESS;
472
+ }
473
+ else
474
+ {
475
+ return LIBSEDML_OPERATION_FAILED;
476
+ }
477
+ }
478
+
479
+
420
480
/*
421
481
* Unsets the value of the "style" attribute of this SedAxis.
422
482
*/
@@ -570,6 +630,12 @@ SedAxis::getAttribute(const std::string& attributeName, bool& value) const
570
630
return_value = LIBSEDML_OPERATION_SUCCESS;
571
631
}
572
632
633
+ if (attributeName == " reverse" )
634
+ {
635
+ value = getReverse ();
636
+ return_value = LIBSEDML_OPERATION_SUCCESS;
637
+ }
638
+
573
639
return return_value;
574
640
}
575
641
@@ -706,6 +772,10 @@ SedAxis::isSetAttribute(const std::string& attributeName) const
706
772
{
707
773
value = isSetGrid ();
708
774
}
775
+ else if (attributeName == " reverse" )
776
+ {
777
+ value = isSetReverse ();
778
+ }
709
779
else if (attributeName == " style" )
710
780
{
711
781
value = isSetStyle ();
@@ -732,6 +802,10 @@ SedAxis::setAttribute(const std::string& attributeName, bool value)
732
802
{
733
803
return_value = setGrid (value);
734
804
}
805
+ else if (attributeName == " reverse" )
806
+ {
807
+ return_value = setReverse (value);
808
+ }
735
809
736
810
return return_value;
737
811
}
@@ -853,6 +927,10 @@ SedAxis::unsetAttribute(const std::string& attributeName)
853
927
{
854
928
value = unsetGrid ();
855
929
}
930
+ else if (attributeName == " reverse" )
931
+ {
932
+ value = unsetReverse ();
933
+ }
856
934
else if (attributeName == " style" )
857
935
{
858
936
value = unsetStyle ();
@@ -884,6 +962,8 @@ SedAxis::addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER
884
962
885
963
attributes.add (" grid" );
886
964
965
+ attributes.add (" reverse" );
966
+
887
967
attributes.add (" style" );
888
968
}
889
969
@@ -1027,6 +1107,23 @@ SedAxis::readAttributes(
1027
1107
}
1028
1108
}
1029
1109
1110
+ //
1111
+ // reverse bool (use = "optional" )
1112
+ //
1113
+
1114
+ numErrs = log ? log ->getNumErrors () : 0 ;
1115
+ mIsSetReverse = attributes.readInto (" reverse" , mReverse );
1116
+
1117
+ if (mIsSetReverse == false )
1118
+ {
1119
+ if (log && log ->getNumErrors () == numErrs + 1 &&
1120
+ log ->contains (XMLAttributeTypeMismatch))
1121
+ {
1122
+ log ->remove (XMLAttributeTypeMismatch);
1123
+ log ->logError (SedmlAxisReverseMustBeBoolean, level, version);
1124
+ }
1125
+ }
1126
+
1030
1127
//
1031
1128
// style SIdRef (use = "optional" )
1032
1129
//
@@ -1090,6 +1187,11 @@ SedAxis::writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
1090
1187
stream.writeAttribute (" grid" , getPrefix (), mGrid );
1091
1188
}
1092
1189
1190
+ if (isSetReverse () == true )
1191
+ {
1192
+ stream.writeAttribute (" reverse" , getPrefix (), mReverse );
1193
+ }
1194
+
1093
1195
if (isSetStyle () == true )
1094
1196
{
1095
1197
stream.writeAttribute (" style" , getPrefix (), mStyle );
@@ -1207,6 +1309,17 @@ SedAxis_getGrid(const SedAxis_t * sa)
1207
1309
}
1208
1310
1209
1311
1312
+ /*
1313
+ * Returns the value of the "reverse" attribute of this SedAxis_t.
1314
+ */
1315
+ LIBSEDML_EXTERN
1316
+ int
1317
+ SedAxis_getReverse (const SedAxis_t* sa)
1318
+ {
1319
+ return (sa != NULL ) ? static_cast <int >(sa->getReverse ()) : 0 ;
1320
+ }
1321
+
1322
+
1210
1323
/*
1211
1324
* Returns the value of the "style" attribute of this SedAxis_t.
1212
1325
*/
@@ -1267,6 +1380,17 @@ SedAxis_isSetGrid(const SedAxis_t * sa)
1267
1380
}
1268
1381
1269
1382
1383
+ /*
1384
+ * Predicate returning @c 1 (true) if this SedAxis_t's "reverse" attribute is set.
1385
+ */
1386
+ LIBSEDML_EXTERN
1387
+ int
1388
+ SedAxis_isSetReverse (const SedAxis_t* sa)
1389
+ {
1390
+ return (sa != NULL ) ? static_cast <int >(sa->isSetReverse ()) : 0 ;
1391
+ }
1392
+
1393
+
1270
1394
/*
1271
1395
* Predicate returning @c 1 (true) if this SedAxis_t's "style" attribute is
1272
1396
* set.
@@ -1334,6 +1458,17 @@ SedAxis_setGrid(SedAxis_t * sa, int grid)
1334
1458
}
1335
1459
1336
1460
1461
+ /*
1462
+ * Sets the value of the "reverse" attribute of this SedAxis_t.
1463
+ */
1464
+ LIBSEDML_EXTERN
1465
+ int
1466
+ SedAxis_setReverse (SedAxis_t* sa, int reverse)
1467
+ {
1468
+ return (sa != NULL ) ? sa->setReverse (reverse) : LIBSEDML_INVALID_OBJECT;
1469
+ }
1470
+
1471
+
1337
1472
/*
1338
1473
* Sets the value of the "style" attribute of this SedAxis_t.
1339
1474
*/
@@ -1389,6 +1524,17 @@ SedAxis_unsetGrid(SedAxis_t * sa)
1389
1524
}
1390
1525
1391
1526
1527
+ /*
1528
+ * Unsets the value of the "reverse" attribute of this SedAxis_t.
1529
+ */
1530
+ LIBSEDML_EXTERN
1531
+ int
1532
+ SedAxis_unsetReverse (SedAxis_t* sa)
1533
+ {
1534
+ return (sa != NULL ) ? sa->unsetReverse () : LIBSEDML_INVALID_OBJECT;
1535
+ }
1536
+
1537
+
1392
1538
/*
1393
1539
* Unsets the value of the "style" attribute of this SedAxis_t.
1394
1540
*/
0 commit comments