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: 3448 $ $Date: 2012-11-15 13:17:17 +0400 (Thu, 15 Nov 2012) $
43------------------------------------------------------------------------------
44with League.Holders;
45
46with AMF.CMOF.Associations;
47with AMF.CMOF.Properties;
48with AMF.Elements;
49with AMF.Extents;
50
51package AMF.Listeners is
52
53   pragma Preelaborate;
54
55   type Abstract_Listener is limited interface;
56
57   type Listener_Access is access all Abstract_Listener'Class;
58
59   not overriding procedure Facility_Start
60    (Self : not null access Abstract_Listener) is null;
61
62   not overriding procedure Facility_Shutdown
63    (Self : not null access Abstract_Listener) is null;
64
65   not overriding procedure Transaction_Start
66    (Self : not null access Abstract_Listener) is null;
67
68   not overriding procedure Transaction_Commit
69    (Self : not null access Abstract_Listener) is null;
70
71   not overriding procedure Transaction_Rollback
72    (Self : not null access Abstract_Listener) is null;
73
74   not overriding procedure Extent_Create
75    (Self   : not null access Abstract_Listener;
76     Extent : not null AMF.Extents.Extent_Access) is null;
77
78   not overriding procedure Extent_Remove
79    (Self   : not null access Abstract_Listener;
80     Extent : not null AMF.Extents.Extent_Access) is null;
81
82   not overriding procedure Instance_Create
83    (Self    : not null access Abstract_Listener;
84     Element : not null AMF.Elements.Element_Access) is null;
85
86   not overriding procedure Instance_Remove
87    (Self    : not null access Abstract_Listener;
88     Element : not null AMF.Elements.Element_Access) is null;
89
90   not overriding procedure Attribute_Add
91    (Self      : not null access Abstract_Listener;
92     Property  : not null AMF.CMOF.Properties.CMOF_Property_Access;
93     Position  : AMF.Optional_Integer;
94     Old_Value : League.Holders.Holder;
95     New_Value : League.Holders.Holder) is null;
96
97   not overriding procedure Attribute_Remove
98    (Self      : not null access Abstract_Listener;
99     Property  : not null AMF.CMOF.Properties.CMOF_Property_Access;
100     Position  : AMF.Optional_Integer;
101     Old_Value : League.Holders.Holder;
102     New_Value : League.Holders.Holder) is null;
103
104   not overriding procedure Attribute_Set
105    (Self      : not null access Abstract_Listener;
106     Element   : not null AMF.Elements.Element_Access;
107     Property  : not null AMF.CMOF.Properties.CMOF_Property_Access;
108     Position  : AMF.Optional_Integer;
109     Old_Value : League.Holders.Holder;
110     New_Value : League.Holders.Holder) is null;
111   --  Called when attribute value is changed.
112
113   not overriding procedure Link_Add
114    (Self           : not null access Abstract_Listener;
115     Association    : not null AMF.CMOF.Associations.CMOF_Association_Access;
116     First_Element  : not null AMF.Elements.Element_Access;
117     Second_Element : not null AMF.Elements.Element_Access) is null;
118   --  Called when link between two elements is created.
119
120   not overriding procedure Link_Remove
121    (Self : not null access Abstract_Listener) is null;
122
123   procedure Register_Listener (Listener : not null Listener_Access);
124
125   procedure Register_Instance_Listener
126    (Listener : not null Listener_Access;
127     Instance : not null AMF.Elements.Element_Access);
128
129end AMF.Listeners;
130