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

Method load

src/laybasic/laybasic/layLayoutHandle.cc:346–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346db::LayerMap
347LayoutHandle::load (const db::LoadLayoutOptions &options, const std::string &technology)
348{
349 m_load_options = options;
350 m_save_options = db::SaveLayoutOptions ();
351 m_save_options_valid = false;
352
353 set_tech_name (technology);
354
355 tl::InputStream stream (m_filename);
356 db::Reader reader (stream);
357 db::LayerMap new_lmap = reader.read (layout (), m_load_options);
358
359 // If there is no technology given and the reader reports one, use this one
360 if (technology.empty ()) {
361 std::string tech_from_reader = layout ().technology_name ();
362 if (! tech_from_reader.empty ()) {
363 set_tech_name (tech_from_reader);
364 }
365 }
366
367 // Update the file's data:
368 remove_file_from_watcher (filename ());
369 add_file_to_watcher (filename ());
370
371 m_save_options.set_format (reader.format ());
372 m_dirty = false;
373 return new_lmap;
374}
375
376db::LayerMap
377LayoutHandle::load ()

Callers

nothing calls this directly

Calls 9

SaveLayoutOptionsClass · 0.70
layoutFunction · 0.70
filenameFunction · 0.70
LoadLayoutOptionsClass · 0.70
stringFunction · 0.50
readMethod · 0.45
emptyMethod · 0.45
set_formatMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected