<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.6002.18100" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Note that partial revelation is going on here, so you have to import the WrClass.i3 interface in your new formatted writer implementation to see the details.</DIV>
<DIV> </DIV>
<DIV>You can't do multiple inheritance, so if you want to make a new type of writer that does the formatting you described earlier, you can do that, but then all other writer objects that want to build upon this new formatted writer will have to either be a subclass of the new formatted writer, or they will have to direct their output to the new formatted writer. You can't cause existing writers that know nothing of your formatted writer to be a subclass of your formatted writer. </DIV>
<DIV> </DIV>
<DIV>In general, the way the writers are set up, you pass the writer as a parameter to all output functions. So, you would have the following: MyFormattedWriter.T is a subtype of Wr.T. Then, it would be possible to pass an instantiation of your new formatted writer object to any procedure that expects a Wr.T.</DIV>
<DIV> </DIV>
<DIV>There are a number of examples of this in the code base.</DIV>
<DIV> </DIV>
<DIV>Does this explanation help?</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy Coleburn<BR><BR>>>> <hendrik@topoi.pooq.com> 11/10/2009 5:05 PM >>><BR>On Tue, Nov 10, 2009 at 01:32:54PM -0500, hendrik@topoi.pooq.com wrote:<BR>> Am I missing something obvious, or am I going about this in completely <BR>> the wrong way.<BR>> <BR><BR>By the way, the comment in WrClass.i3 says:<BR><BR>: - Formatted writers, in which the client can mark the start and end <BR>: of logical objects and specify desirable places to break the objects <BR>: into lines. Formatted writers are basic tools for building pretty <BR>: printers. <BR>: <BR>: It is beyond the scope of this paper to describe these classes in <BR>: detail. Instead we will describe the interfaces that allow you to <BR>: define new classes.<BR><BR>Do these Formatted writers, which were beyond the scope of the paper, <BR>actually exist? And were they built using the described interfaces?<BR><BR>-- hendrik<BR></DIV></BODY></HTML>