Exemplo n.º 1
0
 public void setUp()
 {
     AR = new  AlgebraicRule(2,4);
       if (AR == null);
       {
       }
 }
Exemplo n.º 2
0
 public void setUp()
 {
     R = new  AssignmentRule(2,4);
       if (R == null);
       {
       }
 }
Exemplo n.º 3
0
 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);
       {
       }
 }
Exemplo n.º 6
0
 public void setUp()
 {
     PR = new  AssignmentRule(1,2);
       PR.setL1TypeCode(libsbml.SBML_PARAMETER_RULE);
       if (PR == null);
       {
       }
 }
Exemplo n.º 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.  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;
 }
Exemplo n.º 8
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;
        }
Exemplo n.º 9
0
 internal static HandleRef getCPtr(Rule obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Exemplo n.º 10
0
 public Rule(Rule orig)
     : this(libsbmlPINVOKE.new_Rule(Rule.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
Exemplo n.º 11
0
        Rule clone()
        {
            Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.Rule_clone(swigCPtr), true);

            return(ret);
        }
Exemplo n.º 12
0
 internal static HandleRef getCPtr(Rule obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Exemplo n.º 13
0
        Rule remove(string sid)
        {
            Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_remove__SWIG_1(swigCPtr, sid), true);

            return(ret);
        }
Exemplo n.º 14
0
        Rule remove(long n)
        {
            Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_remove__SWIG_0(swigCPtr, n), true);

            return(ret);
        }
Exemplo n.º 15
0
        Rule get(string sid)
        {
            Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_get__SWIG_2(swigCPtr, sid), false);

            return(ret);
        }
Exemplo n.º 16
0
        Rule get(long n)
        {
            Rule ret = (Rule)libsbml.DowncastSBase(libsbmlPINVOKE.ListOfRules_get__SWIG_0(swigCPtr, n), false);

            return(ret);
        }
Exemplo n.º 17
0
 public void tearDown()
 {
     R = null;
 }
Exemplo n.º 18
0
 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;
 }