3 This file is part of libmspdatafile
4 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
15 void Loader::load(const Statement &st)
17 for(list<Statement>::const_iterator i=st.sub.begin(); i!=st.sub.end(); ++i)
21 void Loader::load(Parser &p)
25 Statement st=p.parse();
33 for(ActionMap::iterator i=actions.begin(); i!=actions.end(); ++i)
37 void Loader::add(const string &k, LoaderAction *a)
39 ActionMap::iterator i=actions.find(k);
49 void Loader::load_statement(const Statement &st)
52 ActionMap::iterator j=actions.find(st.keyword);
54 throw KeyError(st.get_location()+": Unknown keyword '"+st.keyword+"'");
56 j->second->execute(*this, st);
60 } // namespace DataFile