/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.40
 *
 * 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 ModelCreatorList : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal ModelCreatorList(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(ModelCreatorList obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~ModelCreatorList() {
    Dispose();
  }

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

  public ModelCreatorList() : this(libsbmlPINVOKE.new_ModelCreatorList(), true) {
  }

  public void add(ModelCreator item) {
    libsbmlPINVOKE.ModelCreatorList_add(swigCPtr, ModelCreator.getCPtr(item));
  }

  public ModelCreator get(uint n) {
    IntPtr cPtr = libsbmlPINVOKE.ModelCreatorList_get(swigCPtr, n);
    ModelCreator ret = (cPtr == IntPtr.Zero) ? null : new ModelCreator(cPtr, false);
    return ret;
  }

  public void prepend(ModelCreator item) {
    libsbmlPINVOKE.ModelCreatorList_prepend(swigCPtr, ModelCreator.getCPtr(item));
  }

  public ModelCreator remove(uint n) {
    IntPtr cPtr = libsbmlPINVOKE.ModelCreatorList_remove(swigCPtr, n);
    ModelCreator ret = (cPtr == IntPtr.Zero) ? null : new ModelCreator(cPtr, false);
    return ret;
  }

  public uint getSize() {
    uint ret = libsbmlPINVOKE.ModelCreatorList_getSize(swigCPtr);
    return ret;
  }

}

}
