| 560 | } |
| 561 | |
| 562 | bool |
| 563 | Plugin::do_config_set (const std::string &name, const std::string &value, bool for_child) |
| 564 | { |
| 565 | if (for_child) { |
| 566 | // this is the case when we impose a configuration from the parent: in this case we |
| 567 | // have to remove it from the repository of local parameters. |
| 568 | m_repository.erase (name); |
| 569 | } |
| 570 | |
| 571 | try { |
| 572 | if (configure (name, value)) { |
| 573 | // taken by us - don't propagate to the children |
| 574 | return true; |
| 575 | } |
| 576 | } catch (tl::Exception &ex) { |
| 577 | tl::error << tl::to_string (tr ("Error on configure")) << " " << name << "='" << value << "': " << ex.msg (); |
| 578 | } |
| 579 | |
| 580 | // propagate to all children (not only the first that takes it!) |
| 581 | for (tl::weak_collection<Plugin>::iterator c = m_children.begin (); c != m_children.end (); ++c) { |
| 582 | c->do_config_set (name, value, true); |
| 583 | } |
| 584 | |
| 585 | return false; |
| 586 | } |
| 587 | |
| 588 | void |
| 589 | Plugin::call_function (const std::string &symbol, const std::string &args) |