+++ /dev/null
-#include <msp/core/maputils.h>
-#include "connector.h"
-#include "logic.h"
-
-using namespace std;
-
-namespace Msp {
-namespace GLtk {
-
-Connector::~Connector()
-{
- for(map<string, ConnAction *>::iterator i=actions.begin(); i!=actions.end(); ++i)
- delete i->second;
-}
-
-void Connector::connect(const Logic &logic)
-{
- const list<Logic::WidgetBinding> &logic_binds = logic.get_bindings();
-
- for(list<Logic::WidgetBinding>::const_iterator i=logic_binds.begin(); i!=logic_binds.end(); ++i)
- {
- ConnAction *action = get_item(actions, i->type);
- action->connect(*this, *i->wdg, i->data);
- }
-}
-
-void Connector::add(const string &type, ConnAction *act)
-{
- map<string, ConnAction *>::iterator i = actions.find(type);
- if(i!=actions.end())
- {
- delete i->second;
- i->second = act;
- }
- else
- actions[type] = act;
-}
-
-} // namespace GLtk
-} // namespace Msp