getDelay() public method

public getDelay ( ) : Delay
return Delay
Beispiel #1
0
    private static void printEventMath(int n, Event e)
    {
        string formula;
        int i;

        if (e.isSetDelay())
        {
            formula = libsbml.formulaToString(e.getDelay().getMath());
            Console.Write("Event " + n + " delay: " + formula + Environment.NewLine);
        }

        if (e.isSetTrigger())
        {
            formula = libsbml.formulaToString(e.getTrigger().getMath());
            Console.Write("Event " + n + " trigger: " + formula + Environment.NewLine);
        }

        for (i = 0; i < e.getNumEventAssignments(); ++i)
        {
            printEventAssignmentMath(i + 1, e.getEventAssignment(i));
        }

        Console.WriteLine();
    }
 public void test_Delay_parent_add()
 {
     Delay d = new Delay(2,4);
       Event e = new Event(2,4);
       e.setDelay(d);
       d = null;
       assertTrue( e == e.getDelay().getParentSBMLObject() );
       e = null;
 }
 public void test_Delay_ancestor_add()
 {
     Delay d = new Delay(2,4);
       Event e = new Event(2,4);
       e.setDelay(d);
       d = null;
       Delay obj = e.getDelay();
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == e );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       e = null;
 }
 public void test_Delay_ancestor_create()
 {
     Event e = new Event(2,4);
       Delay ea = e.createDelay();
       assertTrue( ea.getAncestorOfType(libsbml.SBML_EVENT) == e );
       assertTrue( ea.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( ea.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
       Delay obj = e.getDelay();
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == e );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
 }
 public void test_Delay_parent_add()
 {
     Delay d = new Delay(2,4);
       d.setMath(libsbml.parseFormula("1"));
       Event e = new Event(2,4);
       e.setDelay(d);
       d = null;
       assertTrue( e == e.getDelay().getParentSBMLObject() );
       e = null;
 }