Hi Ingmar,

Thank you very much for your explanation. Yes, Guard State is a good idea.
I'm interesting in state machine implementation and think MITK has a good
solution on it.
I don't need multiple threads. Thanks!

Best regards,
-Steven

On Mon, Jul 13, 2009 at 12:36 AM, Wegner Ingmar <[email protected]
> wrote:

>  Hi Steven,
>
> a colleague pointed me to the mail once more. Now I see, that I
> misunderstood your question.
>
>
>
> So according to the question, if the method HandleEvent() or
> ExecuteAction() can be re-entered while it is already running:
>
> No, this is not possible as you saw on your own in code.
>
> Perhaps you explain, what you have in mind.
>
> Do you want to build up multiple threads, that are involved in
> user-interaction?
>
>
>
> Best Regards,
>
> Ingmar
>
>
>
> *Von:* Wegner Ingmar [mailto:[email protected]]
> *Gesendet:* Montag, 13. Juli 2009 09:15
> *An:* Steven Wu; [email protected]
> *Betreff:* Re: [mitk-users] question on reentrant of HandleEvent
> andExecutAction?
>
>
>
> Hi Steven,
>
> yes, that’s right.
>
> HandleEvent() mainly is called by the class mitkGlobalInteraction. This
> method should not be changed, because it handles the changes of the
> statemachine (changes to a next state, calling actions etc.).
>
> Within this method ExecuteAction() is as many times as there are actions to
> be processed.
>
> There are special states called guard states that check special conditions
> (e.g. will the set of points be full after addition of a point?). The
> condition is checked within the method ExecuteAction() and then
> HandleEvent() is called again but now with different parameters containing
> the result of the check. Thus ExecuteAction() is reentrant, yes! But every
> time a different switch case block is used.
>
>
>
> See http://docs.mitk.org/nightly-qt4/InteractionPage.html
>
> for a more detailed documentation.
>
>
>
> Best Regards,
>
> Ingmar
>
>
>
>
>
> *Von:* Steven Wu [mailto:[email protected]]
> *Gesendet:* Sonntag, 12. Juli 2009 22:42
> *An:* [email protected]
> *Betreff:* [mitk-users] question on reentrant of HandleEvent and
> ExecutAction?
>
>
>
> Hi All,
>
> I have a question regarding HandleEvent and ExecutAction in a StateMachine.
> Are these function reentrant?  I just read mitkPointSetInteractor and found
> It's ExecuteAction has several actions to call this->HandleEvent again,
> which means mitkPointSetInteracor::ExecuteAction will be called again.  Can
> someone clear me for that? Thanks!
>
> Regards,
> Steven
>
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to