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_Elements;
45with AMF.UML.Named_Elements;
46with AMF.UML.Namespaces.Collections;
47
48package AMF.Internals.UML_Named_Elements is
49
50   type UML_Named_Element_Proxy is
51     abstract limited new AMF.Internals.UML_Elements.UML_Element_Proxy
52       and AMF.UML.Named_Elements.UML_Named_Element with null record;
53
54   overriding function All_Namespaces
55    (Self : not null access constant UML_Named_Element_Proxy)
56       return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace;
57   --  Operation NamedElement::allNamespaces.
58   --
59   --  The query allNamespaces() gives the sequence of namespaces in which the
60   --  NamedElement is nested, working outwards.
61
62   overriding function Get_Name
63    (Self : not null access constant UML_Named_Element_Proxy)
64       return AMF.Optional_String;
65   --  Getter of NamedElement::name.
66   --
67   --  The name of the NamedElement.
68
69   overriding function Get_Visibility
70    (Self : not null access constant UML_Named_Element_Proxy)
71       return AMF.UML.Optional_UML_Visibility_Kind;
72   --  Getter of NamedElement::visibility.
73   --
74   --  Determines where the NamedElement appears within different Namespaces
75   --  within the overall model, and its accessibility.
76
77   function Qualified_Name
78    (Self : not null access constant UML_Named_Element_Proxy)
79       return League.Strings.Universal_String;
80   --  Operation NamedElement::qualifiedName.
81   --
82   --  When there is a name, and all of the containing namespaces have a name,
83   --  the qualified name is constructed from the names of the containing
84   --  namespaces.
85
86   overriding function Separator
87    (Self : not null access constant UML_Named_Element_Proxy)
88       return League.Strings.Universal_String;
89   --  Operation NamedElement::separator.
90   --
91   --  The query separator() gives the string that is used to separate names
92   --  when constructing a qualified name.
93
94   overriding procedure Set_Name
95    (Self : not null access UML_Named_Element_Proxy;
96     To   : AMF.Optional_String);
97   --  Setter of NamedElement::name.
98   --
99   --  The name of the NamedElement.
100
101   overriding procedure Set_Visibility
102    (Self : not null access UML_Named_Element_Proxy;
103     To   : AMF.UML.Optional_UML_Visibility_Kind);
104   --  Setter of NamedElement::visibility.
105   --
106   --  Determines where the NamedElement appears within different Namespaces
107   --  within the overall model, and its accessibility.
108
109end AMF.Internals.UML_Named_Elements;
110