Inheritance: SBase
 public void setUp()
 {
     AR = new  AssignmentRule(2,4);
       if (AR == null);
       {
       }
 }
Example #2
0
 public void setUp()
 {
     RR = new  RateRule(1,2);
       if (RR == null);
       {
       }
 }
 public void setUp()
 {
     AR = new  AlgebraicRule(2,4);
       if (AR == 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);
       {
       }
 }
Example #7
0
 /**
    * 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.  @if clike The value is drawn from the
  * enumeration #OperationReturnValues_t. @endif The possible values
  * returned by this function are:
  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
    * @li @link 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;
 }
Example #8
0
 /**
    * Copy constructor; creates a copy of this Rule.
    *
    * @param orig the object to copy.
    *
    * @throws @if python ValueError @else SBMLConstructorException @endif
    * Thrown if the argument @p orig is @c null.
    */
 public Rule(Rule orig)
     : this(libsbmlPINVOKE.new_Rule(Rule.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Example #9
0
        internal static HandleRef getCPtrAndDisown(Rule obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
            ptr             = obj.swigCPtr;
            obj.swigCMemOwn = false;
            }

            return ptr;
        }
Example #10
0
 internal static HandleRef getCPtr(Rule obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Example #11
0
 public void tearDown()
 {
     RR = null;
 }
Example #12
0
        Rule clone()
        {
            Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.Rule_clone(swigCPtr), true);

            return(ret);
        }
Example #13
0
 internal static HandleRef getCPtr(Rule obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
 public void tearDown()
 {
     SCR = null;
 }
 public void tearDown()
 {
     CVR = 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;
 }