+ if(routes.count(r.get_name()))
+ throw KeyError("Duplicate route name");
+ routes[r.get_name()] = &r;
+ signal_route_added.emit(r);
+}
+
+Route &Layout::get_route(const string &name) const
+{
+ map<string, Route *>::const_iterator i = routes.find(name);
+ if(i==routes.end())
+ throw KeyError("Unknown route", name);
+ return *i->second;