3 This file is part of libmspgltk
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
15 Logic::Loader::Loader(Logic &l, const map<string, Widget *> &w):
19 add("bind", &Loader::bind);
22 void Logic::Loader::bind(const string &wdg, const string &data)
24 map<string, Widget *>::const_iterator i = widgets.find(wdg);
26 throw KeyError("Unknown widget", wdg);
28 string::size_type colon = data.find(':');
31 act.type = data.substr(0, colon);
32 if(colon!=string::npos)
33 act.data = data.substr(colon+1);
34 logic.bindings.push_back(act);