1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- 12-- All rights reserved. -- 13-- -- 14-- Redistribution and use in source and binary forms, with or without -- 15-- modification, are permitted provided that the following conditions -- 16-- are met: -- 17-- -- 18-- * Redistributions of source code must retain the above copyright -- 19-- notice, this list of conditions and the following disclaimer. -- 20-- -- 21-- * Redistributions in binary form must reproduce the above copyright -- 22-- notice, this list of conditions and the following disclaimer in the -- 23-- documentation and/or other materials provided with the distribution. -- 24-- -- 25-- * Neither the name of the Vadim Godunko, IE nor the names of its -- 26-- contributors may be used to endorse or promote products derived from -- 27-- this software without specific prior written permission. -- 28-- -- 29-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- 30-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- 31-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- 32-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- 33-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- 34-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- 35-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- 36-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- 37-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- 38-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- 39-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- 40-- -- 41------------------------------------------------------------------------------ 42-- $Revision: 2937 $ $Date: 2012-05-01 21:07:27 +0400 (Tue, 01 May 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Internals.UML_Value_Specifications; 45with AMF.UML.Dependencies.Collections; 46with AMF.UML.Literal_Nulls; 47with AMF.UML.Named_Elements; 48with AMF.UML.Namespaces; 49with AMF.UML.Packages.Collections; 50with AMF.UML.Parameterable_Elements; 51with AMF.UML.String_Expressions; 52with AMF.UML.Template_Parameters; 53with AMF.UML.Types; 54with AMF.Visitors; 55 56package AMF.Internals.UML_Literal_Nulls is 57 58 type UML_Literal_Null_Proxy is 59 limited new AMF.Internals.UML_Value_Specifications.UML_Value_Specification_Proxy 60 and AMF.UML.Literal_Nulls.UML_Literal_Null with null record; 61 62 overriding function Get_Type 63 (Self : not null access constant UML_Literal_Null_Proxy) 64 return AMF.UML.Types.UML_Type_Access; 65 -- Getter of TypedElement::type. 66 -- 67 -- The type of the TypedElement. 68 -- This information is derived from the return result for this Operation. 69 70 overriding procedure Set_Type 71 (Self : not null access UML_Literal_Null_Proxy; 72 To : AMF.UML.Types.UML_Type_Access); 73 -- Setter of TypedElement::type. 74 -- 75 -- The type of the TypedElement. 76 -- This information is derived from the return result for this Operation. 77 78 overriding function Get_Client_Dependency 79 (Self : not null access constant UML_Literal_Null_Proxy) 80 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 81 -- Getter of NamedElement::clientDependency. 82 -- 83 -- Indicates the dependencies that reference the client. 84 85 overriding function Get_Name_Expression 86 (Self : not null access constant UML_Literal_Null_Proxy) 87 return AMF.UML.String_Expressions.UML_String_Expression_Access; 88 -- Getter of NamedElement::nameExpression. 89 -- 90 -- The string expression used to define the name of this named element. 91 92 overriding procedure Set_Name_Expression 93 (Self : not null access UML_Literal_Null_Proxy; 94 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 95 -- Setter of NamedElement::nameExpression. 96 -- 97 -- The string expression used to define the name of this named element. 98 99 overriding function Get_Namespace 100 (Self : not null access constant UML_Literal_Null_Proxy) 101 return AMF.UML.Namespaces.UML_Namespace_Access; 102 -- Getter of NamedElement::namespace. 103 -- 104 -- Specifies the namespace that owns the NamedElement. 105 106 overriding function Get_Qualified_Name 107 (Self : not null access constant UML_Literal_Null_Proxy) 108 return AMF.Optional_String; 109 -- Getter of NamedElement::qualifiedName. 110 -- 111 -- A name which allows the NamedElement to be identified within a 112 -- hierarchy of nested Namespaces. It is constructed from the names of the 113 -- containing namespaces starting at the root of the hierarchy and ending 114 -- with the name of the NamedElement itself. 115 116 overriding function Get_Owning_Template_Parameter 117 (Self : not null access constant UML_Literal_Null_Proxy) 118 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 119 -- Getter of ParameterableElement::owningTemplateParameter. 120 -- 121 -- The formal template parameter that owns this element. 122 123 overriding procedure Set_Owning_Template_Parameter 124 (Self : not null access UML_Literal_Null_Proxy; 125 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 126 -- Setter of ParameterableElement::owningTemplateParameter. 127 -- 128 -- The formal template parameter that owns this element. 129 130 overriding function Get_Template_Parameter 131 (Self : not null access constant UML_Literal_Null_Proxy) 132 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 133 -- Getter of ParameterableElement::templateParameter. 134 -- 135 -- The template parameter that exposes this element as a formal parameter. 136 137 overriding procedure Set_Template_Parameter 138 (Self : not null access UML_Literal_Null_Proxy; 139 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 140 -- Setter of ParameterableElement::templateParameter. 141 -- 142 -- The template parameter that exposes this element as a formal parameter. 143 144 overriding function Is_Computable 145 (Self : not null access constant UML_Literal_Null_Proxy) 146 return Boolean; 147 -- Operation LiteralNull::isComputable. 148 -- 149 -- The query isComputable() is redefined to be true. 150 151 overriding function Is_Null 152 (Self : not null access constant UML_Literal_Null_Proxy) 153 return Boolean; 154 -- Operation LiteralNull::isNull. 155 -- 156 -- The query isNull() returns true. 157 158 overriding function Is_Compatible_With 159 (Self : not null access constant UML_Literal_Null_Proxy; 160 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 161 return Boolean; 162 -- Operation ValueSpecification::isCompatibleWith. 163 -- 164 -- The query isCompatibleWith() determines if this parameterable element 165 -- is compatible with the specified parameterable element. By default 166 -- parameterable element P is compatible with parameterable element Q if 167 -- the kind of P is the same or a subtype as the kind of Q. In addition, 168 -- for ValueSpecification, the type must be conformant with the type of 169 -- the specified parameterable element. 170 171 overriding function All_Owning_Packages 172 (Self : not null access constant UML_Literal_Null_Proxy) 173 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 174 -- Operation NamedElement::allOwningPackages. 175 -- 176 -- The query allOwningPackages() returns all the directly or indirectly 177 -- owning packages. 178 179 overriding function Is_Distinguishable_From 180 (Self : not null access constant UML_Literal_Null_Proxy; 181 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 182 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 183 return Boolean; 184 -- Operation NamedElement::isDistinguishableFrom. 185 -- 186 -- The query isDistinguishableFrom() determines whether two NamedElements 187 -- may logically co-exist within a Namespace. By default, two named 188 -- elements are distinguishable if (a) they have unrelated types or (b) 189 -- they have related types but different names. 190 191 overriding function Namespace 192 (Self : not null access constant UML_Literal_Null_Proxy) 193 return AMF.UML.Namespaces.UML_Namespace_Access; 194 -- Operation NamedElement::namespace. 195 -- 196 -- Missing derivation for NamedElement::/namespace : Namespace 197 198 overriding function Is_Template_Parameter 199 (Self : not null access constant UML_Literal_Null_Proxy) 200 return Boolean; 201 -- Operation ParameterableElement::isTemplateParameter. 202 -- 203 -- The query isTemplateParameter() determines if this parameterable 204 -- element is exposed as a formal template parameter. 205 206 overriding procedure Enter_Element 207 (Self : not null access constant UML_Literal_Null_Proxy; 208 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 209 Control : in out AMF.Visitors.Traverse_Control); 210 -- Dispatch call to corresponding subprogram of visitor interface. 211 212 overriding procedure Leave_Element 213 (Self : not null access constant UML_Literal_Null_Proxy; 214 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 215 Control : in out AMF.Visitors.Traverse_Control); 216 -- Dispatch call to corresponding subprogram of visitor interface. 217 218 overriding procedure Visit_Element 219 (Self : not null access constant UML_Literal_Null_Proxy; 220 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 221 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 222 Control : in out AMF.Visitors.Traverse_Control); 223 -- Dispatch call to corresponding subprogram of iterator interface. 224 225end AMF.Internals.UML_Literal_Nulls; 226