/* ----------------------------------------------------------------------------
 * 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 Model : SBase {
	private HandleRef swigCPtr;
	
	internal Model(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.ModelUpcast(cPtr), cMemoryOwn)
	{
		//super(libsbmlPINVOKE.ModelUpcast(cPtr), cMemoryOwn);
		swigCPtr = new HandleRef(this, cPtr);
	}
	
	internal static HandleRef getCPtr(Model obj)
	{
		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
	}
	
	internal static HandleRef getCPtrAndDisown (Model obj)
	{
		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
		
		if (obj != null)
		{
			ptr             = obj.swigCPtr;
			obj.swigCMemOwn = false;
		}
		
		return ptr;
	}

  ~Model() {
    Dispose();
  }

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

  public Model(long level, long version) : this(libsbmlPINVOKE.new_Model__SWIG_0(level, version), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public Model(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Model__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public Model(Model orig) : this(libsbmlPINVOKE.new_Model__SWIG_2(Model.getCPtr(orig)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

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

  public new string getId() {
    string ret = libsbmlPINVOKE.Model_getId(swigCPtr);
    return ret;
  }

  public new string getName() {
    string ret = libsbmlPINVOKE.Model_getName(swigCPtr);
    return ret;
  }

  public ModelHistory getModelHistory() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getModelHistory__SWIG_0(swigCPtr);
    ModelHistory ret = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, false);
    return ret;
  }

  public new bool isSetId() {
    bool ret = libsbmlPINVOKE.Model_isSetId(swigCPtr);
    return ret;
  }

  public new bool isSetName() {
    bool ret = libsbmlPINVOKE.Model_isSetName(swigCPtr);
    return ret;
  }

  public bool isSetModelHistory() {
    bool ret = libsbmlPINVOKE.Model_isSetModelHistory(swigCPtr);
    return ret;
  }

  public new int setId(string sid) {
    int ret = libsbmlPINVOKE.Model_setId(swigCPtr, sid);
    return ret;
  }

  public new int setName(string name) {
    int ret = libsbmlPINVOKE.Model_setName(swigCPtr, name);
    return ret;
  }

  public int setModelHistory(ModelHistory history) {
    int ret = libsbmlPINVOKE.Model_setModelHistory(swigCPtr, ModelHistory.getCPtr(history));
    return ret;
  }

  public int unsetId() {
    int ret = libsbmlPINVOKE.Model_unsetId(swigCPtr);
    return ret;
  }

  public int unsetName() {
    int ret = libsbmlPINVOKE.Model_unsetName(swigCPtr);
    return ret;
  }

  public int unsetModelHistory() {
    int ret = libsbmlPINVOKE.Model_unsetModelHistory(swigCPtr);
    return ret;
  }

  public int addFunctionDefinition(FunctionDefinition fd) {
    int ret = libsbmlPINVOKE.Model_addFunctionDefinition(swigCPtr, FunctionDefinition.getCPtr(fd));
    return ret;
  }

  public int addUnitDefinition(UnitDefinition ud) {
    int ret = libsbmlPINVOKE.Model_addUnitDefinition(swigCPtr, UnitDefinition.getCPtr(ud));
    return ret;
  }

  public int addCompartmentType(CompartmentType ct) {
    int ret = libsbmlPINVOKE.Model_addCompartmentType(swigCPtr, CompartmentType.getCPtr(ct));
    return ret;
  }

  public int addSpeciesType(SpeciesType st) {
    int ret = libsbmlPINVOKE.Model_addSpeciesType(swigCPtr, SpeciesType.getCPtr(st));
    return ret;
  }

  public int addCompartment(Compartment c) {
    int ret = libsbmlPINVOKE.Model_addCompartment(swigCPtr, Compartment.getCPtr(c));
    return ret;
  }

  public int addSpecies(Species s) {
    int ret = libsbmlPINVOKE.Model_addSpecies(swigCPtr, Species.getCPtr(s));
    return ret;
  }

  public int addParameter(Parameter p) {
    int ret = libsbmlPINVOKE.Model_addParameter(swigCPtr, Parameter.getCPtr(p));
    return ret;
  }

  public int addInitialAssignment(InitialAssignment ia) {
    int ret = libsbmlPINVOKE.Model_addInitialAssignment(swigCPtr, InitialAssignment.getCPtr(ia));
    return ret;
  }

  public int addRule(Rule r) {
    int ret = libsbmlPINVOKE.Model_addRule(swigCPtr, Rule.getCPtr(r));
    return ret;
  }

  public int addConstraint(Constraint c) {
    int ret = libsbmlPINVOKE.Model_addConstraint(swigCPtr, Constraint.getCPtr(c));
    return ret;
  }

  public int addReaction(Reaction r) {
    int ret = libsbmlPINVOKE.Model_addReaction(swigCPtr, Reaction.getCPtr(r));
    return ret;
  }

  public int addEvent(Event e) {
    int ret = libsbmlPINVOKE.Model_addEvent(swigCPtr, Event.getCPtr(e));
    return ret;
  }

  public FunctionDefinition createFunctionDefinition() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createFunctionDefinition(swigCPtr);
    FunctionDefinition ret = (cPtr == IntPtr.Zero) ? null : new FunctionDefinition(cPtr, false);
    return ret;
  }

  public UnitDefinition createUnitDefinition() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createUnitDefinition(swigCPtr);
    UnitDefinition ret = (cPtr == IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
    return ret;
  }

  public Unit createUnit() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createUnit(swigCPtr);
    Unit ret = (cPtr == IntPtr.Zero) ? null : new Unit(cPtr, false);
    return ret;
  }

  public CompartmentType createCompartmentType() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createCompartmentType(swigCPtr);
    CompartmentType ret = (cPtr == IntPtr.Zero) ? null : new CompartmentType(cPtr, false);
    return ret;
  }

  public SpeciesType createSpeciesType() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createSpeciesType(swigCPtr);
    SpeciesType ret = (cPtr == IntPtr.Zero) ? null : new SpeciesType(cPtr, false);
    return ret;
  }

  public Compartment createCompartment() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createCompartment(swigCPtr);
    Compartment ret = (cPtr == IntPtr.Zero) ? null : new Compartment(cPtr, false);
    return ret;
  }

  public Species createSpecies() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createSpecies(swigCPtr);
    Species ret = (cPtr == IntPtr.Zero) ? null : new Species(cPtr, false);
    return ret;
  }

  public Parameter createParameter() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createParameter(swigCPtr);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    return ret;
  }

  public InitialAssignment createInitialAssignment() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createInitialAssignment(swigCPtr);
    InitialAssignment ret = (cPtr == IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
    return ret;
  }

  public AlgebraicRule createAlgebraicRule() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createAlgebraicRule(swigCPtr);
    AlgebraicRule ret = (cPtr == IntPtr.Zero) ? null : new AlgebraicRule(cPtr, false);
    return ret;
  }

  public AssignmentRule createAssignmentRule() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createAssignmentRule(swigCPtr);
    AssignmentRule ret = (cPtr == IntPtr.Zero) ? null : new AssignmentRule(cPtr, false);
    return ret;
  }

  public RateRule createRateRule() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createRateRule(swigCPtr);
    RateRule ret = (cPtr == IntPtr.Zero) ? null : new RateRule(cPtr, false);
    return ret;
  }

  public Constraint createConstraint() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createConstraint(swigCPtr);
    Constraint ret = (cPtr == IntPtr.Zero) ? null : new Constraint(cPtr, false);
    return ret;
  }

  public Reaction createReaction() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createReaction(swigCPtr);
    Reaction ret = (cPtr == IntPtr.Zero) ? null : new Reaction(cPtr, false);
    return ret;
  }

  public SpeciesReference createReactant() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createReactant(swigCPtr);
    SpeciesReference ret = (cPtr == IntPtr.Zero) ? null : new SpeciesReference(cPtr, false);
    return ret;
  }

  public SpeciesReference createProduct() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createProduct(swigCPtr);
    SpeciesReference ret = (cPtr == IntPtr.Zero) ? null : new SpeciesReference(cPtr, false);
    return ret;
  }

  public ModifierSpeciesReference createModifier() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createModifier(swigCPtr);
    ModifierSpeciesReference ret = (cPtr == IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, false);
    return ret;
  }

  public KineticLaw createKineticLaw() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createKineticLaw(swigCPtr);
    KineticLaw ret = (cPtr == IntPtr.Zero) ? null : new KineticLaw(cPtr, false);
    return ret;
  }

  public Parameter createKineticLawParameter() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createKineticLawParameter(swigCPtr);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    return ret;
  }

  public Event createEvent() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createEvent(swigCPtr);
    Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, false);
    return ret;
  }

  public EventAssignment createEventAssignment() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createEventAssignment(swigCPtr);
    EventAssignment ret = (cPtr == IntPtr.Zero) ? null : new EventAssignment(cPtr, false);
    return ret;
  }

  public Trigger createTrigger() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createTrigger(swigCPtr);
    Trigger ret = (cPtr == IntPtr.Zero) ? null : new Trigger(cPtr, false);
    return ret;
  }

  public Delay createDelay() {
    IntPtr cPtr = libsbmlPINVOKE.Model_createDelay(swigCPtr);
    Delay ret = (cPtr == IntPtr.Zero) ? null : new Delay(cPtr, false);
    return ret;
  }

  public override int setAnnotation(XMLNode annotation) {
    int ret = libsbmlPINVOKE.Model_setAnnotation__SWIG_0(swigCPtr, XMLNode.getCPtr(annotation));
    return ret;
  }

  public override int setAnnotation(string annotation) {
    int ret = libsbmlPINVOKE.Model_setAnnotation__SWIG_1(swigCPtr, annotation);
    return ret;
  }

  public override int appendAnnotation(XMLNode annotation) {
    int ret = libsbmlPINVOKE.Model_appendAnnotation__SWIG_0(swigCPtr, XMLNode.getCPtr(annotation));
    return ret;
  }

  public override int appendAnnotation(string annotation) {
    int ret = libsbmlPINVOKE.Model_appendAnnotation__SWIG_1(swigCPtr, annotation);
    return ret;
  }

  public ListOfFunctionDefinitions getListOfFunctionDefinitions() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfFunctionDefinitions__SWIG_0(swigCPtr);
    ListOfFunctionDefinitions ret = (cPtr == IntPtr.Zero) ? null : new ListOfFunctionDefinitions(cPtr, false);
    return ret;
  }

  public ListOfUnitDefinitions getListOfUnitDefinitions() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfUnitDefinitions__SWIG_0(swigCPtr);
    ListOfUnitDefinitions ret = (cPtr == IntPtr.Zero) ? null : new ListOfUnitDefinitions(cPtr, false);
    return ret;
  }

  public ListOfCompartmentTypes getListOfCompartmentTypes() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfCompartmentTypes__SWIG_0(swigCPtr);
    ListOfCompartmentTypes ret = (cPtr == IntPtr.Zero) ? null : new ListOfCompartmentTypes(cPtr, false);
    return ret;
  }

  public ListOfSpeciesTypes getListOfSpeciesTypes() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfSpeciesTypes__SWIG_0(swigCPtr);
    ListOfSpeciesTypes ret = (cPtr == IntPtr.Zero) ? null : new ListOfSpeciesTypes(cPtr, false);
    return ret;
  }

  public ListOfCompartments getListOfCompartments() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfCompartments__SWIG_0(swigCPtr);
    ListOfCompartments ret = (cPtr == IntPtr.Zero) ? null : new ListOfCompartments(cPtr, false);
    return ret;
  }

  public ListOfSpecies getListOfSpecies() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfSpecies__SWIG_0(swigCPtr);
    ListOfSpecies ret = (cPtr == IntPtr.Zero) ? null : new ListOfSpecies(cPtr, false);
    return ret;
  }

  public ListOfParameters getListOfParameters() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfParameters__SWIG_0(swigCPtr);
    ListOfParameters ret = (cPtr == IntPtr.Zero) ? null : new ListOfParameters(cPtr, false);
    return ret;
  }

  public ListOfInitialAssignments getListOfInitialAssignments() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfInitialAssignments__SWIG_0(swigCPtr);
    ListOfInitialAssignments ret = (cPtr == IntPtr.Zero) ? null : new ListOfInitialAssignments(cPtr, false);
    return ret;
  }

  public ListOfRules getListOfRules() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfRules__SWIG_0(swigCPtr);
    ListOfRules ret = (cPtr == IntPtr.Zero) ? null : new ListOfRules(cPtr, false);
    return ret;
  }

  public ListOfConstraints getListOfConstraints() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfConstraints__SWIG_0(swigCPtr);
    ListOfConstraints ret = (cPtr == IntPtr.Zero) ? null : new ListOfConstraints(cPtr, false);
    return ret;
  }

  public ListOfReactions getListOfReactions() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfReactions__SWIG_0(swigCPtr);
    ListOfReactions ret = (cPtr == IntPtr.Zero) ? null : new ListOfReactions(cPtr, false);
    return ret;
  }

  public ListOfEvents getListOfEvents() {
    IntPtr cPtr = libsbmlPINVOKE.Model_getListOfEvents__SWIG_0(swigCPtr);
    ListOfEvents ret = (cPtr == IntPtr.Zero) ? null : new ListOfEvents(cPtr, false);
    return ret;
  }

  public FunctionDefinition getFunctionDefinition(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getFunctionDefinition__SWIG_0(swigCPtr, n);
    FunctionDefinition ret = (cPtr == IntPtr.Zero) ? null : new FunctionDefinition(cPtr, false);
    return ret;
  }

  public FunctionDefinition getFunctionDefinition(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getFunctionDefinition__SWIG_2(swigCPtr, sid);
    FunctionDefinition ret = (cPtr == IntPtr.Zero) ? null : new FunctionDefinition(cPtr, false);
    return ret;
  }

  public UnitDefinition getUnitDefinition(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getUnitDefinition__SWIG_0(swigCPtr, n);
    UnitDefinition ret = (cPtr == IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
    return ret;
  }

  public UnitDefinition getUnitDefinition(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getUnitDefinition__SWIG_2(swigCPtr, sid);
    UnitDefinition ret = (cPtr == IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
    return ret;
  }

  public CompartmentType getCompartmentType(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getCompartmentType__SWIG_0(swigCPtr, n);
    CompartmentType ret = (cPtr == IntPtr.Zero) ? null : new CompartmentType(cPtr, false);
    return ret;
  }

  public CompartmentType getCompartmentType(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getCompartmentType__SWIG_2(swigCPtr, sid);
    CompartmentType ret = (cPtr == IntPtr.Zero) ? null : new CompartmentType(cPtr, false);
    return ret;
  }

  public SpeciesType getSpeciesType(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getSpeciesType__SWIG_0(swigCPtr, n);
    SpeciesType ret = (cPtr == IntPtr.Zero) ? null : new SpeciesType(cPtr, false);
    return ret;
  }

  public SpeciesType getSpeciesType(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getSpeciesType__SWIG_2(swigCPtr, sid);
    SpeciesType ret = (cPtr == IntPtr.Zero) ? null : new SpeciesType(cPtr, false);
    return ret;
  }

  public Compartment getCompartment(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getCompartment__SWIG_0(swigCPtr, n);
    Compartment ret = (cPtr == IntPtr.Zero) ? null : new Compartment(cPtr, false);
    return ret;
  }

  public Compartment getCompartment(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getCompartment__SWIG_2(swigCPtr, sid);
    Compartment ret = (cPtr == IntPtr.Zero) ? null : new Compartment(cPtr, false);
    return ret;
  }

  public Species getSpecies(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getSpecies__SWIG_0(swigCPtr, n);
    Species ret = (cPtr == IntPtr.Zero) ? null : new Species(cPtr, false);
    return ret;
  }

  public Species getSpecies(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getSpecies__SWIG_2(swigCPtr, sid);
    Species ret = (cPtr == IntPtr.Zero) ? null : new Species(cPtr, false);
    return ret;
  }

  public Parameter getParameter(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getParameter__SWIG_0(swigCPtr, n);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    return ret;
  }

  public Parameter getParameter(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getParameter__SWIG_2(swigCPtr, sid);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    return ret;
  }

  public InitialAssignment getInitialAssignment(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getInitialAssignment__SWIG_0(swigCPtr, n);
    InitialAssignment ret = (cPtr == IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
    return ret;
  }

  public InitialAssignment getInitialAssignment(string symbol) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getInitialAssignment__SWIG_2(swigCPtr, symbol);
    InitialAssignment ret = (cPtr == IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
    return ret;
  }

  public Rule getRule(long n) {
	return (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getRule__SWIG_0(swigCPtr, n), false);
}

  public Rule getRule(string variable) {
	return (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getRule__SWIG_2(swigCPtr, variable), false);
}

  public Constraint getConstraint(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getConstraint__SWIG_0(swigCPtr, n);
    Constraint ret = (cPtr == IntPtr.Zero) ? null : new Constraint(cPtr, false);
    return ret;
  }

  public Reaction getReaction(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getReaction__SWIG_0(swigCPtr, n);
    Reaction ret = (cPtr == IntPtr.Zero) ? null : new Reaction(cPtr, false);
    return ret;
  }

  public Reaction getReaction(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getReaction__SWIG_2(swigCPtr, sid);
    Reaction ret = (cPtr == IntPtr.Zero) ? null : new Reaction(cPtr, false);
    return ret;
  }

  public Event getEvent(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getEvent__SWIG_0(swigCPtr, n);
    Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, false);
    return ret;
  }

  public Event getEvent(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_getEvent__SWIG_2(swigCPtr, sid);
    Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, false);
    return ret;
  }

  public long getNumFunctionDefinitions() { return (long)libsbmlPINVOKE.Model_getNumFunctionDefinitions(swigCPtr); }

  public long getNumUnitDefinitions() { return (long)libsbmlPINVOKE.Model_getNumUnitDefinitions(swigCPtr); }

  public long getNumCompartmentTypes() { return (long)libsbmlPINVOKE.Model_getNumCompartmentTypes(swigCPtr); }

  public long getNumSpeciesTypes() { return (long)libsbmlPINVOKE.Model_getNumSpeciesTypes(swigCPtr); }

  public long getNumCompartments() { return (long)libsbmlPINVOKE.Model_getNumCompartments(swigCPtr); }

  public long getNumSpecies() { return (long)libsbmlPINVOKE.Model_getNumSpecies(swigCPtr); }

  public long getNumSpeciesWithBoundaryCondition() { return (long)libsbmlPINVOKE.Model_getNumSpeciesWithBoundaryCondition(swigCPtr); }

  public long getNumParameters() { return (long)libsbmlPINVOKE.Model_getNumParameters(swigCPtr); }

  public long getNumInitialAssignments() { return (long)libsbmlPINVOKE.Model_getNumInitialAssignments(swigCPtr); }

  public long getNumRules() { return (long)libsbmlPINVOKE.Model_getNumRules(swigCPtr); }

  public long getNumConstraints() { return (long)libsbmlPINVOKE.Model_getNumConstraints(swigCPtr); }

  public long getNumReactions() { return (long)libsbmlPINVOKE.Model_getNumReactions(swigCPtr); }

  public long getNumEvents() { return (long)libsbmlPINVOKE.Model_getNumEvents(swigCPtr); }

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

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

  public void populateListFormulaUnitsData() {
    libsbmlPINVOKE.Model_populateListFormulaUnitsData(swigCPtr);
  }

  public bool isPopulatedListFormulaUnitsData() {
    bool ret = libsbmlPINVOKE.Model_isPopulatedListFormulaUnitsData(swigCPtr);
    return ret;
  }

  public override bool hasRequiredElements() {
    bool ret = libsbmlPINVOKE.Model_hasRequiredElements(swigCPtr);
    return ret;
  }

  public FunctionDefinition removeFunctionDefinition(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeFunctionDefinition__SWIG_0(swigCPtr, n);
    FunctionDefinition ret = (cPtr == IntPtr.Zero) ? null : new FunctionDefinition(cPtr, true);
    return ret;
  }

  public FunctionDefinition removeFunctionDefinition(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeFunctionDefinition__SWIG_1(swigCPtr, sid);
    FunctionDefinition ret = (cPtr == IntPtr.Zero) ? null : new FunctionDefinition(cPtr, true);
    return ret;
  }

  public UnitDefinition removeUnitDefinition(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeUnitDefinition__SWIG_0(swigCPtr, n);
    UnitDefinition ret = (cPtr == IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
    return ret;
  }

  public UnitDefinition removeUnitDefinition(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeUnitDefinition__SWIG_1(swigCPtr, sid);
    UnitDefinition ret = (cPtr == IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
    return ret;
  }

  public CompartmentType removeCompartmentType(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartmentType__SWIG_0(swigCPtr, n);
    CompartmentType ret = (cPtr == IntPtr.Zero) ? null : new CompartmentType(cPtr, true);
    return ret;
  }

  public CompartmentType removeCompartmentType(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartmentType__SWIG_1(swigCPtr, sid);
    CompartmentType ret = (cPtr == IntPtr.Zero) ? null : new CompartmentType(cPtr, true);
    return ret;
  }

  public SpeciesType removeSpeciesType(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeSpeciesType__SWIG_0(swigCPtr, n);
    SpeciesType ret = (cPtr == IntPtr.Zero) ? null : new SpeciesType(cPtr, true);
    return ret;
  }

  public SpeciesType removeSpeciesType(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeSpeciesType__SWIG_1(swigCPtr, sid);
    SpeciesType ret = (cPtr == IntPtr.Zero) ? null : new SpeciesType(cPtr, true);
    return ret;
  }

  public Compartment removeCompartment(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartment__SWIG_0(swigCPtr, n);
    Compartment ret = (cPtr == IntPtr.Zero) ? null : new Compartment(cPtr, true);
    return ret;
  }

  public Compartment removeCompartment(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartment__SWIG_1(swigCPtr, sid);
    Compartment ret = (cPtr == IntPtr.Zero) ? null : new Compartment(cPtr, true);
    return ret;
  }

  public Species removeSpecies(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeSpecies__SWIG_0(swigCPtr, n);
    Species ret = (cPtr == IntPtr.Zero) ? null : new Species(cPtr, true);
    return ret;
  }

  public Species removeSpecies(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeSpecies__SWIG_1(swigCPtr, sid);
    Species ret = (cPtr == IntPtr.Zero) ? null : new Species(cPtr, true);
    return ret;
  }

  public Parameter removeParameter(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeParameter__SWIG_0(swigCPtr, n);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, true);
    return ret;
  }

  public Parameter removeParameter(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeParameter__SWIG_1(swigCPtr, sid);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, true);
    return ret;
  }

  public InitialAssignment removeInitialAssignment(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeInitialAssignment__SWIG_0(swigCPtr, n);
    InitialAssignment ret = (cPtr == IntPtr.Zero) ? null : new InitialAssignment(cPtr, true);
    return ret;
  }

  public InitialAssignment removeInitialAssignment(string symbol) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeInitialAssignment__SWIG_1(swigCPtr, symbol);
    InitialAssignment ret = (cPtr == IntPtr.Zero) ? null : new InitialAssignment(cPtr, true);
    return ret;
  }

  public Rule removeRule(long n) {
	return (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeRule__SWIG_0(swigCPtr, n), true);
}

  public Rule removeRule(string variable) {
	return (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeRule__SWIG_1(swigCPtr, variable), true);
}

  public Constraint removeConstraint(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeConstraint(swigCPtr, n);
    Constraint ret = (cPtr == IntPtr.Zero) ? null : new Constraint(cPtr, true);
    return ret;
  }

  public Reaction removeReaction(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeReaction__SWIG_0(swigCPtr, n);
    Reaction ret = (cPtr == IntPtr.Zero) ? null : new Reaction(cPtr, true);
    return ret;
  }

  public Reaction removeReaction(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeReaction__SWIG_1(swigCPtr, sid);
    Reaction ret = (cPtr == IntPtr.Zero) ? null : new Reaction(cPtr, true);
    return ret;
  }

  public Event removeEvent(long n) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeEvent__SWIG_0(swigCPtr, n);
    Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, true);
    return ret;
  }

  public Event removeEvent(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.Model_removeEvent__SWIG_1(swigCPtr, sid);
    Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, true);
    return ret;
  }

}

}
