Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Znav
nextWriting an Ice Application with C++
prevHello World Application

The first step in writing any Ice application is to write a Slice definition containing the interfaces that are used by the application. For our minimal printing application, we write the following Slice definition:

Wiki Markup
{zcode:slice}
module Demo {
    interface Printer {
        void printString(string s);
    };
};
{zcode}

We save this text in a file called Printer.ice.

Our Slice definitions consist of the module Demo containing a single interface called Printer. For now, the interface is very simple and provides only a single operation, called printString. The printString operation accepts a string as its sole input parameter; the text of that string is what appears on the (possibly remote) printer.

Ztop
See Also
Zret
Znav
nextWriting an Ice Application with C++
prevHello World Application