nickerso/flattenCellML — pull request #1 by agarny (2013-06-04 14:49:35+00:00)
Title: Make sure that all encapsulation hierarchies are in one and the same group.

Strictly speaking, Jonathan's original code is good as-is, it's just that some CellML-based (COR, not to name it :)) only expect one encapsulation group. So, here, we make sure that all encapsulation hierarchies end up in one and the same encapsulation group.

FWIW, I find the use of macros really awful. Sure, it makes the code shorter, but it makes it unnecessarily difficult to understand (for me, at least). This is why, in OpenCOR, I decided against using them (see https://github.com/opencor/opencor/blob/master/src/plugins/misc/CellMLSupport/src/cellmlfilecellml10exporter.cpp).