2

When I fire process_event("eventname"), How can I check if the state transition occurred or if no_transition was called?

Basically, I would like that the class that fires/calls process_event("eventname") be able to tell if the transition occurred. Currently I can't determine this.

Any ideas?

Thank you

Kam
  • 5,878
  • 10
  • 53
  • 97

1 Answers1

5

The return value of process_event is:

typedef enum
{
    HANDLED_FALSE=0,
    HANDLED_TRUE =1,
    HANDLED_GUARD_REJECT=2,
    HANDLED_DEFERRED=4
} HandledEnum;

What you want is probably all except HANDLED_FALSE, which comes with no_transition.

Christophe Henry
  • 1,601
  • 1
  • 10
  • 4
  • Hi Christophe, I realised you are the author for boost msm, and I have a question that I don't seem to get an answer to. would you be able to help me? I am sorry I found no other way to contact you. The question is here: http://stackoverflow.com/questions/11421537/boost-msm-problems-with-events-and-state-reuse – Kam Jul 11 '12 at 18:18
  • I answered on the boost mailing list. I'm checking it much more regularly than SO. – Christophe Henry Jul 11 '12 at 20:50