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