The usage for tdrp_gen is given below:
Usage: tdrp_gen [moduleName] -f paramdef_path [-h] [-c++] [-class className] [-prog progName] [-debug] where: [moduleName] in C mode all externals are prepended with this name. moduleName must be first arg if it is specified. If first arg begins with -, moduleName is set to empty string. [-f paramdef_path] parameter definition file path. This arg is REQUIRED. [-h] gives usage. [-c++] C++ mode - generates .hh and .cc class files. [-class className] In C++ mode, set the name of the params class. Default is 'Params'. [-prog progName] Program name for documenting code files. [-debug] print debug messages. NOTES: TDRP - Table Driven Runtime Parameters. tdrp_gen performs code generation. tdrp_gen will generate two files, one header and one for code. In C mode, the default, it will generate the files: moduleName_tdrp.h and moduleName_tdrp.c. If moduleName is left out of the command line, the files will be: _tdrp.h and _tdrp.c. In C++ mode, it will generate the files: className.hh and className.cc. If the -class arg is not given, the files will be: Params.hh and Params.cc.tdrp_gen supports the following:
If you run:
tdrp_gen -f paramdef_path -prog nametdrp_gen will generate two files, _tdrp.h and _tdrp.c. This is the normal case, in which a single TDRP module is used with a program. The module name is omitted, and the generated files (and the routines within them) start with _tdrp.
Generation of C code for multiple TDRP modules per program.
If you run:
tdrp_gen moduleName -f paramdef_path -prog nametdrp_gen will generate two files, moduleName_tdrp.h and moduleName_tdrp.c. The the generated files (and the routines within them) start with moduleName_tdrp. This allows the programmer to set up multiple TDRP modules. The moduleName provides the unique name-space for each module.
Generation of C++ code for a single TDRP class per program.
If you run:
tdrp_gen -f paramdef_path -C++ -prog nametdrp_gen will generate two files, Params.hh and Params.cc. This is the normal case, in which a single TDRP class is used with a program. The class name is omitted, so the default value of Params is used.
Generation of C++ code for multiple TDRP classes per program.
If you run:
tdrp_gen -f paramdef_path -C++ -class className -prog nametdrp_gen will generate two files, className.hh and className.cc. Running tdrp_gen multiple times with different paramdef file and classNames will produce multiple classes.