next up previous contents
Next: Writing the Implementation Up: Hello World Tutorial Previous: Introduction   Contents

Writing the SIDL File

The ``Hello World!'' program will be written in a directory called hello/ and place the client library in a subdirectory hello/lib/:

% mkdir hello
% cd hello
% mkdir lib

The first step is to write a SIDL file. Recall that SIDL is an interface definition language (IDL) that describes the calling interface for a scientific library. It is used by the Babel tools to generate glue code that hooks together different programming languages. A complete description of SIDL can be found in Chapter [*].

For this particular application, we will write a SIDL file that contains a class World in a package Hello. Method getMsg() in class World returns a string containing the traditional computer greeting. Using your favorite text editor, create a file called hello.sidl in the hello/ directory containing the following:


      package Hello version 1.0 {
        class World {
          string getMsg();
        }
      }

The package statement provides a scope (or namespace) for class World, which contains only one method, getMsg(). The version clause of the statement identifies this as version 1.0 of the Hello package.


next up previous contents
Next: Writing the Implementation Up: Hello World Tutorial Previous: Introduction   Contents


babel-0.8.4
users_guide Last Modified 2003-04-03

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