<start CodeTransformer> loadIDL myfile.idl mapToCPP saveCPP myfile
You should now have the files 'myfile.hh' and 'myfile.cpp' (fileextensions may vary depending on your configuration). Since 'CodeTransformer' can not do a complete language mapping from 'IDL' to 'C++' you might have to alter a few things in the 'C++' headerfile. When you have done this you can generate a new matching 'C++' Implementation file with 'CodeTransformer' like this:
loadCPPHeader myfile.hh saveCPPImpl myfile.cpp
In 'CodeTransformer' the command 'display' is always handy to display how 'CodeTransformer' interprets the data it has read, so it's a good idea to use this command frequently.
Another use for 'CodeTransformer' is if you're implementing plain 'C++' classes. One typical way to do it is like this:
<start CodeTransformer> newClassFile myClass myNewFile saveCPPHeader myNewFile.hh quit <edit the file myNewFile.hh by adding the methods you want> <start CodeTransformer> loadCPPHeader myNewFile.hh saveCPPImpl myfile.cpp
I hope you get the idea about how the software can be used...
You can download the following distributions:
They are all packed with tar and gzip, so to unpack you do something like
To install a binary version, you need to add the location of the CodeTransformer/bin/ct file in the distribution to your path. You must also have a configurationfile called 'CodeTransformer.config' in the directory where you start 'CodeTransformer' or supply the filename and path for a configurationfile as an arguement when you start 'CodeTransformer'. This is described more in detail in the documentation in the distribution in the CodeTransformer/docs/ directory.
To compile the source code you will need an SML'97-compiler with ML-Lex and ML-yacc. I am currently using Standard ML of New Jersey and there are compilationmanager (sources.cm) files included in the source code distribution.
To compile it with SML/NJ, frist start up SML/NJ in the CodeTransformer/srcSML/ directory with the command sml-cm, then execute CM.make() in the SML/NJ system. To create a binary file you can use the function SMLofNJ.exportFn and the program heap2exec which are all part of the SML/NJ system.
I have compiled the Win32 binaries
with MLWorks2.0 but the project files are not included in this release.