1------------------------------------------------------------------------------ 2-- -- 3-- Matreshka Project -- 4-- -- 5-- Ada Modeling Framework -- 6-- -- 7-- Runtime Library Component -- 8-- -- 9------------------------------------------------------------------------------ 10-- -- 11-- Copyright © 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: 3424 $ $Date: 2012-11-13 17:27:36 +0400 (Tue, 13 Nov 2012) $ 43------------------------------------------------------------------------------ 44with AMF.Internals.UML_Packageable_Elements; 45with AMF.UML.Comments.Collections; 46with AMF.UML.Dependencies.Collections; 47with AMF.UML.Elements.Collections; 48with AMF.UML.Named_Elements; 49with AMF.UML.Namespaces.Collections; 50with AMF.UML.Packages.Collections; 51with AMF.UML.Parameterable_Elements; 52with AMF.UML.String_Expressions; 53with AMF.UML.Template_Parameters; 54with AMF.UMLDI.UML_Styles; 55with AMF.Visitors; 56with League.Strings; 57 58package AMF.Internals.UMLDI_UML_Styles is 59 60 type UMLDI_UML_Style_Proxy is 61 limited new AMF.Internals.UML_Packageable_Elements.UML_Packageable_Element_Proxy 62 and AMF.UMLDI.UML_Styles.UMLDI_UML_Style with null record; 63 64 overriding function Get_Font_Name 65 (Self : not null access constant UMLDI_UML_Style_Proxy) 66 return AMF.Optional_String; 67 -- Getter of UMLStyle::fontName. 68 -- 69 -- Name of a font used to render strings. 70 71 overriding procedure Set_Font_Name 72 (Self : not null access UMLDI_UML_Style_Proxy; 73 To : AMF.Optional_String); 74 -- Setter of UMLStyle::fontName. 75 -- 76 -- Name of a font used to render strings. 77 78 overriding function Get_Font_Size 79 (Self : not null access constant UMLDI_UML_Style_Proxy) 80 return AMF.Optional_Real; 81 -- Getter of UMLStyle::fontSize. 82 -- 83 -- Size of a font for rendering strings, given in typographical points. 84 85 overriding procedure Set_Font_Size 86 (Self : not null access UMLDI_UML_Style_Proxy; 87 To : AMF.Optional_Real); 88 -- Setter of UMLStyle::fontSize. 89 -- 90 -- Size of a font for rendering strings, given in typographical points. 91 92 overriding function Get_Client_Dependency 93 (Self : not null access constant UMLDI_UML_Style_Proxy) 94 return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency; 95 -- Getter of NamedElement::clientDependency. 96 -- 97 -- Indicates the dependencies that reference the client. 98 99 overriding function Get_Name 100 (Self : not null access constant UMLDI_UML_Style_Proxy) 101 return AMF.Optional_String; 102 -- Getter of NamedElement::name. 103 -- 104 -- The name of the NamedElement. 105 106 overriding procedure Set_Name 107 (Self : not null access UMLDI_UML_Style_Proxy; 108 To : AMF.Optional_String); 109 -- Setter of NamedElement::name. 110 -- 111 -- The name of the NamedElement. 112 113 overriding function Get_Name_Expression 114 (Self : not null access constant UMLDI_UML_Style_Proxy) 115 return AMF.UML.String_Expressions.UML_String_Expression_Access; 116 -- Getter of NamedElement::nameExpression. 117 -- 118 -- The string expression used to define the name of this named element. 119 120 overriding procedure Set_Name_Expression 121 (Self : not null access UMLDI_UML_Style_Proxy; 122 To : AMF.UML.String_Expressions.UML_String_Expression_Access); 123 -- Setter of NamedElement::nameExpression. 124 -- 125 -- The string expression used to define the name of this named element. 126 127 overriding function Get_Namespace 128 (Self : not null access constant UMLDI_UML_Style_Proxy) 129 return AMF.UML.Namespaces.UML_Namespace_Access; 130 -- Getter of NamedElement::namespace. 131 -- 132 -- Specifies the namespace that owns the NamedElement. 133 134 overriding function Get_Qualified_Name 135 (Self : not null access constant UMLDI_UML_Style_Proxy) 136 return AMF.Optional_String; 137 -- Getter of NamedElement::qualifiedName. 138 -- 139 -- A name which allows the NamedElement to be identified within a 140 -- hierarchy of nested Namespaces. It is constructed from the names of the 141 -- containing namespaces starting at the root of the hierarchy and ending 142 -- with the name of the NamedElement itself. 143 144 overriding function Get_Owned_Comment 145 (Self : not null access constant UMLDI_UML_Style_Proxy) 146 return AMF.UML.Comments.Collections.Set_Of_UML_Comment; 147 -- Getter of Element::ownedComment. 148 -- 149 -- The Comments owned by this element. 150 151 overriding function Get_Owned_Element 152 (Self : not null access constant UMLDI_UML_Style_Proxy) 153 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 154 -- Getter of Element::ownedElement. 155 -- 156 -- The Elements owned by this element. 157 158 overriding function Get_Owner 159 (Self : not null access constant UMLDI_UML_Style_Proxy) 160 return AMF.UML.Elements.UML_Element_Access; 161 -- Getter of Element::owner. 162 -- 163 -- The Element that owns this element. 164 165 overriding function Get_Owning_Template_Parameter 166 (Self : not null access constant UMLDI_UML_Style_Proxy) 167 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 168 -- Getter of ParameterableElement::owningTemplateParameter. 169 -- 170 -- The formal template parameter that owns this element. 171 172 overriding procedure Set_Owning_Template_Parameter 173 (Self : not null access UMLDI_UML_Style_Proxy; 174 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 175 -- Setter of ParameterableElement::owningTemplateParameter. 176 -- 177 -- The formal template parameter that owns this element. 178 179 overriding function Get_Template_Parameter 180 (Self : not null access constant UMLDI_UML_Style_Proxy) 181 return AMF.UML.Template_Parameters.UML_Template_Parameter_Access; 182 -- Getter of ParameterableElement::templateParameter. 183 -- 184 -- The template parameter that exposes this element as a formal parameter. 185 186 overriding procedure Set_Template_Parameter 187 (Self : not null access UMLDI_UML_Style_Proxy; 188 To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access); 189 -- Setter of ParameterableElement::templateParameter. 190 -- 191 -- The template parameter that exposes this element as a formal parameter. 192 193 overriding function All_Namespaces 194 (Self : not null access constant UMLDI_UML_Style_Proxy) 195 return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace; 196 -- Operation NamedElement::allNamespaces. 197 -- 198 -- The query allNamespaces() gives the sequence of namespaces in which the 199 -- NamedElement is nested, working outwards. 200 201 overriding function All_Owning_Packages 202 (Self : not null access constant UMLDI_UML_Style_Proxy) 203 return AMF.UML.Packages.Collections.Set_Of_UML_Package; 204 -- Operation NamedElement::allOwningPackages. 205 -- 206 -- The query allOwningPackages() returns all the directly or indirectly 207 -- owning packages. 208 209 overriding function Is_Distinguishable_From 210 (Self : not null access constant UMLDI_UML_Style_Proxy; 211 N : AMF.UML.Named_Elements.UML_Named_Element_Access; 212 Ns : AMF.UML.Namespaces.UML_Namespace_Access) 213 return Boolean; 214 -- Operation NamedElement::isDistinguishableFrom. 215 -- 216 -- The query isDistinguishableFrom() determines whether two NamedElements 217 -- may logically co-exist within a Namespace. By default, two named 218 -- elements are distinguishable if (a) they have unrelated types or (b) 219 -- they have related types but different names. 220 221 overriding function Namespace 222 (Self : not null access constant UMLDI_UML_Style_Proxy) 223 return AMF.UML.Namespaces.UML_Namespace_Access; 224 -- Operation NamedElement::namespace. 225 -- 226 -- Missing derivation for NamedElement::/namespace : Namespace 227 228 overriding function Qualified_Name 229 (Self : not null access constant UMLDI_UML_Style_Proxy) 230 return League.Strings.Universal_String; 231 -- Operation NamedElement::qualifiedName. 232 -- 233 -- When there is a name, and all of the containing namespaces have a name, 234 -- the qualified name is constructed from the names of the containing 235 -- namespaces. 236 237 overriding function Separator 238 (Self : not null access constant UMLDI_UML_Style_Proxy) 239 return League.Strings.Universal_String; 240 -- Operation NamedElement::separator. 241 -- 242 -- The query separator() gives the string that is used to separate names 243 -- when constructing a qualified name. 244 245 overriding function All_Owned_Elements 246 (Self : not null access constant UMLDI_UML_Style_Proxy) 247 return AMF.UML.Elements.Collections.Set_Of_UML_Element; 248 -- Operation Element::allOwnedElements. 249 -- 250 -- The query allOwnedElements() gives all of the direct and indirect owned 251 -- elements of an element. 252 253 overriding function Is_Compatible_With 254 (Self : not null access constant UMLDI_UML_Style_Proxy; 255 P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) 256 return Boolean; 257 -- Operation ParameterableElement::isCompatibleWith. 258 -- 259 -- The query isCompatibleWith() determines if this parameterable element 260 -- is compatible with the specified parameterable element. By default 261 -- parameterable element P is compatible with parameterable element Q if 262 -- the kind of P is the same or a subtype as the kind of Q. Subclasses 263 -- should override this operation to specify different compatibility 264 -- constraints. 265 266 overriding function Is_Template_Parameter 267 (Self : not null access constant UMLDI_UML_Style_Proxy) 268 return Boolean; 269 -- Operation ParameterableElement::isTemplateParameter. 270 -- 271 -- The query isTemplateParameter() determines if this parameterable 272 -- element is exposed as a formal template parameter. 273 274 overriding procedure Enter_Element 275 (Self : not null access constant UMLDI_UML_Style_Proxy; 276 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 277 Control : in out AMF.Visitors.Traverse_Control); 278 279 overriding procedure Leave_Element 280 (Self : not null access constant UMLDI_UML_Style_Proxy; 281 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 282 Control : in out AMF.Visitors.Traverse_Control); 283 284 overriding procedure Visit_Element 285 (Self : not null access constant UMLDI_UML_Style_Proxy; 286 Iterator : in out AMF.Visitors.Abstract_Iterator'Class; 287 Visitor : in out AMF.Visitors.Abstract_Visitor'Class; 288 Control : in out AMF.Visitors.Traverse_Control); 289 290end AMF.Internals.UMLDI_UML_Styles; 291