[xsd-users] XSD codesynthesis code generator modification
Laurent MONTMAILLER
lmontmailler at edap-tms.com
Mon May 11 08:30:00 EDT 2020
Thank you Boris for your explanation.
I've tried your solution but it did not work. It seems that it is the use of __PRETTY_FUNCTION__ which is not suitable for the indenter. If I instead use __FUNCTION__ all is OK. Unfortunately this macro is less rich of informations, but at least the indentation if correct and make my code readable.
I will try later to improve this point, just after having fixed the indenter ;) as you suggested.
Thank you for your support.
Where are you, USA ?
Best regards
Laurent (France)
-----Message d'origine-----
De : Boris Kolpackov <boris at codesynthesis.com>
Envoyé : lundi 11 mai 2020 13:02
À : Laurent MONTMAILLER <lmontmailler at edap-tms.com>
Cc : xsd-users at codesynthesis.com
Objet : Re: [xsd-users] XSD codesynthesis code generator modification
Laurent MONTMAILLER <lmontmailler at edap-tms.com> writes:
> 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 ?
Our ad hoc indenter is a bit of a voodoo: it tries to analyze the syntax of what's being written and indent things accordingly, which for C++ is not exactly trivial. My guess is it mis-analyzes your first line. Try to change it to:
ctx.os << "// dbg_45: " << __PRETTY_FUNCTION__ << ';' << endl;
Of course, you are also welcome to try to fix the indenter ;-).
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