Issue 1057 (Library#refresh enhancements) (#1060)

* Added Layout#refresh and added that to Library#refresh

* Doc updates, clarification
This commit is contained in:
Matthias Köfferlein 2022-04-10 18:41:26 +02:00 committed by GitHub
parent 19aac2abd7
commit 0df479b29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 2 deletions

View File

@ -1560,6 +1560,14 @@ Layout::allocate_new_cell ()
return new_index;
}
void
Layout::refresh ()
{
for (iterator c = begin (); c != end (); ++c) {
c->update ();
}
}
void
Layout::cleanup (const std::set<db::cell_index_type> &keep)
{

View File

@ -1632,6 +1632,14 @@ public:
*/
void cleanup (const std::set<db::cell_index_type> &keep = std::set<db::cell_index_type> ());
/**
* @brief Calls "update" on all cells of the layout
*
* This will update PCells stored inside this layout, but will *not* update
* PCells which are imported from a library.
*/
void refresh ();
/**
* @brief Implementation of the undo operations
*/

View File

@ -148,6 +148,7 @@ Library::is_retired (const db::cell_index_type library_cell_index) const
void
Library::refresh ()
{
layout ().refresh ();
remap_to (this);
}

View File

@ -2932,10 +2932,14 @@ Class<db::Cell> decl_Cell ("db", "Cell",
"This method has been introduced in version 0.22.\n"
) +
gsi::method_ext ("refresh", &refresh,
"@brief Refreshes the cell\n"
"@brief Refreshes a proxy cell\n"
"\n"
"If the cell is a PCell or a proxy to a PCell in a library, this method recomputes the PCell.\n"
"If the cell is a PCell variant, this method recomputes the PCell.\n"
"If the cell is a library proxy, this method reloads the information from the library, but not the library itself.\n"
"Note that if the cell is an PCell variant for a PCell coming from a library, this method will not recompute the PCell. "
"Instead, you can use \\Library#refresh to recompute all PCells from that library.\n"
"\n"
"You can use \\Layout#refresh to refresh all cells from a layout.\n"
"\n"
"This method has been introduced in version 0.22.\n"
) +

View File

@ -1089,6 +1089,14 @@ Class<db::Layout> decl_Layout ("db", "Layout",
"@brief Gets the library this layout lives in or nil if the layout is not part of a library\n"
"This attribute has been introduced in version 0.27.5."
) +
gsi::method ("refresh", &db::Layout::refresh,
"@brief Calls \\Cell#refresh on all cells inside this layout\n"
"This method is useful to recompute all PCells from a layout. Note that this does not "
"update PCells which are linked from a library. To recompute PCells from a library, you need "
"to use \\Library#refresh on the library object from which the PCells are imported.\n"
"\n"
"This method has been introduced in version 0.27.9."
) +
gsi::method ("add_meta_info", &db::Layout::add_meta_info, gsi::arg ("info"),
"@brief Adds meta information to the layout\n"
"See \\LayoutMetaInfo for details about layouts and meta information."

View File

@ -237,6 +237,7 @@ LibraryClass decl_Library ("db", "Library",
gsi::method ("refresh", &db::Library::refresh,
"@brief Updates all layouts using this library.\n"
"This method will retire cells or update layouts in the attached clients.\n"
"It will also recompute the PCells inside the library. "
"\n"
"This method has been introduced in version 0.27.8."
),