lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Example of using the current PDF generation approach


From: Vadim Zeitlin
Subject: Re: [lmi] Example of using the current PDF generation approach
Date: Mon, 24 Jul 2017 00:44:34 +0200

On Sun, 23 Jul 2017 22:26:47 +0000 Greg Chicares <address@hidden> wrote:

[...]
GC> By saying "the old ledger_xml_io.cpp code", do you imply that that source
GC> file will be completely replaced? That would indeed be good news. It was
GC> born in a parlous state and has only grown uglier over time.

 Unfortunately not. The new ledger_evaluator.cpp is almost exactly the same
as the old ledger_xml_io.cpp, just without all the code filling in
xml::elements, which was completely removed as it's not needed any longer.
I'd like to change this because I think it would actually be better to
just return the different values on demand instead of precomputing all of
them at once and storing them in different maps just in case they're needed
later. But this would be just an optimization and I'm not at this stage
yet.

GC> I have only one question. The first conditional block quoted above uses
GC> the "ctemplate" or "mustache" syntax:
GC> 
GC> > {{^SinglePremium}} less any withdrawals, {{/SinglePremium}}
GC> 
GC> while the second uses a C construct:
GC> 
GC> > if(!interpolate_html.test_variable("GroupExperienceRating"))
GC> 
GC> Would the "external templates" approach push more C conditionals (like
GC> this one) into the "mustache" syntax (which would seem desirable)?

 Yes, exactly. And I agree that this is globally a positive thing, the only
drawback is that sometimes this forces us to create auxiliary variables in
C++ code just to allow testing them in the templates. I'll give an example
of this in the second email that I'll send soon.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]