[xsd-users] XSD codesynthesis code generator modification

Laurent MONTMAILLER lmontmailler at edap-tms.com
Sat May 9 06:09:47 EDT 2020


Hi Boris,

When I just add a few comments in the XSD codesynthesis code generator, I can't handle indents properly.

For example, if I modify 'tree-source.cxx' as is:
    void
    generate_tree_source (Context& ctx, size_t first, size_t last)
    {
//>>>customization-debug
ctx.os << "// dbg_45, " << __PRETTY_FUNCTION__ << endl;
ctx.os << "/* here is my test xsd generator modification */" << endl;
//<<<customization-debug
    ...

The generated code I get is:
// dbg_45, void CXX::Tree::generate_tree_source(CXX::Tree::Context&, std::size_t, std::size_t)
                                                /* here is my test xsd generator modification */

And not, as expected (2 lines starting at column 0):
// dbg_45, void CXX::Tree::generate_tree_source(CXX::Tree::Context&, std::size_t, std::size_t)
/* here is my test xsd generator modification */

Why this behavior ?
I tried to use '\r', '\n', '\r\n', but without success...

Can you please help me to get correct indentations ?

Best regards,
Laurent


www.edap-tms.com<http://www.edap-tms.com>       [Facebook icon] <https://www.facebook.com/edaptmscompany/>    [LinkedIn icon] <https://www.linkedin.com/company/edap-tms>    [Twitter icon] <https://twitter.com/edaptms>    [Twitter icon] <https://www.hifu-prostate.com>     [Logo] <https://www.edap-tms.com/>

[Banner]



More information about the xsd-users mailing list