comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Redefining 'Class'Output
Date: 1999/07/09
Date: 1999-07-09T00:00:00+00:00	[thread overview]
Message-ID: <37860D43.2E7807B1@averstar.com> (raw)
In-Reply-To: L4gh3.37$u72.440300@news0.optus.net.au

Matt Brennan wrote:
> 
> Hiya,
>      I am trying to stream objects of various tagged types between two
> boxes.
> 
> There are different compilers at each end with differing
> Ada.Tags.External_Tags. One compiler (GNAT) has an external
> representation the same as the Ada.Tags.Expanded_Name (defined by the
> language to be all capitals) and the other compiler uses the same string
> but all lower case.

One solution is to specify the value of External_Tag for
each type.  External_Tag is a specifiable attribute.  E.g.:

    for Tagged_Type_T'External_Tag use "P.TAGGED_TYPE_T";

See RM 95 13.3(75).

> In order to guarantee compatibility at each end, i wish to redefine the
> 'Class'Output (and 'Class'Input) for my base type to use the (language
> defined) Expanded_Name in the stream rather than the external tag...
> like so:

This is definitely the hard way, and I wouldn't recommend it...

> ...
> Any assistance would be great.
> 
> Thanks,
> 
>   matt
> 
> --
> -- Matt Brennan || Vision Systems Ltd || +61 8 8300 4686
> --

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




      reply	other threads:[~1999-07-09  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-09  0:00 Redefining 'Class'Output Matt Brennan
1999-07-09  0:00 ` Tucker Taft [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox