From: tmoran@bix.com
Subject: Re: Representation Clauses And Freezing
Date: 2000/07/22
Date: 2000-07-22T00:00:00+00:00 [thread overview]
Message-ID: <ujme5.27$Al5.45903@news.pacbell.net> (raw)
In-Reply-To: 3979C22C.627F3C89@acm.com
>operations are class-wide. No matter how you extend the message, the
>base class needs to be able to determine where the "real" data is in the
>record, how big it is, how to checksum it, how to interpret it as raw
>bytes, etc, etc. In a weakly typed language, you could do this by
You can really do a lot with Streams. You can of course define a
'Write to one child of Root_Stream_Type that puts the bytes of the
data object into a Stream_Element_Array. But a different child of
Root_Stream_Type could instead put a kind_of_record_indicator, or a
checksum, or a length, or even an address into its resulting
Stream_Element_Array. So your Output_To_Device procedure could take
a Stream_Element_Array that consisted of one (or more) triples of
(count, checksum, start_address), should you want to do that.
For bitmaps In Claw we use record rep clauses (with TAG_SIZE
offsets included) to lay things out for Windows system calls, but we
define Mono_Bitmap'Class'Read, VGA_Bitmap'Class'Read, etc, for use in
embedding bitmaps in files or sending them over networks. That's also
used internally for the
function Read(Filename:String) return Claw.Root_Bitmap'Class;
kind of thing for simple read/write of .bmp files.
next prev parent reply other threads:[~2000-07-22 0:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-17 0:00 Representation Clauses And Freezing Marin D. Condic
2000-07-17 0:00 ` Stephen Leake
2000-07-20 0:00 ` Marin D. Condic
2000-07-20 0:00 ` Stephen Leake
2000-07-21 0:00 ` Marin D. Condic
2000-07-21 0:00 ` Simon Wright
2000-07-22 0:00 ` Marin D. Condic
2000-07-22 0:00 ` tmoran [this message]
2000-07-22 0:00 ` Marin D. Condic
2000-07-24 0:00 ` Ted Dennison
2000-07-21 0:00 ` Stephen Leake
2000-07-21 0:00 ` Marin D. Condic
2000-07-21 0:00 ` tmoran
2000-07-18 0:00 ` Nicolas Brunot
2000-07-18 0:00 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox