Add on_container_end() function to code generator to allow injection of children

This commit is contained in:
Jonathan Müller 2017-12-14 19:08:22 +01:00
commit 8eef31bba1
2 changed files with 22 additions and 0 deletions

View file

@ -88,6 +88,8 @@ namespace
if (!need_sep)
// file empty, write newl
output << newl;
else
output.container_end();
}
return static_cast<bool>(output);
}
@ -173,6 +175,7 @@ namespace
output.indent();
write_container(output, ns, newl, cur_access);
output.container_end();
output.unindent();
output << punctuation("}") << newl;
@ -285,6 +288,8 @@ namespace
if (need_sep)
output << newl;
output.container_end();
output.unindent();
output << punctuation("};") << newl;
}
@ -426,6 +431,8 @@ namespace
}
}
output.container_end();
output.unindent();
output << punctuation("};") << newl;
}