Merge pull request #674 from KLayout/issue-670

Documentation clarification regarding properties in gds/oasis formats
This commit is contained in:
Matthias Köfferlein 2020-11-13 01:31:44 +01:00 committed by GitHub
commit ae42b03e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View File

@ -1809,6 +1809,7 @@ Class<db::Cell> decl_Cell ("db", "Cell",
"If no property with that key exists, it will create one. Using that method is more "
"convenient than creating a new property set with a new ID and assigning that properties ID.\n"
"This method may change the properties ID. "
"Note: GDS only supports integer keys. OASIS supports numeric and string keys. "
"\n"
"This method has been introduced in version 0.23."
) +
@ -3821,6 +3822,7 @@ Class<db::Instance> decl_Instance ("db", "Instance",
"If no property with that key exists, it will create one. Using that method is more "
"convenient than creating a new property set with a new ID and assigning that properties ID.\n"
"This method may change the properties ID. "
"Note: GDS only supports integer keys. OASIS supports numeric and string keys. "
"Calling this method may invalidate any iterators. It should not be called inside a "
"loop iterating over instances.\n"
"\n"

View File

@ -1038,12 +1038,13 @@ Class<db::Layout> decl_Layout ("db", "Layout",
"This method has been introduced in version 0.24."
) +
gsi::method_ext ("set_property", &set_layout_property,
"@brief Set the user property with the given key to the given value\n"
"@brief Sets the user property with the given key to the given value\n"
"@args key, value\n"
"This method is a convenience method that sets the property with the given key to the given value. "
"If no property with that key exists, it will create one. Using that method is more "
"convenient than creating a new property set with a new ID and assigning that properties ID.\n"
"This method may change the properties ID. "
"Note: GDS only supports integer keys. OASIS supports numeric and string keys. "
"\n"
"This method has been introduced in version 0.24."
) +

View File

@ -1292,6 +1292,7 @@ Class<db::Shape> decl_Shape ("db", "Shape",
"If no property with that key exists, it will create one. Using that method is more "
"convenient than creating a new property set with a new ID and assigning that properties ID.\n"
"This method may change the properties ID. "
"Note: GDS only supports integer keys. OASIS supports numeric and string keys. "
"Calling this method will invalidate any iterators. It should not be called inside a "
"loop iterating over shapes.\n"
"\n"

View File

@ -473,6 +473,13 @@ shape.set_property(1, "NewValue")</pre>
and "delete_property" also are provided for cells and cell instances (<class_doc href="Cell"/> and <class_doc href="Instance"/>).
</p>
<p>
<b>Note:</b> The GDS format does not have string names for properties. As a result GDS only supports numeric property keys.
OASIS, on the other hand, can handle string and numeric property "names". When saving layouts in GDS format, KLayout tries
to convert the properties' names into numbers if possible (i.e. if it sees that the string is a number). If it can't, then
the property is not saved. When the layout is read by KLayout upon opening, it gets converted to integer.
</p>
<h2>The LayerInfo class</h2>
<keyword name="LayerInfo"/>