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 public class ASTNodeList : global::System.IDisposable { 14 private global::System.Runtime.InteropServices.HandleRef swigCPtr; 15 protected bool swigCMemOwn; 16 ASTNodeList(global::System.IntPtr cPtr, bool cMemoryOwn)17 internal ASTNodeList(global::System.IntPtr cPtr, bool cMemoryOwn) { 18 swigCMemOwn = cMemoryOwn; 19 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); 20 } 21 getCPtr(ASTNodeList obj)22 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ASTNodeList obj) { 23 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; 24 } 25 ~ASTNodeList()26 ~ASTNodeList() { 27 Dispose(false); 28 } 29 Dispose()30 public void Dispose() { 31 Dispose(true); 32 global::System.GC.SuppressFinalize(this); 33 } 34 Dispose(bool disposing)35 protected virtual void Dispose(bool disposing) { 36 lock(this) { 37 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 38 if (swigCMemOwn) { 39 swigCMemOwn = false; 40 libsbmlPINVOKE.delete_ASTNodeList(swigCPtr); 41 } 42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 43 } 44 } 45 } 46 ASTNodeList()47 public ASTNodeList() : this(libsbmlPINVOKE.new_ASTNodeList(), true) { 48 } 49 add(ASTNode item)50 public void add(ASTNode item) { 51 libsbmlPINVOKE.ASTNodeList_add(swigCPtr, ASTNode.getCPtr(item)); 52 } 53 get(uint n)54 public ASTNode get(uint n) { 55 global::System.IntPtr cPtr = libsbmlPINVOKE.ASTNodeList_get(swigCPtr, n); 56 ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false); 57 return ret; 58 } 59 prepend(ASTNode item)60 public void prepend(ASTNode item) { 61 libsbmlPINVOKE.ASTNodeList_prepend(swigCPtr, ASTNode.getCPtr(item)); 62 } 63 remove(uint n)64 public ASTNode remove(uint n) { 65 global::System.IntPtr cPtr = libsbmlPINVOKE.ASTNodeList_remove(swigCPtr, n); 66 ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false); 67 return ret; 68 } 69 getSize()70 public uint getSize() { 71 uint ret = libsbmlPINVOKE.ASTNodeList_getSize(swigCPtr); 72 return ret; 73 } 74 75 } 76 77 } 78