/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.39 * * 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 && swigCMemOwn) { swigCMemOwn = false; libsbmlPINVOKE.delete_Model(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } } public Model(string id, string name) : this(libsbmlPINVOKE.new_Model__SWIG_0(id, name), true) { } public Model(string id) : this(libsbmlPINVOKE.new_Model__SWIG_1(id), true) { } public Model() : this(libsbmlPINVOKE.new_Model__SWIG_2(), true) { } public Model(long level, long version, XMLNamespaces xmlns) : this(libsbmlPINVOKE.new_Model__SWIG_3(level, version, XMLNamespaces.getCPtr(xmlns)), true) { } public Model(long level, long version) : this(libsbmlPINVOKE.new_Model__SWIG_4(level, version), true) { } public Model(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Model__SWIG_5(SBMLNamespaces.getCPtr(sbmlns)), true) { } public Model(Model orig) : this(libsbmlPINVOKE.new_Model__SWIG_6(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 ModelHistory getModelHistory() { IntPtr cPtr = libsbmlPINVOKE.Model_getModelHistory__SWIG_0(swigCPtr); ModelHistory ret = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, false); return ret; } public bool isSetModelHistory() { bool ret = libsbmlPINVOKE.Model_isSetModelHistory(swigCPtr); return ret; } public void setModelHistory(ModelHistory history) { libsbmlPINVOKE.Model_setModelHistory(swigCPtr, ModelHistory.getCPtr(history)); } public void unsetModelHistory() { libsbmlPINVOKE.Model_unsetModelHistory(swigCPtr); } public void addFunctionDefinition(FunctionDefinition fd) { libsbmlPINVOKE.Model_addFunctionDefinition(swigCPtr, FunctionDefinition.getCPtr(fd)); } public void addUnitDefinition(UnitDefinition ud) { libsbmlPINVOKE.Model_addUnitDefinition(swigCPtr, UnitDefinition.getCPtr(ud)); } public void addCompartmentType(CompartmentType ct) { libsbmlPINVOKE.Model_addCompartmentType(swigCPtr, CompartmentType.getCPtr(ct)); } public void addSpeciesType(SpeciesType st) { libsbmlPINVOKE.Model_addSpeciesType(swigCPtr, SpeciesType.getCPtr(st)); } public void addCompartment(Compartment c) { libsbmlPINVOKE.Model_addCompartment(swigCPtr, Compartment.getCPtr(c)); } public void addSpecies(Species s) { libsbmlPINVOKE.Model_addSpecies(swigCPtr, Species.getCPtr(s)); } public void addParameter(Parameter p) { libsbmlPINVOKE.Model_addParameter(swigCPtr, Parameter.getCPtr(p)); } public void addInitialAssignment(InitialAssignment ia) { libsbmlPINVOKE.Model_addInitialAssignment(swigCPtr, InitialAssignment.getCPtr(ia)); } public void addRule(Rule r) { libsbmlPINVOKE.Model_addRule(swigCPtr, Rule.getCPtr(r)); } public void addConstraint(Constraint c) { libsbmlPINVOKE.Model_addConstraint(swigCPtr, Constraint.getCPtr(c)); } public void addReaction(Reaction r) { libsbmlPINVOKE.Model_addReaction(swigCPtr, Reaction.getCPtr(r)); } public void addEvent(Event e) { libsbmlPINVOKE.Model_addEvent(swigCPtr, Event.getCPtr(e)); } 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 void setAnnotation(XMLNode annotation) { libsbmlPINVOKE.Model_setAnnotation__SWIG_0(swigCPtr, XMLNode.getCPtr(annotation)); } public override void setAnnotation(string annotation) { libsbmlPINVOKE.Model_setAnnotation__SWIG_1(swigCPtr, annotation); } public override void appendAnnotation(XMLNode annotation) { libsbmlPINVOKE.Model_appendAnnotation__SWIG_0(swigCPtr, XMLNode.getCPtr(annotation)); } public override void appendAnnotation(string annotation) { libsbmlPINVOKE.Model_appendAnnotation__SWIG_1(swigCPtr, annotation); } 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 void convertToL1() { libsbmlPINVOKE.Model_convertToL1(swigCPtr); } public void convertToL2() { libsbmlPINVOKE.Model_convertToL2(swigCPtr); } public bool isBoolean(ASTNode node) { bool ret = libsbmlPINVOKE.Model_isBoolean(swigCPtr, ASTNode.getCPtr(node)); return ret; } public void removeDuplicateTopLevelAnnotations() { libsbmlPINVOKE.Model_removeDuplicateTopLevelAnnotations(swigCPtr); } public override void setSBMLDocument(SBMLDocument d) { libsbmlPINVOKE.Model_setSBMLDocument(swigCPtr, SBMLDocument.getCPtr(d)); } public override void setParentSBMLObject(SBase sb) { libsbmlPINVOKE.Model_setParentSBMLObject(swigCPtr, SBase.getCPtr(sb)); } 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; } } }