1 using System;
2 using System.Runtime.InteropServices;
3 
4 //------------------------------------------------------------------------------
5 // <auto-generated />
6 //
7 // This file was automatically generated by SWIG (http://www.swig.org).
8 // Version 4.0.2
9 //
10 // Do not make changes to this file unless you know what you are doing--modify
11 // the SWIG interface file instead.
12 //------------------------------------------------------------------------------
13 
14 namespace libsbmlcs {
15 
16  using System;
17  using System.Runtime.InteropServices;
18 
19 /**
20  * @sbmlpackage{core}
21  *
22 @htmlinclude pkg-marker-core.html A single configuration setting for an SBML converter.
23  *
24  * @htmlinclude libsbml-facility-only-warning.html
25  *
26  * LibSBML provides a number of converters that can perform transformations
27  * on SBML documents.  These converters allow their behaviors to be
28  * controlled by setting property values.  Converter properties are
29  * communicated using objects of class ConversionProperties, and within
30  * such objects, individual options are encapsulated using ConversionOption
31  * objects.
32  *
33  * A ConversionOption @if conly structure @else object@endif consists of
34  * four parts:
35  * @li A @em key, acting as the name of the option.
36  * @li A @em value of this option.
37  * @li A @em type for the value; the type code is chosen from @if clike
38  * an enumeration @else a set of integer constants@endif whose names all
39  * begin with the prefix <code>CNV_TYPE_</code>.  (See the separate <a
40  * class='el' href='#ConversionOptionType_t'>subsection</a> below for more
41  * information.)
42  * @li A @em description consisting of a text string that describes the
43  * option in some way.
44  *
45  * There are no constraints on the values of keys or descriptions;
46  * authors of SBML converters are free to choose them as they see fit.
47  *
48  * @section ConversionOptionType_t Conversion option data types
49  *
50  * An option in ConversionOption must have a data type declared, to
51  * indicate whether it is a string value, an integer, and so forth.  The
52  * possible types of values are taken from
53  * @if clike the enumeration #ConversionOptionType_t @else a set of
54  * constants whose symbol names begin with the prefix
55  * <code>CNV_TYPE_</code>@endif. The following are the possible values:
56  *
57  * <p>
58  * <center>
59  * <table width='90%' cellspacing='1' cellpadding='1' border='0' class='normal-font'>
60  *  <tr style='background: lightgray' class='normal-font'>
61  *      <td><strong>Enumerator</strong></td>
62  *      <td><strong>Meaning</strong></td>
63  *  </tr>
64  * <tr>
65  * <td><code>@link libsbml#CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink</code></td>
66  * <td>Indicates the value type is a Boolean.</td>
67  * </tr>
68  * <tr>
69  * <td><code>@link libsbml#CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink</code></td>
70  * <td>Indicates the value type is a double-sized float.</td>
71  * </tr>
72  * <tr>
73  * <td><code>@link libsbml#CNV_TYPE_INT CNV_TYPE_INT@endlink</code></td>
74  * <td>Indicates the value type is an integer.</td>
75  * </tr>
76  * <tr>
77  * <td><code>@link libsbml#CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink</code></td>
78  * <td>Indicates the value type is a float.</td>
79  * </tr>
80  * <tr>
81   * <td><code>@link libsbml#CNV_TYPE_STRING CNV_TYPE_STRING@endlink</code></td>
82  * <td>Indicates the value type is a string.</td>
83  * </tr>
84  * </table>
85  * </center>
86  *
87  * @see ConversionProperties
88  */
89 
90 public class ConversionOption : global::System.IDisposable {
91 	private HandleRef swigCPtr;
92 	protected bool swigCMemOwn;
93 
ConversionOption(IntPtr cPtr, bool cMemoryOwn)94 	internal ConversionOption(IntPtr cPtr, bool cMemoryOwn)
95 	{
96 		swigCMemOwn = cMemoryOwn;
97 		swigCPtr    = new HandleRef(this, cPtr);
98 	}
99 
getCPtr(ConversionOption obj)100 	internal static HandleRef getCPtr(ConversionOption obj)
101 	{
102 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
103 	}
104 
getCPtrAndDisown(ConversionOption obj)105 	internal static HandleRef getCPtrAndDisown (ConversionOption obj)
106 	{
107 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
108 
109 		if (obj != null)
110 		{
111 			ptr             = obj.swigCPtr;
112 			obj.swigCMemOwn = false;
113 		}
114 
115 		return ptr;
116 	}
117 
~ConversionOption()118   ~ConversionOption() {
119     Dispose(false);
120   }
121 
Dispose()122   public void Dispose() {
123     Dispose(true);
124     global::System.GC.SuppressFinalize(this);
125   }
126 
Dispose(bool disposing)127   protected virtual void Dispose(bool disposing) {
128     lock(this) {
129       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
130         if (swigCMemOwn) {
131           swigCMemOwn = false;
132           libsbmlPINVOKE.delete_ConversionOption(swigCPtr);
133         }
134         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
135       }
136     }
137   }
138 
139 
140 /**
141    * Creates a new ConversionOption.
142    *
143    * This is the general constructor, taking arguments for all aspects of
144    * an option.  Other constructors exist with different arguments.
145    *
146    *
147  *
148  * The conversion @p type argument value must be one of
149  * @if clike the values defined in the enumeration
150  * #ConversionOptionType_t.@endif@if java the constants whose names begin
151  * with the characters <code>CNV_TYPE_</code> in the interface class
152  * {@link libsbmlConstants}.@endif@if python the constants whose names begin
153  * with the characters <code>CNV_TYPE_</code> in the interface class
154  * @link libsbml libsbml@endlink.@endif
155    *
156    * @param key the key for this option.
157    * @param value an optional value for this option.
158    * @param type the type of this option.
159    * @param description the description for this option.
160    *
161    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
162    */ public
ConversionOption(string key, string value, int type, string description)163  ConversionOption(string key, string value, int type, string description) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_0(key, value, type, description), true) {
164     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
165   }
166 
167 
168 /**
169    * Creates a new ConversionOption.
170    *
171    * This is the general constructor, taking arguments for all aspects of
172    * an option.  Other constructors exist with different arguments.
173    *
174    *
175  *
176  * The conversion @p type argument value must be one of
177  * @if clike the values defined in the enumeration
178  * #ConversionOptionType_t.@endif@if java the constants whose names begin
179  * with the characters <code>CNV_TYPE_</code> in the interface class
180  * {@link libsbmlConstants}.@endif@if python the constants whose names begin
181  * with the characters <code>CNV_TYPE_</code> in the interface class
182  * @link libsbml libsbml@endlink.@endif
183    *
184    * @param key the key for this option.
185    * @param value an optional value for this option.
186    * @param type the type of this option.
187    * @param description the description for this option.
188    *
189    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
190    */ public
ConversionOption(string key, string value, int type)191  ConversionOption(string key, string value, int type) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_1(key, value, type), true) {
192     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
193   }
194 
195 
196 /**
197    * Creates a new ConversionOption.
198    *
199    * This is the general constructor, taking arguments for all aspects of
200    * an option.  Other constructors exist with different arguments.
201    *
202    *
203  *
204  * The conversion @p type argument value must be one of
205  * @if clike the values defined in the enumeration
206  * #ConversionOptionType_t.@endif@if java the constants whose names begin
207  * with the characters <code>CNV_TYPE_</code> in the interface class
208  * {@link libsbmlConstants}.@endif@if python the constants whose names begin
209  * with the characters <code>CNV_TYPE_</code> in the interface class
210  * @link libsbml libsbml@endlink.@endif
211    *
212    * @param key the key for this option.
213    * @param value an optional value for this option.
214    * @param type the type of this option.
215    * @param description the description for this option.
216    *
217    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
218    */ public
ConversionOption(string key, string value)219  ConversionOption(string key, string value) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_2(key, value), true) {
220     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
221   }
222 
223 
224 /**
225    * Creates a new ConversionOption.
226    *
227    * This is the general constructor, taking arguments for all aspects of
228    * an option.  Other constructors exist with different arguments.
229    *
230    *
231  *
232  * The conversion @p type argument value must be one of
233  * @if clike the values defined in the enumeration
234  * #ConversionOptionType_t.@endif@if java the constants whose names begin
235  * with the characters <code>CNV_TYPE_</code> in the interface class
236  * {@link libsbmlConstants}.@endif@if python the constants whose names begin
237  * with the characters <code>CNV_TYPE_</code> in the interface class
238  * @link libsbml libsbml@endlink.@endif
239    *
240    * @param key the key for this option.
241    * @param value an optional value for this option.
242    * @param type the type of this option.
243    * @param description the description for this option.
244    *
245    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
246    */ public
ConversionOption(string key)247  ConversionOption(string key) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_3(key), true) {
248     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
249   }
250 
251 
252 /**
253    * Creates a new ConversionOption specialized for string-type options.
254    *
255    * @param key the key for this option.
256    * @param value the value for this option.
257    * @param description an optional description.
258    *
259    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
260    */ public
ConversionOption(string key, string value, string description)261  ConversionOption(string key, string value, string description) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_4(key, value, description), true) {
262     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
263   }
264 
265 
266 /**
267    * Creates a new ConversionOption specialized for Boolean-type options.
268    *
269    * @param key the key for this option.
270    * @param value the value for this option.
271    * @param description an optional description.
272    *
273    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
274    */ public
ConversionOption(string key, bool value, string description)275  ConversionOption(string key, bool value, string description) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_6(key, value, description), true) {
276     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
277   }
278 
279 
280 /**
281    * Creates a new ConversionOption specialized for Boolean-type options.
282    *
283    * @param key the key for this option.
284    * @param value the value for this option.
285    * @param description an optional description.
286    *
287    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
288    */ public
ConversionOption(string key, bool value)289  ConversionOption(string key, bool value) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_7(key, value), true) {
290     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
291   }
292 
293 
294 /**
295    * Creates a new ConversionOption specialized for double-type options.
296    *
297    * @param key the key for this option.
298    * @param value the value for this option.
299    * @param description an optional description.
300    *
301    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
302    */ public
ConversionOption(string key, double value, string description)303  ConversionOption(string key, double value, string description) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_8(key, value, description), true) {
304     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
305   }
306 
307 
308 /**
309    * Creates a new ConversionOption specialized for double-type options.
310    *
311    * @param key the key for this option.
312    * @param value the value for this option.
313    * @param description an optional description.
314    *
315    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
316    */ public
ConversionOption(string key, double value)317  ConversionOption(string key, double value) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_9(key, value), true) {
318     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
319   }
320 
321 
322 /**
323    * Creates a new ConversionOption specialized for float-type options.
324    *
325    * @param key the key for this option.
326    * @param value the value for this option.
327    * @param description an optional description.
328    *
329    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
330    */ public
ConversionOption(string key, float value, string description)331  ConversionOption(string key, float value, string description) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_10(key, value, description), true) {
332     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
333   }
334 
335 
336 /**
337    * Creates a new ConversionOption specialized for float-type options.
338    *
339    * @param key the key for this option.
340    * @param value the value for this option.
341    * @param description an optional description.
342    *
343    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
344    */ public
ConversionOption(string key, float value)345  ConversionOption(string key, float value) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_11(key, value), true) {
346     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
347   }
348 
349 
350 /**
351    * Creates a new ConversionOption specialized for integer-type options.
352    *
353    * @param key the key for this option.
354    * @param value the value for this option.
355    * @param description an optional description.
356    *
357    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
358    */ public
ConversionOption(string key, int value, string description)359  ConversionOption(string key, int value, string description) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_12(key, value, description), true) {
360     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
361   }
362 
363 
364 /**
365    * Creates a new ConversionOption specialized for integer-type options.
366    *
367    * @param key the key for this option.
368    * @param value the value for this option.
369    * @param description an optional description.
370    *
371    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
372    */ public
ConversionOption(string key, int value)373  ConversionOption(string key, int value) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_13(key, value), true) {
374     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
375   }
376 
377 
378 /**
379    * Copy constructor; creates a copy of an ConversionOption object.
380    *
381    * @param orig the ConversionOption object to copy.
382    */ public
ConversionOption(ConversionOption orig)383  ConversionOption(ConversionOption orig) : this(libsbmlPINVOKE.new_ConversionOption__SWIG_14(ConversionOption.getCPtr(orig)), true) {
384     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
385   }
386 
387 
388 /**
389    * Creates and returns a deep copy of this ConversionOption object.
390    *
391    * @return the (deep) copy of this ConversionOption object.
392    */ public new
clone()393  ConversionOption clone() {
394     global::System.IntPtr cPtr = libsbmlPINVOKE.ConversionOption_clone(swigCPtr);
395     ConversionOption ret = (cPtr == global::System.IntPtr.Zero) ? null : new ConversionOption(cPtr, true);
396     return ret;
397   }
398 
399 
400 /**
401    * Returns the key for this option.
402    *
403    * @return the key, as a string.
404    */ public
getKey()405  string getKey() {
406     string ret = libsbmlPINVOKE.ConversionOption_getKey(swigCPtr);
407     return ret;
408   }
409 
410 
411 /**
412    * Sets the key for this option.
413    *
414    * @param key a string representing the key to set.
415    */ public
setKey(string key)416  void setKey(string key) {
417     libsbmlPINVOKE.ConversionOption_setKey(swigCPtr, key);
418     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
419   }
420 
421 
422 /**
423    * Returns the value of this option.
424    *
425    * @return the value of this option, as a string.
426    */ public
getValue()427  string getValue() {
428     string ret = libsbmlPINVOKE.ConversionOption_getValue(swigCPtr);
429     return ret;
430   }
431 
432 
433 /**
434    * Sets the value for this option.
435    *
436    * @param value the value to set, as a string.
437    */ public
setValue(string value)438  void setValue(string value) {
439     libsbmlPINVOKE.ConversionOption_setValue(swigCPtr, value);
440     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
441   }
442 
443 
444 /**
445    * Returns the description string for this option.
446    *
447    * @return the description of this option.
448    */ public
getDescription()449  string getDescription() {
450     string ret = libsbmlPINVOKE.ConversionOption_getDescription(swigCPtr);
451     return ret;
452   }
453 
454 
455 /**
456    * Sets the description text for this option.
457    *
458    * @param description the description to set for this option.
459    */ public
setDescription(string description)460  void setDescription(string description) {
461     libsbmlPINVOKE.ConversionOption_setDescription(swigCPtr, description);
462     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
463   }
464 
465 
466 /**
467    * Returns the type of this option
468    *
469    * @return the type of this option.
470    */ public
getType()471  int getType() {
472     int ret = libsbmlPINVOKE.ConversionOption_getType(swigCPtr);
473     return ret;
474   }
475 
476 
477 /**
478    * Sets the type of this option.
479    *
480    *
481  *
482  * The conversion @p type argument value must be one of
483  * @if clike the values defined in the enumeration
484  * #ConversionOptionType_t.@endif@if java the constants whose names begin
485  * with the characters <code>CNV_TYPE_</code> in the interface class
486  * {@link libsbmlConstants}.@endif@if python the constants whose names begin
487  * with the characters <code>CNV_TYPE_</code> in the interface class
488  * @link libsbml libsbml@endlink.@endif
489    *
490    * @param type the type value to use.
491    */ public
setType(int type)492  void setType(int type) {
493     libsbmlPINVOKE.ConversionOption_setType(swigCPtr, type);
494   }
495 
496 
497 /**
498    * Returns the value of this option as a Boolean.
499    *
500    * @return the value of this option.
501    */ public new
getBoolValue()502  bool getBoolValue() {
503     bool ret = libsbmlPINVOKE.ConversionOption_getBoolValue(swigCPtr);
504     return ret;
505   }
506 
507 
508 /**
509    * Set the value of this option to a given Boolean value.
510    *
511    * Invoking this method will also set the type of the option to
512    * @link libsbml#CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink.
513    *
514    * @param value the Boolean value to set.
515    */ public new
setBoolValue(bool value)516  void setBoolValue(bool value) {
517     libsbmlPINVOKE.ConversionOption_setBoolValue(swigCPtr, value);
518   }
519 
520 
521 /**
522    * Returns the value of this option as a @c double.
523    *
524    * @return the value of this option.
525    */ public new
getDoubleValue()526  double getDoubleValue() {
527     double ret = libsbmlPINVOKE.ConversionOption_getDoubleValue(swigCPtr);
528     return ret;
529   }
530 
531 
532 /**
533    * Set the value of this option to a given @c double value.
534    *
535    * Invoking this method will also set the type of the option to
536    * @link libsbml#CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink.
537    *
538    * @param value the value to set.
539    */ public new
setDoubleValue(double value)540  void setDoubleValue(double value) {
541     libsbmlPINVOKE.ConversionOption_setDoubleValue(swigCPtr, value);
542   }
543 
544 
545 /**
546    * Returns the value of this option as a @c float.
547    *
548    * @return the value of this option as a float.
549    */ public new
getFloatValue()550  float getFloatValue() {
551     float ret = libsbmlPINVOKE.ConversionOption_getFloatValue(swigCPtr);
552     return ret;
553   }
554 
555 
556 /**
557    * Set the value of this option to a given @c float value.
558    *
559    * Invoking this method will also set the type of the option to
560    * @link libsbml#CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink.
561    *
562    * @param value the value to set.
563    */ public new
setFloatValue(float value)564  void setFloatValue(float value) {
565     libsbmlPINVOKE.ConversionOption_setFloatValue(swigCPtr, value);
566   }
567 
568 
569 /**
570    * Returns the value of this option as an @c integer.
571    *
572    * @return the value of this option, as an int.
573    */ public new
getIntValue()574  int getIntValue() {
575     int ret = libsbmlPINVOKE.ConversionOption_getIntValue(swigCPtr);
576     return ret;
577   }
578 
579 
580 /**
581    * Set the value of this option to a given @c int value.
582    *
583    * Invoking this method will also set the type of the option to
584    * @link libsbml#CNV_TYPE_INT CNV_TYPE_INT@endlink.
585    *
586    * @param value the value to set.
587    */ public new
setIntValue(int value)588  void setIntValue(int value) {
589     libsbmlPINVOKE.ConversionOption_setIntValue(swigCPtr, value);
590   }
591 
592 }
593 
594 }
595