try
{
- if(!aux_loaders.empty() && !has_keyword(st.keyword))
+ ActionKey key(st.keyword, st.get_signature());
+
+ if(!aux_loaders.empty() && !has_action(key))
{
for(list<Loader *>::const_iterator i=aux_loaders.begin(); i!=aux_loaders.end(); ++i)
- if((*i)->has_keyword(st.keyword))
+ if((*i)->has_action(key))
return (*i)->load_statement(st);
}
- LoaderAction *act = find_action(ActionKey(st.keyword, st.get_signature()));
+ LoaderAction *act = find_action(key);
if(act)
{
sub_loaded = false;
aux_loaders.push_back(&ldr);
}
-bool Loader::has_keyword(const string &kwd) const
+bool Loader::has_action(const ActionKey &key) const
{
- ActionMap::const_iterator i = actions.lower_bound(ActionKey(kwd, string()));
- return i!=actions.end() && i->first.keyword==kwd;
+ ActionMap::const_iterator i = actions.lower_bound(ActionKey(key.keyword, string()));
+ for(; (i!=actions.end() && i->first.keyword==key.keyword); ++i)
+ if(signature_match(key.signature, i->first.signature))
+ return true;
+ return false;
}
LoaderAction *Loader::find_action(const ActionKey &key) const
void add_auxiliary_loader(Loader &);
private:
- bool has_keyword(const std::string &) const;
+ bool has_action(const ActionKey &) const;
LoaderAction *find_action(const ActionKey &) const;
protected: