public void setUp() { AR = new AlgebraicRule(2,4); if (AR == null); { } }
public void setUp() { R = new AssignmentRule(2,4); if (R == null); { } }
public void setUp() { RR = new RateRule(1,2); if (RR == null); { } }
public void setUp() { SCR = new AssignmentRule(1,2); SCR.setL1TypeCode(libsbml.SBML_SPECIES_CONCENTRATION_RULE); if (SCR == null); { } }
public void setUp() { CVR = new AssignmentRule(1,2); CVR.setL1TypeCode(libsbml.SBML_COMPARTMENT_VOLUME_RULE); if (CVR == null); { } }
public void setUp() { PR = new AssignmentRule(1,2); PR.setL1TypeCode(libsbml.SBML_PARAMETER_RULE); if (PR == null); { } }
/** * Adds a copy of the given Rule object to this Model. * * @param r the Rule object to add * * @return integer value indicating success/failure of the * function. The possible values * returned by this function are: * @li @link libsbmlcs.libsbml.LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink * @li @link libsbmlcs.libsbml.LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH @endlink * @li @link libsbmlcs.libsbml.LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH @endlink * @li @link libsbmlcs.libsbml.LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID @endlink * @li @link libsbmlcs.libsbml.LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink * @li @link libsbmlcs.libsbml.LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink * * * * @note This method should be used with some caution. The fact that this * method @em copies the object passed to it means that the caller will be * left holding a physically different object instance than the one contained * inside this object. Changes made to the original object instance (such as * resetting attribute values) will <em>not affect the instance in this * object</em>. In addition, the caller should make sure to free the * original object if it is no longer being used, or else a memory leak will * result. Please see other methods on this class (particularly a * corresponding method whose name begins with the word <code>create</code>) * for alternatives that do not lead to these issues. * * * * @see createAlgebraicRule() * @see createAssignmentRule() * @see createRateRule() */ public int addRule(Rule r) { int ret = libsbmlPINVOKE.Model_addRule(swigCPtr, Rule.getCPtr(r)); return ret; }
internal static HandleRef getCPtrAndDisown(Rule obj) { HandleRef ptr = new HandleRef(null, IntPtr.Zero); if (obj != null) { ptr = obj.swigCPtr; obj.swigCMemOwn = false; } return ptr; }
internal static HandleRef getCPtr(Rule obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
public Rule(Rule orig) : this(libsbmlPINVOKE.new_Rule(Rule.getCPtr(orig)), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); }
Rule clone() { Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.Rule_clone(swigCPtr), true); return(ret); }
internal static HandleRef getCPtr(Rule obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
Rule remove(string sid) { Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_remove__SWIG_1(swigCPtr, sid), true); return(ret); }
Rule remove(long n) { Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_remove__SWIG_0(swigCPtr, n), true); return(ret); }
Rule get(string sid) { Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_get__SWIG_2(swigCPtr, sid), false); return(ret); }
Rule get(long n) { Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_get__SWIG_0(swigCPtr, n), false); return(ret); }
public void tearDown() { R = null; }
public void test_Rule_copyConstructor() { Rule o1 = new RateRule(2,1); o1.setVariable("a"); assertTrue( o1.getVariable() == "a" ); ASTNode node = new ASTNode(libsbml.AST_CONSTANT_PI); o1.setMath(node); node = null; assertTrue( o1.isSetMath() == true ); Rule o2 = new Rule(o1); assertTrue( o2.getVariable() == "a" ); assertTrue( o2.isSetMath() == true ); assertTrue( o2.getParentSBMLObject() == o1.getParentSBMLObject() ); o2 = null; o1 = null; }