r-lyeh-archived/fsm

How to understand the [State] and [Event] in Fsm

Opened this issue · 0 comments

Dear author:
Today,i am coufused, when i saw the codes。As follows:
` // setup
fsm::call &on(const fsm::state &from, const fsm::state &to) {

		//XXX 这个返回应该是值传递还是什么呢?
		//XXX 但是这个可是全局变量啊
		//XXX 会不会出现重复添加的情况呢?
		callbacks[bistate(from, to)];
		cout << "Size is " << this->callbacks.size() << endl;
		return callbacks[bistate(from, to)];
	}`

i think the author confuses the concept of [State] and [Event].
How do you think?