File: /home/oboss/Users/gec/sources/Basic_Services/Source_Data/universal_parameter_representation.ads

1     --% Compilation Unit: Universal_Parameter_Representation
2     --
3     --% Category: Package Declaration
4     --
5     --% Release:  $Name:  $
6     --
7     --% Version:  $Revision: 2.1 $
8     --
9     --% Author:   $Author: gec $
10     --
11     --% Revision Log:
12     --    $Log: universal_parameter_representation.ads,v $
13     --    Revision 2.1  2003/11/13 14:57:36  gec
14     --    Merged ECSS Migration branch to main trunk.
15     --
16     --    Revision 1.1.2.1  2003/11/10 10:00:23  gec
17     --    Added universal representation of parameters and associated arithmetic operators.
18     --
19     --
20     --% Project: OBOSS
21     --
22     --% Copyright (C) 2003 by Terma A/S
23     --  Proprietary and intellectual rights of Terma A/S, Denmark,
24     --  are involved in the subject-matter of this material and
25     --  all manufacturing, reproduction, use, disclosure, and
26     --  sales rights pertaining to such subject-matter are
27     --  expressly reserved. This material is submitted for a
28     --  specific purpose as agreed, and the recipient by
29     --  accepting this material agrees that this material will
30     --  not be used, copied, or reproduced in whole or in part
31     --  nor its contents revealed in any manner or to any person,
32     --  except to meet the purpose for which it was submitted and
33     --  subject to the terms of the agreement.
34     --
35     --% Target Dependencies:
36     --    None
37     --% Compiler Dependencies:
38     --    None
39     
40     --~-----------------------------------------------------------------------------
41     
42     package Universal_Parameter_Representation is
43     
44        --% Library Package:
45        --    Representation of a universal supertype for a subset of the parameter
46        --+    domain
47        --% Active Tasks:
48        -->   None
49        --% Passive Tasks:
50        -->   None
51     
52        -- Definition of an abstract universal supertype for subset of the parameter
53        --+    types
54        type Universal_Parameter_Type is abstract tagged null record;
55     
56        --% Abstract Subprogram:
57        --   Subtraction operator on abstract universal type
58        --% Parameter Constraints:
59        -->   None
60        --% Exceptions Raised:
61        -->   None
62     
63        function "-"
64              (Left, Right :        Universal_Parameter_Type)
65              return Universal_Parameter_Type is abstract;
66     
67     
68        --% Abstract Subprogram:
69        --   Multiplication operator on abstract universal type and integer
70        --% Parameter Constraints:
71        -->   None
72        --% Exceptions Raised:
73        -->   None
74     
75        function "*"
76              (Left  :        Universal_Parameter_Type;
77               Right :        Natural)
78              return Universal_Parameter_Type is abstract;
79     
80        --% Abstract Subprogram:
81        --   Abolute operator on abstract universal type
82        --% Parameter Constraints:
83        -->   None
84        --% Exceptions Raised:
85        -->   None
86     
87        function "abs"
88              (Value :        Universal_Parameter_Type)
89              return Universal_Parameter_Type is abstract;
90     
91        --% Abstract Subprogram:
92        --   Ordering relaiton on abstract universal type
93        --% Parameter Constraints:
94        -->   None
95        --% Exceptions Raised:
96        -->   None
97     
98        function ">"
99              (Left, Right :        Universal_Parameter_Type)
100              return Boolean is abstract;
101        function ">"
102              (Left  :        Universal_Parameter_Type;
103               Right :        Natural)
104              return Boolean is abstract;
105     
106        -- Definition of special type used to represent an undefined universal
107        --+    parameter type
108        type Void_Parameter_Type is new Universal_Parameter_Type
109           with record
110              null;
111           end record;
112     
113        -- Indicates that an operation has been invoked on an object belonging to
114        --+    the Void_Parameter_Type
115        Void_Operation : exception;
116     
117        --% Abstract Subprogram:
118        --   Provision of implementations for abstract operations on the void
119        --+    parameter type.
120        --   Should never be invoked.
121        --% Parameter Constraints:
122        -->   None
123        --% Exceptions Raised:
124        -->   Void_Operation - Raised by all operations
125     
126        function "-"
127              (Left, Right :        Void_Parameter_Type)
128              return Void_Parameter_Type;
129        function "*"
130              (Left  :        Void_Parameter_Type;
131               Right :        Natural)
132              return Void_Parameter_Type;
133        function "abs"
134              (Left :        Void_Parameter_Type)
135              return Void_Parameter_Type;
136        function ">"
137              (Left, Right :        Void_Parameter_Type)
138              return Boolean;
139        function ">"
140              (Left  :        Void_Parameter_Type;
141               Right :        Natural)
142              return Boolean;
143     
144     end Universal_Parameter_Representation;
145     
146     --~-----------------------------------------------------------------------------
147