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_Packageable_Elements; 45with AMF.UML.Constraints; 46with AMF.UML.Dependencies.Collections; 47with AMF.UML.Elements.Collections; 48with AMF.UML.Named_Elements; 49with AMF.UML.Namespaces; 50with AMF.UML.Packages.Collections; 51with AMF.UML.Parameterable_Elements; 52with AMF.UML.String_Expressions; 53with AMF.UML.Template_Parameters; 54with AMF.UML.Value_Specifications; 55with AMF.Visitors; 56 57package AMF.Internals.UML_Constraints is 58 59 type UML_Constraint_Proxy is 60 limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 61 and AMF.UML.Constraints.UML_Constraint with null record; 62 63 overriding function Get_Constrained_Element 64 (Self : not null access constant UML_Constraint_Proxy) 65 return AMF.UML.Elements.Collections.Ordered_Set_Of_UML_Element; 66 -- Getter of Constraint::constrainedElement. 67 -- 68 -- The ordered set of Elements referenced by this Constraint. 69 70 overriding function Get_Context 71 (Self : not null access constant UML_Constraint_Proxy) 72 return AMF.UML.Namespaces.UML_Namespace_Access; 73 -- Getter of Constraint::context. 74 -- 75 -- Specifies the namespace that owns the NamedElement. 76 77 overriding procedure Set_Context 78 (Self : not null access UML_Constraint_Proxy; 79 To : AMF.UML.Namespaces.UML_Namespace_Access); 80 -- Setter of Constraint::context. 81 -- 82 -- Specifies the namespace that owns the NamedElement. 83 84 overriding function Get_Specification 85 (Self : not null access constant UML_Constraint_Proxy) 86 return AMF.UML.Value_Specifications.UML_Value_Specification_Access; 87 -- Getter of Constraint::specification. 88 -- 89 -- A condition that must be true when evaluated in order for the 90 -- constraint to be satisfied. 91 92 overriding procedure Set_Specification 93 (Self : not null access UML_Constraint_Proxy; 94 To : AMF.UML.Value_Specifications.UML_Value_Specification_Access); 95 -- Setter of Constraint::specification. 96 -- 97 -- A condition that must be true when evaluated in order for the 98 -- constraint to be satisfied. 99 100 overriding function Get_Client_Dependency 101 (Self : not null access constant UML_Constraint_Proxy) 102 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 103 -- Getter of NamedElement::clientDependency. 104 -- 105 -- Indicates the dependencies that reference the client. 106 107 overriding function Get_Name_Expression 108 (Self : not null access constant UML_Constraint_Proxy) 109 return AMF.UML.String_Expressions.UML_String_Expression_Access; 110 -- Getter of NamedElement::nameExpression. 111 -- 112 -- The string expression used to define the name of this named element. 113 114 overriding procedure Set_Name_Expression 115 (Self : not null access UML_Constraint_Proxy; 116 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 117 -- Setter of NamedElement::nameExpression. 118 -- 119 -- The string expression used to define the name of this named element. 120 121 overriding function Get_Namespace 122 (Self : not null access constant UML_Constraint_Proxy) 123 return AMF.UML.Namespaces.UML_Namespace_Access; 124 -- Getter of NamedElement::namespace. 125 -- 126 -- Specifies the namespace that owns the NamedElement. 127 128 overriding function Get_Qualified_Name 129 (Self : not null access constant UML_Constraint_Proxy) 130 return AMF.Optional_String; 131 -- Getter of NamedElement::qualifiedName. 132 -- 133 -- A name which allows the NamedElement to be identified within a 134 -- hierarchy of nested Namespaces. It is constructed from the names of the 135 -- containing namespaces starting at the root of the hierarchy and ending 136 -- with the name of the NamedElement itself. 137 138 overriding function Get_Owning_Template_Parameter 139 (Self : not null access constant UML_Constraint_Proxy) 140 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 141 -- Getter of ParameterableElement::owningTemplateParameter. 142 -- 143 -- The formal template parameter that owns this element. 144 145 overriding procedure Set_Owning_Template_Parameter 146 (Self : not null access UML_Constraint_Proxy; 147 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 148 -- Setter of ParameterableElement::owningTemplateParameter. 149 -- 150 -- The formal template parameter that owns this element. 151 152 overriding function Get_Template_Parameter 153 (Self : not null access constant UML_Constraint_Proxy) 154 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 155 -- Getter of ParameterableElement::templateParameter. 156 -- 157 -- The template parameter that exposes this element as a formal parameter. 158 159 overriding procedure Set_Template_Parameter 160 (Self : not null access UML_Constraint_Proxy; 161 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 162 -- Setter of ParameterableElement::templateParameter. 163 -- 164 -- The template parameter that exposes this element as a formal parameter. 165 166 overriding function All_Owning_Packages 167 (Self : not null access constant UML_Constraint_Proxy) 168 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 169 -- Operation NamedElement::allOwningPackages. 170 -- 171 -- The query allOwningPackages() returns all the directly or indirectly 172 -- owning packages. 173 174 overriding function Is_Distinguishable_From 175 (Self : not null access constant UML_Constraint_Proxy; 176 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 177 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 178 return Boolean; 179 -- Operation NamedElement::isDistinguishableFrom. 180 -- 181 -- The query isDistinguishableFrom() determines whether two NamedElements 182 -- may logically co-exist within a Namespace. By default, two named 183 -- elements are distinguishable if (a) they have unrelated types or (b) 184 -- they have related types but different names. 185 186 overriding function Namespace 187 (Self : not null access constant UML_Constraint_Proxy) 188 return AMF.UML.Namespaces.UML_Namespace_Access; 189 -- Operation NamedElement::namespace. 190 -- 191 -- Missing derivation for NamedElement::/namespace : Namespace 192 193 overriding function Is_Compatible_With 194 (Self : not null access constant UML_Constraint_Proxy; 195 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 196 return Boolean; 197 -- Operation ParameterableElement::isCompatibleWith. 198 -- 199 -- The query isCompatibleWith() determines if this parameterable element 200 -- is compatible with the specified parameterable element. By default 201 -- parameterable element P is compatible with parameterable element Q if 202 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 203 -- should override this operation to specify different compatibility 204 -- constraints. 205 206 overriding function Is_Template_Parameter 207 (Self : not null access constant UML_Constraint_Proxy) 208 return Boolean; 209 -- Operation ParameterableElement::isTemplateParameter. 210 -- 211 -- The query isTemplateParameter() determines if this parameterable 212 -- element is exposed as a formal template parameter. 213 214 overriding procedure Enter_Element 215 (Self : not null access constant UML_Constraint_Proxy; 216 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 217 Control : in out AMF.Visitors.Traverse_Control); 218 -- Dispatch call to corresponding subprogram of visitor interface. 219 220 overriding procedure Leave_Element 221 (Self : not null access constant UML_Constraint_Proxy; 222 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 223 Control : in out AMF.Visitors.Traverse_Control); 224 -- Dispatch call to corresponding subprogram of visitor interface. 225 226 overriding procedure Visit_Element 227 (Self : not null access constant UML_Constraint_Proxy; 228 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 229 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 230 Control : in out AMF.Visitors.Traverse_Control); 231 -- Dispatch call to corresponding subprogram of iterator interface. 232 233end AMF.Internals.UML_Constraints; 234