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)
22 void Loader::load(Parser &p)
26 Statement st=p.parse();
35 for(ActionMap::iterator i=actions.begin(); i!=actions.end(); ++i)
39 void Loader::add(const string &k, LoaderAction *a)
41 ActionMap::iterator i=actions.find(k);
51 void Loader::load_statement(const Statement &st)
54 ActionMap::iterator j=actions.find(st.keyword);
56 throw KeyError(st.get_location()+": Unknown keyword", st.keyword);
58 j->second->execute(*this, st);
62 } // namespace DataFile