getTrigger() public method

public getTrigger ( ) : Trigger
return Trigger
コード例 #1
0
ファイル: EventImporter.cs プロジェクト: onwhenrdy/MoBi
        /// <summary>
        ///    Creates a MoBi Event by the given SBML Event.
        /// </summary>
        internal void CreateEvent(Event sbmlEvent)
        {
            EventBuilder = new EventBuilder()
                           .WithId(sbmlEvent.getId() + SBMLConstants.SBML_EVENTBUILDER)
                           .WithName(sbmlEvent.getId())
                           .WithDescription(sbmlEvent.getNotesString());

            if (sbmlEvent.isSetTrigger())
            {
                CreateCondition(sbmlEvent.getTrigger());
            }
            CreateEventAssignments(sbmlEvent);
            CreateWarningsForUnsupportedFeatures(sbmlEvent);

            EventGroupBuilder.Add(EventBuilder);
        }
コード例 #2
0
ファイル: printMath.cs プロジェクト: TotteKarlsson/roadrunner
    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();
    }
コード例 #3
0
 public void test_Trigger_parent_add()
 {
     Trigger d = new Trigger(2,4);
       Event e = new Event(2,4);
       e.setTrigger(d);
       d = null;
       assertTrue( e == e.getTrigger().getParentSBMLObject() );
       e = null;
 }
コード例 #4
0
 public void test_Trigger_ancestor_create()
 {
     Event e = new Event(2,4);
       Trigger ea = e.createTrigger();
       assertTrue( ea.getAncestorOfType(libsbml.SBML_EVENT) == e );
       assertTrue( ea.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( ea.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
       Trigger obj = e.getTrigger();
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == e );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
 }
コード例 #5
0
 public void test_Trigger_ancestor_add()
 {
     Trigger d = new Trigger(2,4);
       Event e = new Event(2,4);
       e.setTrigger(d);
       d = null;
       Trigger obj = e.getTrigger();
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == e );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       e = null;
 }
コード例 #6
0
 public void test_Trigger_parent_add()
 {
     Trigger d = new Trigger(2,4);
       d.setMath(libsbml.parseFormula("true"));
       Event e = new Event(2, 4);
       e.setTrigger(d);
       d = null;
       assertTrue( e == e.getTrigger().getParentSBMLObject() );
       e = null;
 }