3 This file is part of libmspdatafile
4 Copyright © 2006-2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
17 for(ActionMap::iterator i = actions.begin(); i!=actions.end(); ++i)
21 void Loader::load(Parser &p)
25 Statement st = p.parse();
32 void Loader::load(const Statement &st)
34 for(list<Statement>::const_iterator i = st.sub.begin(); i!=st.sub.end(); ++i)
39 void Loader::load_statement(const Statement &st)
42 ActionMap::iterator j = actions.find(st.keyword);
44 throw_at(KeyError("Unknown keyword", st.keyword), st.get_location());
49 j->second->execute(*this, st);
54 e.at(st.get_location());
61 void Loader::load_sub_with(Loader &ldr)
64 throw InvalidState("load_sub called without current statement");
69 void Loader::add(const string &k, LoaderAction *a)
71 ActionMap::iterator i = actions.find(k);
81 } // namespace DataFile