1 using System;
2 using System.Runtime.InteropServices;
3 
4 //------------------------------------------------------------------------------
5 // <auto-generated />
6 //
7 // This file was automatically generated by SWIG (http://www.swig.org).
8 // Version 4.0.2
9 //
10 // Do not make changes to this file unless you know what you are doing--modify
11 // the SWIG interface file instead.
12 //------------------------------------------------------------------------------
13 
14 namespace libsbmlcs {
15 
16  using System;
17  using System.Runtime.InteropServices;
18 
19 /**
20  * @sbmlpackage{core}
21  *
22 @htmlinclude pkg-marker-core.html A definition of a unit used in an SBML model.
23  *
24  * Units of measurement may be supplied in a number of contexts in an SBML
25  * model.  The SBML unit definition facility uses two classes of objects,
26  * UnitDefinition and Unit.  The approach to defining units in SBML is
27  * compositional; for example, <em>meter second<sup> &ndash;2</sup></em> is
28  * constructed by combining a Unit object representing <em>meter</em> with
29  * another Unit object representing <em>second<sup> &ndash;2</sup></em>.
30  * The combination is wrapped inside a UnitDefinition, which provides for
31  * assigning an identifier and optional name to the combination.  The
32  * identifier can then be referenced from elsewhere in a model.  Thus, the
33  * UnitDefinition class is the container, and Unit instances are placed
34  * inside UnitDefinition instances.
35  *
36  * Two points are worth discussing in the context of SBML units.  First,
37  * unit declarations in SBML models are @em optional.  The consequence of
38  * this is that a model must be numerically self-consistent independently
39  * of unit declarations, for the benefit of software tools that cannot
40  * interpret or manipulate units.  Unit declarations in SBML are thus more
41  * akin to a type of annotation; they can indicate intentions, and can be
42  * used by model readers for checking the consistency of the model,
43  * labeling simulation output, etc., but any transformations of values
44  * implied by different units must be incorporated @em explicitly into a
45  * model.
46  *
47  * Second, the vast majority of situations that require new SBML unit
48  * definitions involve simple multiplicative combinations of base units and
49  * factors.  An example is <em>moles per litre per second</em>.  What
50  * distinguishes these sorts of unit definitions from more complex ones is
51  * that they may be expressed without the use of an additive offset from a
52  * zero point.  The use of offsets complicates all unit definition systems,
53  * yet in the domain of SBML, the real-life cases requiring offsets are few
54  * (and in fact, to the best of our knowledge, only involve temperature).
55  * Consequently, the SBML unit system has been consciously designed to
56  * simplify implementation of unit support for the most common cases in
57  * systems biology.  The cost of this simplification is to require units
58  * with offsets to be handled explicitly by the modeler.
59  *
60  * @section unitdef-summary Summary of the UnitDefinition construct
61  *
62  * UnitDefinition has two attributes and one subelement.  The two
63  * attributes are 'id' and 'name', and the subelement is ListOfUnits.
64  *
65  * The required attribute 'id' and optional attribute 'name' are both
66  * strings.  The 'id' attribute is used to give the defined unit a unique
67  * identifier by which other parts of an SBML model definition can refer to
68  * it.  The 'name' attribute is intended to be used for giving the unit
69  * definition an optional human-readable name.  Please see the <a
70  * href='#unitdef-id'>next section</a> for information about the values
71  * permitted for 'id'.
72  *
73  * A UnitDefinition may contain exactly one ListOfUnits, and this list
74  * may contain one or more Unit definitions; see the definitions of these
75  * other object classes for more information about them.  In SBML
76  * Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1, if the ListOfUnits
77  * was present, it must have one or more Unit definitions.  In SBML
78  * Level&nbsp;3 Version&nbsp;2, this restriction was relaxed, and
79  * a ListOfUnits was allowed to be empty.  In either case, if a
80  * UnitDefinition had no child Unit elements, the unit was considered
81  * to be undefined.
82  *
83  * The following
84  * example illustrates a complete unit definition (when written in XML)
85  * when all the pieces are combined together.  This defines 'mmls'
86  * to be millimoles per litre per second.
87  * @verbatim
88  <listOfUnitDefinitions>
89      <unitDefinition id='mmls'>
90          <listOfUnits>
91              <unit kind='mole'   scale='-3'/>
92              <unit kind='litre'  exponent='-1'/>
93              <unit kind='second' exponent='-1'/>
94          </listOfUnits>
95      </unitDefinition>
96  </listOfUnitDefinitions>
97  @endverbatim
98  *
99  * @section unitdef-id Special considerations for Unit object identifiers
100  *
101  * The attribute 'id' in UnitDefinition cannot be given simply any value,
102  * and the precise details of the values permitted differ slightly between
103  * Levels of SBML:
104  * <ul>
105  *
106  * <li> The 'id' of a UnitDefinition must @em not contain a value from the
107  * list of SBML's predefined base unit names (i.e., the strings @c gram,
108  * @c litre, etc.).  In SBML Level&nbsp;3, this list consists of the
109  * following:
110  *
111  *
112  *
113 <table border='0' class='centered text-table width80 normal-font code'
114        style='border: none !important'>
115 <tr>
116 <td>ampere</td><td>farad</td><td>joule</td><td>lux</td><td>radian</td><td>volt</td>
117 </tr>
118 <tr>
119 <td>avogadro</td><td>gram</td><td>katal</td><td>metre</td><td>second</td><td>watt</td>
120 </tr>
121 <tr>
122 <td>becquerel</td><td>gray</td><td>kelvin</td><td>mole</td><td>siemens</td><td>weber</td>
123 </tr>
124 <tr>
125 <td>candela</td><td>henry</td><td>kilogram</td><td>newton</td><td>sievert</td>
126 </tr>
127 <tr>
128 <td>coulomb</td><td>hertz</td><td>litre</td><td>ohm</td><td>steradian</td>
129 </tr>
130 <tr>
131 <td>dimensionless</td><td>item</td><td>lumen</td><td>pascal</td><td>tesla</td>
132 </tr>
133 </table>
134  *
135  *
136  *
137  * This list of predefined base units is nearly identical in SBML
138  * Level&nbsp;2 Version&nbsp;4, the exception being that Level&nbsp;2 does
139  * not define @c avogadro.  SBML Level&nbsp;2 Version&nbsp;1 (and @em only
140  * this Level+Version combination) provides an additional predefined unit
141  * name, @c Celsius, not available in Level&nbsp;3.  Finally, SBML
142  * Level&nbsp;1 Versions&nbsp;2&ndash;3 provide two more additional
143  * predefined unit names, @c meter and @c liter.  This is explained in
144  * somewhat greater detail in the description of the Unit class.
145  *
146  * <ul>
147  * <li> In SBML Level&nbsp;2 (all Versions), there is an additional set of
148  * reserved identifiers: @c substance, @c volume, @c area, @c length, and
149  * @c time.  Using one of these values for the attribute 'id' of a
150  * UnitDefinition has the effect of redefining the model-wide default units
151  * for the corresponding quantities.  The list of special unit names in
152  * SBML Level&nbsp;2 is given in the table below:
153  * </ul>
154  *
155  *   @htmlinclude predefined-units.html
156  *
157  * Also, SBML Level&nbsp;2 imposes two limitations on redefining the
158  * predefined unit @c substance, @c volume, @c area, @c length, and
159  * @c time: (1) The UnitDefinition of a predefined SBML unit can only contain
160  * a single Unit object within it.  (2) The value of the 'kind' attribute
161  * in a Unit instance must be drawn from one of the values in the second
162  * column of the table above.
163  *
164  * The special unit names @c substance, @c volume, @c area, @c length, and
165  * @c time are not defined by SBML Level&nbsp;3, which uses a different
166  * approach to setting model-wide inherited units.
167  *
168  *
169  * @section sbml-units-limits Further comments about SBML's unit definition system
170  *
171  * The vast majority of modeling situations requiring new SBML unit
172  * definitions involve simple multiplicative combinations of base units and
173  * factors.  An example of this might be <em>moles per litre per
174  * second</em>.  What distinguishes these sorts of simpler unit definitions
175  * from more complex ones is that they may be expressed without the use of
176  * an additive offset from a zero point.  The use of offsets complicates
177  * all unit definition systems, yet in the domain of SBML the real-life
178  * cases requiring offsets are few (and in fact, to the best of our
179  * knowledge, only involve temperature).  Consequently, the SBML unit
180  * system has been consciously designed in a way that attempts to simplify
181  * implementation of unit support for the most common cases in systems
182  * biology.
183  *
184  * As of SBML Level&nbsp;2 Version&nbsp;2, Unit no longer has the
185  * attribute called 'offset' introduced in SBML Level&nbsp;2
186  * Version&nbsp;1.  It turned out that the general case involving units
187  * with offsets was incorrectly defined, and few (if any) developers even
188  * attempted to support offset-based units in their software.  In the
189  * development of Level&nbsp;2 Version&nbsp;2, a consensus among SBML
190  * developers emerged that a fully generalized unit scheme is @em so
191  * confusing and complicated that it actually @em impedes interoperability.
192  * SBML Level&nbsp;2 Version&nbsp;2, Version&nbsp;3 and Version&nbsp;4 acknowledge this
193  * reality by reducing and simplifying the unit system, specifically by
194  * removing the 'offset' attribute on Unit and @c Celsius as a pre-defined
195  * unit.
196  *
197  * The following guidelines suggest methods for handling units that do
198  * require the use of zero offsets for their definitions:
199  * <ul>
200  * <li> <em>Handling Celsius</em>.  A model in which certain quantities are
201  *   temperatures measured in degrees Celsius can be converted
202  *   straightforwardly to a model in which those temperatures are in
203  *   kelvin.  A software tool could do this by performing a straightforward
204  *   substitution using the following relationship: <em>T<sub> kelvin</sub> =
205  *   T<sub>Celsius</sub> + 273.15</em>.  In every mathematical formula of the
206  *   model where a quantity (call it @em x) in degrees Celsius appears,
207  *   replace @em x with <em>x<sub>k</sub>+ 273.15</em>, where
208  *   <em>x<sub>k</sub></em> is now in kelvin.  An alternative approach would
209  *   be to use a FunctionDefinition object to define a function encapsulating this
210  *   relationship above and then using that in the rest of the model as
211  *   needed.  Since Celsius is a commonly-used unit, software tools could
212  *   help users by providing users with the ability to express temperatures
213  *   in Celsius in the tools' interfaces, and making substitutions
214  *   automatically when writing out the SBML.
215  *
216  * <li> <em>Other units requiring offsets</em>.  One approach to handling
217  *   other kinds of units is to use a FunctionDefinition to define a function
218  *   encapsulating the necessary mathematical relationship, then
219  *   substituting a call to this function wherever the original quantity
220  *   appeared in the model.  For example, here is a possible definition for
221  *   converting Fahrenheit to Celsius degrees:
222  *   @verbatim
223  <functionDefinition id='Fahrenheit_to_kelvin'>
224      <math xmlns='http://www.w3.org/1998/Math/MathML'>
225          <lambda>
226              <bvar><ci> temp_in_fahrenheit </ci></bvar>
227              <apply>
228                  <divide/>
229                  <apply>
230                      <plus/>
231                      <ci> temp_in_fahrenheit </ci>
232                      <cn> 459.67 </cn>
233                  </apply>
234                  <cn> 1.8 </cn>
235              </apply>
236          </lambda>
237      </math>
238  </functionDefinition>
239  @endverbatim
240  *
241  * <li> An alternative approach not requiring the use of function definitions
242  *   is to use an AssignmentRule for each variable in Fahrenheit units.
243  *   The AssignmentRule could compute the conversion from Fahrenheit to
244  *   (say) kelvin, assign its value to a variable (in Kelvin units), and
245  *   then that variable could be used elsewhere in the model.
246  *
247  * <li> Still another approach is to rewrite the mathematical formulas of a
248  *   model to directly incorporate the conversion formula wherever the
249  *   original quantity appeared.
250  * </ul>
251  *
252  * Please consult the SBML specifications for more information about this
253  * and other issues involving units.
254  *
255  *
256  */
257 
258 public class UnitDefinition : SBase {
259 	private HandleRef swigCPtr;
260 
UnitDefinition(IntPtr cPtr, bool cMemoryOwn)261 	internal UnitDefinition(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.UnitDefinition_SWIGUpcast(cPtr), cMemoryOwn)
262 	{
263 		//super(libsbmlPINVOKE.UnitDefinitionUpcast(cPtr), cMemoryOwn);
264 		swigCPtr = new HandleRef(this, cPtr);
265 	}
266 
getCPtr(UnitDefinition obj)267 	internal static HandleRef getCPtr(UnitDefinition obj)
268 	{
269 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
270 	}
271 
getCPtrAndDisown(UnitDefinition obj)272 	internal static HandleRef getCPtrAndDisown (UnitDefinition obj)
273 	{
274 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
275 
276 		if (obj != null)
277 		{
278 			ptr             = obj.swigCPtr;
279 			obj.swigCMemOwn = false;
280 		}
281 
282 		return ptr;
283 	}
284 
Dispose(bool disposing)285   protected override void Dispose(bool disposing) {
286     lock(this) {
287       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
288         if (swigCMemOwn) {
289           swigCMemOwn = false;
290           libsbmlPINVOKE.delete_UnitDefinition(swigCPtr);
291         }
292         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
293       }
294       base.Dispose(disposing);
295     }
296   }
297 
298 
299 /**
300    * Creates a new UnitDefinition using the given SBML @p level and @p version
301    * values.
302    *
303    * @param level a long integer, the SBML Level to assign to this UnitDefinition.
304    *
305    * @param version a long integer, the SBML Version to assign to this
306    * UnitDefinition.
307    *
308    *
309  * @throws SBMLConstructorException
310  * Thrown if the given @p level and @p version combination are invalid
311  * or if this object is incompatible with the given level and version.
312  *
313  *
314    *
315    *
316  * @note Attempting to add an object to an SBMLDocument having a different
317  * combination of SBML Level, Version and XML namespaces than the object
318  * itself will result in an error at the time a caller attempts to make the
319  * addition.  A parent object must have compatible Level, Version and XML
320  * namespaces.  (Strictly speaking, a parent may also have more XML
321  * namespaces than a child, but the reverse is not permitted.)  The
322  * restriction is necessary to ensure that an SBML model has a consistent
323  * overall structure.  This requires callers to manage their objects
324  * carefully, but the benefit is increased flexibility in how models can be
325  * created by permitting callers to create objects bottom-up if desired.  In
326  * situations where objects are not yet attached to parents (e.g.,
327  * SBMLDocument), knowledge of the intented SBML Level and Version help
328  * libSBML determine such things as whether it is valid to assign a
329  * particular value to an attribute.
330  *
331  *
332    */ public
UnitDefinition(long level, long version)333  UnitDefinition(long level, long version) : this(libsbmlPINVOKE.new_UnitDefinition__SWIG_0(level, version), true) {
334     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
335   }
336 
337 
338 /**
339    * Creates a new UnitDefinition using the given SBMLNamespaces object
340    * @p sbmlns.
341    *
342    *
343  *
344  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
345  * information.  It is used to communicate the SBML Level, Version, and (in
346  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
347  * common approach to using libSBML's SBMLNamespaces facilities is to create an
348  * SBMLNamespaces object somewhere in a program once, then hand that object
349  * as needed to object constructors that accept SBMLNamespaces as arguments.
350  *
351  *
352    *
353    * @param sbmlns an SBMLNamespaces object.
354    *
355    *
356  * @throws SBMLConstructorException
357  * Thrown if the given @p sbmlns is inconsistent or incompatible
358  * with this object.
359  *
360  *
361    *
362    *
363  * @note Attempting to add an object to an SBMLDocument having a different
364  * combination of SBML Level, Version and XML namespaces than the object
365  * itself will result in an error at the time a caller attempts to make the
366  * addition.  A parent object must have compatible Level, Version and XML
367  * namespaces.  (Strictly speaking, a parent may also have more XML
368  * namespaces than a child, but the reverse is not permitted.)  The
369  * restriction is necessary to ensure that an SBML model has a consistent
370  * overall structure.  This requires callers to manage their objects
371  * carefully, but the benefit is increased flexibility in how models can be
372  * created by permitting callers to create objects bottom-up if desired.  In
373  * situations where objects are not yet attached to parents (e.g.,
374  * SBMLDocument), knowledge of the intented SBML Level and Version help
375  * libSBML determine such things as whether it is valid to assign a
376  * particular value to an attribute.
377  *
378  *
379    */ public
UnitDefinition(SBMLNamespaces sbmlns)380  UnitDefinition(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_UnitDefinition__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
381     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
382   }
383 
384 
385 /**
386    * Copy constructor; creates a copy of this UnitDefinition.
387    *
388    * @param orig the object to copy.
389    */ public
UnitDefinition(UnitDefinition orig)390  UnitDefinition(UnitDefinition orig) : this(libsbmlPINVOKE.new_UnitDefinition__SWIG_2(UnitDefinition.getCPtr(orig)), true) {
391     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
392   }
393 
394 
395 /**
396    * Creates and returns a deep copy of this UnitDefinition object.
397    *
398    * @return the (deep) copy of this UnitDefinition object.
399    */ public new
clone()400  UnitDefinition clone() {
401     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_clone(swigCPtr);
402     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
403     return ret;
404   }
405 
406 
407 /**
408    * Returns the first child element found that has the given @p id in the
409    * model-wide SId namespace, or @c null if no such object is found.
410    *
411    * @param id string representing the id of the object to find.
412    *
413    * @return pointer to the first element found with the given @p id.
414    */ public new
getElementBySId(string id)415  SBase getElementBySId(string id) {
416 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.UnitDefinition_getElementBySId(swigCPtr, id), false);
417     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
418 	return ret;
419 }
420 
421 
422 /**
423    * Returns the first child element it can find with the given @p metaid, or
424    * @c null if no such object is found.
425    *
426    * @param metaid string representing the metaid of the object to find.
427    *
428    * @return pointer to the first element found with the given @p metaid.
429    */ public new
getElementByMetaId(string metaid)430  SBase getElementByMetaId(string metaid) {
431 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.UnitDefinition_getElementByMetaId(swigCPtr, metaid), false);
432     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
433 	return ret;
434 }
435 
436 
437 /**
438    * Returns the value of the 'id' attribute of this UnitDefinition.
439    *
440    * @note Because of the inconsistent behavior of this function with
441    * respect to assignments and rules, it is now recommended to
442    * use the getIdAttribute() function instead.
443    *
444    *
445  *
446  * The identifier given by an object's 'id' attribute value
447  * is used to identify the object within the SBML model definition.
448  * Other objects can refer to the component using this identifier.  The
449  * data type of 'id' is always <code>SId</code> or a type derived
450  * from that, such as <code>UnitSId</code>, depending on the object in
451  * question.  All data types are defined as follows:
452  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
453  *   letter ::= 'a'..'z','A'..'Z'
454  *   digit  ::= '0'..'9'
455  *   idChar ::= letter | digit | '_'
456  *   SId    ::= ( letter | '_' ) idChar*
457  * </pre>
458  * The characters <code>(</code> and <code>)</code> are used for grouping,
459  * the character <code>*</code> 'zero or more times', and the character
460  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
461  * is determined by an exact character sequence match; i.e., comparisons must
462  * be performed in a case-sensitive manner.  This applies to all uses of
463  * <code>SId</code>, <code>SIdRef</code>, and derived types.
464  *
465  * Users need to be aware of some important API issues that are the result of
466  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
467  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
468  * of SBML objects.  To simplify the work of programmers, libSBML's API
469  * provided get, set, check, and unset on the SBase object class itself
470  * instead of on individual subobject classes. This made the
471  * get/set/etc. methods uniformly available on all objects in the libSBML
472  * API.  LibSBML simply returned empty strings or otherwise did not act when
473  * the methods were applied to SBML objects that were not defined by the SBML
474  * specification to have 'id' or 'name' attributes.  Additional complications
475  * arose with the rule and assignment objects: InitialAssignment,
476  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
477  * the rule object hierarchy was different, and in addition, then as now,
478  * they possess different attributes: 'variable' (for the rules and event
479  * assignments), 'symbol' (for initial assignments), or neither (for
480  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
481  * would always return an empty string, and isSetId() would always return @c
482  * false for objects of these classes.
483  *
484  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
485  * Version&nbsp;2, it became necessary to introduce a new way to interact
486  * with the attributes more consistently in libSBML to avoid breaking
487  * backward compatibility in the behavior of the original 'id' methods.  For
488  * this reason, libSBML provides four functions (getIdAttribute(),
489  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
490  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
491  * from SBase, regardless of the object's type.  <strong>These new methods
492  * should be used instead of the older getId()/setId()/etc. methods</strong>
493  * unless the old behavior is somehow necessary.  Regardless of the Level and
494  * Version of the SBML, these functions allow client applications to use more
495  * generalized code in some situations (for instance, when manipulating
496  * objects that are all known to have identifiers).  If the object in
497  * question does not posess an 'id' attribute according to the SBML
498  * specification for the Level and Version in use, libSBML will not allow the
499  * identifier to be set, nor will it read or write 'id' attributes for those
500  * objects.
501  *
502  *
503    *
504    * @return the id of this UnitDefinition.
505    *
506    * @see getIdAttribute()
507    * @see setIdAttribute(string sid)
508    * @see isSetIdAttribute()
509    * @see unsetIdAttribute()
510    */ public new
getId()511  string getId() {
512     string ret = libsbmlPINVOKE.UnitDefinition_getId(swigCPtr);
513     return ret;
514   }
515 
516 
517 /**
518    * Returns the value of the 'name' attribute of this UnitDefinition object.
519    *
520    *
521  *
522  *
523  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
524  * moved to SBase directly, instead of being defined individually for many
525  * (but not all) objects.  LibSBML has for a long time provided functions
526  * defined on SBase itself to get, set, and unset those attributes, which
527  * would fail or otherwise return empty strings if executed on any object
528  * for which those attributes were not defined.  Now that all SBase objects
529  * define those attributes, those functions now succeed for any object with
530  * the appropriate level and version.
531  *
532  * The 'name' attribute is
533  * optional and is not intended to be used for cross-referencing purposes
534  * within a model.  Its purpose instead is to provide a human-readable
535  * label for the component.  The data type of 'name' is the type
536  * <code>string</code> defined in XML Schema.  SBML imposes no
537  * restrictions as to the content of 'name' attributes beyond those
538  * restrictions defined by the <code>string</code> type in XML Schema.
539  *
540  * The recommended practice for handling 'name' is as follows.  If a
541  * software tool has the capability for displaying the content of 'name'
542  * attributes, it should display this content to the user as a
543  * component's label instead of the component's 'id'.  If the user
544  * interface does not have this capability (e.g., because it cannot
545  * display or use special characters in symbol names), or if the 'name'
546  * attribute is missing on a given component, then the user interface
547  * should display the value of the 'id' attribute instead.  (Script
548  * language interpreters are especially likely to display 'id' instead of
549  * 'name'.)
550  *
551  * As a consequence of the above, authors of systems that automatically
552  * generate the values of 'id' attributes should be aware some systems
553  * may display the 'id''s to the user.  Authors therefore may wish to
554  * take some care to have their software create 'id' values that are: (a)
555  * reasonably easy for humans to type and read; and (b) likely to be
556  * meaningful, for example by making the 'id' attribute be an abbreviated
557  * form of the name attribute value.
558  *
559  * An additional point worth mentioning is although there are
560  * restrictions on the uniqueness of 'id' values, there are no
561  * restrictions on the uniqueness of 'name' values in a model.  This
562  * allows software applications leeway in assigning component identifiers.
563  *
564  * Regardless of the level and version of the SBML, these functions allow
565  * client applications to use more generalized code in some situations
566  * (for instance, when manipulating objects that are all known to have
567  * names).  If the object in question does not posess a 'name' attribute
568  * according to the SBML specification for the Level and Version in use,
569  * libSBML will not allow the name to be set, nor will it read or
570  * write 'name' attributes for those objects.
571  *
572  *
573  *
574  * @return the name of this SBML object, or the empty string if not set or unsettable.
575  *
576  * @see getIdAttribute()
577  * @see isSetName()
578  * @see setName(string sid)
579  * @see unsetName()
580  *
581  *
582    */ public new
getName()583  string getName() {
584     string ret = libsbmlPINVOKE.UnitDefinition_getName(swigCPtr);
585     return ret;
586   }
587 
588 
589 /**
590    * Predicate returning @c true if this
591    * UnitDefinition's 'id' attribute is set.
592    *
593    *
594  *
595  *
596  * The identifier given by an object's 'id' attribute value
597  * is used to identify the object within the SBML model definition.
598  * Other objects can refer to the component using this identifier.  The
599  * data type of 'id' is always <code>SId</code> or a type derived
600  * from that, such as <code>UnitSId</code>, depending on the object in
601  * question.  All data types are defined as follows:
602  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
603  *   letter ::= 'a'..'z','A'..'Z'
604  *   digit  ::= '0'..'9'
605  *   idChar ::= letter | digit | '_'
606  *   SId    ::= ( letter | '_' ) idChar*
607  * </pre>
608  * The characters <code>(</code> and <code>)</code> are used for grouping,
609  * the character <code>*</code> 'zero or more times', and the character
610  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
611  * is determined by an exact character sequence match; i.e., comparisons must
612  * be performed in a case-sensitive manner.  This applies to all uses of
613  * <code>SId</code>, <code>SIdRef</code>, and derived types.
614  *
615  * Users need to be aware of some important API issues that are the result of
616  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
617  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
618  * of SBML objects.  To simplify the work of programmers, libSBML's API
619  * provided get, set, check, and unset on the SBase object class itself
620  * instead of on individual subobject classes. This made the
621  * get/set/etc. methods uniformly available on all objects in the libSBML
622  * API.  LibSBML simply returned empty strings or otherwise did not act when
623  * the methods were applied to SBML objects that were not defined by the SBML
624  * specification to have 'id' or 'name' attributes.  Additional complications
625  * arose with the rule and assignment objects: InitialAssignment,
626  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
627  * the rule object hierarchy was different, and in addition, then as now,
628  * they possess different attributes: 'variable' (for the rules and event
629  * assignments), 'symbol' (for initial assignments), or neither (for
630  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
631  * would always return an empty string, and isSetId() would always return @c
632  * false for objects of these classes.
633  *
634  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
635  * Version&nbsp;2, it became necessary to introduce a new way to interact
636  * with the attributes more consistently in libSBML to avoid breaking
637  * backward compatibility in the behavior of the original 'id' methods.  For
638  * this reason, libSBML provides four functions (getIdAttribute(),
639  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
640  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
641  * from SBase, regardless of the object's type.  <strong>These new methods
642  * should be used instead of the older getId()/setId()/etc. methods</strong>
643  * unless the old behavior is somehow necessary.  Regardless of the Level and
644  * Version of the SBML, these functions allow client applications to use more
645  * generalized code in some situations (for instance, when manipulating
646  * objects that are all known to have identifiers).  If the object in
647  * question does not posess an 'id' attribute according to the SBML
648  * specification for the Level and Version in use, libSBML will not allow the
649  * identifier to be set, nor will it read or write 'id' attributes for those
650  * objects.
651  *
652  *
653  *
654  * @return @c true if the 'id' attribute of this SBML object is
655  * set, @c false otherwise.
656  *
657  * @note Because of the inconsistent behavior of this function with
658  * respect to assignments and rules, it is recommended that callers
659  * use isSetIdAttribute() instead.
660  *
661  * @see getIdAttribute()
662  * @see setIdAttribute(string sid)
663  * @see unsetIdAttribute()
664  * @see isSetIdAttribute()
665  *
666  *
667    */ public new
isSetId()668  bool isSetId() {
669     bool ret = libsbmlPINVOKE.UnitDefinition_isSetId(swigCPtr);
670     return ret;
671   }
672 
673 
674 /**
675    * Predicate returning @c true if this
676    * UnitDefinition's 'name' attribute is set.
677    *
678    *
679  *
680  *
681  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
682  * moved to SBase directly, instead of being defined individually for many
683  * (but not all) objects.  LibSBML has for a long time provided functions
684  * defined on SBase itself to get, set, and unset those attributes, which
685  * would fail or otherwise return empty strings if executed on any object
686  * for which those attributes were not defined.  Now that all SBase objects
687  * define those attributes, those functions now succeed for any object with
688  * the appropriate level and version.
689  *
690  * The 'name' attribute is
691  * optional and is not intended to be used for cross-referencing purposes
692  * within a model.  Its purpose instead is to provide a human-readable
693  * label for the component.  The data type of 'name' is the type
694  * <code>string</code> defined in XML Schema.  SBML imposes no
695  * restrictions as to the content of 'name' attributes beyond those
696  * restrictions defined by the <code>string</code> type in XML Schema.
697  *
698  * The recommended practice for handling 'name' is as follows.  If a
699  * software tool has the capability for displaying the content of 'name'
700  * attributes, it should display this content to the user as a
701  * component's label instead of the component's 'id'.  If the user
702  * interface does not have this capability (e.g., because it cannot
703  * display or use special characters in symbol names), or if the 'name'
704  * attribute is missing on a given component, then the user interface
705  * should display the value of the 'id' attribute instead.  (Script
706  * language interpreters are especially likely to display 'id' instead of
707  * 'name'.)
708  *
709  * As a consequence of the above, authors of systems that automatically
710  * generate the values of 'id' attributes should be aware some systems
711  * may display the 'id''s to the user.  Authors therefore may wish to
712  * take some care to have their software create 'id' values that are: (a)
713  * reasonably easy for humans to type and read; and (b) likely to be
714  * meaningful, for example by making the 'id' attribute be an abbreviated
715  * form of the name attribute value.
716  *
717  * An additional point worth mentioning is although there are
718  * restrictions on the uniqueness of 'id' values, there are no
719  * restrictions on the uniqueness of 'name' values in a model.  This
720  * allows software applications leeway in assigning component identifiers.
721  *
722  * Regardless of the level and version of the SBML, these functions allow
723  * client applications to use more generalized code in some situations
724  * (for instance, when manipulating objects that are all known to have
725  * names).  If the object in question does not posess a 'name' attribute
726  * according to the SBML specification for the Level and Version in use,
727  * libSBML will not allow the name to be set, nor will it read or
728  * write 'name' attributes for those objects.
729  *
730  *
731  *
732  * @return @c true if the 'name' attribute of this SBML object is
733  * set, @c false otherwise.
734  *
735  * @see getName()
736  * @see setName(string sid)
737  * @see unsetName()
738  *
739  *
740    */ public new
isSetName()741  bool isSetName() {
742     bool ret = libsbmlPINVOKE.UnitDefinition_isSetName(swigCPtr);
743     return ret;
744   }
745 
746 
747 /**
748    * Sets the value of the 'id' attribute of this UnitDefinition.
749    *
750    *
751  *
752  * The string @p sid is copied.
753  *
754  *
755  *
756  * The identifier given by an object's 'id' attribute value
757  * is used to identify the object within the SBML model definition.
758  * Other objects can refer to the component using this identifier.  The
759  * data type of 'id' is always <code>SId</code> or a type derived
760  * from that, such as <code>UnitSId</code>, depending on the object in
761  * question.  All data types are defined as follows:
762  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
763  *   letter ::= 'a'..'z','A'..'Z'
764  *   digit  ::= '0'..'9'
765  *   idChar ::= letter | digit | '_'
766  *   SId    ::= ( letter | '_' ) idChar*
767  * </pre>
768  * The characters <code>(</code> and <code>)</code> are used for grouping,
769  * the character <code>*</code> 'zero or more times', and the character
770  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
771  * is determined by an exact character sequence match; i.e., comparisons must
772  * be performed in a case-sensitive manner.  This applies to all uses of
773  * <code>SId</code>, <code>SIdRef</code>, and derived types.
774  *
775  * Users need to be aware of some important API issues that are the result of
776  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
777  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
778  * of SBML objects.  To simplify the work of programmers, libSBML's API
779  * provided get, set, check, and unset on the SBase object class itself
780  * instead of on individual subobject classes. This made the
781  * get/set/etc. methods uniformly available on all objects in the libSBML
782  * API.  LibSBML simply returned empty strings or otherwise did not act when
783  * the methods were applied to SBML objects that were not defined by the SBML
784  * specification to have 'id' or 'name' attributes.  Additional complications
785  * arose with the rule and assignment objects: InitialAssignment,
786  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
787  * the rule object hierarchy was different, and in addition, then as now,
788  * they possess different attributes: 'variable' (for the rules and event
789  * assignments), 'symbol' (for initial assignments), or neither (for
790  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
791  * would always return an empty string, and isSetId() would always return @c
792  * false for objects of these classes.
793  *
794  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
795  * Version&nbsp;2, it became necessary to introduce a new way to interact
796  * with the attributes more consistently in libSBML to avoid breaking
797  * backward compatibility in the behavior of the original 'id' methods.  For
798  * this reason, libSBML provides four functions (getIdAttribute(),
799  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
800  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
801  * from SBase, regardless of the object's type.  <strong>These new methods
802  * should be used instead of the older getId()/setId()/etc. methods</strong>
803  * unless the old behavior is somehow necessary.  Regardless of the Level and
804  * Version of the SBML, these functions allow client applications to use more
805  * generalized code in some situations (for instance, when manipulating
806  * objects that are all known to have identifiers).  If the object in
807  * question does not posess an 'id' attribute according to the SBML
808  * specification for the Level and Version in use, libSBML will not allow the
809  * identifier to be set, nor will it read or write 'id' attributes for those
810  * objects.
811  *
812  *
813  *
814  * @param sid the string to use as the identifier of this object.
815  *
816  *
817  * @return integer value indicating success/failure of the
818  * function.  @if clike The value is drawn from the
819  * enumeration #OperationReturnValues_t. @endif The possible values
820  * returned by this function are:
821  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
822  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
823  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
824  *
825  * @see getIdAttribute()
826  * @see setIdAttribute(string sid)
827  * @see isSetIdAttribute()
828  * @see unsetIdAttribute()
829  *
830  *
831    */ public new
setId(string sid)832  int setId(string sid) {
833     int ret = libsbmlPINVOKE.UnitDefinition_setId(swigCPtr, sid);
834     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
835     return ret;
836   }
837 
838 
839 /**
840    * Sets the value of the 'name' attribute of this UnitDefinition.
841    *
842    *
843  *
844  *
845  * The string in @p name is copied.
846  *
847  * @param name the new name for the SBML object.
848  *
849  *
850  * @return integer value indicating success/failure of the
851  * function.  @if clike The value is drawn from the
852  * enumeration #OperationReturnValues_t. @endif The possible values
853  * returned by this function are:
854  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
855  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
856  *
857  *
858    */ public new
setName(string name)859  int setName(string name) {
860     int ret = libsbmlPINVOKE.UnitDefinition_setName(swigCPtr, name);
861     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
862     return ret;
863   }
864 
865 
866 /**
867    * Unsets the value of the 'name' attribute of this UnitDefinition.
868    *
869    *
870  *
871  *
872  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
873  * moved to SBase directly, instead of being defined individually for many
874  * (but not all) objects.  LibSBML has for a long time provided functions
875  * defined on SBase itself to get, set, and unset those attributes, which
876  * would fail or otherwise return empty strings if executed on any object
877  * for which those attributes were not defined.  Now that all SBase objects
878  * define those attributes, those functions now succeed for any object with
879  * the appropriate level and version.
880  *
881  * The 'name' attribute is
882  * optional and is not intended to be used for cross-referencing purposes
883  * within a model.  Its purpose instead is to provide a human-readable
884  * label for the component.  The data type of 'name' is the type
885  * <code>string</code> defined in XML Schema.  SBML imposes no
886  * restrictions as to the content of 'name' attributes beyond those
887  * restrictions defined by the <code>string</code> type in XML Schema.
888  *
889  * The recommended practice for handling 'name' is as follows.  If a
890  * software tool has the capability for displaying the content of 'name'
891  * attributes, it should display this content to the user as a
892  * component's label instead of the component's 'id'.  If the user
893  * interface does not have this capability (e.g., because it cannot
894  * display or use special characters in symbol names), or if the 'name'
895  * attribute is missing on a given component, then the user interface
896  * should display the value of the 'id' attribute instead.  (Script
897  * language interpreters are especially likely to display 'id' instead of
898  * 'name'.)
899  *
900  * As a consequence of the above, authors of systems that automatically
901  * generate the values of 'id' attributes should be aware some systems
902  * may display the 'id''s to the user.  Authors therefore may wish to
903  * take some care to have their software create 'id' values that are: (a)
904  * reasonably easy for humans to type and read; and (b) likely to be
905  * meaningful, for example by making the 'id' attribute be an abbreviated
906  * form of the name attribute value.
907  *
908  * An additional point worth mentioning is although there are
909  * restrictions on the uniqueness of 'id' values, there are no
910  * restrictions on the uniqueness of 'name' values in a model.  This
911  * allows software applications leeway in assigning component identifiers.
912  *
913  * Regardless of the level and version of the SBML, these functions allow
914  * client applications to use more generalized code in some situations
915  * (for instance, when manipulating objects that are all known to have
916  * names).  If the object in question does not posess a 'name' attribute
917  * according to the SBML specification for the Level and Version in use,
918  * libSBML will not allow the name to be set, nor will it read or
919  * write 'name' attributes for those objects.
920  *
921  *
922  *
923  *
924  * @return integer value indicating success/failure of the
925  * function.  @if clike The value is drawn from the
926  * enumeration #OperationReturnValues_t. @endif The possible values
927  * returned by this function are:
928  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
929  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
930  *
931  * @see getName()
932  * @see setName(string sid)
933  * @see isSetName()
934  *
935  *
936    */ public new
unsetName()937  int unsetName() {
938     int ret = libsbmlPINVOKE.UnitDefinition_unsetName(swigCPtr);
939     return ret;
940   }
941 
942 
943 /**
944    * Convenience function for testing if a given unit definition is a
945    * variant of the predefined unit identifier @c 'area'.
946    *
947    * @return @c true if this UnitDefinition is a variant of the predefined
948    * unit @c area, meaning square metres with only arbitrary variations
949    * in scale or multiplier values; @c false otherwise.
950    */ public
isVariantOfArea(bool relaxed)951  bool isVariantOfArea(bool relaxed) {
952     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfArea__SWIG_0(swigCPtr, relaxed);
953     return ret;
954   }
955 
956 
957 /**
958    * Convenience function for testing if a given unit definition is a
959    * variant of the predefined unit identifier @c 'area'.
960    *
961    * @return @c true if this UnitDefinition is a variant of the predefined
962    * unit @c area, meaning square metres with only arbitrary variations
963    * in scale or multiplier values; @c false otherwise.
964    */ public
isVariantOfArea()965  bool isVariantOfArea() {
966     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfArea__SWIG_1(swigCPtr);
967     return ret;
968   }
969 
970 
971 /**
972    * Convenience function for testing if a given unit definition is a
973    * variant of the predefined unit identifier @c 'length'.
974    *
975    * @return @c true if this UnitDefinition is a variant of the predefined
976    * unit @c length, meaning metres with only arbitrary variations in scale
977    * or multiplier values; @c false otherwise.
978    */ public
isVariantOfLength(bool relaxed)979  bool isVariantOfLength(bool relaxed) {
980     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfLength__SWIG_0(swigCPtr, relaxed);
981     return ret;
982   }
983 
984 
985 /**
986    * Convenience function for testing if a given unit definition is a
987    * variant of the predefined unit identifier @c 'length'.
988    *
989    * @return @c true if this UnitDefinition is a variant of the predefined
990    * unit @c length, meaning metres with only arbitrary variations in scale
991    * or multiplier values; @c false otherwise.
992    */ public
isVariantOfLength()993  bool isVariantOfLength() {
994     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfLength__SWIG_1(swigCPtr);
995     return ret;
996   }
997 
998 
999 /**
1000    * Convenience function for testing if a given unit definition is a
1001    * variant of the predefined unit identifier @c 'substance'.
1002    *
1003    * @return @c true if this UnitDefinition is a variant of the predefined
1004    * unit @c substance, meaning moles or items (and grams or kilograms from
1005    * SBML Level&nbsp;2 Version&nbsp;2 onwards) with only arbitrary variations
1006    * in scale or multiplier values; @c false otherwise.
1007    */ public
isVariantOfSubstance(bool relaxed)1008  bool isVariantOfSubstance(bool relaxed) {
1009     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfSubstance__SWIG_0(swigCPtr, relaxed);
1010     return ret;
1011   }
1012 
1013 
1014 /**
1015    * Convenience function for testing if a given unit definition is a
1016    * variant of the predefined unit identifier @c 'substance'.
1017    *
1018    * @return @c true if this UnitDefinition is a variant of the predefined
1019    * unit @c substance, meaning moles or items (and grams or kilograms from
1020    * SBML Level&nbsp;2 Version&nbsp;2 onwards) with only arbitrary variations
1021    * in scale or multiplier values; @c false otherwise.
1022    */ public
isVariantOfSubstance()1023  bool isVariantOfSubstance() {
1024     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfSubstance__SWIG_1(swigCPtr);
1025     return ret;
1026   }
1027 
1028 
1029 /**
1030    * Convenience function for testing if a given unit definition is a
1031    * variant of the predefined unit identifier @c 'time'.
1032    *
1033    * @return @c true if this UnitDefinition is a variant of the predefined
1034    * unit @c time, meaning seconds with only arbitrary variations in scale or
1035    * multiplier values; @c false otherwise.
1036    */ public
isVariantOfTime(bool relaxed)1037  bool isVariantOfTime(bool relaxed) {
1038     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfTime__SWIG_0(swigCPtr, relaxed);
1039     return ret;
1040   }
1041 
1042 
1043 /**
1044    * Convenience function for testing if a given unit definition is a
1045    * variant of the predefined unit identifier @c 'time'.
1046    *
1047    * @return @c true if this UnitDefinition is a variant of the predefined
1048    * unit @c time, meaning seconds with only arbitrary variations in scale or
1049    * multiplier values; @c false otherwise.
1050    */ public
isVariantOfTime()1051  bool isVariantOfTime() {
1052     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfTime__SWIG_1(swigCPtr);
1053     return ret;
1054   }
1055 
1056 
1057 /**
1058    * Convenience function for testing if a given unit definition is a
1059    * variant of the predefined unit identifier @c 'volume'.
1060    *
1061    * @return @c true if this UnitDefinition is a variant of the predefined
1062    * unit @c volume, meaning litre or cubic metre with only arbitrary
1063    * variations in scale or multiplier values; @c false otherwise.
1064    */ public
isVariantOfVolume(bool relaxed)1065  bool isVariantOfVolume(bool relaxed) {
1066     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfVolume__SWIG_0(swigCPtr, relaxed);
1067     return ret;
1068   }
1069 
1070 
1071 /**
1072    * Convenience function for testing if a given unit definition is a
1073    * variant of the predefined unit identifier @c 'volume'.
1074    *
1075    * @return @c true if this UnitDefinition is a variant of the predefined
1076    * unit @c volume, meaning litre or cubic metre with only arbitrary
1077    * variations in scale or multiplier values; @c false otherwise.
1078    */ public
isVariantOfVolume()1079  bool isVariantOfVolume() {
1080     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfVolume__SWIG_1(swigCPtr);
1081     return ret;
1082   }
1083 
1084 
1085 /**
1086    * Convenience function for testing if a given unit definition is a
1087    * variant of the unit @c 'dimensionless'.
1088    *
1089    * @return @c true if this UnitDefinition is a variant of
1090    * @c dimensionless, meaning dimensionless with only arbitrary variations in
1091    * scale or multiplier values; @c false otherwise.
1092    */ public
isVariantOfDimensionless(bool relaxed)1093  bool isVariantOfDimensionless(bool relaxed) {
1094     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfDimensionless__SWIG_0(swigCPtr, relaxed);
1095     return ret;
1096   }
1097 
1098 
1099 /**
1100    * Convenience function for testing if a given unit definition is a
1101    * variant of the unit @c 'dimensionless'.
1102    *
1103    * @return @c true if this UnitDefinition is a variant of
1104    * @c dimensionless, meaning dimensionless with only arbitrary variations in
1105    * scale or multiplier values; @c false otherwise.
1106    */ public
isVariantOfDimensionless()1107  bool isVariantOfDimensionless() {
1108     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfDimensionless__SWIG_1(swigCPtr);
1109     return ret;
1110   }
1111 
1112 
1113 /**
1114    * Convenience function for testing if a given unit definition is a
1115    * variant of the predefined unit identifier @c 'mass'.
1116    *
1117    * @return @c true if this UnitDefinition is a variant of mass units,
1118    * meaning gram or kilogram with only arbitrary variations in scale or
1119    * multiplier values; @c false otherwise.
1120    */ public
isVariantOfMass(bool relaxed)1121  bool isVariantOfMass(bool relaxed) {
1122     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfMass__SWIG_0(swigCPtr, relaxed);
1123     return ret;
1124   }
1125 
1126 
1127 /**
1128    * Convenience function for testing if a given unit definition is a
1129    * variant of the predefined unit identifier @c 'mass'.
1130    *
1131    * @return @c true if this UnitDefinition is a variant of mass units,
1132    * meaning gram or kilogram with only arbitrary variations in scale or
1133    * multiplier values; @c false otherwise.
1134    */ public
isVariantOfMass()1135  bool isVariantOfMass() {
1136     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfMass__SWIG_1(swigCPtr);
1137     return ret;
1138   }
1139 
1140 
1141 /**
1142    * Convenience function for testing if a given unit definition is a
1143    * variant of the predefined unit @c 'substance' divided by the predefined
1144    * unit @c 'time'.
1145    *
1146    * @return @c true if this UnitDefinition is a variant of the predefined
1147    * unit @c substance per predefined unit @c time, meaning it contains two
1148    * units one of which is a variant of substance and the other is a
1149    * variant of time which an exponent of -1; @c false otherwise.
1150    */ public
isVariantOfSubstancePerTime(bool relaxed)1151  bool isVariantOfSubstancePerTime(bool relaxed) {
1152     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfSubstancePerTime__SWIG_0(swigCPtr, relaxed);
1153     return ret;
1154   }
1155 
1156 
1157 /**
1158    * Convenience function for testing if a given unit definition is a
1159    * variant of the predefined unit @c 'substance' divided by the predefined
1160    * unit @c 'time'.
1161    *
1162    * @return @c true if this UnitDefinition is a variant of the predefined
1163    * unit @c substance per predefined unit @c time, meaning it contains two
1164    * units one of which is a variant of substance and the other is a
1165    * variant of time which an exponent of -1; @c false otherwise.
1166    */ public
isVariantOfSubstancePerTime()1167  bool isVariantOfSubstancePerTime() {
1168     bool ret = libsbmlPINVOKE.UnitDefinition_isVariantOfSubstancePerTime__SWIG_1(swigCPtr);
1169     return ret;
1170   }
1171 
1172 
1173 /**
1174    * Adds a copy of the given Unit to this UnitDefinition.
1175    *
1176    * @param u the Unit instance to add to this UnitDefinition.
1177    *
1178    *
1179  * @return integer value indicating success/failure of the
1180  * function.  @if clike The value is drawn from the
1181  * enumeration #OperationReturnValues_t. @endif The possible values
1182  * returned by this function are:
1183  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1184    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1185    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1186    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1187    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1188    *
1189    *
1190  * @note This method should be used with some caution.  The fact that this
1191  * method @em copies the object passed to it means that the caller will be
1192  * left holding a physically different object instance than the one contained
1193  * inside this object.  Changes made to the original object instance (such as
1194  * resetting attribute values) will <em>not affect the instance in this
1195  * object</em>.  In addition, the caller should make sure to free the
1196  * original object if it is no longer being used, or else a memory leak will
1197  * result.  Please see other methods on this class (particularly a
1198  * corresponding method whose name begins with the word <code>create</code>)
1199  * for alternatives that do not lead to these issues.
1200  *
1201  *
1202    *
1203    * @see createUnit()
1204    */ public
addUnit(Unit u)1205  int addUnit(Unit u) {
1206     int ret = libsbmlPINVOKE.UnitDefinition_addUnit(swigCPtr, Unit.getCPtr(u));
1207     return ret;
1208   }
1209 
1210 
1211 /**
1212    * Creates a new and empty Unit, adds it to this UnitDefinition's list of
1213    * units, and returns it.
1214    *
1215    * @return a newly constructed (and empty) Unit instance.
1216    *
1217    * @note It is worth emphasizing that the attribute 'kind' value of a
1218    * Unit is a required attribute for a valid Unit definition.  The
1219    * createUnit() method does not assign a valid kind to the constructed
1220    * unit (instead, it sets the 'kind' to @link libsbml#UNIT_KIND_INVALID UNIT_KIND_INVALID@endlink).
1221    * Callers are cautioned to set the newly-constructed Unit's kind using
1222    * Unit::setKind(@if java int@endif) soon after calling this method.
1223    *
1224    * @see addUnit(Unit u)
1225    */ public
createUnit()1226  Unit createUnit() {
1227     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_createUnit(swigCPtr);
1228     Unit ret = (cPtr == global::System.IntPtr.Zero) ? null : new Unit(cPtr, false);
1229     return ret;
1230   }
1231 
1232 
1233 /**
1234    * Returns the list of Units for this UnitDefinition instance.
1235    * @return the ListOfUnits value for this UnitDefinition.
1236    */ public
getListOfUnits()1237  ListOfUnits getListOfUnits() {
1238     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_getListOfUnits__SWIG_0(swigCPtr);
1239     ListOfUnits ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfUnits(cPtr, false);
1240     return ret;
1241   }
1242 
1243 
1244 /**
1245    * Returns a specific Unit instance belonging to this UnitDefinition.
1246    *
1247    * @param n an integer, the index of the Unit to be returned.
1248    *
1249    * @return the nth Unit of this UnitDefinition.
1250    * If the index @p n is invalid, @c null is returned.
1251    *
1252    * @see getNumUnits()
1253    */ public
getUnit(long n)1254  Unit getUnit(long n) {
1255     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_getUnit__SWIG_0(swigCPtr, n);
1256     Unit ret = (cPtr == global::System.IntPtr.Zero) ? null : new Unit(cPtr, false);
1257     return ret;
1258   }
1259 
1260 
1261 /**
1262    * Returns the number of Unit objects contained within this
1263    * UnitDefinition.
1264    *
1265    * @return an integer representing the number of Units in this
1266    * UnitDefinition.
1267    */ public
getNumUnits()1268  long getNumUnits() { return (long)libsbmlPINVOKE.UnitDefinition_getNumUnits(swigCPtr); }
1269 
1270 
1271 /**
1272    * Removes the nth Unit object from this UnitDefinition object and
1273    * returns a pointer to it.
1274    *
1275    * The caller owns the returned object and is responsible for deleting it.
1276    *
1277    * @param n the index of the Unit object to remove.
1278    *
1279    * @return the Unit object removed, or @c null if the given index
1280    * is out of range.
1281    *
1282    */ public
removeUnit(long n)1283  Unit removeUnit(long n) {
1284     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_removeUnit(swigCPtr, n);
1285     Unit ret = (cPtr == global::System.IntPtr.Zero) ? null : new Unit(cPtr, true);
1286     return ret;
1287   }
1288 
connectToChild()1289   public override void connectToChild() {
1290     libsbmlPINVOKE.UnitDefinition_connectToChild(swigCPtr);
1291   }
1292 
1293 
1294 /** */ /* libsbml-internal */ public new
enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)1295  void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) {
1296     libsbmlPINVOKE.UnitDefinition_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag);
1297     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1298   }
1299 
1300 
1301 /** */ /* libsbml-internal */ public new
updateSBMLNamespace(string package, long level, long version)1302  void updateSBMLNamespace(string package, long level, long version) {
1303     libsbmlPINVOKE.UnitDefinition_updateSBMLNamespace(swigCPtr, package, level, version);
1304     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1305   }
1306 
1307 
1308 /**
1309    * Returns the libSBML type code for this object instance.
1310    *
1311    *
1312  *
1313  * LibSBML attaches an identifying code to every kind of SBML object.  These
1314  * are integer constants known as <em>SBML type codes</em>.  The names of all
1315  * the codes begin with the characters <code>SBML_</code>.
1316  * @if clike The set of possible type codes for core elements is defined in
1317  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
1318  * SBML Level&nbsp;3 packages define their own extra enumerations of type
1319  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
1320  * package).@endif@if java In the Java language interface for libSBML, the
1321  * type codes are defined as static integer constants in the interface class
1322  * {@link libsbmlConstants}.  @endif@if python In the Python language
1323  * interface for libSBML, the type codes are defined as static integer
1324  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
1325  * the C# language interface for libSBML, the type codes are defined as
1326  * static integer constants in the interface class
1327  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
1328  * package plug-ins may use overlapping type codes; to identify the package
1329  * to which a given object belongs, call the
1330  * <code>@if conly SBase_getPackageName()
1331  * @else SBase::getPackageName()
1332  * @endif</code>
1333  * method on the object.
1334  *
1335  * The exception to this is lists:  all SBML-style list elements have the type
1336  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
1337  * are from.
1338  *
1339  *
1340    *
1341    * @return the SBML type code for this object:
1342    * @link libsbml#SBML_UNIT_DEFINITION SBML_UNIT_DEFINITION@endlink (default).
1343    *
1344    *
1345  * @warning <span class='warning'>The specific integer values of the possible
1346  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
1347  * packages,  To fully identify the correct code, <strong>it is necessary to
1348  * invoke both getPackageName() and getTypeCode()</strong> (or
1349  * ListOf::getItemTypeCode()).</span>
1350  *
1351  *
1352    *
1353    * @see getPackageName()
1354    * @see getElementName()
1355    */ public new
getTypeCode()1356  int getTypeCode() {
1357     int ret = libsbmlPINVOKE.UnitDefinition_getTypeCode(swigCPtr);
1358     return ret;
1359   }
1360 
1361 
1362 /**
1363    * Returns the XML element name of this object, which for UnitDefinition,
1364    * is always @c 'unitDefinition'.
1365    *
1366    * @return the name of this element, i.e., @c 'unitDefinition'.
1367    */ public new
getElementName()1368  string getElementName() {
1369     string ret = libsbmlPINVOKE.UnitDefinition_getElementName(swigCPtr);
1370     return ret;
1371   }
1372 
1373 
1374 /**
1375    * Simplifies the UnitDefinition such that any given kind of Unit object
1376    * occurs only once in the ListOfUnits.
1377    *
1378    * For example, the following definition,
1379    * @verbatim
1380  <unitDefinition>
1381   <listOfUnits>
1382     <unit kind='metre' exponent='1'/>
1383     <unit kind='metre' exponent='2'/>
1384   </listOfUnits>
1385  <unitDefinition>
1386  @endverbatim
1387    * will be simplified to
1388    * @verbatim
1389  <unitDefinition>
1390    <listOfUnits>
1391      <unit kind='metre' exponent='3'/>
1392    </listOfUnits>
1393  <unitDefinition>
1394  @endverbatim
1395    *
1396    * @param ud the UnitDefinition object to be simplified.
1397    *
1398    *
1399  * @if python @note Because this is a static method on a class, the Python
1400  * language interface for libSBML will contain two variants.  One will be the
1401  * expected, normal static method on the class (i.e., a regular
1402  * <em>methodName</em>), and the other will be a standalone top-level
1403  * function with the name <em>ClassName_methodName()</em>. This is merely an
1404  * artifact of how the language interfaces are created in libSBML.  The
1405  * methods are functionally identical. @endif
1406  *
1407  *
1408    */ public
simplify(UnitDefinition ud)1409  static void simplify(UnitDefinition ud) {
1410     libsbmlPINVOKE.UnitDefinition_simplify(UnitDefinition.getCPtr(ud));
1411   }
1412 
1413 
1414 /**
1415    * Alphabetically orders the Unit objects within the ListOfUnits of a
1416    * UnitDefinition.
1417    *
1418    * @param ud the UnitDefinition object whose units are to be reordered.
1419    *
1420    *
1421  * @if python @note Because this is a static method on a class, the Python
1422  * language interface for libSBML will contain two variants.  One will be the
1423  * expected, normal static method on the class (i.e., a regular
1424  * <em>methodName</em>), and the other will be a standalone top-level
1425  * function with the name <em>ClassName_methodName()</em>. This is merely an
1426  * artifact of how the language interfaces are created in libSBML.  The
1427  * methods are functionally identical. @endif
1428  *
1429  *
1430    */ public
reorder(UnitDefinition ud)1431  static void reorder(UnitDefinition ud) {
1432     libsbmlPINVOKE.UnitDefinition_reorder(UnitDefinition.getCPtr(ud));
1433   }
1434 
1435 
1436 /**
1437    * Convert a given UnitDefinition into a new UnitDefinition object
1438    * that uses SI units.
1439    *
1440    * @param ud the UnitDefinition object to convert to SI.
1441    *
1442    * @return a new UnitDefinition object representing the results of the
1443    * conversion.
1444    *
1445    *
1446  * @if python @note Because this is a static method on a class, the Python
1447  * language interface for libSBML will contain two variants.  One will be the
1448  * expected, normal static method on the class (i.e., a regular
1449  * <em>methodName</em>), and the other will be a standalone top-level
1450  * function with the name <em>ClassName_methodName()</em>. This is merely an
1451  * artifact of how the language interfaces are created in libSBML.  The
1452  * methods are functionally identical. @endif
1453  *
1454  *
1455    */ public
convertToSI(UnitDefinition ud)1456  static UnitDefinition convertToSI(UnitDefinition ud) {
1457     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_convertToSI(UnitDefinition.getCPtr(ud));
1458     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
1459     return ret;
1460   }
1461 
1462 
1463 /**
1464    * Predicate returning @c true if two
1465    * UnitDefinition objects are identical.
1466    *
1467    * For the purposes of performing this comparison, two UnitDefinition
1468    * objects are considered identical when they contain identical lists of
1469    * Unit objects.  Pairs of Unit objects in the lists are in turn
1470    * considered identical if they satisfy the predicate
1471    * Unit::areIdentical(@if java Unit, %Unit@endif).
1472    * The predicate compares every attribute of the
1473    * Unit objects.
1474    *
1475    * @param ud1 the first UnitDefinition object to compare.
1476    * @param ud2 the second UnitDefinition object to compare.
1477    *
1478    * @return @c true if all the Unit objects in @p ud1 are identical to the
1479    * Unit objects of @p ud2, @c false otherwise.
1480    *
1481    *
1482  * @if python @note Because this is a static method on a class, the Python
1483  * language interface for libSBML will contain two variants.  One will be the
1484  * expected, normal static method on the class (i.e., a regular
1485  * <em>methodName</em>), and the other will be a standalone top-level
1486  * function with the name <em>ClassName_methodName()</em>. This is merely an
1487  * artifact of how the language interfaces are created in libSBML.  The
1488  * methods are functionally identical. @endif
1489  *
1490  *
1491    *
1492    * @see UnitDefinition::areEquivalent(UnitDefinition  ud1, %UnitDefinition  ud2)
1493    * @see Unit::areIdentical(Unit  unit1, %Unit  unit2)
1494    */ public
areIdentical(UnitDefinition ud1, UnitDefinition ud2)1495  static bool areIdentical(UnitDefinition ud1, UnitDefinition ud2) {
1496     bool ret = libsbmlPINVOKE.UnitDefinition_areIdentical(UnitDefinition.getCPtr(ud1), UnitDefinition.getCPtr(ud2));
1497     return ret;
1498   }
1499 
1500 
1501 /**
1502    * Predicate returning @c true if two
1503    * UnitDefinition objects are equivalent.
1504    *
1505    * For the purposes of performing this comparison, two UnitDefinition
1506    * objects are considered equivalent when they contain @em equivalent
1507    * list of Unit objects.  Unit objects are in turn considered equivalent
1508    * if they satisfy the predicate
1509    * Unit::areEquivalent(@if java Unit, %Unit@endif).
1510    * The predicate tests a subset of the objects's attributes.
1511    *
1512    * @param ud1 the first UnitDefinition object to compare.
1513    *
1514    * @param ud2 the second UnitDefinition object to compare.
1515    *
1516    * @return @c true if all the Unit objects in @p ud1 are equivalent
1517    * to the Unit objects in @p ud2, @c false otherwise.
1518    *
1519    *
1520  * @if python @note Because this is a static method on a class, the Python
1521  * language interface for libSBML will contain two variants.  One will be the
1522  * expected, normal static method on the class (i.e., a regular
1523  * <em>methodName</em>), and the other will be a standalone top-level
1524  * function with the name <em>ClassName_methodName()</em>. This is merely an
1525  * artifact of how the language interfaces are created in libSBML.  The
1526  * methods are functionally identical. @endif
1527  *
1528  *
1529    *
1530    * @see UnitDefinition::areIdentical(UnitDefinition  ud1, %UnitDefinition  ud2)
1531    * @see Unit::areEquivalent(Unit  unit1, %Unit  unit2)
1532    */ public
areEquivalent(UnitDefinition ud1, UnitDefinition ud2)1533  static bool areEquivalent(UnitDefinition ud1, UnitDefinition ud2) {
1534     bool ret = libsbmlPINVOKE.UnitDefinition_areEquivalent(UnitDefinition.getCPtr(ud1), UnitDefinition.getCPtr(ud2));
1535     return ret;
1536   }
1537 
1538 
1539 /**
1540    * Combines two UnitDefinition objects into a single UnitDefinition.
1541    *
1542    * This takes UnitDefinition objects @p ud1 and @p ud2, and creates a
1543    * UnitDefinition object that expresses the product of the units of @p
1544    * ud1 and @p ud2.
1545    *
1546    * @param ud1 the first UnitDefinition object.
1547    * @param ud2 the second UnitDefinition object.
1548    *
1549    * @return a UnitDefinition which represents the product of the
1550    * units of the two argument UnitDefinitions.
1551    *
1552    *
1553  * @if python @note Because this is a static method on a class, the Python
1554  * language interface for libSBML will contain two variants.  One will be the
1555  * expected, normal static method on the class (i.e., a regular
1556  * <em>methodName</em>), and the other will be a standalone top-level
1557  * function with the name <em>ClassName_methodName()</em>. This is merely an
1558  * artifact of how the language interfaces are created in libSBML.  The
1559  * methods are functionally identical. @endif
1560  *
1561  *
1562    */ public
combine(UnitDefinition ud1, UnitDefinition ud2)1563  static UnitDefinition combine(UnitDefinition ud1, UnitDefinition ud2) {
1564     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_combine(UnitDefinition.getCPtr(ud1), UnitDefinition.getCPtr(ud2));
1565     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
1566     return ret;
1567   }
1568 
1569 
1570 /**
1571    * Combines two UnitDefinition objects into a single UnitDefinition as
1572    * a division.
1573    *
1574    * This takes UnitDefinition objects @p ud1 and @p ud2, and creates a
1575    * UnitDefinition object that expresses the division of the units of @p
1576    * ud1 and @p ud2.
1577    *
1578    * @param ud1 the first UnitDefinition object.
1579    * @param ud2 the second UnitDefinition object.
1580    *
1581    * @return a UnitDefinition which represents the division of the
1582    * units of the two argument UnitDefinitions.
1583    *
1584    *
1585  * @if python @note Because this is a static method on a class, the Python
1586  * language interface for libSBML will contain two variants.  One will be the
1587  * expected, normal static method on the class (i.e., a regular
1588  * <em>methodName</em>), and the other will be a standalone top-level
1589  * function with the name <em>ClassName_methodName()</em>. This is merely an
1590  * artifact of how the language interfaces are created in libSBML.  The
1591  * methods are functionally identical. @endif
1592  *
1593  *
1594    */ public
divide(UnitDefinition ud1, UnitDefinition ud2)1595  static UnitDefinition divide(UnitDefinition ud1, UnitDefinition ud2) {
1596     global::System.IntPtr cPtr = libsbmlPINVOKE.UnitDefinition_divide(UnitDefinition.getCPtr(ud1), UnitDefinition.getCPtr(ud2));
1597     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
1598     return ret;
1599   }
1600 
1601 
1602 /**
1603    * Expresses the given definition in a plain-text form.
1604    *
1605    * For example,
1606    * UnitDefinition::printUnits(@if java UnitDefinition@endif)
1607    * applied to
1608    * @verbatim
1609  <unitDefinition>
1610   <listOfUnits>
1611     <unit kind='metre' exponent='1'/>
1612     <unit kind='second' exponent='-2'/>
1613   </listOfUnits>
1614  <unitDefinition>
1615  @endverbatim
1616    * will return the string <code>'metre (exponent = 1, multiplier = 1,
1617    * scale = 0) second (exponent = -2, multiplier = 1, scale = 0)'</code>
1618    * or, if the optional parameter @p compact is given the value @c true,
1619    * the string <code>'(1 metre)^1 (1 second)^-2'</code>.  This method may
1620    * be useful for printing unit information to human users, or in
1621    * debugging software, or other situations.
1622    *
1623    * @param ud the UnitDefinition object.
1624    * @param compact boolean indicating whether the compact form
1625    * should be used (defaults to false).
1626    *
1627    * @return a string expressing the unit definition defined by the given
1628    * UnitDefinition object @p ud.
1629    *
1630    *
1631  * @if python @note Because this is a static method on a class, the Python
1632  * language interface for libSBML will contain two variants.  One will be the
1633  * expected, normal static method on the class (i.e., a regular
1634  * <em>methodName</em>), and the other will be a standalone top-level
1635  * function with the name <em>ClassName_methodName()</em>. This is merely an
1636  * artifact of how the language interfaces are created in libSBML.  The
1637  * methods are functionally identical. @endif
1638  *
1639  *
1640    */ public
printUnits(UnitDefinition ud, bool compact)1641  static string printUnits(UnitDefinition ud, bool compact) {
1642     string ret = libsbmlPINVOKE.UnitDefinition_printUnits__SWIG_0(UnitDefinition.getCPtr(ud), compact);
1643     return ret;
1644   }
1645 
1646 
1647 /**
1648    * Expresses the given definition in a plain-text form.
1649    *
1650    * For example,
1651    * UnitDefinition::printUnits(@if java UnitDefinition@endif)
1652    * applied to
1653    * @verbatim
1654  <unitDefinition>
1655   <listOfUnits>
1656     <unit kind='metre' exponent='1'/>
1657     <unit kind='second' exponent='-2'/>
1658   </listOfUnits>
1659  <unitDefinition>
1660  @endverbatim
1661    * will return the string <code>'metre (exponent = 1, multiplier = 1,
1662    * scale = 0) second (exponent = -2, multiplier = 1, scale = 0)'</code>
1663    * or, if the optional parameter @p compact is given the value @c true,
1664    * the string <code>'(1 metre)^1 (1 second)^-2'</code>.  This method may
1665    * be useful for printing unit information to human users, or in
1666    * debugging software, or other situations.
1667    *
1668    * @param ud the UnitDefinition object.
1669    * @param compact boolean indicating whether the compact form
1670    * should be used (defaults to false).
1671    *
1672    * @return a string expressing the unit definition defined by the given
1673    * UnitDefinition object @p ud.
1674    *
1675    *
1676  * @if python @note Because this is a static method on a class, the Python
1677  * language interface for libSBML will contain two variants.  One will be the
1678  * expected, normal static method on the class (i.e., a regular
1679  * <em>methodName</em>), and the other will be a standalone top-level
1680  * function with the name <em>ClassName_methodName()</em>. This is merely an
1681  * artifact of how the language interfaces are created in libSBML.  The
1682  * methods are functionally identical. @endif
1683  *
1684  *
1685    */ public
printUnits(UnitDefinition ud)1686  static string printUnits(UnitDefinition ud) {
1687     string ret = libsbmlPINVOKE.UnitDefinition_printUnits__SWIG_1(UnitDefinition.getCPtr(ud));
1688     return ret;
1689   }
1690 
1691 
1692 /**
1693    * Predicate returning @c true if
1694    * all the required attributes for this UnitDefinition object
1695    * have been set.
1696    *
1697    * The required attributes for a UnitDefinition object are:
1698    * @li 'id'
1699    *
1700    * @return @c true if the required attributes have been set, @c false
1701    * otherwise.
1702    */ public new
hasRequiredAttributes()1703  bool hasRequiredAttributes() {
1704     bool ret = libsbmlPINVOKE.UnitDefinition_hasRequiredAttributes(swigCPtr);
1705     return ret;
1706   }
1707 
1708 
1709 /**
1710    * Predicate returning @c true if
1711    * all the required elements for this UnitDefinition object
1712    * have been set.
1713    *
1714    * @note The required elements for a Constraint object are:
1715    * @li 'listOfUnits' (required in SBML Level&nbsp;2 only, optional in Level&nbsp;3)
1716    *
1717    * @return a boolean value indicating whether all the required
1718    * elements for this object have been defined.
1719    */ public new
hasRequiredElements()1720  bool hasRequiredElements() {
1721     bool ret = libsbmlPINVOKE.UnitDefinition_hasRequiredElements(swigCPtr);
1722     return ret;
1723   }
1724 
1725 }
1726 
1727 }
1728