URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 304 |
Rev 384 |
-- { dg-do compile }
|
-- { dg-do compile }
|
with Ada.Tags.Generic_Dispatching_Constructor; use Ada.Tags;
|
with Ada.Tags.Generic_Dispatching_Constructor; use Ada.Tags;
|
package body abstract1 is
|
package body abstract1 is
|
|
|
function New_T (Stream : not null access Root_Stream_Type'Class)
|
function New_T (Stream : not null access Root_Stream_Type'Class)
|
return T'Class is
|
return T'Class is
|
function Construct is
|
function Construct is
|
new Generic_Dispatching_Constructor (T, Root_Stream_Type'Class, Input);
|
new Generic_Dispatching_Constructor (T, Root_Stream_Type'Class, Input);
|
E : constant String := String'Input (Stream);
|
E : constant String := String'Input (Stream);
|
I : constant Tag := Internal_Tag (E);
|
I : constant Tag := Internal_Tag (E);
|
|
|
begin
|
begin
|
return Construct (I, Stream);
|
return Construct (I, Stream);
|
end New_T;
|
end New_T;
|
|
|
function Input (Stream : not null access Root_Stream_Type'Class)
|
function Input (Stream : not null access Root_Stream_Type'Class)
|
return IT is
|
return IT is
|
begin
|
begin
|
return O : IT do
|
return O : IT do
|
Integer'Read (Stream, O.I);
|
Integer'Read (Stream, O.I);
|
end return;
|
end return;
|
end Input;
|
end Input;
|
|
|
function Input (Stream : not null access Root_Stream_Type'Class)
|
function Input (Stream : not null access Root_Stream_Type'Class)
|
return FT is
|
return FT is
|
begin
|
begin
|
return O : FT do
|
return O : FT do
|
Float'Read (Stream, O.F);
|
Float'Read (Stream, O.F);
|
end return;
|
end return;
|
end Input;
|
end Input;
|
end abstract1;
|
end abstract1;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.