Ejemplo n.º 1
0
void State::getReachableStates(const Atom& atom, StateContainer& states)
{
	states.clear();

	// iterate through all values with the key which equals to input
	std::pair<Transitions::iterator, Transitions::iterator> keyRange = transitions_.equal_range(atom);
	Transitions transitionsOnAtom = Transitions(keyRange.first, keyRange.second);

	BOOST_FOREACH (Transitions::value_type& pair, transitionsOnAtom)
	{
		StatePointer state = pair.second;
		assert(state != NULL);
		states.push_back(state);
	}
Ejemplo n.º 2
0
// add a state to the state graph
BOOL LLStateDiagram::addState(LLFSMState *state)
{
	mStates[state] = Transitions();
	return TRUE;
}