X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flogic.cpp;h=85ec710def369c7b6764e0cb69f0e628f03e8af6;hb=01eaaef90f4c56cd4669d2f621e3061a938753eb;hp=40d06b218b1aa4b01f9de19ac6df9189bad0d1bb;hpb=c435423919a20a87d100e1ee4cd1fc6ce223040c;p=libs%2Fgltk.git diff --git a/source/logic.cpp b/source/logic.cpp index 40d06b2..85ec710 100644 --- a/source/logic.cpp +++ b/source/logic.cpp @@ -16,22 +16,22 @@ Logic::Loader::Loader(Logic &l, const map &w): logic(l), widgets(w) { - add("action", &Loader::action); + add("bind", &Loader::bind); } -void Logic::Loader::action(const string &wdg, const string &data) +void Logic::Loader::bind(const string &wdg, const string &data) { - map::const_iterator i=widgets.find(wdg); + map::const_iterator i = widgets.find(wdg); if(i==widgets.end()) throw KeyError("Unknown widget", wdg); - unsigned colon=data.find(':'); - WidgetAction act; - act.wdg=i->second; - act.type=data.substr(0, colon); + string::size_type colon = data.find(':'); + WidgetBinding act; + act.wdg = i->second; + act.type = data.substr(0, colon); if(colon!=string::npos) - act.data=data.substr(colon+1); - logic.actions.push_back(act); + act.data = data.substr(colon+1); + logic.bindings.push_back(act); } } // namespace GLtk