/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.0
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace libsbml {

using System;
using System.Runtime.InteropServices;

public class ListOfRules : ListOf {
	private HandleRef swigCPtr;
	
	internal ListOfRules(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.ListOfRules_SWIGUpcast(cPtr), cMemoryOwn)
	{
		//super(libsbmlPINVOKE.ListOfRulesUpcast(cPtr), cMemoryOwn);
		swigCPtr = new HandleRef(this, cPtr);
	}
	
	internal static HandleRef getCPtr(ListOfRules obj)
	{
		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
	}
	
	internal static HandleRef getCPtrAndDisown (ListOfRules obj)
	{
		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
		
		if (obj != null)
		{
			ptr             = obj.swigCPtr;
			obj.swigCMemOwn = false;
		}
		
		return ptr;
	}

  ~ListOfRules() {
    Dispose();
  }

  public override void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          libsbmlPINVOKE.delete_ListOfRules(swigCPtr);
        }
        swigCPtr = new HandleRef(null, IntPtr.Zero);
      }
      GC.SuppressFinalize(this);
      base.Dispose();
    }
  }

  public new ListOfRules clone() {
    IntPtr cPtr = libsbmlPINVOKE.ListOfRules_clone(swigCPtr);
    ListOfRules ret = (cPtr == IntPtr.Zero) ? null : new ListOfRules(cPtr, true);
    return ret;
  }

  public override int getTypeCode() {
    int ret = libsbmlPINVOKE.ListOfRules_getTypeCode(swigCPtr);
    return ret;
  }

  public override int getItemTypeCode() {
    int ret = libsbmlPINVOKE.ListOfRules_getItemTypeCode(swigCPtr);
    return ret;
  }

  public override string getElementName() {
    string ret = libsbmlPINVOKE.ListOfRules_getElementName(swigCPtr);
    return ret;
  }

  public new Rule get(long n) {
        Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_get__SWIG_0(swigCPtr, n), false);
	return ret;
}

  public virtual Rule get(string sid) {
        Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_get__SWIG_2(swigCPtr, sid), false);
	return ret;
}

  public new Rule remove(long n) {
        Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_remove__SWIG_0(swigCPtr, n), true);
	return ret;
}

  public virtual Rule remove(string sid) {
        Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_remove__SWIG_1(swigCPtr, sid), true);
	return ret;
}

  public ListOfRules() : this(libsbmlPINVOKE.new_ListOfRules(), true) {
  }

}

}
