3 This file is part of libmspdatafile
4 Copyright © 2006-2008 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::load_sub_with(Loader &ldr)
42 throw InvalidState("load_sub called without current statement");
47 void Loader::add(const string &k, LoaderAction *a)
49 ActionMap::iterator i=actions.find(k);
59 void Loader::load_statement(const Statement &st)
62 ActionMap::iterator j=actions.find(st.keyword);
64 throw_at(KeyError("Unknown keyword", st.keyword), st.get_location());
69 j->second->execute(*this, st);
74 e.at(st.get_location());
81 } // namespace DataFile