Some templates within the ETL are designed to support a variable number of template parameters. To accommodate
this, these template classes have a number of specialisations to handle each variant. The ETL sets this number to a
reasonable default, but there will almost certainly be circumstances where these are too small for the project at hand.
To this end, the ETL supplies 'generators' to enable the creation of customised variants of these template classes.
The code generation is handled by a Python library called COG. This allows Python code to be embedded within the C++.
When COG is run on the generator header, it will produce a customised version of that header.
The naming convention used is
The generator file: xxxx_generator.h
The output file: xxxx.h
The script: generate_xxxx.bat
The script generate.bat will run all of the generate scripts.
Running the COG script on the generator type_traits_generator.h will create type_traits.h
The syntax for processing a generator file is
python -m cogapp -d -e -o<output> -D<parameter>=<N> <generator>
python -m cogapp -d -e -otype_traits.h -DIsOneOf=16 type_traits_generator.h
The line above will create type_traits.h with the ability to handle up to 16 types in the etl::is_one_of structure.
All of the generator files may be processed by running the script generate.bat
There are generator scripts for each generator header.
This can be run as a command line batch file under Windows or as a script under Linux (if set to 'executable')