| 3152 | } |
| 3153 | |
| 3154 | FilterStateBase * |
| 3155 | FilterBracket::create_state_helper (std::map<const FilterBase *, FilterStateBase *> &fmap, const FilterBase *child, FilterStateBase *closure_state, db::Layout *layout, tl::Eval &eval) const |
| 3156 | { |
| 3157 | std::vector<FilterStateBase *> followers; |
| 3158 | followers.reserve (child->followers ().size ()); |
| 3159 | |
| 3160 | for (std::vector<FilterBase *>::const_iterator o = child->followers ().begin (); o != child->followers ().end (); ++o) { |
| 3161 | if (*o == &m_closure) { |
| 3162 | followers.push_back (closure_state); |
| 3163 | } else { |
| 3164 | std::map<const FilterBase *, FilterStateBase *>::const_iterator f = fmap.find (*o); |
| 3165 | if (f != fmap.end ()) { |
| 3166 | followers.push_back (f->second); |
| 3167 | } else { |
| 3168 | FilterStateBase *fs = create_state_helper (fmap, *o, closure_state, layout, eval); |
| 3169 | fmap.insert (std::make_pair (*o, fs)); |
| 3170 | followers.push_back (fs); |
| 3171 | } |
| 3172 | } |
| 3173 | } |
| 3174 | |
| 3175 | return child->create_state (followers, layout, eval, false); |
| 3176 | } |
| 3177 | |
| 3178 | void |
| 3179 | FilterBracket::dump (unsigned int l) const |