mirror of https://github.com/KLayout/klayout.git
Debugging & testing
This commit is contained in:
parent
3361802a20
commit
56fbba60c1
|
|
@ -844,8 +844,40 @@ OASISReader::do_read (db::Layout &layout)
|
|||
|
||||
db::PropertiesRepository &rep = layout.properties_repository ();
|
||||
|
||||
// exchange the properties in the repository: first locate all
|
||||
// property sets that are affected
|
||||
// exchange properties in layout_properties
|
||||
db::PropertiesRepository::properties_set new_set;
|
||||
|
||||
for (db::PropertiesRepository::properties_set::const_iterator s = layout_properties.begin (); s != layout_properties.end (); ++s) {
|
||||
if (s->first == pf->second && is_s_gds_property) {
|
||||
|
||||
// S_GDS_PROPERTY translation
|
||||
if (!s->second.is_list () || s->second.get_list ().size () != 2) {
|
||||
error (tl::to_string (tr ("S_GDS_PROPERTY must have a value list with exactly two elements")));
|
||||
}
|
||||
|
||||
new_set.insert (std::make_pair (rep.prop_name_id (s->second.get_list () [0]), s->second.get_list () [1]));
|
||||
|
||||
} else if (s->first == pf->second && is_klayout_context_property) {
|
||||
|
||||
// feed context strings from klayout context property
|
||||
if (s->second.is_list ()) {
|
||||
for (auto l = s->second.begin (); l != s->second.end (); ++l) {
|
||||
context_properties.push_back (*l);
|
||||
}
|
||||
} else {
|
||||
context_properties.push_back (s->second);
|
||||
}
|
||||
|
||||
} else {
|
||||
new_set.insert (*s);
|
||||
}
|
||||
}
|
||||
|
||||
new_set.swap (layout_properties);
|
||||
|
||||
// exchange the properties in the repository
|
||||
|
||||
// first locate all property sets that are affected
|
||||
std::vector <db::properties_id_type> pids;
|
||||
for (db::PropertiesRepository::iterator p = rep.begin (); p != rep.end (); ++p) {
|
||||
if (p->second.find (pf->second) != p->second.end ()) {
|
||||
|
|
@ -871,13 +903,18 @@ OASISReader::do_read (db::Layout &layout)
|
|||
|
||||
} else if (s->first == pf->second && is_klayout_context_property) {
|
||||
|
||||
// feed context strings from klayout context property
|
||||
if (s->second.is_list ()) {
|
||||
for (auto l = s->second.begin (); l != s->second.end (); ++l) {
|
||||
context_properties.push_back (*l);
|
||||
if (*pid == layout.prop_id ()) {
|
||||
// feed context strings from klayout context property
|
||||
if (s->second.is_list ()) {
|
||||
for (auto l = s->second.begin (); l != s->second.end (); ++l) {
|
||||
context_properties.push_back (*l);
|
||||
}
|
||||
} else {
|
||||
context_properties.push_back (s->second);
|
||||
}
|
||||
} else {
|
||||
context_properties.push_back (s->second);
|
||||
// TODO: should update that in cells (in case we encounter forward-referenced context properties
|
||||
// for cells)
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue