From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 9 May 1996 08:01:57 -0400 From: Hans-Peter Bischof bischof@informatik.Uni-Osnabrueck.DE Subject: Object Oriented Programming in ANSI C for Plan 9 Topicbox-Message-UUID: 4637b466-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19960509120157.ajaAnUR50zBq5h-10C8zrcr0eH1CSYkszysErw1DvuI@z> Object Oriented Programming in ANSI C Axel T. Schreiner developed this technique. We ported the system to Plan 9 and added a few classes. ooc is a technique to do object-oriented programming (classes, methods, dynamic linkage, simple inheritance, polymorphisms, persistent objects, method existence testing, message forwarding, exception handling, etc.) using ANSI-C. ooc is a preprocessor to simplify the coding task by converting class descriptions and method implementations into ANSI-C as required by the technique. You implement the algorithms inside the methods and the ooc preprocessor produces the boilerplate. ooc consists of a shell script driving a modular awk script (with provisions for debugging), a set of reports -- code generation templates -- interpreted by the script, and the source of a root class to provide basic functionality. Everything is designed to be changed if desired. There are manual pages, lots of examples, among them a calculator based on curses and X11, and you can ask me about the book. ooc as a technique requires an ANSI-C system -- classic C would necessitate substantial changes. The preprocessor needs a healthy Bourne-Shell and "new" awk as described in Aho, Weinberger, and Kernighan's book. ooc was developed primarily to teach about object-oriented programming without having to learn a new language. If you see how it is done in a familiar setting, it is much easier to grasp the concepts and to know what miracles to expect from the technique and what not. Conceivably, the preprocessor can be used for production programming but this was not the original intent. Being able to roll your own object-oriented coding techniques has its possibilities, however... If you are interessted: ooc description ps-files: ftp:informatik.uni-osnabrueck.de/pub/plan9/O9_BOOK_PS.tar source: ftp:informatik.uni-osnabrueck.de/pub/plan9/O9.tar Hans-Peter Bischof University of Osnabrueck bischof@informatik.Uni-Osnabrueck.DE gandalf plan9 95