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_Named_Elements;
45with AMF.UML.Dependencies.Collections;
46with AMF.UML.Events;
47with AMF.UML.Named_Elements;
48with AMF.UML.Namespaces;
49with AMF.UML.Packages.Collections;
50with AMF.UML.Ports.Collections;
51with AMF.UML.String_Expressions;
52with AMF.UML.Triggers;
53with AMF.Visitors;
54
55package AMF.Internals.UML_Triggers is
56
57   type UML_Trigger_Proxy is
58     limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
59       and AMF.UML.Triggers.UML_Trigger with null record;
60
61   overriding function Get_Event
62    (Self : not null access constant UML_Trigger_Proxy)
63       return AMF.UML.Events.UML_Event_Access;
64   --  Getter of Trigger::event.
65   --
66   --  The event that causes the trigger.
67
68   overriding procedure Set_Event
69    (Self : not null access UML_Trigger_Proxy;
70     To   : AMF.UML.Events.UML_Event_Access);
71   --  Setter of Trigger::event.
72   --
73   --  The event that causes the trigger.
74
75   overriding function Get_Port
76    (Self : not null access constant UML_Trigger_Proxy)
77       return AMF.UML.Ports.Collections.Set_Of_UML_Port;
78   --  Getter of Trigger::port.
79   --
80   --  A optional port of the receiver object on which the behavioral feature
81   --  is invoked.
82
83   overriding function Get_Client_Dependency
84    (Self : not null access constant UML_Trigger_Proxy)
85       return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
86   --  Getter of NamedElement::clientDependency.
87   --
88   --  Indicates the dependencies that reference the client.
89
90   overriding function Get_Name_Expression
91    (Self : not null access constant UML_Trigger_Proxy)
92       return AMF.UML.String_Expressions.UML_String_Expression_Access;
93   --  Getter of NamedElement::nameExpression.
94   --
95   --  The string expression used to define the name of this named element.
96
97   overriding procedure Set_Name_Expression
98    (Self : not null access UML_Trigger_Proxy;
99     To   : AMF.UML.String_Expressions.UML_String_Expression_Access);
100   --  Setter of NamedElement::nameExpression.
101   --
102   --  The string expression used to define the name of this named element.
103
104   overriding function Get_Namespace
105    (Self : not null access constant UML_Trigger_Proxy)
106       return AMF.UML.Namespaces.UML_Namespace_Access;
107   --  Getter of NamedElement::namespace.
108   --
109   --  Specifies the namespace that owns the NamedElement.
110
111   overriding function Get_Qualified_Name
112    (Self : not null access constant UML_Trigger_Proxy)
113       return AMF.Optional_String;
114   --  Getter of NamedElement::qualifiedName.
115   --
116   --  A name which allows the NamedElement to be identified within a
117   --  hierarchy of nested Namespaces. It is constructed from the names of the
118   --  containing namespaces starting at the root of the hierarchy and ending
119   --  with the name of the NamedElement itself.
120
121   overriding function All_Owning_Packages
122    (Self : not null access constant UML_Trigger_Proxy)
123       return AMF.UML.Packages.Collections.Set_Of_UML_Package;
124   --  Operation NamedElement::allOwningPackages.
125   --
126   --  The query allOwningPackages() returns all the directly or indirectly
127   --  owning packages.
128
129   overriding function Is_Distinguishable_From
130    (Self : not null access constant UML_Trigger_Proxy;
131     N : AMF.UML.Named_Elements.UML_Named_Element_Access;
132     Ns : AMF.UML.Namespaces.UML_Namespace_Access)
133       return Boolean;
134   --  Operation NamedElement::isDistinguishableFrom.
135   --
136   --  The query isDistinguishableFrom() determines whether two NamedElements
137   --  may logically co-exist within a Namespace. By default, two named
138   --  elements are distinguishable if (a) they have unrelated types or (b)
139   --  they have related types but different names.
140
141   overriding function Namespace
142    (Self : not null access constant UML_Trigger_Proxy)
143       return AMF.UML.Namespaces.UML_Namespace_Access;
144   --  Operation NamedElement::namespace.
145   --
146   --  Missing derivation for NamedElement::/namespace : Namespace
147
148   overriding procedure Enter_Element
149    (Self    : not null access constant UML_Trigger_Proxy;
150     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
151     Control : in out AMF.Visitors.Traverse_Control);
152   --  Dispatch call to corresponding subprogram of visitor interface.
153
154   overriding procedure Leave_Element
155    (Self    : not null access constant UML_Trigger_Proxy;
156     Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
157     Control : in out AMF.Visitors.Traverse_Control);
158   --  Dispatch call to corresponding subprogram of visitor interface.
159
160   overriding procedure Visit_Element
161    (Self     : not null access constant UML_Trigger_Proxy;
162     Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
163     Visitor  : in out AMF.Visitors.Abstract_Visitor'Class;
164     Control  : in out AMF.Visitors.Traverse_Control);
165   --  Dispatch call to corresponding subprogram of iterator interface.
166
167end AMF.Internals.UML_Triggers;
168