getVariable() public method

public getVariable ( ) : string
return string
Esempio n. 1
0
    private static void printRuleMath(int n, Rule r)
    {
        string formula;

        if (r.isSetMath())
        {
            formula = libsbml.formulaToString(r.getMath());

            if (r.getVariable().Length > 0)
            {
                Console.Write("Rule " + n + ", formula: "
                                 + r.getVariable() + " = " + formula + Environment.NewLine);
            }
            else
            {
                Console.Write("Rule " + n + ", formula: "
                                 + formula + " = 0" + Environment.NewLine);
            }

        }
    }
 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;
 }