From: "Warren W. Gay VE3WWG" <ve3wwg@home.com>
Subject: In Plain Text: Tags.Internal_Tag(String'Input(Stream)) ??
Date: Thu, 28 Dec 2000 15:02:55 GMT
Date: 2000-12-28T15:02:55+00:00 [thread overview]
Message-ID: <3A4B557F.F167C8E@home.com> (raw)
In-Reply-To: 3A4AC329.9C2A311A@home.com
(Apologies re: the prior post in HTML, here again in plain:)
I want to read in WAVE file chunks using the S'Class'Input() facility.
Each WAVE chunk starts with a String(1..4) that identifies the chunk.
I have set up the external representation of each tagged record to
match this chunk ID, for example:
for Riff_Form'External_Tag use "RIFF";
However, the difficulty now is that I want to override the way the
Tag is read in (the Tag length is ALWAYS 4 bytes here). The Ada
implementation attempts to read in the lower bound and upper
bound of the Tag string first [ See ref to the note about
Tags.Internal_Tag(String'Input(Stream)) below ].
I would prefer not to override String'Input since this would affect
it's behavour for all strings.
This suggests that I have to define my own S'Class'Input()
instead. This would allow me to read the tag in, in any way I
please, but then how do I proceed from there? How does the
Ada S'Class'Input() dispatch once the external tag is known?
I.E. how do I "dispatch to the subprogram denoted by the Input
attribute of the specific type identified by the internal tag; returning
that result."????
I tried to find the GNAT implementation of this, but so far have been
unsuccessful.
Thanks in advance...
From the ARM :
http://www.adapower.com/rm95/arm95_214.html#SEC214
1.S'Class'Input
S'Class'Input denotes a function with the following specification:
1.function S'Class'Input(
Stream : access Ada.Streams.Root_Stream_Type'Class)
return T'Class
2.First reads the external tag from Stream and determines the corresponding
internal tag (by calling Tags.Internal_Tag(String'Input(Stream)) -- See
section 3.9 Tagged Types and Type Extensions.) and then dispatches to
the subprogram denoted by the Input attribute of the specific type identified by
the internal tag; returns that result.
--
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg
next prev parent reply other threads:[~2000-12-28 15:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3A4AC329.9C2A311A@home.com>
2000-12-28 6:19 ` Tags.Internal_Tag(String'Input(Stream)) ?? tmoran
2000-12-28 15:06 ` Warren W. Gay VE3WWG
2000-12-28 15:02 ` Warren W. Gay VE3WWG [this message]
2000-12-28 15:54 ` In Plain Text: " Ted Dennison
2000-12-28 18:32 ` Warren W. Gay VE3WWG
2000-12-28 19:44 ` Ted Dennison
2000-12-29 2:20 ` Warren W. Gay VE3WWG
2000-12-29 3:20 ` tmoran
2000-12-29 3:04 ` tmoran
2000-12-29 5:29 ` Ada0x Enhancement? Was: " Warren W. Gay VE3WWG
2000-12-29 7:11 ` tmoran
2000-12-29 14:32 ` Warren W. Gay VE3WWG
2000-12-30 5:55 ` External_Tag: Why? was " tmoran
2000-12-31 22:17 ` Randy Brukardt
2001-01-01 16:50 ` Warren W. Gay VE3WWG
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox