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

Method unregister_lib

src/db/db/dbLibraryManager.cc:141–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void
142LibraryManager::unregister_lib (Library *library)
143{
144 if (! library) {
145 return;
146 }
147
148 library->remap_to (0);
149
150 {
151 tl::MutexLocker locker (&m_lock);
152
153 for (lib_id_type id = 0; id < m_libs.size (); ++id) {
154 if (m_libs [id] == library) {
155 m_lib_by_name.erase (library->get_name ());
156 m_libs [id] = 0;
157 break;
158 }
159 }
160 }
161
162 library->set_id (std::numeric_limits<lib_id_type>::max ());
163
164 // issue the change notification
165 changed_event ();
166}
167
168void
169LibraryManager::delete_lib (Library *library)

Callers 3

unregister_libFunction · 0.80
~LibraryMethod · 0.80

Calls 5

maxFunction · 0.85
remap_toMethod · 0.80
set_idMethod · 0.80
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected