Variable Expression Library 1.1 review
Downloadlibvarexp is a C++ library that allows its users to detach any kind of information from the representation of that information by pro
|
|
libvarexp is a C++ library that allows its users to detach any kind of information from the representation of that information by providing a simple-to-use but powerful text-template mechanism.
Similar mechanisms have been available in tools like sh(1), make(1), or perl(1) forever and have proven to be very useful.
The basic idea is that the relevant information is made available in variables, which the author of the template can than use within the text itself as he or she sees fit.
Consider, for example, a tool that will calculate the monthly financial reports of a small company.
Such a program should only calculate the required values, it should not worry about writing the resulting reports into an HTML file, a CSV file, or whatever format is desired. Instead, it should make the results of the calculation available in the variables "$TURNOVER", "$PROFIT", and "$INCREASE".
Then, using libvarexp, it could load an arbitrary template file and have the actual values inserted at the apropriate positions. Without changing a single line of code, one could generate the monthly report in HTML
Variable Expression Library 1.1 keywords