Examples

To create a new XML version of a SIDL file, use the following command:

% babel -E -tXML -omydepot mystuff.sidl

To exclude code generation for types whose name begins with ``MPI.'', use the following command:

% babel -sUC++ -exclude='^MPI$\backslash$.' mystuff.sidl
Note, at this time, there are two C++ bindings in Babel. The current and future binding is called UC++ or UCxx, and the old, deprecated binding is called DC++ or DCxx. This manual will focus on the UC++ binding.

Now suppose a developer wants to implement a library in C++ that corresponds to these types in the SIDL file.

% babel -E -sUC++ mystuff.sidl

Alternatively, the developer could also create C++ implementation files based on the XML repository. In this case, a list of symbols to be implemented would need to be specified. Assuming that all of the types are in a package called ``mystuff'', the following command can be issued:

% babel -E -sUC++ -Rmydepot mystuff

Now suppose a second developer wants to extend this software. A second SIDL file is created then the implementation files in Fortran 90 are generated with the following command:

% babel -E -sf90 -Rmydepot newstuff.sidl

A user now can download both SIDL files and create their Python bindings to use both libraries with the following command:

% babel -cPython -Rhttp://localhost/mystuff/mydepot;
http://www.otherhost.com/newstuff mystuff newstuff

Finally, to generate SIDL files for each package based on the XML stored in the repository, the following command is used:

% babel -tSIDL -Rhttp://localhost/mystuff/mydepot;
http://www.otherhost.com/newstuff mystuff newstuff



babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov