MCPcopy Create free account
hub / github.com/KLayout/klayout / do_config_set

Method do_config_set

src/laybasic/laybasic/layPlugin.cc:562–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562bool
563Plugin::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
588void
589Plugin::call_function (const std::string &symbol, const std::string &args)

Callers 1

do_config_setupMethod · 0.80

Calls 7

msgMethod · 0.80
configureFunction · 0.70
to_stringFunction · 0.50
trFunction · 0.50
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected