Variable Expression Library 1.1 review

Download
by rbytes.net on

libvarexp is a C++ library that allows its users to detach any kind of information from the representation of that information by pro

License: BSD License
File size: 93K
Developer: Peter Simons
0 stars award from rbytes.net

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