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

Method write

src/laybasic/laybasic/gtf.cc:473–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void
474LogEventBase::write (std::ostream &os, bool with_endl) const
475{
476 std::vector< std::pair<std::string, std::string> > attrs;
477 attributes (attrs);
478
479 os << " <" << name ();
480 for (std::vector< std::pair<std::string, std::string> >::const_iterator a = attrs.begin (); a != attrs.end (); ++a) {
481 os << " " << a->first << "=\"" << a->second << "\"";
482 }
483
484 if (! data ().is_nil () && ! (data ().is_list () && data ().get_list ().empty ())) {
485 os << ">" << std::endl;
486 if (data ().is_list ()) {
487 for (tl::Variant::const_iterator b = data ().begin (); b != data ().end (); ++b) {
488 write_data (*b, os, 2);
489 }
490 } else {
491 write_data (data (), os, 2);
492 }
493 os << " </" << name () << ">";
494 } else {
495 os << "/>";
496 }
497
498 if (with_endl) {
499 os << std::endl;
500 }
501
502}
503
504// --------------------------------------------------------------
505// The log event specializations

Callers 15

save_toMethod · 0.45
saveMethod · 0.45
produce_index_fileMethod · 0.45
saveMethod · 0.45
saveMethod · 0.45
copy_toMethod · 0.45
save_screenshotMethod · 0.45
save_imageMethod · 0.45
saveMethod · 0.45
save_asMethod · 0.45

Calls 7

attributesFunction · 0.85
write_dataFunction · 0.85
nameFunction · 0.70
dataFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected