A brief article on C++ reflection approach implemented in ESFWX framework
When using boost framework, which I usually try to avoid, if possible, I further avoid using its binary libraries. Mainly because it's required to build these, and it's not as easy as it may seem.
First, you should build the boost build engine itself. My most recent attempt was with boost 1.66 + MSVC 2017. Needless to say, that I ran into quite usual showstopper. Boost could not compile b2 because it could not find a few C++ headers, and libraries. Following are necessary steps to perform to avoid these obstacles.
I started ESP8266 project, the first step was to support SDMMC over SPI. I have implemented SDMMC SPI interface years ago. The main challenge was to adapt it to new MCU core. After many attempts, it was up and running. Below are lessons learned.
Recently I've implemented lightweight header library to encapsulate interfacing with FTDI EVE chip, namely, FT800, in templated OO manner. It should compile in modern embedded x86/ARM toolchains, like ones Keil or C++ Builder have.
The idea is as follows - while your core framework provides standard IO bus interface, like mine esfwxe, via EseChannel templated abstract facade, the rest is done in modular manner by EVE library classes.
For the recent mobile FMX application development, I had a challenge, do not use any service from my full-featured cross-platform framework, to minimize application bloat, besides, FMX framework itself is rather big piece of cake.
One of the cornerstones is a I18N support which in my framework is based upon custom implementation of gettext. In current case, I decided to wrap I18N manager coode around FMX's TLang. As far as TLang may use, besides its binary stoarage, the plain text files as well, formatted as key=value pair.
About couple years ago, I've faced neccessity to add Auto-update functionality to my software. There were several restrictions, to which this tool should comply.
- Freeware, open source.
- Intuitive programming interface.
- Final binary should be independent of any external libraries.
- Easy to integrate with a product
Below is an example of simple ESS script which loads any file as binary, an converts any byte, which has most signficant bit set, into C hex-escaped character. Other bytes get copied to output stream without changes.
It means, that if we feed non-BOM utf-8 file to this script, an output will be fully single-byte-compatible.