From: hanslad@gmail.com
Subject: Re: Binary and XML serialization of types
Date: Fri, 31 Jan 2014 01:51:37 -0800 (PST)
Date: 2014-01-31T01:51:37-08:00 [thread overview]
Message-ID: <e54b02ed-2602-409e-9259-86b26f2318f4@googlegroups.com> (raw)
In-Reply-To: <1txs6yifzioke$.30cghpl6qq1j$.dlg@40tude.net>
>
>
> In that case you can use the implementations from Simple Components.
>
>
Hello,
I am sorry for the late reply on this. Y\Thank you for all the answers.
I have looked briefly into Simple Components, and I am impressed by all the funtionalty you have implemented there.
One question: You have implemented the litle endian Unsigned_16 Get like this:
procedure Get
( Data : in out Stream_Element_Array;
Pointer : in out Stream_Element_Offset;
Value : out Unsigned_16
) is
begin
if ( Pointer < Data'First
or else
( Pointer > Data'Last
and then
Pointer > Data'Last + 1
) )
then
Raise_Exception
( Layout_Error'Identity,
"Pointer is out of bounds"
);
elsif Pointer + 1 > Data'Last then
Raise_Exception (End_Error'Identity, "End of data");
end if;
Value :=
( Shift_Left (Unsigned_16 (Data (Pointer + 1)), 8)
or Unsigned_16 (Data (Pointer))
);
Pointer := Pointer + 2;
end Get;
Is it assumed that the system is little endian. How will this work on a big endian system?
Regards,
HP
next prev parent reply other threads:[~2014-01-31 9:51 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 18:53 Binary and XML serialization of types hanslad
2014-01-23 19:15 ` adambeneschan
2014-01-23 19:17 ` adambeneschan
2014-01-23 19:58 ` hanslad
2014-01-23 20:03 ` adambeneschan
2014-01-23 21:00 ` Dmitry A. Kazakov
2014-01-24 8:54 ` hanslad
2014-01-24 10:01 ` Dmitry A. Kazakov
2014-01-24 14:44 ` hanslad
2014-01-24 15:22 ` Dmitry A. Kazakov
2014-01-31 9:51 ` hanslad [this message]
2014-01-31 10:49 ` Dmitry A. Kazakov
2014-02-04 10:33 ` AdaMagica
2014-02-04 11:14 ` Dmitry A. Kazakov
2014-02-04 11:20 ` AdaMagica
2014-02-04 13:04 ` Dmitry A. Kazakov
2014-02-04 17:16 ` AdaMagica
2014-02-04 17:57 ` Dmitry A. Kazakov
2014-02-04 22:34 ` Simon Wright
2014-02-05 9:02 ` AdaMagica
2014-02-05 9:39 ` Simon Wright
2014-02-05 10:35 ` Dmitry A. Kazakov
2014-02-05 13:03 ` AdaMagica
2014-02-05 13:44 ` G.B.
2014-02-05 15:34 ` Niklas Holsti
2014-02-06 1:32 ` adambeneschan
2014-01-24 17:36 ` Simon Wright
2014-01-24 8:44 ` Georg Bauhaus
2014-01-24 17:13 ` Simon Wright
2014-01-23 22:44 ` Simon Wright
2014-01-23 23:43 ` adambeneschan
2014-01-24 0:58 ` Randy Brukardt
2014-01-24 8:29 ` Oliver Kleinke
2014-01-24 16:22 ` adambeneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox