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

Method save_layer_props

src/laybasic/laybasic/layLayoutViewBase.cc:2864–2887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2862}
2863
2864void
2865LayoutViewBase::save_layer_props (const std::string &fn)
2866{
2867 tl::OutputStream os (fn, tl::OutputStream::OM_Plain);
2868
2869 if (layer_lists () == 1) {
2870
2871 // a single list is written in the traditional format
2872 get_properties ().save (os);
2873
2874 } else {
2875
2876 // multiple tabs are written in the multi-tab format
2877 std::vector<lay::LayerPropertiesList> props;
2878 for (unsigned int i = 0; i < layer_lists (); ++i) {
2879 props.push_back (get_properties (i));
2880 }
2881
2882 lay::LayerPropertiesList::save (os, props);
2883
2884 }
2885
2886 tl::log << "Saved layer properties to " << fn;
2887}
2888
2889void
2890LayoutViewBase::add_new_layers (const std::vector <unsigned int> &layer_ids, int cv_index)

Callers 1

cm_save_layer_propsMethod · 0.80

Calls 5

layer_listsFunction · 0.85
saveFunction · 0.70
get_propertiesFunction · 0.50
saveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected