Logo Search packages:      
Sourcecode: lttoolbox version File versions  Download package

void State::apply ( int const   input  )  [private]

Make a transition, version for lowercase letters and symbols

Parameters:
input the input symbol

Definition at line 99 of file state.cc.

References Pool< T >::get(), pool, and Pool< T >::release().

Referenced by step().

{
  vector<TNodeState> new_state;
  
  for(size_t i = 0, limit = state.size(); i != limit; i++)
  {
    map<int, Dest>::const_iterator it;
    it = state[i].where->transitions.find(input);
    if(it != state[i].where->transitions.end())
    {
      for(int j = 0; j != it->second.size; j++)
      {
        vector<int> *new_v = pool.get();
        *new_v = *(state[i].sequence);
        if(it->first != 0)
        {
          new_v->push_back(it->second.out_tag[j]);
        }
        new_state.push_back(TNodeState(it->second.dest[j], new_v, state[i].dirty||false));
      }
    }
    pool.release(state[i].sequence);
  }
  
  state = new_state;
}


Generated by  Doxygen 1.6.0   Back to index