1 | --------------------------------------------------------------- {{{1 ---------- |
---|---|
2 | --: Copyright © 2003 … 2023 Martin Krischik «krischik@users.sourceforge.net» |
3 | ------------------------------------------------------------------------------- |
4 | --: This library is free software; you can redistribute it and/or modify it |
5 | --: under the terms of the GNU Library General Public License as published by |
6 | --: the Free Software Foundation; either version 2 of the License, or (at your |
7 | --: option) any later version. |
8 | --: |
9 | --: This library is distributed in the hope that it will be useful, but |
10 | --: WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 | --: or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
12 | --: License for more details. |
13 | --: |
14 | --: You should have received a copy of the GNU Library General Public License |
15 | --: along with this library; if not, write to the Free Software Foundation, |
16 | --: Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | --------------------------------------------------------------- }}}1 ---------- |
18 | |
19 | pragma License (Modified_Gpl); |
20 | pragma Ada_2022; |
21 | |
22 | with Ada.Finalization; |
23 | with Ada.Tags; |
24 | |
25 | --- |
26 | -- @summary |
27 | -- |
28 | -- @description |
29 | -- Base class for all non limited AdaCL classes - which is currently. all AdaCL Classes. Limited Objects are so |
30 | -- limiting ;-). |
31 | -- |
32 | package AdaCL.Base is |
33 | |
34 | ---------- Interface ------------------------------------------------------ |
35 | |
36 | type Object_Interface is interface; |
37 | type Object_Class is access Object_Interface'Class; |
38 | |
39 | --- |
40 | -- Description: Get name of the Class. Shortcut for Ada.Tags.Expanded_Name(This'Class'Tag); |
41 | -- |
42 | function Get_Name (This : in Object_Interface) return String is abstract; |
43 | |
44 | ---------- Class ---------------------------------------------------------- |
45 | |
46 | --- |
47 | -- Base class for all non limited AdaCL classes - which is currently. all AdaCL Classes. Limited Objects are so |
48 | -- limiting ;-). |
49 | -- |
50 | type Object is abstract new Ada.Finalization.Controlled and Object_Interface with private; |
51 | |
52 | --- |
53 | -- Description: Get name of the Class. Shortcut for Ada.Tags.Expanded_Name(This'Class'Tag); |
54 | -- |
55 | overriding function Get_Name (This : in Object) return String is |
56 | (Ada.Tags.Expanded_Name (Object'Class (This)'Tag)) with |
57 | Pure_Function, Inline; |
58 | |
59 | private |
60 | |
61 | --- |
62 | -- Base class for all non limited AdaCL classes - which is currently. all AdaCL Classes. Limited Objects are so |
63 | -- limiting ;-). |
64 | -- |
65 | type Object is abstract new Ada.Finalization.Controlled and Object_Interface with null record; |
66 | |
67 | end AdaCL.Base; |
68 | |
69 | ---------------------------------------------------------------- {{{ ---------- |
70 | --: vim: set textwidth=0 nowrap tabstop=8 shiftwidth=3 softtabstop=3 expandtab : |
71 | --: vim: set filetype=ada fileencoding=utf-8 fileformat=unix foldmethod=expr : |
72 | --: vim: set spell spelllang=en_gb |