CVS difference for ais/ai-00260.txt

Differences between 1.8 and version 1.9
Log of other versions for file ais/ai-00260.txt

--- ais/ai-00260.txt	2002/01/04 22:50:22	1.8
+++ ais/ai-00260.txt	2002/03/13 00:48:28	1.9
@@ -1,6 +1,7 @@
-!standard 13.13.2  (31)                               02-01-04  AI95-00260/02
+!standard 13.13.2  (31)                               02-02-25  AI95-00260/03
 !standard 13.13.2  (34)
 !class amendment 01-02-13
+!status ARG Approved 7-0-0  02-02-11
 !status work item 01-06-02
 !status received 01-02-13
 !priority Low
@@ -25,7 +26,7 @@
 tag string value by using Ada.Tags facilities. But the tag will always
 be streamed as an unbounded string object. This means that the tag string value
 will be written preceded by the string bounds -- which are binary data. There
-is no way to prevent this binary data from being be sent. In other words, there
+is no way to prevent this binary data from being sent. In other words, there
 is no way to stream an object with a plain text representation.
 
 !proposal
@@ -33,40 +34,8 @@
 Two new operational attributes are defined for reading and writing tags.
 These attributes are used in S'Class'Input and S'Class'Output.
 
-For every tagged subtype S'Class of a class-wide type T'Class, the following
-attributes are defined:
+See wording for the detailed proposal.
 
-   S'Class'Tag_Write
-
-        procedure S'Class'Tag_Write (
-                Stream : access Streams.Root_Stream_Type'Class;
-                Tag : Ada.Tags.Tag);
-
-	S'Class'Tag_Write writes the value of Tag to Stream.
-
-   S'Class'Tag_Read
-
-        function S'Class'Tag_Read (
-                Stream : access Streams.Root_Stream_Type'Class)
-                return Ada.Tags.Tag;
-
-	S'Tag_Read reads a tag from Stream, and returns its value.
-
-If T is a derived type, then the parent class-wide type's attributes are
-called. Otherwise, the default implementation of Tag_Write is to call
-String'Output(Stream, Tags.External_Tag(Item'Tag)), which is what Ada 95
-defines as the way of writing tags to a stream. Similarly, the default
-implementation of Tag_Read is to return the value of
-Tags.Internal_Tag(String'Input(Stream)).
-
-User-specifed Tag_Read and Tag_Write attributes may raise an exception if
-presented with a tag value not in S'Class.
-
-S'Class'Input and S'Class'Output use S'Tag_Read and S'Tag_Write, respectively,
-to read and write tag values. The default implementations of S'Tag_Read and
-S'Tag_Write insure that programs not redefining these attributes get unchanged
-behavior.
-
 !discussion
 
 These attributes can be set on any class-wide tagged type, not just the root
@@ -82,15 +51,15 @@
 The wording "returns that result" does not have this effect, as conversions
 are defined as part of the execution of a return_statement. (This is a minor
 hole in Ada 95, discussed in AI-279, which gets more serious with
-user-defined tag reading).
+user-defined tag reading.)
 
-Note that RM 13.13.1(31) is missing a right parenthesis in the call to
+Note that RM 13.13.2(31) is missing a right parenthesis in the call to
 String'Output, and it is missing the Stream parameter. But this paragraph will
 be replaced anyway in this proposal.
 
 !wording:
 
-Add after 13.13.1(28):
+Add after 13.13.2(28):
 
    S'Class'Tag_Write
 
@@ -106,7 +75,7 @@
                 Stream : access Streams.Root_Stream_Type'Class)
                 return Ada.Tags.Tag;
 
-	S'Tag_Read reads a tag from Stream, and returns its value.
+	S'Class'Tag_Read reads a tag from Stream, and returns its value.
 
 The default implementations of the Tag_Write and Tag_Read operate as follows:
   * If T is type derived from type P, the default implementation of Tag_Write
@@ -116,11 +85,8 @@
     String'Output(Stream, Tags.External_Tag(Tag)) -- see 3.9. The default
     implementation of Tag_Read returns the value of
     Tags.Internal_Tag(String'Input(Stream)).
-
-User-specified Tag_Read and Tag_Write attributes may raise an exception if
-presented with a tag value not in S'Class.
 
-Replace 13.13.1(31) by:
+Replace 13.13.2(31) by:
 
 First writes the external tag of Item to Stream (by calling
 S'Tag_Write(Stream, Item'Tag)) and then dispatches to the subprogram denoted
@@ -132,6 +98,11 @@
 internal tag (by calling S'Tag_Read(Stream)) and then dispatches to the
 subprogram denoted by the Input attribute of the specific type identified by
 the internal tag; converts that result to S'Class and returns it.
+
+Add after 13.13.2(38):
+
+User-specified Tag_Read and Tag_Write attributes should raise an exception if
+presented with a tag value not in S'Class.
 
 !example
 

Questions? Ask the ACAA Technical Agent