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 Abstract class for references to species in reactions.
20  *
21  * As mentioned in the description of Reaction, every species that enters
22  * into a given reaction must appear in that reaction's lists of reactants,
23  * products and/or modifiers.  In an SBML model, all species that may
24  * participate in any reaction are listed in the 'listOfSpecies' element of
25  * the top-level Model object.  Lists of products, reactants and modifiers
26  * in Reaction objects do not introduce new species, but rather, they refer
27  * back to those listed in the model's top-level 'listOfSpecies'.  For
28  * reactants and products, the connection is made using SpeciesReference
29  * objects; for modifiers, it is made using ModifierSpeciesReference
30  * objects.  SimpleSpeciesReference is an abstract type that serves as the
31  * parent class of both SpeciesReference and ModifierSpeciesReference.  It
32  * is used simply to hold the attributes and elements that are common to
33  * the latter two structures.
34  *
35  * The SimpleSpeciesReference structure has a mandatory attribute,
36  * 'species', which must be a text string conforming to the identifer
37  * syntax permitted in %SBML.  This attribute is inherited by the
38  * SpeciesReference and ModifierSpeciesReference subclasses derived from
39  * SimpleSpeciesReference.  The value of the 'species' attribute must be
40  * the identifier of a species defined in the enclosing Model.  The species
41  * is thereby declared as participating in the reaction being defined.  The
42  * precise role of that species as a reactant, product, or modifier in the
43  * reaction is determined by the subclass of SimpleSpeciesReference (i.e.,
44  * either SpeciesReference or ModifierSpeciesReference) in which the
45  * identifier appears.
46  *
47  * SimpleSpeciesReference also contains an optional attribute, 'id',
48  * allowing instances to be referenced from other structures.  No SBML
49  * structures currently do this; however, such structures are anticipated
50  * in future SBML Levels.
51  *
52  */
53 
54 public class SimpleSpeciesReference : SBase {
55 	private HandleRef swigCPtr;
56 
SimpleSpeciesReference(IntPtr cPtr, bool cMemoryOwn)57 	internal SimpleSpeciesReference(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.SimpleSpeciesReference_SWIGUpcast(cPtr), cMemoryOwn)
58 	{
59 		//super(libsbmlPINVOKE.SimpleSpeciesReferenceUpcast(cPtr), cMemoryOwn);
60 		swigCPtr = new HandleRef(this, cPtr);
61 	}
62 
getCPtr(SimpleSpeciesReference obj)63 	internal static HandleRef getCPtr(SimpleSpeciesReference obj)
64 	{
65 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
66 	}
67 
getCPtrAndDisown(SimpleSpeciesReference obj)68 	internal static HandleRef getCPtrAndDisown (SimpleSpeciesReference obj)
69 	{
70 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
71 
72 		if (obj != null)
73 		{
74 			ptr             = obj.swigCPtr;
75 			obj.swigCMemOwn = false;
76 		}
77 
78 		return ptr;
79 	}
80 
Dispose(bool disposing)81   protected override void Dispose(bool disposing) {
82     lock(this) {
83       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
84         if (swigCMemOwn) {
85           swigCMemOwn = false;
86           libsbmlPINVOKE.delete_SimpleSpeciesReference(swigCPtr);
87         }
88         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
89       }
90       base.Dispose(disposing);
91     }
92   }
93 
94 
95 /**
96    * Returns the value of the 'id' attribute of this SimpleSpeciesReference.
97    *
98    * @note Because of the inconsistent behavior of this function with
99    * respect to assignments and rules, it is now recommended to
100    * use the getIdAttribute() function instead.
101    *
102    *
103  *
104  * The identifier given by an object's 'id' attribute value
105  * is used to identify the object within the SBML model definition.
106  * Other objects can refer to the component using this identifier.  The
107  * data type of 'id' is always <code>SId</code> or a type derived
108  * from that, such as <code>UnitSId</code>, depending on the object in
109  * question.  All data types are defined as follows:
110  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
111  *   letter ::= 'a'..'z','A'..'Z'
112  *   digit  ::= '0'..'9'
113  *   idChar ::= letter | digit | '_'
114  *   SId    ::= ( letter | '_' ) idChar*
115  * </pre>
116  * The characters <code>(</code> and <code>)</code> are used for grouping,
117  * the character <code>*</code> 'zero or more times', and the character
118  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
119  * is determined by an exact character sequence match; i.e., comparisons must
120  * be performed in a case-sensitive manner.  This applies to all uses of
121  * <code>SId</code>, <code>SIdRef</code>, and derived types.
122  *
123  * Users need to be aware of some important API issues that are the result of
124  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
125  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
126  * of SBML objects.  To simplify the work of programmers, libSBML's API
127  * provided get, set, check, and unset on the SBase object class itself
128  * instead of on individual subobject classes. This made the
129  * get/set/etc. methods uniformly available on all objects in the libSBML
130  * API.  LibSBML simply returned empty strings or otherwise did not act when
131  * the methods were applied to SBML objects that were not defined by the SBML
132  * specification to have 'id' or 'name' attributes.  Additional complications
133  * arose with the rule and assignment objects: InitialAssignment,
134  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
135  * the rule object hierarchy was different, and in addition, then as now,
136  * they possess different attributes: 'variable' (for the rules and event
137  * assignments), 'symbol' (for initial assignments), or neither (for
138  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
139  * would always return an empty string, and isSetId() would always return @c
140  * false for objects of these classes.
141  *
142  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
143  * Version&nbsp;2, it became necessary to introduce a new way to interact
144  * with the attributes more consistently in libSBML to avoid breaking
145  * backward compatibility in the behavior of the original 'id' methods.  For
146  * this reason, libSBML provides four functions (getIdAttribute(),
147  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
148  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
149  * from SBase, regardless of the object's type.  <strong>These new methods
150  * should be used instead of the older getId()/setId()/etc. methods</strong>
151  * unless the old behavior is somehow necessary.  Regardless of the Level and
152  * Version of the SBML, these functions allow client applications to use more
153  * generalized code in some situations (for instance, when manipulating
154  * objects that are all known to have identifiers).  If the object in
155  * question does not posess an 'id' attribute according to the SBML
156  * specification for the Level and Version in use, libSBML will not allow the
157  * identifier to be set, nor will it read or write 'id' attributes for those
158  * objects.
159  *
160  *
161    *
162    * @return the id of this SimpleSpeciesReference.
163    *
164    * @see getIdAttribute()
165    * @see setIdAttribute(string sid)
166    * @see isSetIdAttribute()
167    * @see unsetIdAttribute()
168    */ public new
getId()169  string getId() {
170     string ret = libsbmlPINVOKE.SimpleSpeciesReference_getId(swigCPtr);
171     return ret;
172   }
173 
174 
175 /**
176    * Returns the value of the 'name' attribute of this SimpleSpeciesReference object.
177    *
178    *
179  *
180  *
181  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
182  * moved to SBase directly, instead of being defined individually for many
183  * (but not all) objects.  LibSBML has for a long time provided functions
184  * defined on SBase itself to get, set, and unset those attributes, which
185  * would fail or otherwise return empty strings if executed on any object
186  * for which those attributes were not defined.  Now that all SBase objects
187  * define those attributes, those functions now succeed for any object with
188  * the appropriate level and version.
189  *
190  * The 'name' attribute is
191  * optional and is not intended to be used for cross-referencing purposes
192  * within a model.  Its purpose instead is to provide a human-readable
193  * label for the component.  The data type of 'name' is the type
194  * <code>string</code> defined in XML Schema.  SBML imposes no
195  * restrictions as to the content of 'name' attributes beyond those
196  * restrictions defined by the <code>string</code> type in XML Schema.
197  *
198  * The recommended practice for handling 'name' is as follows.  If a
199  * software tool has the capability for displaying the content of 'name'
200  * attributes, it should display this content to the user as a
201  * component's label instead of the component's 'id'.  If the user
202  * interface does not have this capability (e.g., because it cannot
203  * display or use special characters in symbol names), or if the 'name'
204  * attribute is missing on a given component, then the user interface
205  * should display the value of the 'id' attribute instead.  (Script
206  * language interpreters are especially likely to display 'id' instead of
207  * 'name'.)
208  *
209  * As a consequence of the above, authors of systems that automatically
210  * generate the values of 'id' attributes should be aware some systems
211  * may display the 'id''s to the user.  Authors therefore may wish to
212  * take some care to have their software create 'id' values that are: (a)
213  * reasonably easy for humans to type and read; and (b) likely to be
214  * meaningful, for example by making the 'id' attribute be an abbreviated
215  * form of the name attribute value.
216  *
217  * An additional point worth mentioning is although there are
218  * restrictions on the uniqueness of 'id' values, there are no
219  * restrictions on the uniqueness of 'name' values in a model.  This
220  * allows software applications leeway in assigning component identifiers.
221  *
222  * Regardless of the level and version of the SBML, these functions allow
223  * client applications to use more generalized code in some situations
224  * (for instance, when manipulating objects that are all known to have
225  * names).  If the object in question does not posess a 'name' attribute
226  * according to the SBML specification for the Level and Version in use,
227  * libSBML will not allow the name to be set, nor will it read or
228  * write 'name' attributes for those objects.
229  *
230  *
231  *
232  * @return the name of this SBML object, or the empty string if not set or unsettable.
233  *
234  * @see getIdAttribute()
235  * @see isSetName()
236  * @see setName(string sid)
237  * @see unsetName()
238  *
239  *
240    */ public new
getName()241  string getName() {
242     string ret = libsbmlPINVOKE.SimpleSpeciesReference_getName(swigCPtr);
243     return ret;
244   }
245 
246 
247 /**
248    * Get the value of the 'species' attribute.
249    *
250    * @return the value of the attribute 'species' for this
251    * SimpleSpeciesReference.
252    */ public
getSpecies()253  string getSpecies() {
254     string ret = libsbmlPINVOKE.SimpleSpeciesReference_getSpecies(swigCPtr);
255     return ret;
256   }
257 
258 
259 /**
260    * Predicate returning @c true if this
261    * SimpleSpeciesReference's 'id' attribute is set.
262    *
263    *
264  *
265  *
266  * The identifier given by an object's 'id' attribute value
267  * is used to identify the object within the SBML model definition.
268  * Other objects can refer to the component using this identifier.  The
269  * data type of 'id' is always <code>SId</code> or a type derived
270  * from that, such as <code>UnitSId</code>, depending on the object in
271  * question.  All data types are defined as follows:
272  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
273  *   letter ::= 'a'..'z','A'..'Z'
274  *   digit  ::= '0'..'9'
275  *   idChar ::= letter | digit | '_'
276  *   SId    ::= ( letter | '_' ) idChar*
277  * </pre>
278  * The characters <code>(</code> and <code>)</code> are used for grouping,
279  * the character <code>*</code> 'zero or more times', and the character
280  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
281  * is determined by an exact character sequence match; i.e., comparisons must
282  * be performed in a case-sensitive manner.  This applies to all uses of
283  * <code>SId</code>, <code>SIdRef</code>, and derived types.
284  *
285  * Users need to be aware of some important API issues that are the result of
286  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
287  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
288  * of SBML objects.  To simplify the work of programmers, libSBML's API
289  * provided get, set, check, and unset on the SBase object class itself
290  * instead of on individual subobject classes. This made the
291  * get/set/etc. methods uniformly available on all objects in the libSBML
292  * API.  LibSBML simply returned empty strings or otherwise did not act when
293  * the methods were applied to SBML objects that were not defined by the SBML
294  * specification to have 'id' or 'name' attributes.  Additional complications
295  * arose with the rule and assignment objects: InitialAssignment,
296  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
297  * the rule object hierarchy was different, and in addition, then as now,
298  * they possess different attributes: 'variable' (for the rules and event
299  * assignments), 'symbol' (for initial assignments), or neither (for
300  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
301  * would always return an empty string, and isSetId() would always return @c
302  * false for objects of these classes.
303  *
304  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
305  * Version&nbsp;2, it became necessary to introduce a new way to interact
306  * with the attributes more consistently in libSBML to avoid breaking
307  * backward compatibility in the behavior of the original 'id' methods.  For
308  * this reason, libSBML provides four functions (getIdAttribute(),
309  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
310  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
311  * from SBase, regardless of the object's type.  <strong>These new methods
312  * should be used instead of the older getId()/setId()/etc. methods</strong>
313  * unless the old behavior is somehow necessary.  Regardless of the Level and
314  * Version of the SBML, these functions allow client applications to use more
315  * generalized code in some situations (for instance, when manipulating
316  * objects that are all known to have identifiers).  If the object in
317  * question does not posess an 'id' attribute according to the SBML
318  * specification for the Level and Version in use, libSBML will not allow the
319  * identifier to be set, nor will it read or write 'id' attributes for those
320  * objects.
321  *
322  *
323  *
324  * @return @c true if the 'id' attribute of this SBML object is
325  * set, @c false otherwise.
326  *
327  * @note Because of the inconsistent behavior of this function with
328  * respect to assignments and rules, it is recommended that callers
329  * use isSetIdAttribute() instead.
330  *
331  * @see getIdAttribute()
332  * @see setIdAttribute(string sid)
333  * @see unsetIdAttribute()
334  * @see isSetIdAttribute()
335  *
336  *
337    */ public new
isSetId()338  bool isSetId() {
339     bool ret = libsbmlPINVOKE.SimpleSpeciesReference_isSetId(swigCPtr);
340     return ret;
341   }
342 
343 
344 /**
345    * Predicate returning @c true if this
346    * SimpleSpeciesReference's 'name' attribute is set.
347    *
348    *
349  *
350  *
351  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
352  * moved to SBase directly, instead of being defined individually for many
353  * (but not all) objects.  LibSBML has for a long time provided functions
354  * defined on SBase itself to get, set, and unset those attributes, which
355  * would fail or otherwise return empty strings if executed on any object
356  * for which those attributes were not defined.  Now that all SBase objects
357  * define those attributes, those functions now succeed for any object with
358  * the appropriate level and version.
359  *
360  * The 'name' attribute is
361  * optional and is not intended to be used for cross-referencing purposes
362  * within a model.  Its purpose instead is to provide a human-readable
363  * label for the component.  The data type of 'name' is the type
364  * <code>string</code> defined in XML Schema.  SBML imposes no
365  * restrictions as to the content of 'name' attributes beyond those
366  * restrictions defined by the <code>string</code> type in XML Schema.
367  *
368  * The recommended practice for handling 'name' is as follows.  If a
369  * software tool has the capability for displaying the content of 'name'
370  * attributes, it should display this content to the user as a
371  * component's label instead of the component's 'id'.  If the user
372  * interface does not have this capability (e.g., because it cannot
373  * display or use special characters in symbol names), or if the 'name'
374  * attribute is missing on a given component, then the user interface
375  * should display the value of the 'id' attribute instead.  (Script
376  * language interpreters are especially likely to display 'id' instead of
377  * 'name'.)
378  *
379  * As a consequence of the above, authors of systems that automatically
380  * generate the values of 'id' attributes should be aware some systems
381  * may display the 'id''s to the user.  Authors therefore may wish to
382  * take some care to have their software create 'id' values that are: (a)
383  * reasonably easy for humans to type and read; and (b) likely to be
384  * meaningful, for example by making the 'id' attribute be an abbreviated
385  * form of the name attribute value.
386  *
387  * An additional point worth mentioning is although there are
388  * restrictions on the uniqueness of 'id' values, there are no
389  * restrictions on the uniqueness of 'name' values in a model.  This
390  * allows software applications leeway in assigning component identifiers.
391  *
392  * Regardless of the level and version of the SBML, these functions allow
393  * client applications to use more generalized code in some situations
394  * (for instance, when manipulating objects that are all known to have
395  * names).  If the object in question does not posess a 'name' attribute
396  * according to the SBML specification for the Level and Version in use,
397  * libSBML will not allow the name to be set, nor will it read or
398  * write 'name' attributes for those objects.
399  *
400  *
401  *
402  * @return @c true if the 'name' attribute of this SBML object is
403  * set, @c false otherwise.
404  *
405  * @see getName()
406  * @see setName(string sid)
407  * @see unsetName()
408  *
409  *
410    */ public new
isSetName()411  bool isSetName() {
412     bool ret = libsbmlPINVOKE.SimpleSpeciesReference_isSetName(swigCPtr);
413     return ret;
414   }
415 
416 
417 /**
418    * Predicate returning @c true if this
419    * SimpleSpeciesReference's 'species' attribute is set.
420    *
421    * @return @c true if the 'species' attribute of this
422    * SimpleSpeciesReference is set, @c false otherwise.
423    */ public
isSetSpecies()424  bool isSetSpecies() {
425     bool ret = libsbmlPINVOKE.SimpleSpeciesReference_isSetSpecies(swigCPtr);
426     return ret;
427   }
428 
429 
430 /**
431    * Sets the 'species' attribute of this SimpleSpeciesReference.
432    *
433    * The identifier string passed in @p sid is copied.
434    *
435    * @param sid the identifier of a species defined in the enclosing
436    * Model's ListOfSpecies.
437    *
438    *
439  * @return integer value indicating success/failure of the
440  * function.  @if clike The value is drawn from the
441  * enumeration #OperationReturnValues_t. @endif The possible values
442  * returned by this function are:
443  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
444    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
445    */ public
setSpecies(string sid)446  int setSpecies(string sid) {
447     int ret = libsbmlPINVOKE.SimpleSpeciesReference_setSpecies(swigCPtr, sid);
448     return ret;
449   }
450 
451 
452 /**
453    * Sets the value of the 'id' attribute of this SimpleSpeciesReference.
454    *
455    *
456  *
457  * The string @p sid is copied.
458  *
459  *
460  *
461  * The identifier given by an object's 'id' attribute value
462  * is used to identify the object within the SBML model definition.
463  * Other objects can refer to the component using this identifier.  The
464  * data type of 'id' is always <code>SId</code> or a type derived
465  * from that, such as <code>UnitSId</code>, depending on the object in
466  * question.  All data types are defined as follows:
467  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
468  *   letter ::= 'a'..'z','A'..'Z'
469  *   digit  ::= '0'..'9'
470  *   idChar ::= letter | digit | '_'
471  *   SId    ::= ( letter | '_' ) idChar*
472  * </pre>
473  * The characters <code>(</code> and <code>)</code> are used for grouping,
474  * the character <code>*</code> 'zero or more times', and the character
475  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
476  * is determined by an exact character sequence match; i.e., comparisons must
477  * be performed in a case-sensitive manner.  This applies to all uses of
478  * <code>SId</code>, <code>SIdRef</code>, and derived types.
479  *
480  * Users need to be aware of some important API issues that are the result of
481  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
482  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
483  * of SBML objects.  To simplify the work of programmers, libSBML's API
484  * provided get, set, check, and unset on the SBase object class itself
485  * instead of on individual subobject classes. This made the
486  * get/set/etc. methods uniformly available on all objects in the libSBML
487  * API.  LibSBML simply returned empty strings or otherwise did not act when
488  * the methods were applied to SBML objects that were not defined by the SBML
489  * specification to have 'id' or 'name' attributes.  Additional complications
490  * arose with the rule and assignment objects: InitialAssignment,
491  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
492  * the rule object hierarchy was different, and in addition, then as now,
493  * they possess different attributes: 'variable' (for the rules and event
494  * assignments), 'symbol' (for initial assignments), or neither (for
495  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
496  * would always return an empty string, and isSetId() would always return @c
497  * false for objects of these classes.
498  *
499  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
500  * Version&nbsp;2, it became necessary to introduce a new way to interact
501  * with the attributes more consistently in libSBML to avoid breaking
502  * backward compatibility in the behavior of the original 'id' methods.  For
503  * this reason, libSBML provides four functions (getIdAttribute(),
504  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
505  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
506  * from SBase, regardless of the object's type.  <strong>These new methods
507  * should be used instead of the older getId()/setId()/etc. methods</strong>
508  * unless the old behavior is somehow necessary.  Regardless of the Level and
509  * Version of the SBML, these functions allow client applications to use more
510  * generalized code in some situations (for instance, when manipulating
511  * objects that are all known to have identifiers).  If the object in
512  * question does not posess an 'id' attribute according to the SBML
513  * specification for the Level and Version in use, libSBML will not allow the
514  * identifier to be set, nor will it read or write 'id' attributes for those
515  * objects.
516  *
517  *
518  *
519  * @param sid the string to use as the identifier of this object.
520  *
521  *
522  * @return integer value indicating success/failure of the
523  * function.  @if clike The value is drawn from the
524  * enumeration #OperationReturnValues_t. @endif The possible values
525  * returned by this function are:
526  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
527  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
528  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
529  *
530  * @see getIdAttribute()
531  * @see setIdAttribute(string sid)
532  * @see isSetIdAttribute()
533  * @see unsetIdAttribute()
534  *
535  *
536    */ public new
setId(string sid)537  int setId(string sid) {
538     int ret = libsbmlPINVOKE.SimpleSpeciesReference_setId(swigCPtr, sid);
539     return ret;
540   }
541 
542 
543 /**
544    * Sets the value of the 'name' attribute of this SimpleSpeciesReference.
545    *
546    *
547  *
548  *
549  * The string in @p name is copied.
550  *
551  * @param name the new name for the SBML object.
552  *
553  *
554  * @return integer value indicating success/failure of the
555  * function.  @if clike The value is drawn from the
556  * enumeration #OperationReturnValues_t. @endif The possible values
557  * returned by this function are:
558  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
559  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
560  *
561  *
562    */ public new
setName(string name)563  int setName(string name) {
564     int ret = libsbmlPINVOKE.SimpleSpeciesReference_setName(swigCPtr, name);
565     return ret;
566   }
567 
568 
569 /**
570    * Unsets the value of the 'id' attribute of this SimpleSpeciesReference.
571    *
572    *
573  *
574  *
575  * The identifier given by an object's 'id' attribute value
576  * is used to identify the object within the SBML model definition.
577  * Other objects can refer to the component using this identifier.  The
578  * data type of 'id' is always <code>SId</code> or a type derived
579  * from that, such as <code>UnitSId</code>, depending on the object in
580  * question.  All data types are defined as follows:
581  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
582  *   letter ::= 'a'..'z','A'..'Z'
583  *   digit  ::= '0'..'9'
584  *   idChar ::= letter | digit | '_'
585  *   SId    ::= ( letter | '_' ) idChar*
586  * </pre>
587  * The characters <code>(</code> and <code>)</code> are used for grouping,
588  * the character <code>*</code> 'zero or more times', and the character
589  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
590  * is determined by an exact character sequence match; i.e., comparisons must
591  * be performed in a case-sensitive manner.  This applies to all uses of
592  * <code>SId</code>, <code>SIdRef</code>, and derived types.
593  *
594  * Users need to be aware of some important API issues that are the result of
595  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
596  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
597  * of SBML objects.  To simplify the work of programmers, libSBML's API
598  * provided get, set, check, and unset on the SBase object class itself
599  * instead of on individual subobject classes. This made the
600  * get/set/etc. methods uniformly available on all objects in the libSBML
601  * API.  LibSBML simply returned empty strings or otherwise did not act when
602  * the methods were applied to SBML objects that were not defined by the SBML
603  * specification to have 'id' or 'name' attributes.  Additional complications
604  * arose with the rule and assignment objects: InitialAssignment,
605  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
606  * the rule object hierarchy was different, and in addition, then as now,
607  * they possess different attributes: 'variable' (for the rules and event
608  * assignments), 'symbol' (for initial assignments), or neither (for
609  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
610  * would always return an empty string, and isSetId() would always return @c
611  * false for objects of these classes.
612  *
613  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
614  * Version&nbsp;2, it became necessary to introduce a new way to interact
615  * with the attributes more consistently in libSBML to avoid breaking
616  * backward compatibility in the behavior of the original 'id' methods.  For
617  * this reason, libSBML provides four functions (getIdAttribute(),
618  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
619  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
620  * from SBase, regardless of the object's type.  <strong>These new methods
621  * should be used instead of the older getId()/setId()/etc. methods</strong>
622  * unless the old behavior is somehow necessary.  Regardless of the Level and
623  * Version of the SBML, these functions allow client applications to use more
624  * generalized code in some situations (for instance, when manipulating
625  * objects that are all known to have identifiers).  If the object in
626  * question does not posess an 'id' attribute according to the SBML
627  * specification for the Level and Version in use, libSBML will not allow the
628  * identifier to be set, nor will it read or write 'id' attributes for those
629  * objects.
630  *
631  *
632  *
633  *
634  * @return integer value indicating success/failure of the
635  * function.  @if clike The value is drawn from the
636  * enumeration #OperationReturnValues_t. @endif The possible values
637  * returned by this function are:
638  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
639  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
640  *
641  * @see getIdAttribute()
642  * @see setIdAttribute(string sid)
643  * @see isSetIdAttribute()
644  * @see unsetIdAttribute()
645  *
646  *
647    */ public new
unsetId()648  int unsetId() {
649     int ret = libsbmlPINVOKE.SimpleSpeciesReference_unsetId(swigCPtr);
650     return ret;
651   }
652 
653 
654 /**
655    * Unsets the value of the 'name' attribute of this SimpleSpeciesReference.
656    *
657    *
658  *
659  *
660  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
661  * moved to SBase directly, instead of being defined individually for many
662  * (but not all) objects.  LibSBML has for a long time provided functions
663  * defined on SBase itself to get, set, and unset those attributes, which
664  * would fail or otherwise return empty strings if executed on any object
665  * for which those attributes were not defined.  Now that all SBase objects
666  * define those attributes, those functions now succeed for any object with
667  * the appropriate level and version.
668  *
669  * The 'name' attribute is
670  * optional and is not intended to be used for cross-referencing purposes
671  * within a model.  Its purpose instead is to provide a human-readable
672  * label for the component.  The data type of 'name' is the type
673  * <code>string</code> defined in XML Schema.  SBML imposes no
674  * restrictions as to the content of 'name' attributes beyond those
675  * restrictions defined by the <code>string</code> type in XML Schema.
676  *
677  * The recommended practice for handling 'name' is as follows.  If a
678  * software tool has the capability for displaying the content of 'name'
679  * attributes, it should display this content to the user as a
680  * component's label instead of the component's 'id'.  If the user
681  * interface does not have this capability (e.g., because it cannot
682  * display or use special characters in symbol names), or if the 'name'
683  * attribute is missing on a given component, then the user interface
684  * should display the value of the 'id' attribute instead.  (Script
685  * language interpreters are especially likely to display 'id' instead of
686  * 'name'.)
687  *
688  * As a consequence of the above, authors of systems that automatically
689  * generate the values of 'id' attributes should be aware some systems
690  * may display the 'id''s to the user.  Authors therefore may wish to
691  * take some care to have their software create 'id' values that are: (a)
692  * reasonably easy for humans to type and read; and (b) likely to be
693  * meaningful, for example by making the 'id' attribute be an abbreviated
694  * form of the name attribute value.
695  *
696  * An additional point worth mentioning is although there are
697  * restrictions on the uniqueness of 'id' values, there are no
698  * restrictions on the uniqueness of 'name' values in a model.  This
699  * allows software applications leeway in assigning component identifiers.
700  *
701  * Regardless of the level and version of the SBML, these functions allow
702  * client applications to use more generalized code in some situations
703  * (for instance, when manipulating objects that are all known to have
704  * names).  If the object in question does not posess a 'name' attribute
705  * according to the SBML specification for the Level and Version in use,
706  * libSBML will not allow the name to be set, nor will it read or
707  * write 'name' attributes for those objects.
708  *
709  *
710  *
711  *
712  * @return integer value indicating success/failure of the
713  * function.  @if clike The value is drawn from the
714  * enumeration #OperationReturnValues_t. @endif The possible values
715  * returned by this function are:
716  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
717  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
718  *
719  * @see getName()
720  * @see setName(string sid)
721  * @see isSetName()
722  *
723  *
724    */ public new
unsetName()725  int unsetName() {
726     int ret = libsbmlPINVOKE.SimpleSpeciesReference_unsetName(swigCPtr);
727     return ret;
728   }
729 
730 
731 /**
732    * Unsets the value of the 'species' attribute of this SimpleSpeciesReference.
733    *
734    *
735  * @return integer value indicating success/failure of the
736  * function.  @if clike The value is drawn from the
737  * enumeration #OperationReturnValues_t. @endif The possible values
738  * returned by this function are:
739  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
740    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
741    */ public new
unsetSpecies()742  int unsetSpecies() {
743     int ret = libsbmlPINVOKE.SimpleSpeciesReference_unsetSpecies(swigCPtr);
744     return ret;
745   }
746 
747 
748 /**
749    * Predicate returning @c true if this
750    * is a ModifierSpeciesReference.
751    *
752    * @return @c true if this SimpleSpeciesReference's subclass is
753    * ModiferSpeciesReference, @c false if it is a plain SpeciesReference.
754    */ public
isModifier()755  bool isModifier() {
756     bool ret = libsbmlPINVOKE.SimpleSpeciesReference_isModifier(swigCPtr);
757     return ret;
758   }
759 
760 
761 /**
762    *
763  * Replaces all uses of a given @c SIdRef type attribute value with another
764  * value.
765  *
766  *
767  *
768 
769  * In SBML, object identifiers are of a data type called <code>SId</code>.
770  * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
771  * introduced for attribute values that refer to <code>SId</code> values; in
772  * previous Levels of SBML, this data type did not exist and attributes were
773  * simply described to as 'referring to an identifier', but the effective
774  * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
775  * other methods of libSBML refer to the type <code>SIdRef</code> for all
776  * Levels of SBML, even if the corresponding SBML specification did not
777  * explicitly name the data type.
778  *
779  *
780  *
781  * This method works by looking at all attributes and (if appropriate)
782  * mathematical formulas in MathML content, comparing the referenced
783  * identifiers to the value of @p oldid.  If any matches are found, the
784  * matching values are replaced with @p newid.  The method does @em not
785  * descend into child elements.
786  *
787  * @param oldid the old identifier.
788  * @param newid the new identifier.
789  *
790  *
791    */ public new
renameSIdRefs(string oldid, string newid)792  void renameSIdRefs(string oldid, string newid) {
793     libsbmlPINVOKE.SimpleSpeciesReference_renameSIdRefs(swigCPtr, oldid, newid);
794   }
795 
796 }
797 
798 }
799