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

Function node_to_string

src/laybasic/unit_tests/layAbstractMenuTests.cc:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "tlUnitTest.h"
26
27std::string node_to_string (const lay::AbstractMenuItem &item)
28{
29 std::string s = item.name ();
30 if (! item.children.empty ()) {
31 s += "(";
32 for (std::list<lay::AbstractMenuItem>::const_iterator c = item.children.begin (); c != item.children.end (); ++c) {
33 if (c != item.children.begin ()) {
34 s += ",";
35 }
36 s += node_to_string (*c);
37 }
38 s += ")";
39 }
40 return s;
41}
42
43std::string menu_to_string (const lay::AbstractMenu &menu)
44{

Callers 1

menu_to_stringFunction · 0.85

Calls 4

nameMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected