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

Function get_property

src/db/db/dbLayoutQuery.cc:369–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367 }
368
369 bool get_property (unsigned int id, tl::Variant &v)
370 {
371 if (id == m_pids.bbox || id == m_pids.shape_bbox) {
372
373 v = tl::Variant::make_variant (m_shape->bbox ());
374 return true;
375
376 } else if (id == m_pids.dbbox || id == m_pids.shape_dbbox) {
377
378 tl_assert (mp_parent->layout ());
379 v = tl::Variant::make_variant (db::CplxTrans (mp_parent->layout ()->dbu ()) * m_shape->bbox ());
380 return true;
381
382 } else if (id == m_pids.shape) {
383
384 if (m_reading) {
385 v = tl::Variant::make_variant (*m_shape, true /*=is_const*/);
386 } else {
387 v = tl::Variant::make_variant_ref (&m_s);
388 }
389 return true;
390
391 } else if (id == m_pids.layer_index) {
392
393 v = m_layers[m_lindex];
394 return true;
395
396 } else if (id == m_pids.layer_info) {
397
398 v = tl::Variant::make_variant (layout ()->get_properties (m_layers[m_lindex]));
399 return true;
400
401 } else {
402 return FilterStateBase::get_property (id, v);
403 }
404 }
405
406 virtual void dump () const
407 {

Callers 2

resetFunction · 0.70
do_deleteFunction · 0.70

Calls 15

make_variantFunction · 0.85
make_variant_refFunction · 0.85
InstElementFunction · 0.85
get_expressionsFunction · 0.85
get_propertiesMethod · 0.80
is_valid_cell_indexMethod · 0.80
to_longMethod · 0.80
objectMethod · 0.80
layoutFunction · 0.70
cell_indexFunction · 0.70
VariantClass · 0.70
distanceFunction · 0.70

Tested by

no test coverage detected