repo_name
stringlengths
9
74
language
stringclasses
1 value
length_bytes
int64
11
9.34M
extension
stringclasses
2 values
content
stringlengths
11
9.34M
jweese/Ada_Vent_19
Ada
936
ads
with Ada.Containers.Ordered_Maps; with Memory; package Intcode is use type Memory.Address; use type Memory.Value; package Aux_Memory is new Ada.Containers.Ordered_Maps( Key_Type => Memory.Address, Element_Type => Memory.Value); type Maybe_Memory_Value(Present: Boolean := False) is record case Present is when False => null; when True => Value: Memory.Value; end case; end record; type Port_Status is (Empty, Full, Closed); protected type Port is entry Put(I: in Memory.Value); entry Get(X: out Maybe_Memory_Value); entry Close; private Status: Port_Status := Empty; Value: Memory.Value := 0; end Port; type Machine(Hi_Mem: Memory.Address) is record Mem: Memory.Block(0 .. Hi_Mem); Aux_Mem: Aux_Memory.Map; Input, Output: access Port; end record; task type Executor(AM: not null access Machine); end Intcode;
zhmu/ananas
Ada
10,476
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . E N U M E R A T I O N _ A U X -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Wide_Text_IO.Generic_Aux; use Ada.Wide_Text_IO.Generic_Aux; with Ada.Characters.Handling; use Ada.Characters.Handling; with Interfaces.C_Streams; use Interfaces.C_Streams; with System.WCh_Con; use System.WCh_Con; package body Ada.Wide_Text_IO.Enumeration_Aux is ----------------------- -- Local Subprograms -- ----------------------- procedure Store_Char (WC : Wide_Character; Buf : out Wide_String; Ptr : in out Integer); -- Store a single character in buffer, checking for overflow -- These definitions replace the ones in Ada.Characters.Handling, which -- do not seem to work for some strange not understood reason ??? at -- least in the OS/2 version. function To_Lower (C : Character) return Character; ------------------ -- Get_Enum_Lit -- ------------------ procedure Get_Enum_Lit (File : File_Type; Buf : out Wide_String; Buflen : out Natural) is ch : int; WC : Wide_Character; begin Buflen := 0; Load_Skip (File); ch := Nextc (File); -- Character literal case. If the initial character is a quote, then -- we read as far as we can without backup (see ACVC test CE3905L) if ch = Character'Pos (''') then Get (File, WC); Store_Char (WC, Buf, Buflen); ch := Nextc (File); if ch = LM or else ch = EOF then return; end if; Get (File, WC); Store_Char (WC, Buf, Buflen); ch := Nextc (File); if ch /= Character'Pos (''') then return; end if; Get (File, WC); Store_Char (WC, Buf, Buflen); -- Similarly for identifiers, read as far as we can, in particular, -- do read a trailing underscore (again see ACVC test CE3905L to -- understand why we do this, although it seems somewhat peculiar). else -- Identifier must start with a letter. Any wide character value -- outside the normal Latin-1 range counts as a letter for this. if ch < 255 and then not Is_Letter (Character'Val (ch)) then return; end if; -- If we do have a letter, loop through the characters quitting on -- the first non-identifier character (note that this includes the -- cases of hitting a line mark or page mark). loop Get (File, WC); Store_Char (WC, Buf, Buflen); ch := Nextc (File); exit when ch = EOF; if ch = Character'Pos ('_') then exit when Buf (Buflen) = '_'; elsif ch = Character'Pos (ASCII.ESC) then null; elsif File.WC_Method in WC_Upper_Half_Encoding_Method and then ch > 127 then null; else exit when not Is_Letter (Character'Val (ch)) and then not Is_Digit (Character'Val (ch)); end if; end loop; end if; end Get_Enum_Lit; --------- -- Put -- --------- procedure Put (File : File_Type; Item : Wide_String; Width : Field; Set : Type_Set) is Actual_Width : constant Integer := Integer'Max (Integer (Width), Item'Length); begin Check_On_One_Line (File, Actual_Width); if Set = Lower_Case and then Item (Item'First) /= ''' then declare Iteml : Wide_String (Item'First .. Item'Last); begin for J in Item'Range loop if Is_Character (Item (J)) then Iteml (J) := To_Wide_Character (To_Lower (To_Character (Item (J)))); else Iteml (J) := Item (J); end if; end loop; Put (File, Iteml); end; else Put (File, Item); end if; for J in 1 .. Actual_Width - Item'Length loop Put (File, ' '); end loop; end Put; ---------- -- Puts -- ---------- procedure Puts (To : out Wide_String; Item : Wide_String; Set : Type_Set) is Ptr : Natural; begin if Item'Length > To'Length then raise Layout_Error; else Ptr := To'First; for J in Item'Range loop if Set = Lower_Case and then Item (Item'First) /= ''' and then Is_Character (Item (J)) then To (Ptr) := To_Wide_Character (To_Lower (To_Character (Item (J)))); else To (Ptr) := Item (J); end if; Ptr := Ptr + 1; end loop; while Ptr <= To'Last loop To (Ptr) := ' '; Ptr := Ptr + 1; end loop; end if; end Puts; ------------------- -- Scan_Enum_Lit -- ------------------- procedure Scan_Enum_Lit (From : Wide_String; Start : out Natural; Stop : out Natural) is WC : Wide_Character; -- Processing for Scan_Enum_Lit begin Start := From'First; loop if Start > From'Last then raise End_Error; elsif Is_Character (From (Start)) and then not Is_Blank (To_Character (From (Start))) then exit; else Start := Start + 1; end if; end loop; -- Character literal case. If the initial character is a quote, then -- we read as far as we can without backup (see ACVC test CE3905L -- which is for the analogous case for reading from a file). if From (Start) = ''' then Stop := Start; if Stop = From'Last then raise Data_Error; else Stop := Stop + 1; end if; if From (Stop) in ' ' .. '~' or else From (Stop) >= Wide_Character'Val (16#80#) then if Stop = From'Last then raise Data_Error; else Stop := Stop + 1; if From (Stop) = ''' then return; end if; end if; end if; raise Data_Error; -- Similarly for identifiers, read as far as we can, in particular, -- do read a trailing underscore (again see ACVC test CE3905L to -- understand why we do this, although it seems somewhat peculiar). else -- Identifier must start with a letter, any wide character outside -- the normal Latin-1 range is considered a letter for this test. if Is_Character (From (Start)) and then not Is_Letter (To_Character (From (Start))) then raise Data_Error; end if; -- If we do have a letter, loop through the characters quitting on -- the first non-identifier character (note that this includes the -- cases of hitting a line mark or page mark). Stop := Start + 1; while Stop < From'Last loop WC := From (Stop + 1); exit when Is_Character (WC) and then not Is_Letter (To_Character (WC)) and then (WC /= '_' or else From (Stop - 1) = '_'); Stop := Stop + 1; end loop; end if; end Scan_Enum_Lit; ---------------- -- Store_Char -- ---------------- procedure Store_Char (WC : Wide_Character; Buf : out Wide_String; Ptr : in out Integer) is begin if Ptr = Buf'Last then raise Data_Error; else Ptr := Ptr + 1; Buf (Ptr) := WC; end if; end Store_Char; -------------- -- To_Lower -- -------------- function To_Lower (C : Character) return Character is begin if C in 'A' .. 'Z' then return Character'Val (Character'Pos (C) + 32); else return C; end if; end To_Lower; end Ada.Wide_Text_IO.Enumeration_Aux;
sungyeon/drake
Ada
36
adb
../machine-apple-darwin/s-synobj.adb
zhmu/ananas
Ada
5,875
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . S C A L A R _ V A L U E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2001-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package defines the constants used for initializing scalar values -- when pragma Initialize_Scalars is used. The actual values are defined -- in the binder generated file. This package contains the Ada names that -- are used by the generated code, which are linked to the actual values -- by the use of pragma Import. -- This is the 128-bit version of the package with Interfaces; package System.Scalar_Values is -- Note: logically this package should be Pure since it can be accessed -- from pure units, but the IS_xxx variables below get set at run time, -- so they have to be library level variables. In fact we only ever -- access this from generated code, and the compiler knows that it is -- OK to access this unit from generated code. subtype Byte1 is Interfaces.Unsigned_8; subtype Byte2 is Interfaces.Unsigned_16; subtype Byte4 is Interfaces.Unsigned_32; subtype Byte8 is Interfaces.Unsigned_64; subtype Byte16 is Interfaces.Unsigned_128; -- The explicit initializations here are not really required, since these -- variables are always set by System.Scalar_Values.Initialize. IS_Is1 : Byte1 := 0; -- Initialize 1 byte signed IS_Is2 : Byte2 := 0; -- Initialize 2 byte signed IS_Is4 : Byte4 := 0; -- Initialize 4 byte signed IS_Is8 : Byte8 := 0; -- Initialize 8 byte signed IS_Is16 : Byte16 := 0; -- Initialize 8 byte signed -- For the above cases, the undefined value (set by the binder -Sin switch) -- is the largest negative number (1 followed by all zero bits). IS_Iu1 : Byte1 := 0; -- Initialize 1 byte unsigned IS_Iu2 : Byte2 := 0; -- Initialize 2 byte unsigned IS_Iu4 : Byte4 := 0; -- Initialize 4 byte unsigned IS_Iu8 : Byte8 := 0; -- Initialize 8 byte unsigned IS_Iu16 : Byte16 := 0; -- Initialize 8 byte unsigned -- For the above cases, the undefined value (set by the binder -Sin switch) -- is the largest unsigned number (all 1 bits). IS_Iz1 : Byte1 := 0; -- Initialize 1 byte zeroes IS_Iz2 : Byte2 := 0; -- Initialize 2 byte zeroes IS_Iz4 : Byte4 := 0; -- Initialize 4 byte zeroes IS_Iz8 : Byte8 := 0; -- Initialize 8 byte zeroes IS_Iz16 : Byte16 := 0; -- Initialize 8 byte zeroes -- For the above cases, the undefined value (set by the binder -Sin switch) -- is the zero (all 0 bits). This is used when zero is known to be an -- invalid value. -- The float definitions are aliased, because we use overlays to set them IS_Isf : aliased Short_Float := 0.0; -- Initialize short float IS_Ifl : aliased Float := 0.0; -- Initialize float IS_Ilf : aliased Long_Float := 0.0; -- Initialize long float IS_Ill : aliased Long_Long_Float := 0.0; -- Initialize long long float procedure Initialize (Mode1 : Character; Mode2 : Character); -- This procedure is called from the binder when Initialize_Scalars mode -- is active. The arguments are the two characters from the -S switch, -- with letters forced upper case. So for example if -S5a is given, then -- Mode1 will be '5' and Mode2 will be 'A'. If the parameters are EV, -- then this routine reads the environment variable GNAT_INIT_SCALARS. -- The possible settings are the same as those for the -S switch (except -- for EV), i.e. IN/LO/HO/xx, xx = 2 hex digits. If no -S switch is given -- then the default of IN (invalid values) is passed on the call. end System.Scalar_Values;
ShadowGameStudio/Project-Unknown
Ada
778
adb
<AnimDB FragDef="Animations/Mannequin/ADB/PlayerFragmentIds.xml" TagDef="Animations/Mannequin/ADB/PlayerTags.xml"> <FragmentList> <Idle> <Fragment BlendOutDuration="0.2" Tags="Rotate"> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.2"/> <Animation name="idle" flags="Loop"/> </AnimLayer> </Fragment> <Fragment BlendOutDuration="0.2" Tags=""> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.2"/> <Animation name="idle" flags="Loop"/> </AnimLayer> </Fragment> </Idle> <Walk> <Fragment BlendOutDuration="0.2" Tags=""> <AnimLayer> <Blend ExitTime="0" StartTime="0" Duration="0.2"/> <Animation name="walk" flags="Loop"/> </AnimLayer> </Fragment> </Walk> </FragmentList> </AnimDB>
Fabien-Chouteau/cortex-m
Ada
4,413
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- This package provides utility routines for use with the Data Watchpoint -- Trace (DWT) facility defined by ARM for Cortex M processors. As such it -- should be vendor-independent. with HAL; use HAL; package Cortex_M.DWT is -- Data Watchpoint Trace pragma Elaborate_Body; -- The assumption is that application code will access the registers of -- the DWT directly, via the SVD-generated package Cortex_M_SVD.DWT, -- except when the convenience routines below are utilized. ---------------------------- -- Convenience functions -- ---------------------------- -- DWT reset values. These constant are the control register considered -- as unsigned 32-bit values for convenient comparison using the function -- below. The values are just the NUMCOMP nibble and the boolean flags in -- the next nibble. No_DWT_Present : constant UInt32 := 0; Only_One_Comparator : constant UInt32 := 16#1000_0000#; -- 268435456 dec One_Comparator_Watchpoints : constant UInt32 := 16#1F00_0000#; -- 520093696 dec Four_Comparators_Watchpoints_And_Triggers : constant UInt32 := 16#4000_0000#; -- 1073741824 dec Four_Comparators_Watchpoints_Only : constant UInt32 := 16#4F00_0000#; -- 1325400064 dec function DWT_Reset_Value return UInt32 with Inline; -- Returns the value of the DWT.CTRL register as a word, for convenient -- comparison to the constants above. procedure Enable_DWT_Unit with Post => DWT_Unit_Enabled, Inline; -- Sets the trace enable bit (TRCENA) in the Debug Exception & Monitor Ctrl -- (DEMCR) register within the Cortex M Debug peripheral. procedure Disable_DWT_Unit with Post => not DWT_Unit_Enabled, Inline; -- Clears the trace enable bit (TRCENA) in the Debug Exception & Monitor -- Ctrl (DEMCR) register within the Cortex M Debug peripheral. function DWT_Unit_Enabled return Boolean with Inline; end Cortex_M.DWT;
stcarrez/ada-awa
Ada
5,067
ads
----------------------------------------------------------------------- -- awa-wikis-previews -- Wiki preview management -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with EL.Expressions; with ASF.Applications; with AWA.Modules; with AWA.Jobs.Services; with AWA.Jobs.Modules; with AWA.Wikis.Modules; with AWA.Wikis.Models; -- == Wiki Preview Module == -- The <tt>AWA.Wikis.Previews</tt> package implements a preview image generation for a wiki page. -- This module is optional, it is possible to use the wikis without preview support. When the -- module is registered, it listens to wiki page lifecycle events. When a new wiki content is -- changed, it triggers a job to make the preview. The preview job uses the -- <tt>wkhtmotoimage</tt> external program to make the preview image. package AWA.Wikis.Previews is -- The name under which the module is registered. NAME : constant String := "wiki_previews"; -- The configuration parameter that defines how to build the wiki preview template path. PARAM_PREVIEW_TEMPLATE : constant String := "wiki_preview_template"; -- The configuration parameter to build the preview command to execute. PARAM_PREVIEW_COMMAND : constant String := "wiki_preview_command"; -- The configuration parameter that defines how to build the HTML preview path. PARAM_PREVIEW_HTML : constant String := "wiki_preview_html"; -- The configuration parameter that defines the path for the tmp directory. PARAM_PREVIEW_TMPDIR : constant String := "wiki_preview_tmp"; -- The worker procedure that performs the preview job. procedure Preview_Worker (Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class); -- Preview job definition. package Preview_Job_Definition is new AWA.Jobs.Services.Work_Definition (Preview_Worker'Access); -- ------------------------------ -- Preview wiki module -- ------------------------------ type Preview_Module is new AWA.Modules.Module and AWA.Wikis.Modules.Wiki_Lifecycle.Listener with private; type Preview_Module_Access is access all Preview_Module'Class; -- Initialize the preview wiki module. overriding procedure Initialize (Plugin : in out Preview_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config); -- Configures the module after its initialization and after having read its XML configuration. overriding procedure Configure (Plugin : in out Preview_Module; Props : in ASF.Applications.Config); -- The `On_Create` procedure is called by `Notify_Create` to notify the creation of the page. overriding procedure On_Create (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- The `On_Update` procedure is called by `Notify_Update` to notify the update of the page. overriding procedure On_Update (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion of the page. overriding procedure On_Delete (Instance : in Preview_Module; Item : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- Create a preview job and schedule the job to generate a new thumbnail preview for the page. procedure Make_Preview_Job (Plugin : in Preview_Module; Page : in AWA.Wikis.Models.Wiki_Page_Ref'Class); -- Execute the preview job and make the thumbnail preview. The page is first rendered in -- an HTML text file and the preview is rendered by using an external command. procedure Do_Preview_Job (Plugin : in Preview_Module; Job : in out AWA.Jobs.Services.Abstract_Job_Type'Class); -- Get the preview module instance associated with the current application. function Get_Preview_Module return Preview_Module_Access; private type Preview_Module is new AWA.Modules.Module and AWA.Wikis.Modules.Wiki_Lifecycle.Listener with record Template : EL.Expressions.Expression; Command : EL.Expressions.Expression; Html : EL.Expressions.Expression; Job_Module : AWA.Jobs.Modules.Job_Module_Access; end record; end AWA.Wikis.Previews;
zhmu/ananas
Ada
607
adb
-- { dg-do compile } with Discr12_Pkg; use Discr12_Pkg; procedure Discr13 is function F1 return Integer is begin return Dummy (1); end F1; protected type Poe (D3 : Integer := F1) is entry E (D3 .. F1); -- F1 evaluated function Is_Ok (D3 : Integer; E_First : Integer; E_Last : Integer) return Boolean; end Poe; protected body Poe is entry E (for I in D3 .. F1) when True is begin null; end E; function Is_Ok (D3 : Integer; E_First : Integer; E_Last : Integer) return Boolean is begin return False; end Is_Ok; end Poe; begin null; end;
charlie5/lace
Ada
361
ads
private with eGL; package openGL.Display -- -- Models an openGL display. -- is type Item is tagged private; function Default return Item; private type Item is tagged record Thin : eGL.EGLDisplay; Version_major, Version_minor : aliased eGL.EGLint; end record; end openGL.Display;
afrl-rq/OpenUxAS
Ada
430
ads
-- TODO: maybe move contents to package Transport for sharing by children? package UxAS.Comms.Transport.Socket_Configurations is type Socket_Configuration is tagged record Network_Name : Dynamic_String (Capacity => Max_Network_Name_Length); Socket_Address : Dynamic_String (Capacity => Max_Socket_Address_Length); Is_Receive : Boolean; end record; end UxAS.Comms.Transport.Socket_Configurations;
apple-oss-distributions/old_ncurses
Ada
5,053
ads
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Form_Demo.Aux -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer <[email protected]> 1996 -- Version Control -- $Revision: 1.1.1.1 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; package Sample.Form_Demo.Aux is procedure Geometry (F : in Form; L : out Line_Count; C : out Column_Count; Y : out Line_Position; X : out Column_Position); -- Calculate the geometry for a panel beeing able to be used to display -- the menu. function Create (F : Form; Title : String; Lin : Line_Position; Col : Column_Position) return Panel; -- Create a panel decorated with a frame and the title at the specified -- position. The dimension of the panel is derived from the menus layout. procedure Destroy (F : in Form; P : in out Panel); -- Destroy all the windowing structures associated with this menu and -- panel. function Get_Request (F : Form; P : Panel; Handle_CRLF : Boolean := True) return Key_Code; -- Centralized request driver for all menus in this sample. This -- gives us a common key binding for all menus. function Make (Top : Line_Position; Left : Column_Position; Text : String) return Field; -- create a label function Make (Height : Line_Count := 1; Width : Column_Count; Top : Line_Position; Left : Column_Position; Off_Screen : Natural := 0) return Field; -- create a editable field function Default_Driver (F : Form; K : Key_Code; P : Panel) return Boolean; function Count_Active (F : Form) return Natural; -- Count the number of active fields in the form end Sample.Form_Demo.Aux;
zhmu/ananas
Ada
5,766
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C A L E N D A R . C O N V E R S I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2008-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Interfaces.C; use Interfaces.C; package body Ada.Calendar.Conversions is ----------------- -- To_Ada_Time -- ----------------- function To_Ada_Time (Unix_Time : long) return Time is Val : constant Long_Integer := Long_Integer (Unix_Time); begin return Conversion_Operations.To_Ada_Time (Val); end To_Ada_Time; ----------------- -- To_Ada_Time -- ----------------- function To_Ada_Time (tm_year : int; tm_mon : int; tm_day : int; tm_hour : int; tm_min : int; tm_sec : int; tm_isdst : int) return Time is Year : constant Integer := Integer (tm_year); Month : constant Integer := Integer (tm_mon); Day : constant Integer := Integer (tm_day); Hour : constant Integer := Integer (tm_hour); Minute : constant Integer := Integer (tm_min); Second : constant Integer := Integer (tm_sec); DST : constant Integer := Integer (tm_isdst); begin return Conversion_Operations.To_Ada_Time (Year, Month, Day, Hour, Minute, Second, DST); end To_Ada_Time; ----------------- -- To_Duration -- ----------------- function To_Duration (tv_sec : long; tv_nsec : long) return Duration is Secs : constant Long_Integer := Long_Integer (tv_sec); Nano_Secs : constant Long_Integer := Long_Integer (tv_nsec); begin return Conversion_Operations.To_Duration (Secs, Nano_Secs); end To_Duration; ------------------------ -- To_Struct_Timespec -- ------------------------ procedure To_Struct_Timespec (D : Duration; tv_sec : out long; tv_nsec : out long) is Secs : Long_Integer; Nano_Secs : Long_Integer; begin Conversion_Operations.To_Struct_Timespec (D, Secs, Nano_Secs); tv_sec := long (Secs); tv_nsec := long (Nano_Secs); end To_Struct_Timespec; ------------------ -- To_Struct_Tm -- ------------------ procedure To_Struct_Tm (T : Time; tm_year : out int; tm_mon : out int; tm_day : out int; tm_hour : out int; tm_min : out int; tm_sec : out int) is Year : Integer; Month : Integer; Day : Integer; Hour : Integer; Minute : Integer; Second : Integer; begin Conversion_Operations.To_Struct_Tm (T, Year, Month, Day, Hour, Minute, Second); tm_year := int (Year); tm_mon := int (Month); tm_day := int (Day); tm_hour := int (Hour); tm_min := int (Minute); tm_sec := int (Second); end To_Struct_Tm; ------------------ -- To_Unix_Time -- ------------------ function To_Unix_Time (Ada_Time : Time) return long is Val : constant Long_Integer := Conversion_Operations.To_Unix_Time (Ada_Time); begin return long (Val); end To_Unix_Time; ----------------------- -- To_Unix_Nano_Time -- ----------------------- function To_Unix_Nano_Time (Ada_Time : Time) return long_long is pragma Unsuppress (Overflow_Check); Ada_Rep : constant Time_Rep := Time_Rep (Ada_Time); begin return long_long (Ada_Rep + Epoch_Offset); exception when Constraint_Error => raise Time_Error; end To_Unix_Nano_Time; end Ada.Calendar.Conversions;
reznikmm/matreshka
Ada
3,679
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Elements; package ODF.DOM.Text_Image_Count_Elements is pragma Preelaborate; type ODF_Text_Image_Count is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Text_Image_Count_Access is access all ODF_Text_Image_Count'Class with Storage_Size => 0; end ODF.DOM.Text_Image_Count_Elements;
zhmu/ananas
Ada
20,246
adb
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M - S T A C K _ U S A G E -- -- -- -- B o d y -- -- -- -- Copyright (C) 2004-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ with System.Parameters; with System.CRTL; with System.IO; package body System.Stack_Usage is use System.Storage_Elements; use System.IO; use Interfaces; ----------------- -- Stack_Slots -- ----------------- -- Stack_Slots is an internal data type to represent a sequence of real -- stack slots initialized with a provided pattern, with operations to -- abstract away the target call stack growth direction. type Stack_Slots is array (Integer range <>) of Pattern_Type; for Stack_Slots'Component_Size use Pattern_Type'Object_Size; -- We will carefully handle the initializations ourselves and might want -- to remap an initialized overlay later on with an address clause. pragma Suppress_Initialization (Stack_Slots); -- The abstract Stack_Slots operations all operate over the simple array -- memory model: -- memory addresses increasing ----> -- Slots('First) Slots('Last) -- | | -- V V -- +------------------------------------------------------------------+ -- |####| |####| -- +------------------------------------------------------------------+ -- What we call Top or Bottom always denotes call chain leaves or entry -- points respectively, and their relative positions in the stack array -- depends on the target stack growth direction: -- Stack_Grows_Down -- <----- calls push frames towards decreasing addresses -- Top(most) Slot Bottom(most) Slot -- | | -- V V -- +------------------------------------------------------------------+ -- |####| | leaf frame | ... | entry frame | -- +------------------------------------------------------------------+ -- Stack_Grows_Up -- calls push frames towards increasing addresses -----> -- Bottom(most) Slot Top(most) Slot -- | | -- V V -- +------------------------------------------------------------------+ -- | entry frame | ... | leaf frame | |####| -- +------------------------------------------------------------------+ ------------------- -- Unit Services -- ------------------- -- Now the implementation of the services offered by this unit, on top of -- the Stack_Slots abstraction above. Index_Str : constant String := "Index"; Task_Name_Str : constant String := "Task Name"; Stack_Size_Str : constant String := "Stack Size"; Actual_Size_Str : constant String := "Stack usage"; procedure Output_Result (Result_Id : Natural; Result : Task_Result; Max_Stack_Size_Len : Natural; Max_Actual_Use_Len : Natural); -- Prints the result on the standard output. Result Id is the number of -- the result in the array, and Result the contents of the actual result. -- Max_Stack_Size_Len and Max_Actual_Use_Len are used for displaying the -- proper layout. They hold the maximum length of the string representing -- the Stack_Size and Actual_Use values. ---------------- -- Initialize -- ---------------- procedure Initialize (Buffer_Size : Natural) is Stack_Size_Chars : System.Address; begin -- Initialize the buffered result array Result_Array := new Result_Array_Type (1 .. Buffer_Size); Result_Array.all := [others => [Task_Name => [others => ASCII.NUL], Value => 0, Stack_Size => 0]]; -- Set the Is_Enabled flag to true, so that the task wrapper knows that -- it has to handle dynamic stack analysis Is_Enabled := True; Stack_Size_Chars := System.CRTL.getenv ("GNAT_STACK_LIMIT" & ASCII.NUL); -- If variable GNAT_STACK_LIMIT is set, then we will take care of the -- environment task, using GNAT_STASK_LIMIT as the size of the stack. -- It doesn't make sens to process the stack when no bound is set (e.g. -- limit is typically up to 4 GB). if Stack_Size_Chars /= Null_Address then declare My_Stack_Size : Integer; begin My_Stack_Size := System.CRTL.atoi (Stack_Size_Chars) * 1024; Initialize_Analyzer (Environment_Task_Analyzer, "ENVIRONMENT TASK", My_Stack_Size, 0, My_Stack_Size); Fill_Stack (Environment_Task_Analyzer); Compute_Environment_Task := True; end; -- GNAT_STACK_LIMIT not set else Compute_Environment_Task := False; end if; end Initialize; ---------------- -- Fill_Stack -- ---------------- procedure Fill_Stack (Analyzer : in out Stack_Analyzer) is -- Change the local variables and parameters of this function with -- super-extra care. The more the stack frame size of this function is -- big, the more an "instrumentation threshold at writing" error is -- likely to happen. Current_Stack_Level : aliased Integer; Guard : constant := 256; -- Guard space between the Current_Stack_Level'Address and the last -- allocated byte on the stack. begin if Parameters.Stack_Grows_Down then if Analyzer.Stack_Base - Stack_Address (Analyzer.Pattern_Size) > To_Stack_Address (Current_Stack_Level'Address) - Guard then -- No room for a pattern Analyzer.Pattern_Size := 0; return; end if; Analyzer.Pattern_Limit := Analyzer.Stack_Base - Stack_Address (Analyzer.Pattern_Size); if Analyzer.Stack_Base > To_Stack_Address (Current_Stack_Level'Address) - Guard then -- Reduce pattern size to prevent local frame overwrite Analyzer.Pattern_Size := Integer (To_Stack_Address (Current_Stack_Level'Address) - Guard - Analyzer.Pattern_Limit); end if; Analyzer.Pattern_Overlay_Address := To_Address (Analyzer.Pattern_Limit); else if Analyzer.Stack_Base + Stack_Address (Analyzer.Pattern_Size) < To_Stack_Address (Current_Stack_Level'Address) + Guard then -- No room for a pattern Analyzer.Pattern_Size := 0; return; end if; Analyzer.Pattern_Limit := Analyzer.Stack_Base + Stack_Address (Analyzer.Pattern_Size); if Analyzer.Stack_Base < To_Stack_Address (Current_Stack_Level'Address) + Guard then -- Reduce pattern size to prevent local frame overwrite Analyzer.Pattern_Size := Integer (Analyzer.Pattern_Limit - (To_Stack_Address (Current_Stack_Level'Address) + Guard)); end if; Analyzer.Pattern_Overlay_Address := To_Address (Analyzer.Pattern_Limit - Stack_Address (Analyzer.Pattern_Size)); end if; -- Declare and fill the pattern buffer declare Pattern : aliased Stack_Slots (1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern); for Pattern'Address use Analyzer.Pattern_Overlay_Address; begin if System.Parameters.Stack_Grows_Down then for J in reverse Pattern'Range loop Pattern (J) := Analyzer.Pattern; end loop; else for J in Pattern'Range loop Pattern (J) := Analyzer.Pattern; end loop; end if; end; end Fill_Stack; ------------------------- -- Initialize_Analyzer -- ------------------------- procedure Initialize_Analyzer (Analyzer : in out Stack_Analyzer; Task_Name : String; Stack_Size : Natural; Stack_Base : Stack_Address; Pattern_Size : Natural; Pattern : Interfaces.Unsigned_32 := 16#DEAD_BEEF#) is begin -- Initialize the analyzer fields Analyzer.Stack_Base := Stack_Base; Analyzer.Stack_Size := Stack_Size; Analyzer.Pattern_Size := Pattern_Size; Analyzer.Pattern := Pattern; Analyzer.Result_Id := Next_Id; Analyzer.Task_Name := [others => ' ']; -- Compute the task name, and truncate if bigger than Task_Name_Length if Task_Name'Length <= Task_Name_Length then Analyzer.Task_Name (1 .. Task_Name'Length) := Task_Name; else Analyzer.Task_Name := Task_Name (Task_Name'First .. Task_Name'First + Task_Name_Length - 1); end if; Next_Id := Next_Id + 1; end Initialize_Analyzer; ---------------- -- Stack_Size -- ---------------- function Stack_Size (SP_Low : Stack_Address; SP_High : Stack_Address) return Natural is begin if SP_Low > SP_High then return Natural (SP_Low - SP_High); else return Natural (SP_High - SP_Low); end if; end Stack_Size; -------------------- -- Compute_Result -- -------------------- procedure Compute_Result (Analyzer : in out Stack_Analyzer) is -- Change the local variables and parameters of this function with -- super-extra care. The larger the stack frame size of this function -- is, the more an "instrumentation threshold at reading" error is -- likely to happen. Stack : Stack_Slots (1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern); for Stack'Address use Analyzer.Pattern_Overlay_Address; begin -- Value if the pattern was not modified if Parameters.Stack_Grows_Down then Analyzer.Topmost_Touched_Mark := Analyzer.Pattern_Limit + Stack_Address (Analyzer.Pattern_Size); else Analyzer.Topmost_Touched_Mark := Analyzer.Pattern_Limit - Stack_Address (Analyzer.Pattern_Size); end if; if Analyzer.Pattern_Size = 0 then return; end if; -- Look backward from the topmost possible end of the marked stack to -- the bottom of it. The first index not equals to the patterns marks -- the beginning of the used stack. if System.Parameters.Stack_Grows_Down then for J in Stack'Range loop if Stack (J) /= Analyzer.Pattern then Analyzer.Topmost_Touched_Mark := To_Stack_Address (Stack (J)'Address); exit; end if; end loop; else for J in reverse Stack'Range loop if Stack (J) /= Analyzer.Pattern then Analyzer.Topmost_Touched_Mark := To_Stack_Address (Stack (J)'Address); exit; end if; end loop; end if; end Compute_Result; --------------------- -- Output_Result -- --------------------- procedure Output_Result (Result_Id : Natural; Result : Task_Result; Max_Stack_Size_Len : Natural; Max_Actual_Use_Len : Natural) is Result_Id_Str : constant String := Natural'Image (Result_Id); Stack_Size_Str : constant String := Natural'Image (Result.Stack_Size); Actual_Use_Str : constant String := Natural'Image (Result.Value); Result_Id_Blanks : constant String (1 .. Index_Str'Length - Result_Id_Str'Length) := (others => ' '); Stack_Size_Blanks : constant String (1 .. Max_Stack_Size_Len - Stack_Size_Str'Length) := (others => ' '); Actual_Use_Blanks : constant String (1 .. Max_Actual_Use_Len - Actual_Use_Str'Length) := (others => ' '); begin Set_Output (Standard_Error); Put (Result_Id_Blanks & Natural'Image (Result_Id)); Put (" | "); Put (Result.Task_Name); Put (" | "); Put (Stack_Size_Blanks & Stack_Size_Str); Put (" | "); Put (Actual_Use_Blanks & Actual_Use_Str); New_Line; end Output_Result; --------------------- -- Output_Results -- --------------------- procedure Output_Results is Max_Stack_Size : Natural := 0; Max_Stack_Usage : Natural := 0; Max_Stack_Size_Len, Max_Actual_Use_Len : Natural := 0; Task_Name_Blanks : constant String (1 .. Task_Name_Length - Task_Name_Str'Length) := (others => ' '); begin Set_Output (Standard_Error); if Compute_Environment_Task then Compute_Result (Environment_Task_Analyzer); Report_Result (Environment_Task_Analyzer); end if; if Result_Array'Length > 0 then -- Computes the size of the largest strings that will get displayed, -- in order to do correct column alignment. for J in Result_Array'Range loop exit when J >= Next_Id; if Result_Array (J).Value > Max_Stack_Usage then Max_Stack_Usage := Result_Array (J).Value; end if; if Result_Array (J).Stack_Size > Max_Stack_Size then Max_Stack_Size := Result_Array (J).Stack_Size; end if; end loop; Max_Stack_Size_Len := Natural'Image (Max_Stack_Size)'Length; Max_Actual_Use_Len := Natural'Image (Max_Stack_Usage)'Length; -- Display the output header. Blanks will be added in front of the -- labels if needed. declare Stack_Size_Blanks : constant String (1 .. Max_Stack_Size_Len - Stack_Size_Str'Length) := [others => ' ']; Stack_Usage_Blanks : constant String (1 .. Max_Actual_Use_Len - Actual_Size_Str'Length) := [others => ' ']; begin if Stack_Size_Str'Length > Max_Stack_Size_Len then Max_Stack_Size_Len := Stack_Size_Str'Length; end if; if Actual_Size_Str'Length > Max_Actual_Use_Len then Max_Actual_Use_Len := Actual_Size_Str'Length; end if; Put (Index_Str & " | " & Task_Name_Str & Task_Name_Blanks & " | " & Stack_Size_Str & Stack_Size_Blanks & " | " & Stack_Usage_Blanks & Actual_Size_Str); end; New_Line; -- Now display the individual results for J in Result_Array'Range loop exit when J >= Next_Id; Output_Result (J, Result_Array (J), Max_Stack_Size_Len, Max_Actual_Use_Len); end loop; -- Case of no result stored, still display the labels else Put (Index_Str & " | " & Task_Name_Str & Task_Name_Blanks & " | " & Stack_Size_Str & " | " & Actual_Size_Str); New_Line; end if; end Output_Results; ------------------- -- Report_Result -- ------------------- procedure Report_Result (Analyzer : Stack_Analyzer) is Result : Task_Result := (Task_Name => Analyzer.Task_Name, Stack_Size => Analyzer.Stack_Size, Value => 0); begin if Analyzer.Pattern_Size = 0 then -- If we have that result, it means that we didn't do any computation -- at all (i.e. we used at least everything (and possibly more). Result.Value := Analyzer.Stack_Size; else Result.Value := Stack_Size (Analyzer.Topmost_Touched_Mark, Analyzer.Stack_Base); end if; if Analyzer.Result_Id in Result_Array'Range then -- If the result can be stored, then store it in Result_Array Result_Array (Analyzer.Result_Id) := Result; else -- If the result cannot be stored, then we display it right away declare Result_Str_Len : constant Natural := Natural'Image (Result.Value)'Length; Size_Str_Len : constant Natural := Natural'Image (Analyzer.Stack_Size)'Length; Max_Stack_Size_Len : Natural; Max_Actual_Use_Len : Natural; begin -- Take either the label size or the number image size for the -- size of the column "Stack Size". Max_Stack_Size_Len := (if Size_Str_Len > Stack_Size_Str'Length then Size_Str_Len else Stack_Size_Str'Length); -- Take either the label size or the number image size for the -- size of the column "Stack Usage". Max_Actual_Use_Len := (if Result_Str_Len > Actual_Size_Str'Length then Result_Str_Len else Actual_Size_Str'Length); Output_Result (Analyzer.Result_Id, Result, Max_Stack_Size_Len, Max_Actual_Use_Len); end; end if; end Report_Result; end System.Stack_Usage;
reznikmm/matreshka
Ada
3,714
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Elements; package ODF.DOM.Db_Table_Include_Filter_Elements is pragma Preelaborate; type ODF_Db_Table_Include_Filter is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Db_Table_Include_Filter_Access is access all ODF_Db_Table_Include_Filter'Class with Storage_Size => 0; end ODF.DOM.Db_Table_Include_Filter_Elements;
persan/advent-of-code-2020
Ada
546
adb
procedure Adventofcode.Day_8.Main is C : Computer_Type; begin C.Load ("src/day-8/input.test"); for I of C.Storage loop C.Reset; C.Trace := True; if I.Code in Nop | Jmp then if I.Code = Nop then I.Code := Jmp; C.Run; I.Code := Nop; elsif I.Code = Nop then I.Code := Jmp; C.Run; I.Code := Nop; end if; end if; if C.Execution_OK then C.Print; end if; end loop; end Adventofcode.Day_8.Main;
reznikmm/matreshka
Ada
6,651
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Helpers; with AMF.Internals.Tables.Utp_Attributes; with AMF.UML.Send_Object_Actions; with AMF.Visitors.Utp_Iterators; with AMF.Visitors.Utp_Visitors; package body AMF.Internals.Utp_Log_Actions is --------------------------------- -- Get_Base_Send_Object_Action -- --------------------------------- overriding function Get_Base_Send_Object_Action (Self : not null access constant Utp_Log_Action_Proxy) return AMF.UML.Send_Object_Actions.UML_Send_Object_Action_Access is begin return AMF.UML.Send_Object_Actions.UML_Send_Object_Action_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.Utp_Attributes.Internal_Get_Base_Send_Object_Action (Self.Element))); end Get_Base_Send_Object_Action; --------------------------------- -- Set_Base_Send_Object_Action -- --------------------------------- overriding procedure Set_Base_Send_Object_Action (Self : not null access Utp_Log_Action_Proxy; To : AMF.UML.Send_Object_Actions.UML_Send_Object_Action_Access) is begin AMF.Internals.Tables.Utp_Attributes.Internal_Set_Base_Send_Object_Action (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Base_Send_Object_Action; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant Utp_Log_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then AMF.Visitors.Utp_Visitors.Utp_Visitor'Class (Visitor).Enter_Log_Action (AMF.Utp.Log_Actions.Utp_Log_Action_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant Utp_Log_Action_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then AMF.Visitors.Utp_Visitors.Utp_Visitor'Class (Visitor).Leave_Log_Action (AMF.Utp.Log_Actions.Utp_Log_Action_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant Utp_Log_Action_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.Utp_Iterators.Utp_Iterator'Class then AMF.Visitors.Utp_Iterators.Utp_Iterator'Class (Iterator).Visit_Log_Action (Visitor, AMF.Utp.Log_Actions.Utp_Log_Action_Access (Self), Control); end if; end Visit_Element; end AMF.Internals.Utp_Log_Actions;
reznikmm/spawn
Ada
3,107
ads
-- -- Copyright (C) 2018-2023, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- -- It is Glib's version of the package. with Ada.Streams; with Glib.IOChannel; private with Glib.Main; with Spawn.Common; limited with Spawn.Internal; private package Spawn.Channels is type Channels (Process : not null access Spawn.Internal.Process'Class) is private; type Pipe_Array is array (Spawn.Common.Standard_Pipe) of Glib.Gint; -- File descriptors array procedure Setup_Channels (Self : in out Channels; Use_PTY : Spawn.Common.Pipe_Flags; Child : out Pipe_Array); procedure Close_Child_Descriptors (Self : in out Channels); procedure Shutdown_Channels (Self : in out Channels); procedure Shutdown_Stdin (Self : in out Channels); procedure Shutdown_Stdout (Self : in out Channels); procedure Shutdown_Stderr (Self : in out Channels); function PTY_Slave (Self : Channels) return Glib.Gint; procedure Start_Watch (Self : in out Channels); procedure Write_Stdin (Self : in out Channels; Data : Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Success : in out Boolean); procedure Read_Stdout (Self : in out Channels; Data : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Success : in out Boolean); procedure Read_Stderr (Self : in out Channels; Data : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset; Success : in out Boolean); function Is_Active (Self : Channels) return Boolean; private use type Glib.Gint; type Channels (Process : not null access Spawn.Internal.Process'Class) is record Stdin_Parent : Glib.IOChannel.Giochannel := null; Stdin_Child : Glib.Gint := -1; Stdin_Event : Glib.Main.G_Source_Id := Glib.Main.No_Source_Id; Stdin_Lock : Glib.Gboolean := 0; -- Lock of the Stdin_Event field. Lock is managed as counter -- to prevent reset of the Stdin_Event field by the nested IO -- operation on the channel. Stdout_Parent : Glib.IOChannel.Giochannel := null; Stdout_Child : Glib.Gint := -1; Stdout_Event : Glib.Main.G_Source_Id := Glib.Main.No_Source_Id; Stdout_Lock : Glib.Gboolean := 0; -- Lock of the Stdout_Event field. Lock is managed as counter -- to prevent reset of the Stdout_Event field by the nested IO -- operation on the channel. Stderr_Parent : Glib.IOChannel.Giochannel := null; Stderr_Child : Glib.Gint := -1; Stderr_Event : Glib.Main.G_Source_Id := Glib.Main.No_Source_Id; Stderr_Lock : Glib.Gboolean := 0; -- Lock of the Stderr_Event field. Lock is managed as counter -- to prevent reset of the Stderr_Event field by the nested IO -- operation on the channel. PTY_Slave : Glib.Gint := -1; end record; end Spawn.Channels;
msrLi/portingSources
Ada
3,017
ads
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Menu_Demo -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Menu_Demo is procedure Demo; end Sample.Menu_Demo;
reznikmm/matreshka
Ada
4,922
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ -- An opaque expression is an uninterpreted textual statement that denotes a -- (possibly empty) set of values when evaluated in a context. ------------------------------------------------------------------------------ with AMF.CMOF.Value_Specifications; with AMF.String_Collections; package AMF.CMOF.Opaque_Expressions is pragma Preelaborate; type CMOF_Opaque_Expression is limited interface and AMF.CMOF.Value_Specifications.CMOF_Value_Specification; type CMOF_Opaque_Expression_Access is access all CMOF_Opaque_Expression'Class; for CMOF_Opaque_Expression_Access'Storage_Size use 0; not overriding function Get_Body (Self : not null access constant CMOF_Opaque_Expression) return AMF.String_Collections.Sequence_Of_String is abstract; -- Getter of OpaqueExpression::body. -- -- The text of the expression, possibly in multiple languages. not overriding function Get_Language (Self : not null access constant CMOF_Opaque_Expression) return AMF.String_Collections.Ordered_Set_Of_String is abstract; -- Getter of OpaqueExpression::language. -- -- Specifies the languages in which the expression is stated. The -- interpretation of the expression body depends on the languages. If the -- languages are unspecified, they might be implicit from the expression -- body or the context. Languages are matched to body strings by order. end AMF.CMOF.Opaque_Expressions;
Lucretia/Cherry
Ada
482
ads
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- package Macros is procedure Append (Name : in String); -- This routine is called with the argument to each -D command-line option. -- Add the macro defined to the azDefine array. end Macros;
reznikmm/matreshka
Ada
4,708
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Table_Deletion_Elements; package Matreshka.ODF_Table.Deletion_Elements is type Table_Deletion_Element_Node is new Matreshka.ODF_Table.Abstract_Table_Element_Node and ODF.DOM.Table_Deletion_Elements.ODF_Table_Deletion with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Table_Deletion_Element_Node; overriding function Get_Local_Name (Self : not null access constant Table_Deletion_Element_Node) return League.Strings.Universal_String; overriding procedure Enter_Node (Self : not null access Table_Deletion_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Leave_Node (Self : not null access Table_Deletion_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); overriding procedure Visit_Node (Self : not null access Table_Deletion_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control); end Matreshka.ODF_Table.Deletion_Elements;
reznikmm/matreshka
Ada
53,197
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.OCL_Attributes; with AMF.String_Collections; with AMF.UML.Classifier_Template_Parameters; with AMF.UML.Classifiers.Collections; with AMF.UML.Collaboration_Uses.Collections; with AMF.UML.Comments.Collections; with AMF.UML.Constraints.Collections; with AMF.UML.Dependencies.Collections; with AMF.UML.Element_Imports.Collections; with AMF.UML.Elements.Collections; with AMF.UML.Features.Collections; with AMF.UML.Generalization_Sets.Collections; with AMF.UML.Generalizations.Collections; with AMF.UML.Named_Elements.Collections; with AMF.UML.Namespaces.Collections; with AMF.UML.Operations.Collections; with AMF.UML.Package_Imports.Collections; with AMF.UML.Packageable_Elements.Collections; with AMF.UML.Packages.Collections; with AMF.UML.Parameterable_Elements.Collections; with AMF.UML.Properties.Collections; with AMF.UML.Redefinable_Elements.Collections; with AMF.UML.Redefinable_Template_Signatures; with AMF.UML.String_Expressions; with AMF.UML.Substitutions.Collections; with AMF.UML.Template_Bindings.Collections; with AMF.UML.Template_Parameters; with AMF.UML.Template_Signatures; with AMF.UML.Types; with AMF.UML.Use_Cases.Collections; with AMF.Visitors.OCL_Iterators; with AMF.Visitors.OCL_Visitors; with League.Strings.Internals; with Matreshka.Internals.Strings; package body AMF.Internals.OCL_Collection_Types is ---------------------- -- Get_Element_Type -- ---------------------- overriding function Get_Element_Type (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.UML_Classifier_Access is begin return AMF.UML.Classifiers.UML_Classifier_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Element_Type (Self.Element))); end Get_Element_Type; ---------------------- -- Set_Element_Type -- ---------------------- overriding procedure Set_Element_Type (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Classifiers.UML_Classifier_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Element_Type (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Element_Type; ------------------------- -- Get_Owned_Attribute -- ------------------------- overriding function Get_Owned_Attribute (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property is begin return AMF.UML.Properties.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Attribute (Self.Element))); end Get_Owned_Attribute; ------------------------- -- Get_Owned_Operation -- ------------------------- overriding function Get_Owned_Operation (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation is begin return AMF.UML.Operations.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Operation (Self.Element))); end Get_Owned_Operation; ------------------- -- Get_Attribute -- ------------------- overriding function Get_Attribute (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Properties.Collections.Set_Of_UML_Property is begin return AMF.UML.Properties.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Attribute (Self.Element))); end Get_Attribute; --------------------------- -- Get_Collaboration_Use -- --------------------------- overriding function Get_Collaboration_Use (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use is begin return AMF.UML.Collaboration_Uses.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Collaboration_Use (Self.Element))); end Get_Collaboration_Use; ----------------- -- Get_Feature -- ----------------- overriding function Get_Feature (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Features.Collections.Set_Of_UML_Feature is begin return AMF.UML.Features.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Feature (Self.Element))); end Get_Feature; ----------------- -- Get_General -- ----------------- overriding function Get_General (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_General (Self.Element))); end Get_General; ------------------------ -- Get_Generalization -- ------------------------ overriding function Get_Generalization (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization is begin return AMF.UML.Generalizations.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Generalization (Self.Element))); end Get_Generalization; -------------------------- -- Get_Inherited_Member -- -------------------------- overriding function Get_Inherited_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Inherited_Member (Self.Element))); end Get_Inherited_Member; --------------------- -- Get_Is_Abstract -- --------------------- overriding function Get_Is_Abstract (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin return AMF.Internals.Tables.OCL_Attributes.Internal_Get_Is_Abstract (Self.Element); end Get_Is_Abstract; --------------------- -- Set_Is_Abstract -- --------------------- overriding procedure Set_Is_Abstract (Self : not null access OCL_Collection_Type_Proxy; To : Boolean) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Is_Abstract (Self.Element, To); end Set_Is_Abstract; --------------------------------- -- Get_Is_Final_Specialization -- --------------------------------- overriding function Get_Is_Final_Specialization (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin return AMF.Internals.Tables.OCL_Attributes.Internal_Get_Is_Final_Specialization (Self.Element); end Get_Is_Final_Specialization; --------------------------------- -- Set_Is_Final_Specialization -- --------------------------------- overriding procedure Set_Is_Final_Specialization (Self : not null access OCL_Collection_Type_Proxy; To : Boolean) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Is_Final_Specialization (Self.Element, To); end Set_Is_Final_Specialization; ---------------------------------- -- Get_Owned_Template_Signature -- ---------------------------------- overriding function Get_Owned_Template_Signature (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access is begin return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Template_Signature (Self.Element))); end Get_Owned_Template_Signature; ---------------------------------- -- Set_Owned_Template_Signature -- ---------------------------------- overriding procedure Set_Owned_Template_Signature (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Owned_Template_Signature (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owned_Template_Signature; ------------------------ -- Get_Owned_Use_Case -- ------------------------ overriding function Get_Owned_Use_Case (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is begin return AMF.UML.Use_Cases.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Use_Case (Self.Element))); end Get_Owned_Use_Case; -------------------------- -- Get_Powertype_Extent -- -------------------------- overriding function Get_Powertype_Extent (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set is begin return AMF.UML.Generalization_Sets.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Powertype_Extent (Self.Element))); end Get_Powertype_Extent; ------------------------------ -- Get_Redefined_Classifier -- ------------------------------ overriding function Get_Redefined_Classifier (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Redefined_Classifier (Self.Element))); end Get_Redefined_Classifier; ------------------------ -- Get_Representation -- ------------------------ overriding function Get_Representation (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access is begin return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Representation (Self.Element))); end Get_Representation; ------------------------ -- Set_Representation -- ------------------------ overriding procedure Set_Representation (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Representation (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Representation; ---------------------- -- Get_Substitution -- ---------------------- overriding function Get_Substitution (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution is begin return AMF.UML.Substitutions.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Substitution (Self.Element))); end Get_Substitution; ---------------------------- -- Get_Template_Parameter -- ---------------------------- overriding function Get_Template_Parameter (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access is begin return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Template_Parameter (Self.Element))); end Get_Template_Parameter; ---------------------------- -- Set_Template_Parameter -- ---------------------------- overriding procedure Set_Template_Parameter (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Template_Parameter; ------------------ -- Get_Use_Case -- ------------------ overriding function Get_Use_Case (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case is begin return AMF.UML.Use_Cases.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Use_Case (Self.Element))); end Get_Use_Case; ------------------------ -- Get_Element_Import -- ------------------------ overriding function Get_Element_Import (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is begin return AMF.UML.Element_Imports.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Element_Import (Self.Element))); end Get_Element_Import; ------------------------- -- Get_Imported_Member -- ------------------------- overriding function Get_Imported_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin return AMF.UML.Packageable_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Imported_Member (Self.Element))); end Get_Imported_Member; ---------------- -- Get_Member -- ---------------- overriding function Get_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Member (Self.Element))); end Get_Member; ---------------------- -- Get_Owned_Member -- ---------------------- overriding function Get_Owned_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Member (Self.Element))); end Get_Owned_Member; -------------------- -- Get_Owned_Rule -- -------------------- overriding function Get_Owned_Rule (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is begin return AMF.UML.Constraints.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Rule (Self.Element))); end Get_Owned_Rule; ------------------------ -- Get_Package_Import -- ------------------------ overriding function Get_Package_Import (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is begin return AMF.UML.Package_Imports.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Package_Import (Self.Element))); end Get_Package_Import; --------------------------- -- Get_Client_Dependency -- --------------------------- overriding function Get_Client_Dependency (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is begin return AMF.UML.Dependencies.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Client_Dependency (Self.Element))); end Get_Client_Dependency; -------------- -- Get_Name -- -------------- overriding function Get_Name (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.OCL_Attributes.Internal_Get_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Name; -------------- -- Set_Name -- -------------- overriding procedure Set_Name (Self : not null access OCL_Collection_Type_Proxy; To : AMF.Optional_String) is begin if To.Is_Empty then AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name (Self.Element, null); else AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name (Self.Element, League.Strings.Internals.Internal (To.Value)); end if; end Set_Name; ------------------------- -- Get_Name_Expression -- ------------------------- overriding function Get_Name_Expression (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access is begin return AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Name_Expression (Self.Element))); end Get_Name_Expression; ------------------------- -- Set_Name_Expression -- ------------------------- overriding procedure Set_Name_Expression (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Name_Expression (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Name_Expression; ------------------- -- Get_Namespace -- ------------------- overriding function Get_Namespace (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin return AMF.UML.Namespaces.UML_Namespace_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Namespace (Self.Element))); end Get_Namespace; ------------------------ -- Get_Qualified_Name -- ------------------------ overriding function Get_Qualified_Name (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.OCL_Attributes.Internal_Get_Qualified_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Qualified_Name; -------------------- -- Get_Visibility -- -------------------- overriding function Get_Visibility (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Optional_UML_Visibility_Kind is begin return AMF.Internals.Tables.OCL_Attributes.Internal_Get_Visibility (Self.Element); end Get_Visibility; -------------------- -- Set_Visibility -- -------------------- overriding procedure Set_Visibility (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Optional_UML_Visibility_Kind) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Visibility (Self.Element, To); end Set_Visibility; ----------------------- -- Get_Owned_Comment -- ----------------------- overriding function Get_Owned_Comment (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Comments.Collections.Set_Of_UML_Comment is begin return AMF.UML.Comments.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Comment (Self.Element))); end Get_Owned_Comment; ----------------------- -- Get_Owned_Element -- ----------------------- overriding function Get_Owned_Element (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Element (Self.Element))); end Get_Owned_Element; --------------- -- Get_Owner -- --------------- overriding function Get_Owner (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Elements.UML_Element_Access is begin return AMF.UML.Elements.UML_Element_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owner (Self.Element))); end Get_Owner; ----------------- -- Get_Package -- ----------------- overriding function Get_Package (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Packages.UML_Package_Access is begin return AMF.UML.Packages.UML_Package_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Package (Self.Element))); end Get_Package; ----------------- -- Set_Package -- ----------------- overriding procedure Set_Package (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Packages.UML_Package_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Package (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Package; -------------------- -- Get_Visibility -- -------------------- overriding function Get_Visibility (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.UML_Visibility_Kind is begin return AMF.Internals.Tables.OCL_Attributes.Internal_Get_Visibility (Self.Element).Value; end Get_Visibility; -------------------- -- Set_Visibility -- -------------------- overriding procedure Set_Visibility (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.UML_Visibility_Kind) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Visibility (Self.Element, (False, To)); end Set_Visibility; ----------------------------------- -- Get_Owning_Template_Parameter -- ----------------------------------- overriding function Get_Owning_Template_Parameter (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owning_Template_Parameter (Self.Element))); end Get_Owning_Template_Parameter; ----------------------------------- -- Set_Owning_Template_Parameter -- ----------------------------------- overriding procedure Set_Owning_Template_Parameter (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Owning_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owning_Template_Parameter; ---------------------------- -- Get_Template_Parameter -- ---------------------------- overriding function Get_Template_Parameter (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Template_Parameter (Self.Element))); end Get_Template_Parameter; ---------------------------- -- Set_Template_Parameter -- ---------------------------- overriding procedure Set_Template_Parameter (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Template_Parameter; ---------------------------------- -- Get_Owned_Template_Signature -- ---------------------------------- overriding function Get_Owned_Template_Signature (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Template_Signatures.UML_Template_Signature_Access is begin return AMF.UML.Template_Signatures.UML_Template_Signature_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Owned_Template_Signature (Self.Element))); end Get_Owned_Template_Signature; ---------------------------------- -- Set_Owned_Template_Signature -- ---------------------------------- overriding procedure Set_Owned_Template_Signature (Self : not null access OCL_Collection_Type_Proxy; To : AMF.UML.Template_Signatures.UML_Template_Signature_Access) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Owned_Template_Signature (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owned_Template_Signature; -------------------------- -- Get_Template_Binding -- -------------------------- overriding function Get_Template_Binding (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding is begin return AMF.UML.Template_Bindings.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Template_Binding (Self.Element))); end Get_Template_Binding; ----------------- -- Get_Is_Leaf -- ----------------- overriding function Get_Is_Leaf (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin return AMF.Internals.Tables.OCL_Attributes.Internal_Get_Is_Leaf (Self.Element); end Get_Is_Leaf; ----------------- -- Set_Is_Leaf -- ----------------- overriding procedure Set_Is_Leaf (Self : not null access OCL_Collection_Type_Proxy; To : Boolean) is begin AMF.Internals.Tables.OCL_Attributes.Internal_Set_Is_Leaf (Self.Element, To); end Set_Is_Leaf; --------------------------- -- Get_Redefined_Element -- --------------------------- overriding function Get_Redefined_Element (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is begin return AMF.UML.Redefinable_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Redefined_Element (Self.Element))); end Get_Redefined_Element; ------------------------------ -- Get_Redefinition_Context -- ------------------------------ overriding function Get_Redefinition_Context (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin return AMF.UML.Classifiers.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.OCL_Attributes.Internal_Get_Redefinition_Context (Self.Element))); end Get_Redefinition_Context; ------------- -- Inherit -- ------------- overriding function Inherit (Self : not null access constant OCL_Collection_Type_Proxy; Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Inherit unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Inherit"; return Inherit (Self, Inhs); end Inherit; ------------------ -- All_Features -- ------------------ overriding function All_Features (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Features.Collections.Set_Of_UML_Feature is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Features unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.All_Features"; return All_Features (Self); end All_Features; ----------------- -- All_Parents -- ----------------- overriding function All_Parents (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Parents unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.All_Parents"; return All_Parents (Self); end All_Parents; ----------------- -- Conforms_To -- ----------------- overriding function Conforms_To (Self : not null access constant OCL_Collection_Type_Proxy; Other : AMF.UML.Classifiers.UML_Classifier_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Conforms_To"; return Conforms_To (Self, Other); end Conforms_To; ------------- -- General -- ------------- overriding function General (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "General unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.General"; return General (Self); end General; ----------------------- -- Has_Visibility_Of -- ----------------------- overriding function Has_Visibility_Of (Self : not null access constant OCL_Collection_Type_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Has_Visibility_Of unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Has_Visibility_Of"; return Has_Visibility_Of (Self, N); end Has_Visibility_Of; ------------------------- -- Inheritable_Members -- ------------------------- overriding function Inheritable_Members (Self : not null access constant OCL_Collection_Type_Proxy; C : AMF.UML.Classifiers.UML_Classifier_Access) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Inheritable_Members unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Inheritable_Members"; return Inheritable_Members (Self, C); end Inheritable_Members; ---------------------- -- Inherited_Member -- ---------------------- overriding function Inherited_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Inherited_Member unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Inherited_Member"; return Inherited_Member (Self); end Inherited_Member; ----------------- -- Is_Template -- ----------------- overriding function Is_Template (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Template unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Is_Template"; return Is_Template (Self); end Is_Template; ------------------------- -- May_Specialize_Type -- ------------------------- overriding function May_Specialize_Type (Self : not null access constant OCL_Collection_Type_Proxy; C : AMF.UML.Classifiers.UML_Classifier_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "May_Specialize_Type unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.May_Specialize_Type"; return May_Specialize_Type (Self, C); end May_Specialize_Type; ------------- -- Parents -- ------------- overriding function Parents (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Parents unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Parents"; return Parents (Self); end Parents; ------------------------ -- Exclude_Collisions -- ------------------------ overriding function Exclude_Collisions (Self : not null access constant OCL_Collection_Type_Proxy; Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Exclude_Collisions"; return Exclude_Collisions (Self, Imps); end Exclude_Collisions; ------------------------- -- Get_Names_Of_Member -- ------------------------- overriding function Get_Names_Of_Member (Self : not null access constant OCL_Collection_Type_Proxy; Element : AMF.UML.Named_Elements.UML_Named_Element_Access) return AMF.String_Collections.Set_Of_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Get_Names_Of_Member"; return Get_Names_Of_Member (Self, Element); end Get_Names_Of_Member; -------------------- -- Import_Members -- -------------------- overriding function Import_Members (Self : not null access constant OCL_Collection_Type_Proxy; Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Import_Members"; return Import_Members (Self, Imps); end Import_Members; --------------------- -- Imported_Member -- --------------------- overriding function Imported_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Imported_Member"; return Imported_Member (Self); end Imported_Member; --------------------------------- -- Members_Are_Distinguishable -- --------------------------------- overriding function Members_Are_Distinguishable (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Members_Are_Distinguishable"; return Members_Are_Distinguishable (Self); end Members_Are_Distinguishable; ------------------ -- Owned_Member -- ------------------ overriding function Owned_Member (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Owned_Member"; return Owned_Member (Self); end Owned_Member; -------------------- -- All_Namespaces -- -------------------- overriding function All_Namespaces (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.All_Namespaces"; return All_Namespaces (Self); end All_Namespaces; ------------------------- -- All_Owning_Packages -- ------------------------- overriding function All_Owning_Packages (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.All_Owning_Packages"; return All_Owning_Packages (Self); end All_Owning_Packages; ----------------------------- -- Is_Distinguishable_From -- ----------------------------- overriding function Is_Distinguishable_From (Self : not null access constant OCL_Collection_Type_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Is_Distinguishable_From"; return Is_Distinguishable_From (Self, N, Ns); end Is_Distinguishable_From; --------------- -- Namespace -- --------------- overriding function Namespace (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Namespace"; return Namespace (Self); end Namespace; -------------------- -- Qualified_Name -- -------------------- overriding function Qualified_Name (Self : not null access constant OCL_Collection_Type_Proxy) return League.Strings.Universal_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Qualified_Name"; return Qualified_Name (Self); end Qualified_Name; --------------- -- Separator -- --------------- overriding function Separator (Self : not null access constant OCL_Collection_Type_Proxy) return League.Strings.Universal_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Separator unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Separator"; return Separator (Self); end Separator; ------------------------ -- All_Owned_Elements -- ------------------------ overriding function All_Owned_Elements (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.All_Owned_Elements"; return All_Owned_Elements (Self); end All_Owned_Elements; ------------------- -- Must_Be_Owned -- ------------------- overriding function Must_Be_Owned (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Must_Be_Owned unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Must_Be_Owned"; return Must_Be_Owned (Self); end Must_Be_Owned; ----------------- -- Conforms_To -- ----------------- overriding function Conforms_To (Self : not null access constant OCL_Collection_Type_Proxy; Other : AMF.UML.Types.UML_Type_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Conforms_To unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Conforms_To"; return Conforms_To (Self, Other); end Conforms_To; ------------------------ -- Is_Compatible_With -- ------------------------ overriding function Is_Compatible_With (Self : not null access constant OCL_Collection_Type_Proxy; P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Is_Compatible_With"; return Is_Compatible_With (Self, P); end Is_Compatible_With; --------------------------- -- Is_Template_Parameter -- --------------------------- overriding function Is_Template_Parameter (Self : not null access constant OCL_Collection_Type_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Is_Template_Parameter"; return Is_Template_Parameter (Self); end Is_Template_Parameter; ---------------------------- -- Parameterable_Elements -- ---------------------------- overriding function Parameterable_Elements (Self : not null access constant OCL_Collection_Type_Proxy) return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Parameterable_Elements unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Parameterable_Elements"; return Parameterable_Elements (Self); end Parameterable_Elements; ------------------------ -- Is_Consistent_With -- ------------------------ overriding function Is_Consistent_With (Self : not null access constant OCL_Collection_Type_Proxy; Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Is_Consistent_With"; return Is_Consistent_With (Self, Redefinee); end Is_Consistent_With; ----------------------------------- -- Is_Redefinition_Context_Valid -- ----------------------------------- overriding function Is_Redefinition_Context_Valid (Self : not null access constant OCL_Collection_Type_Proxy; Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented"); raise Program_Error with "Unimplemented procedure OCL_Collection_Type_Proxy.Is_Redefinition_Context_Valid"; return Is_Redefinition_Context_Valid (Self, Redefined); end Is_Redefinition_Context_Valid; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant OCL_Collection_Type_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then AMF.Visitors.OCL_Visitors.OCL_Visitor'Class (Visitor).Enter_Collection_Type (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant OCL_Collection_Type_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.OCL_Visitors.OCL_Visitor'Class then AMF.Visitors.OCL_Visitors.OCL_Visitor'Class (Visitor).Leave_Collection_Type (AMF.OCL.Collection_Types.OCL_Collection_Type_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant OCL_Collection_Type_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.OCL_Iterators.OCL_Iterator'Class then AMF.Visitors.OCL_Iterators.OCL_Iterator'Class (Iterator).Visit_Collection_Type (Visitor, AMF.OCL.Collection_Types.OCL_Collection_Type_Access (Self), Control); end if; end Visit_Element; end AMF.Internals.OCL_Collection_Types;
Letractively/ada-ado
Ada
1,215
ads
----------------------------------------------------------------------- -- ado-datasets-tests -- Test executing queries and using datasets -- Copyright (C) 2013, 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ADO.Datasets.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_List (T : in out Test); procedure Test_Count (T : in out Test); procedure Test_Count_Query (T : in out Test); end ADO.Datasets.Tests;
optikos/oasis
Ada
2,326
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Formal_Type_Definitions; with Program.Lexical_Elements; with Program.Elements.Expressions; with Program.Elements.Component_Definitions; package Program.Elements.Formal_Unconstrained_Array_Types is pragma Pure (Program.Elements.Formal_Unconstrained_Array_Types); type Formal_Unconstrained_Array_Type is limited interface and Program.Elements.Formal_Type_Definitions.Formal_Type_Definition; type Formal_Unconstrained_Array_Type_Access is access all Formal_Unconstrained_Array_Type'Class with Storage_Size => 0; not overriding function Index_Subtypes (Self : Formal_Unconstrained_Array_Type) return not null Program.Elements.Expressions.Expression_Vector_Access is abstract; not overriding function Component_Definition (Self : Formal_Unconstrained_Array_Type) return not null Program.Elements.Component_Definitions .Component_Definition_Access is abstract; type Formal_Unconstrained_Array_Type_Text is limited interface; type Formal_Unconstrained_Array_Type_Text_Access is access all Formal_Unconstrained_Array_Type_Text'Class with Storage_Size => 0; not overriding function To_Formal_Unconstrained_Array_Type_Text (Self : aliased in out Formal_Unconstrained_Array_Type) return Formal_Unconstrained_Array_Type_Text_Access is abstract; not overriding function Array_Token (Self : Formal_Unconstrained_Array_Type_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Left_Bracket_Token (Self : Formal_Unconstrained_Array_Type_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Right_Bracket_Token (Self : Formal_Unconstrained_Array_Type_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Of_Token (Self : Formal_Unconstrained_Array_Type_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Formal_Unconstrained_Array_Types;
AdaDoom3/wayland_ada_binding
Ada
5,783
adb
------------------------------------------------------------------------------ -- Copyright (C) 2016-2016, AdaCore -- -- -- -- This library is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- -- Software Foundation; either version 3, or (at your option) any later -- -- version. This library is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- ------------------------------------------------------------------------------ -- A graph data structure implemented as an adjacency list. -- It stores a sequence of out-edges for each vertex. -- This package lets users decide whether to use lists, vectors, or other -- types of sequences for vertices and their edges. pragma Ada_2012; package body Conts.Graphs.Adjacency_List is ---------- -- Impl -- ---------- package body Impl is ----------- -- Clear -- ----------- procedure Clear (Self : in out Graph) is begin Self.Vertices.Clear; end Clear; ------------------ -- Add_Vertices -- ------------------ procedure Add_Vertices (Self : in out Graph; Props : Vertex_Properties.Element_Type; Count : Count_Type := 1) is begin Self.Vertices.Append (Element => (Props => Vertex_Properties.To_Stored (Props), Out_Edges => <>), Count => Count); end Add_Vertices; -------------- -- Add_Edge -- -------------- procedure Add_Edge (Self : in out Graph; From, To : Vertex; Props : Edge_Properties.Element_Type) is begin Self.Vertices.Reference (From).Out_Edges.Append (Edge' (From => From, To => To, Props => Edge_Properties.To_Stored (Props))); end Add_Edge; ------------ -- Length -- ------------ function Length (Self : Graph) return Count_Type is begin return Self.Vertices.Length; end Length; ---------------- -- Get_Target -- ---------------- function Get_Target (G : Graph; E : Edge) return Vertex is pragma Unreferenced (G); begin return E.To; end Get_Target; ----------- -- First -- ----------- function First (G : Graph) return Vertex_Cursor is begin return (Current => G.Vertices.First); end First; ------------- -- Element -- ------------- function Element (G : Graph; C : Vertex_Cursor) return Vertex is pragma Unreferenced (G); begin return C.Current; end Element; ----------------- -- Has_Element -- ----------------- function Has_Element (G : Graph; C : Vertex_Cursor) return Boolean is begin return G.Vertices.Has_Element (C.Current); end Has_Element; ---------- -- Next -- ---------- function Next (G : Graph; C : Vertex_Cursor) return Vertex_Cursor is begin return (Current => G.Vertices.Next (C.Current)); end Next; --------------- -- Out_Edges -- --------------- function Out_Edges (G : Graph; V : Vertex) return Edges_Cursor is begin return (Current => G.Vertices.Element (V).Out_Edges.First, From => V); end Out_Edges; ------------- -- Element -- ------------- function Element (G : Graph; C : Edges_Cursor) return Edge is begin return G.Vertices.Element (C.From).Out_Edges.Element (C.Current); end Element; ----------------- -- Has_Element -- ----------------- function Has_Element (G : Graph; C : Edges_Cursor) return Boolean is begin return G.Vertices.Element (C.From).Out_Edges.Has_Element (C.Current); end Has_Element; ---------- -- Next -- ---------- function Next (G : Graph; C : Edges_Cursor) return Edges_Cursor is begin return (Current => G.Vertices.Element (C.From).Out_Edges.Next (C.Current), From => C.From); end Next; ------------- -- Release -- ------------- procedure Release (E : in out Edge) is begin Edge_Properties.Release (E.Props); end Release; ------------- -- Release -- ------------- procedure Release (V : in out Vertex_Record) is begin Vertex_Properties.Release (V.Props); V.Out_Edges.Clear; end Release; end Impl; end Conts.Graphs.Adjacency_List;
zhmu/ananas
Ada
17,441
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K I N G . Q U E U I N G -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This version of the body implements queueing policy according to the policy -- specified by the pragma Queuing_Policy. When no such pragma is specified -- FIFO policy is used as default. with System.Task_Primitives.Operations; with System.Tasking.Initialization; package body System.Tasking.Queuing is use Task_Primitives.Operations; use Protected_Objects; use Protected_Objects.Entries; -- Entry Queues implemented as doubly linked list Queuing_Policy : constant Character; pragma Import (C, Queuing_Policy, "__gl_queuing_policy"); Priority_Queuing : constant Boolean := Queuing_Policy = 'P'; procedure Send_Program_Error (Self_ID : Task_Id; Entry_Call : Entry_Call_Link); -- Raise Program_Error in the caller of the specified entry call function Check_Queue (E : Entry_Queue) return Boolean; -- Check the validity of E. -- Return True if E is valid, raise Assert_Failure if assertions are -- enabled and False otherwise. ----------------------------- -- Broadcast_Program_Error -- ----------------------------- procedure Broadcast_Program_Error (Self_ID : Task_Id; Object : Protection_Entries_Access; Pending_Call : Entry_Call_Link) is Entry_Call : Entry_Call_Link; begin if Pending_Call /= null then Send_Program_Error (Self_ID, Pending_Call); end if; for E in Object.Entry_Queues'Range loop Dequeue_Head (Object.Entry_Queues (E), Entry_Call); while Entry_Call /= null loop pragma Assert (Entry_Call.Mode /= Conditional_Call); Send_Program_Error (Self_ID, Entry_Call); Dequeue_Head (Object.Entry_Queues (E), Entry_Call); end loop; end loop; end Broadcast_Program_Error; ----------------- -- Check_Queue -- ----------------- function Check_Queue (E : Entry_Queue) return Boolean is Valid : Boolean := True; C, Prev : Entry_Call_Link; begin if E.Head = null then if E.Tail /= null then Valid := False; pragma Assert (Valid); end if; else if E.Tail = null or else E.Tail.Next /= E.Head then Valid := False; pragma Assert (Valid); else C := E.Head; loop Prev := C; C := C.Next; if C = null then Valid := False; pragma Assert (Valid); exit; end if; if Prev /= C.Prev then Valid := False; pragma Assert (Valid); exit; end if; exit when C = E.Head; end loop; if Prev /= E.Tail then Valid := False; pragma Assert (Valid); end if; end if; end if; return Valid; end Check_Queue; ------------------- -- Count_Waiting -- ------------------- -- Return number of calls on the waiting queue of E function Count_Waiting (E : Entry_Queue) return Natural is Count : Natural; Temp : Entry_Call_Link; begin pragma Assert (Check_Queue (E)); Count := 0; if E.Head /= null then Temp := E.Head; loop Count := Count + 1; exit when E.Tail = Temp; Temp := Temp.Next; end loop; end if; return Count; end Count_Waiting; ------------- -- Dequeue -- ------------- -- Dequeue call from entry_queue E procedure Dequeue (E : in out Entry_Queue; Call : Entry_Call_Link) is begin pragma Assert (Check_Queue (E)); pragma Assert (Call /= null); -- If empty queue, simply return if E.Head = null then return; end if; pragma Assert (Call.Prev /= null); pragma Assert (Call.Next /= null); Call.Prev.Next := Call.Next; Call.Next.Prev := Call.Prev; if E.Head = Call then -- Case of one element if E.Tail = Call then E.Head := null; E.Tail := null; -- More than one element else E.Head := Call.Next; end if; elsif E.Tail = Call then E.Tail := Call.Prev; end if; -- Successfully dequeued Call.Prev := null; Call.Next := null; pragma Assert (Check_Queue (E)); end Dequeue; ------------------ -- Dequeue_Call -- ------------------ procedure Dequeue_Call (Entry_Call : Entry_Call_Link) is Called_PO : Protection_Entries_Access; begin pragma Assert (Entry_Call /= null); if Entry_Call.Called_Task /= null then Dequeue (Entry_Call.Called_Task.Entry_Queues (Task_Entry_Index (Entry_Call.E)), Entry_Call); else Called_PO := To_Protection (Entry_Call.Called_PO); Dequeue (Called_PO.Entry_Queues (Protected_Entry_Index (Entry_Call.E)), Entry_Call); end if; end Dequeue_Call; ------------------ -- Dequeue_Head -- ------------------ -- Remove and return the head of entry_queue E procedure Dequeue_Head (E : in out Entry_Queue; Call : out Entry_Call_Link) is Temp : Entry_Call_Link; begin pragma Assert (Check_Queue (E)); -- If empty queue, return null pointer if E.Head = null then Call := null; return; end if; Temp := E.Head; -- Case of one element if E.Head = E.Tail then E.Head := null; E.Tail := null; -- More than one element else pragma Assert (Temp /= null); pragma Assert (Temp.Next /= null); pragma Assert (Temp.Prev /= null); E.Head := Temp.Next; Temp.Prev.Next := Temp.Next; Temp.Next.Prev := Temp.Prev; end if; -- Successfully dequeued Temp.Prev := null; Temp.Next := null; Call := Temp; pragma Assert (Check_Queue (E)); end Dequeue_Head; ------------- -- Enqueue -- ------------- -- Enqueue call at the end of entry_queue E, for FIFO queuing policy. -- Enqueue call priority ordered, FIFO at same priority level, for -- Priority queuing policy. procedure Enqueue (E : in out Entry_Queue; Call : Entry_Call_Link) is Temp : Entry_Call_Link := E.Head; begin pragma Assert (Check_Queue (E)); pragma Assert (Call /= null); -- Priority Queuing if Priority_Queuing then if Temp = null then Call.Prev := Call; Call.Next := Call; E.Head := Call; E.Tail := Call; else loop -- Find the entry that the new guy should precede exit when Call.Prio > Temp.Prio; Temp := Temp.Next; if Temp = E.Head then Temp := null; exit; end if; end loop; if Temp = null then -- Insert at tail Call.Prev := E.Tail; Call.Next := E.Head; E.Tail := Call; else Call.Prev := Temp.Prev; Call.Next := Temp; -- Insert at head if Temp = E.Head then E.Head := Call; end if; end if; pragma Assert (Call.Prev /= null); pragma Assert (Call.Next /= null); Call.Prev.Next := Call; Call.Next.Prev := Call; end if; pragma Assert (Check_Queue (E)); return; end if; -- FIFO Queuing if E.Head = null then E.Head := Call; else E.Tail.Next := Call; Call.Prev := E.Tail; end if; E.Head.Prev := Call; E.Tail := Call; Call.Next := E.Head; pragma Assert (Check_Queue (E)); end Enqueue; ------------------ -- Enqueue_Call -- ------------------ procedure Enqueue_Call (Entry_Call : Entry_Call_Link) is Called_PO : Protection_Entries_Access; begin pragma Assert (Entry_Call /= null); if Entry_Call.Called_Task /= null then Enqueue (Entry_Call.Called_Task.Entry_Queues (Task_Entry_Index (Entry_Call.E)), Entry_Call); else Called_PO := To_Protection (Entry_Call.Called_PO); Enqueue (Called_PO.Entry_Queues (Protected_Entry_Index (Entry_Call.E)), Entry_Call); end if; end Enqueue_Call; ---------- -- Head -- ---------- -- Return the head of entry_queue E function Head (E : Entry_Queue) return Entry_Call_Link is begin pragma Assert (Check_Queue (E)); return E.Head; end Head; ------------- -- Onqueue -- ------------- -- Return True if Call is on any entry_queue at all function Onqueue (Call : Entry_Call_Link) return Boolean is begin pragma Assert (Call /= null); -- Utilize the fact that every queue is circular, so if Call -- is on any queue at all, Call.Next must NOT be null. return Call.Next /= null; end Onqueue; -------------------------------- -- Requeue_Call_With_New_Prio -- -------------------------------- procedure Requeue_Call_With_New_Prio (Entry_Call : Entry_Call_Link; Prio : System.Any_Priority) is begin pragma Assert (Entry_Call /= null); -- Perform a queue reordering only when the policy being used is the -- Priority Queuing. if Priority_Queuing then if Onqueue (Entry_Call) then Dequeue_Call (Entry_Call); Entry_Call.Prio := Prio; Enqueue_Call (Entry_Call); end if; end if; end Requeue_Call_With_New_Prio; --------------------------------- -- Select_Protected_Entry_Call -- --------------------------------- -- Select an entry of a protected object. Selection depends on the -- queuing policy being used. procedure Select_Protected_Entry_Call (Self_ID : Task_Id; Object : Protection_Entries_Access; Call : out Entry_Call_Link) is Entry_Call : Entry_Call_Link; Temp_Call : Entry_Call_Link; Entry_Index : Protected_Entry_Index := Null_Entry; -- stop warning begin Entry_Call := null; begin -- Priority queuing case if Priority_Queuing then for J in Object.Entry_Queues'Range loop Temp_Call := Head (Object.Entry_Queues (J)); if Temp_Call /= null and then Object.Entry_Bodies (Object.Find_Body_Index (Object.Compiler_Info, J)). Barrier (Object.Compiler_Info, J) then if Entry_Call = null or else Entry_Call.Prio < Temp_Call.Prio then Entry_Call := Temp_Call; Entry_Index := J; end if; end if; end loop; -- FIFO queueing case else for J in Object.Entry_Queues'Range loop Temp_Call := Head (Object.Entry_Queues (J)); if Temp_Call /= null and then Object.Entry_Bodies (Object.Find_Body_Index (Object.Compiler_Info, J)). Barrier (Object.Compiler_Info, J) then Entry_Call := Temp_Call; Entry_Index := J; exit; end if; end loop; end if; exception when others => Broadcast_Program_Error (Self_ID, Object, null); end; -- If a call was selected, dequeue it and return it for service if Entry_Call /= null then Temp_Call := Entry_Call; Dequeue_Head (Object.Entry_Queues (Entry_Index), Entry_Call); pragma Assert (Temp_Call = Entry_Call); end if; Call := Entry_Call; end Select_Protected_Entry_Call; ---------------------------- -- Select_Task_Entry_Call -- ---------------------------- -- Select an entry for rendezvous. Selection depends on the queuing policy -- being used. procedure Select_Task_Entry_Call (Acceptor : Task_Id; Open_Accepts : Accept_List_Access; Call : out Entry_Call_Link; Selection : out Select_Index; Open_Alternative : out Boolean) is Entry_Call : Entry_Call_Link; Temp_Call : Entry_Call_Link; Entry_Index : Task_Entry_Index := Task_Entry_Index'First; Temp_Entry : Task_Entry_Index; begin Open_Alternative := False; Entry_Call := null; Selection := No_Rendezvous; if Priority_Queuing then -- Priority queueing case for J in Open_Accepts'Range loop Temp_Entry := Open_Accepts (J).S; if Temp_Entry /= Null_Task_Entry then Open_Alternative := True; Temp_Call := Head (Acceptor.Entry_Queues (Temp_Entry)); if Temp_Call /= null and then (Entry_Call = null or else Entry_Call.Prio < Temp_Call.Prio) then Entry_Call := Head (Acceptor.Entry_Queues (Temp_Entry)); Entry_Index := Temp_Entry; Selection := J; end if; end if; end loop; else -- FIFO Queuing case for J in Open_Accepts'Range loop Temp_Entry := Open_Accepts (J).S; if Temp_Entry /= Null_Task_Entry then Open_Alternative := True; Temp_Call := Head (Acceptor.Entry_Queues (Temp_Entry)); if Temp_Call /= null then Entry_Call := Head (Acceptor.Entry_Queues (Temp_Entry)); Entry_Index := Temp_Entry; Selection := J; exit; end if; end if; end loop; end if; if Entry_Call /= null then Dequeue_Head (Acceptor.Entry_Queues (Entry_Index), Entry_Call); -- Guard is open end if; Call := Entry_Call; end Select_Task_Entry_Call; ------------------------ -- Send_Program_Error -- ------------------------ procedure Send_Program_Error (Self_ID : Task_Id; Entry_Call : Entry_Call_Link) is Caller : Task_Id; begin Caller := Entry_Call.Self; Entry_Call.Exception_To_Raise := Program_Error'Identity; Write_Lock (Caller); Initialization.Wakeup_Entry_Caller (Self_ID, Entry_Call, Done); Unlock (Caller); end Send_Program_Error; end System.Tasking.Queuing;
zhmu/ananas
Ada
127,748
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ D I M -- -- -- -- B o d y -- -- -- -- Copyright (C) 2011-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Aspects; use Aspects; with Atree; use Atree; with Einfo; use Einfo; with Einfo.Entities; use Einfo.Entities; with Einfo.Utils; use Einfo.Utils; with Errout; use Errout; with Exp_Util; use Exp_Util; with Lib; use Lib; with Namet; use Namet; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Rtsfind; use Rtsfind; with Sem; use Sem; with Sem_Aux; use Sem_Aux; with Sem_Eval; use Sem_Eval; with Sem_Res; use Sem_Res; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; with Sinfo.Nodes; use Sinfo.Nodes; with Sinfo.Utils; use Sinfo.Utils; with Snames; use Snames; with Stand; use Stand; with Stringt; use Stringt; with Table; with Tbuild; use Tbuild; with Uintp; use Uintp; with Urealp; use Urealp; with GNAT.HTable; package body Sem_Dim is ------------------------- -- Rational Arithmetic -- ------------------------- type Whole is new Int; subtype Positive_Whole is Whole range 1 .. Whole'Last; type Rational is record Numerator : Whole; Denominator : Positive_Whole; end record; Zero : constant Rational := Rational'(Numerator => 0, Denominator => 1); No_Rational : constant Rational := Rational'(Numerator => 0, Denominator => 2); -- Used to indicate an expression that cannot be interpreted as a rational -- Returned value of the Create_Rational_From routine when parameter Expr -- is not a static representation of a rational. -- Rational constructors function "+" (Right : Whole) return Rational; function GCD (Left, Right : Whole) return Int; function Reduce (X : Rational) return Rational; -- Unary operator for Rational function "-" (Right : Rational) return Rational; function "abs" (Right : Rational) return Rational; -- Rational operations for Rationals function "+" (Left, Right : Rational) return Rational; function "-" (Left, Right : Rational) return Rational; function "*" (Left, Right : Rational) return Rational; function "/" (Left, Right : Rational) return Rational; ------------------ -- System Types -- ------------------ Max_Number_Of_Dimensions : constant := 7; -- Maximum number of dimensions in a dimension system High_Position_Bound : constant := Max_Number_Of_Dimensions; Invalid_Position : constant := 0; Low_Position_Bound : constant := 1; subtype Dimension_Position is Nat range Invalid_Position .. High_Position_Bound; type Name_Array is array (Dimension_Position range Low_Position_Bound .. High_Position_Bound) of Name_Id; -- Store the names of all units within a system No_Names : constant Name_Array := (others => No_Name); type Symbol_Array is array (Dimension_Position range Low_Position_Bound .. High_Position_Bound) of String_Id; -- Store the symbols of all units within a system No_Symbols : constant Symbol_Array := (others => No_String); -- The following record should be documented field by field type System_Type is record Type_Decl : Node_Id; Unit_Names : Name_Array; Unit_Symbols : Symbol_Array; Dim_Symbols : Symbol_Array; Count : Dimension_Position; end record; Null_System : constant System_Type := (Empty, No_Names, No_Symbols, No_Symbols, Invalid_Position); subtype System_Id is Nat; -- The following table maps types to systems package System_Table is new Table.Table ( Table_Component_Type => System_Type, Table_Index_Type => System_Id, Table_Low_Bound => 1, Table_Initial => 5, Table_Increment => 5, Table_Name => "System_Table"); -------------------- -- Dimension Type -- -------------------- type Dimension_Type is array (Dimension_Position range Low_Position_Bound .. High_Position_Bound) of Rational; Null_Dimension : constant Dimension_Type := (others => Zero); type Dimension_Table_Range is range 0 .. 510; function Dimension_Table_Hash (Key : Node_Id) return Dimension_Table_Range; -- The following table associates nodes with dimensions package Dimension_Table is new GNAT.HTable.Simple_HTable (Header_Num => Dimension_Table_Range, Element => Dimension_Type, No_Element => Null_Dimension, Key => Node_Id, Hash => Dimension_Table_Hash, Equal => "="); ------------------ -- Symbol Types -- ------------------ type Symbol_Table_Range is range 0 .. 510; function Symbol_Table_Hash (Key : Entity_Id) return Symbol_Table_Range; -- Each subtype with a dimension has a symbolic representation of the -- related unit. This table establishes a relation between the subtype -- and the symbol. package Symbol_Table is new GNAT.HTable.Simple_HTable (Header_Num => Symbol_Table_Range, Element => String_Id, No_Element => No_String, Key => Entity_Id, Hash => Symbol_Table_Hash, Equal => "="); -- The following array enumerates all contexts which may contain or -- produce a dimension. OK_For_Dimension : constant array (Node_Kind) of Boolean := (N_Attribute_Reference => True, N_Case_Expression => True, N_Expanded_Name => True, N_Explicit_Dereference => True, N_Defining_Identifier => True, N_Function_Call => True, N_Identifier => True, N_If_Expression => True, N_Indexed_Component => True, N_Integer_Literal => True, N_Op_Abs => True, N_Op_Add => True, N_Op_Divide => True, N_Op_Expon => True, N_Op_Minus => True, N_Op_Mod => True, N_Op_Multiply => True, N_Op_Plus => True, N_Op_Rem => True, N_Op_Subtract => True, N_Qualified_Expression => True, N_Real_Literal => True, N_Selected_Component => True, N_Slice => True, N_Type_Conversion => True, N_Unchecked_Type_Conversion => True, others => False); ----------------------- -- Local Subprograms -- ----------------------- procedure Analyze_Dimension_Assignment_Statement (N : Node_Id); -- Subroutine of Analyze_Dimension for assignment statement. Check that the -- dimensions of the left-hand side and the right-hand side of N match. procedure Analyze_Dimension_Binary_Op (N : Node_Id); -- Subroutine of Analyze_Dimension for binary operators. Check the -- dimensions of the right and the left operand permit the operation. -- Then, evaluate the resulting dimensions for each binary operator. procedure Analyze_Dimension_Component_Declaration (N : Node_Id); -- Subroutine of Analyze_Dimension for component declaration. Check that -- the dimensions of the type of N and of the expression match. procedure Analyze_Dimension_Extended_Return_Statement (N : Node_Id); -- Subroutine of Analyze_Dimension for extended return statement. Check -- that the dimensions of the returned type and of the returned object -- match. procedure Analyze_Dimension_Has_Etype (N : Node_Id); -- Subroutine of Analyze_Dimension for a subset of N_Has_Etype denoted by -- the list below: -- N_Attribute_Reference -- N_Identifier -- N_Indexed_Component -- N_Qualified_Expression -- N_Selected_Component -- N_Slice -- N_Type_Conversion -- N_Unchecked_Type_Conversion procedure Analyze_Dimension_Case_Expression (N : Node_Id); -- Verify that all alternatives have the same dimension procedure Analyze_Dimension_If_Expression (N : Node_Id); -- Verify that all alternatives have the same dimension procedure Analyze_Dimension_Number_Declaration (N : Node_Id); -- Procedure to analyze dimension of expression in a number declaration. -- This allows a named number to have nontrivial dimensions, while by -- default a named number is dimensionless. procedure Analyze_Dimension_Object_Declaration (N : Node_Id); -- Subroutine of Analyze_Dimension for object declaration. Check that -- the dimensions of the object type and the dimensions of the expression -- (if expression is present) match. Note that when the expression is -- a literal, no error is returned. This special case allows object -- declaration such as: m : constant Length := 1.0; procedure Analyze_Dimension_Object_Renaming_Declaration (N : Node_Id); -- Subroutine of Analyze_Dimension for object renaming declaration. Check -- the dimensions of the type and of the renamed object name of N match. procedure Analyze_Dimension_Simple_Return_Statement (N : Node_Id); -- Subroutine of Analyze_Dimension for simple return statement -- Check that the dimensions of the returned type and of the returned -- expression match. procedure Analyze_Dimension_Subtype_Declaration (N : Node_Id); -- Subroutine of Analyze_Dimension for subtype declaration. Propagate the -- dimensions from the parent type to the identifier of N. Note that if -- both the identifier and the parent type of N are not dimensionless, -- return an error. procedure Analyze_Dimension_Type_Conversion (N : Node_Id); -- Type conversions handle conversions between literals and dimensioned -- types, from dimensioned types to their base type, and between different -- dimensioned systems. Dimensions of the conversion are obtained either -- from those of the expression, or from the target type, and dimensional -- consistency must be checked when converting between values belonging -- to different dimensioned systems. procedure Analyze_Dimension_Unary_Op (N : Node_Id); -- Subroutine of Analyze_Dimension for unary operators. For Plus, Minus and -- Abs operators, propagate the dimensions from the operand to N. function Create_Rational_From (Expr : Node_Id; Complain : Boolean) return Rational; -- Given an arbitrary expression Expr, return a valid rational if Expr can -- be interpreted as a rational. Otherwise return No_Rational and also an -- error message if Complain is set to True. function Dimensions_Of (N : Node_Id) return Dimension_Type; -- Return the dimension vector of node N function Dimensions_Msg_Of (N : Node_Id; Description_Needed : Boolean := False) return String; -- Given a node N, return the dimension symbols of N, preceded by "has -- dimension" if Description_Needed. If N is dimensionless, return "'[']", -- or "is dimensionless" if Description_Needed. function Dimension_System_Root (T : Entity_Id) return Entity_Id; -- Given a type that has dimension information, return the type that is the -- root of its dimension system, e.g. Mks_Type. If T is not a dimensioned -- type, i.e. a standard numeric type, return Empty. procedure Dim_Warning_For_Numeric_Literal (N : Node_Id; Typ : Entity_Id); -- Issue a warning on the given numeric literal N to indicate that the -- compiler made the assumption that the literal is not dimensionless -- but has the dimension of Typ. procedure Eval_Op_Expon_With_Rational_Exponent (N : Node_Id; Exponent_Value : Rational); -- Evaluate the exponent it is a rational and the operand has a dimension function Exists (Dim : Dimension_Type) return Boolean; -- Returns True iff Dim does not denote the null dimension function Exists (Str : String_Id) return Boolean; -- Returns True iff Str does not denote No_String function Exists (Sys : System_Type) return Boolean; -- Returns True iff Sys does not denote the null system function From_Dim_To_Str_Of_Dim_Symbols (Dims : Dimension_Type; System : System_Type; In_Error_Msg : Boolean := False) return String_Id; -- Given a dimension vector and a dimension system, return the proper -- string of dimension symbols. If In_Error_Msg is True (i.e. the String_Id -- will be used to issue an error message) then this routine has a special -- handling for the insertion characters * or [ which must be preceded by -- a quote ' to be placed literally into the message. function From_Dim_To_Str_Of_Unit_Symbols (Dims : Dimension_Type; System : System_Type) return String_Id; -- Given a dimension vector and a dimension system, return the proper -- string of unit symbols. function Is_Dim_IO_Package_Entity (E : Entity_Id) return Boolean; -- Return True if E is the package entity of System.Dim.Float_IO or -- System.Dim.Integer_IO. function Is_Invalid (Position : Dimension_Position) return Boolean; -- Return True if Pos denotes the invalid position procedure Move_Dimensions (From : Node_Id; To : Node_Id); -- Copy dimension vector of From to To and delete dimension vector of From procedure Remove_Dimensions (N : Node_Id); -- Remove the dimension vector of node N procedure Set_Dimensions (N : Node_Id; Val : Dimension_Type); -- Associate a dimension vector with a node procedure Set_Symbol (E : Entity_Id; Val : String_Id); -- Associate a symbol representation of a dimension vector with a subtype function Symbol_Of (E : Entity_Id) return String_Id; -- E denotes a subtype with a dimension. Return the symbol representation -- of the dimension vector. function System_Of (E : Entity_Id) return System_Type; -- E denotes a type, return associated system of the type if it has one --------- -- "+" -- --------- function "+" (Right : Whole) return Rational is begin return Rational'(Numerator => Right, Denominator => 1); end "+"; function "+" (Left, Right : Rational) return Rational is R : constant Rational := Rational'(Numerator => Left.Numerator * Right.Denominator + Left.Denominator * Right.Numerator, Denominator => Left.Denominator * Right.Denominator); begin return Reduce (R); end "+"; --------- -- "-" -- --------- function "-" (Right : Rational) return Rational is begin return Rational'(Numerator => -Right.Numerator, Denominator => Right.Denominator); end "-"; function "-" (Left, Right : Rational) return Rational is R : constant Rational := Rational'(Numerator => Left.Numerator * Right.Denominator - Left.Denominator * Right.Numerator, Denominator => Left.Denominator * Right.Denominator); begin return Reduce (R); end "-"; --------- -- "*" -- --------- function "*" (Left, Right : Rational) return Rational is R : constant Rational := Rational'(Numerator => Left.Numerator * Right.Numerator, Denominator => Left.Denominator * Right.Denominator); begin return Reduce (R); end "*"; --------- -- "/" -- --------- function "/" (Left, Right : Rational) return Rational is R : constant Rational := abs Right; L : Rational := Left; begin if Right.Numerator < 0 then L.Numerator := Whole (-Integer (L.Numerator)); end if; return Reduce (Rational'(Numerator => L.Numerator * R.Denominator, Denominator => L.Denominator * R.Numerator)); end "/"; ----------- -- "abs" -- ----------- function "abs" (Right : Rational) return Rational is begin return Rational'(Numerator => abs Right.Numerator, Denominator => Right.Denominator); end "abs"; ------------------------------ -- Analyze_Aspect_Dimension -- ------------------------------ -- with Dimension => -- ([Symbol =>] SYMBOL, DIMENSION_VALUE {, DIMENSION_Value}) -- -- SYMBOL ::= STRING_LITERAL | CHARACTER_LITERAL -- DIMENSION_VALUE ::= -- RATIONAL -- | others => RATIONAL -- | DISCRETE_CHOICE_LIST => RATIONAL -- RATIONAL ::= [-] NUMERIC_LITERAL [/ NUMERIC_LITERAL] -- Note that when the dimensioned type is an integer type, then any -- dimension value must be an integer literal. procedure Analyze_Aspect_Dimension (N : Node_Id; Id : Entity_Id; Aggr : Node_Id) is Def_Id : constant Entity_Id := Defining_Identifier (N); Processed : array (Dimension_Type'Range) of Boolean := (others => False); -- This array is used when processing ranges or Others_Choice as part of -- the dimension aggregate. Dimensions : Dimension_Type := Null_Dimension; procedure Extract_Power (Expr : Node_Id; Position : Dimension_Position); -- Given an expression with denotes a rational number, read the number -- and associate it with Position in Dimensions. function Position_In_System (Id : Node_Id; System : System_Type) return Dimension_Position; -- Given an identifier which denotes a dimension, return the position of -- that dimension within System. ------------------- -- Extract_Power -- ------------------- procedure Extract_Power (Expr : Node_Id; Position : Dimension_Position) is begin Dimensions (Position) := Create_Rational_From (Expr, True); Processed (Position) := True; -- If the dimensioned root type is an integer type, it is not -- particularly useful, and fractional dimensions do not make -- much sense for such types, so previously we used to reject -- dimensions of integer types that were not integer literals. -- However, the manipulation of dimensions does not depend on -- the kind of root type, so we can accept this usage for rare -- cases where dimensions are specified for integer values. end Extract_Power; ------------------------ -- Position_In_System -- ------------------------ function Position_In_System (Id : Node_Id; System : System_Type) return Dimension_Position is Dimension_Name : constant Name_Id := Chars (Id); begin for Position in System.Unit_Names'Range loop if Dimension_Name = System.Unit_Names (Position) then return Position; end if; end loop; return Invalid_Position; end Position_In_System; -- Local variables Assoc : Node_Id; Choice : Node_Id; Expr : Node_Id; Num_Choices : Nat := 0; Num_Dimensions : Nat := 0; Others_Seen : Boolean := False; Position : Nat := 0; Sub_Ind : Node_Id; Symbol : String_Id := No_String; Symbol_Expr : Node_Id; System : System_Type; Typ : Entity_Id; Errors_Count : Nat; -- Errors_Count is a count of errors detected by the compiler so far -- just before the extraction of symbol, names and values in the -- aggregate (Step 2). -- -- At the end of the analysis, there is a check to verify that this -- count equals to Serious_Errors_Detected i.e. no erros have been -- encountered during the process. Otherwise the Dimension_Table is -- not filled. -- Start of processing for Analyze_Aspect_Dimension begin -- STEP 1: Legality of aspect if Nkind (N) /= N_Subtype_Declaration then Error_Msg_NE ("aspect& must apply to subtype declaration", N, Id); return; end if; Sub_Ind := Subtype_Indication (N); Typ := Etype (Sub_Ind); System := System_Of (Typ); if Nkind (Sub_Ind) = N_Subtype_Indication then Error_Msg_NE ("constraint not allowed with aspect&", Constraint (Sub_Ind), Id); return; end if; -- The dimension declarations are useless if the parent type does not -- declare a valid system. if not Exists (System) then Error_Msg_NE ("parent type of& lacks dimension system", Sub_Ind, Def_Id); return; end if; if Nkind (Aggr) /= N_Aggregate then Error_Msg_N ("aggregate expected", Aggr); return; end if; -- STEP 2: Symbol, Names and values extraction -- Get the number of errors detected by the compiler so far Errors_Count := Serious_Errors_Detected; -- STEP 2a: Symbol extraction -- The first entry in the aggregate may be the symbolic representation -- of the quantity. -- Positional symbol argument Symbol_Expr := First (Expressions (Aggr)); -- Named symbol argument if No (Symbol_Expr) or else Nkind (Symbol_Expr) not in N_Character_Literal | N_String_Literal then Symbol_Expr := Empty; -- Component associations present if Present (Component_Associations (Aggr)) then Assoc := First (Component_Associations (Aggr)); Choice := First (Choices (Assoc)); if No (Next (Choice)) and then Nkind (Choice) = N_Identifier then -- Symbol component association is present if Chars (Choice) = Name_Symbol then Num_Choices := Num_Choices + 1; Symbol_Expr := Expression (Assoc); -- Verify symbol expression is a string or a character if Nkind (Symbol_Expr) not in N_Character_Literal | N_String_Literal then Symbol_Expr := Empty; Error_Msg_N ("symbol expression must be character or string", Symbol_Expr); end if; -- Special error if no Symbol choice but expression is string -- or character. elsif Nkind (Expression (Assoc)) in N_Character_Literal | N_String_Literal then Num_Choices := Num_Choices + 1; Error_Msg_N ("optional component Symbol expected, found&", Choice); end if; end if; end if; end if; -- STEP 2b: Names and values extraction -- Positional elements Expr := First (Expressions (Aggr)); -- Skip the symbol expression when present if Present (Symbol_Expr) and then Num_Choices = 0 then Next (Expr); end if; Position := Low_Position_Bound; while Present (Expr) loop if Position > High_Position_Bound then Error_Msg_N ("type& has more dimensions than system allows", Def_Id); exit; end if; Extract_Power (Expr, Position); Position := Position + 1; Num_Dimensions := Num_Dimensions + 1; Next (Expr); end loop; -- Named elements Assoc := First (Component_Associations (Aggr)); -- Skip the symbol association when present if Num_Choices = 1 then Next (Assoc); end if; while Present (Assoc) loop Expr := Expression (Assoc); Choice := First (Choices (Assoc)); while Present (Choice) loop -- Identifier case: NAME => EXPRESSION if Nkind (Choice) = N_Identifier then Position := Position_In_System (Choice, System); if Is_Invalid (Position) then Error_Msg_N ("dimension name& not part of system", Choice); else Extract_Power (Expr, Position); end if; -- Range case: NAME .. NAME => EXPRESSION elsif Nkind (Choice) = N_Range then declare Low : constant Node_Id := Low_Bound (Choice); High : constant Node_Id := High_Bound (Choice); Low_Pos : Dimension_Position; High_Pos : Dimension_Position; begin if Nkind (Low) /= N_Identifier then Error_Msg_N ("bound must denote a dimension name", Low); elsif Nkind (High) /= N_Identifier then Error_Msg_N ("bound must denote a dimension name", High); else Low_Pos := Position_In_System (Low, System); High_Pos := Position_In_System (High, System); if Is_Invalid (Low_Pos) then Error_Msg_N ("dimension name& not part of system", Low); elsif Is_Invalid (High_Pos) then Error_Msg_N ("dimension name& not part of system", High); elsif Low_Pos > High_Pos then Error_Msg_N ("expected low to high range", Choice); else for Position in Low_Pos .. High_Pos loop Extract_Power (Expr, Position); end loop; end if; end if; end; -- Others case: OTHERS => EXPRESSION elsif Nkind (Choice) = N_Others_Choice then if Present (Next (Choice)) or else Present (Prev (Choice)) then Error_Msg_N ("OTHERS must appear alone in a choice list", Choice); elsif Present (Next (Assoc)) then Error_Msg_N ("OTHERS must appear last in an aggregate", Choice); elsif Others_Seen then Error_Msg_N ("multiple OTHERS not allowed", Choice); else -- Fill the non-processed dimensions with the default value -- supplied by others. for Position in Processed'Range loop if not Processed (Position) then Extract_Power (Expr, Position); end if; end loop; end if; Others_Seen := True; -- All other cases are illegal declarations of dimension names else Error_Msg_NE ("wrong syntax for aspect&", Choice, Id); end if; Num_Choices := Num_Choices + 1; Next (Choice); end loop; Num_Dimensions := Num_Dimensions + 1; Next (Assoc); end loop; -- STEP 3: Consistency of system and dimensions if Present (First (Expressions (Aggr))) and then (First (Expressions (Aggr)) /= Symbol_Expr or else Present (Next (Symbol_Expr))) and then (Num_Choices > 1 or else (Num_Choices = 1 and then not Others_Seen)) then Error_Msg_N ("named associations cannot follow positional associations", Aggr); end if; if Num_Dimensions > System.Count then Error_Msg_N ("type& has more dimensions than system allows", Def_Id); elsif Num_Dimensions < System.Count and then not Others_Seen then Error_Msg_N ("type& has less dimensions than system allows", Def_Id); end if; -- STEP 4: Dimension symbol extraction if Present (Symbol_Expr) then if Nkind (Symbol_Expr) = N_Character_Literal then Start_String; Store_String_Char (UI_To_CC (Char_Literal_Value (Symbol_Expr))); Symbol := End_String; else Symbol := Strval (Symbol_Expr); end if; if String_Length (Symbol) = 0 then Error_Msg_N ("empty string not allowed here", Symbol_Expr); end if; end if; -- STEP 5: Storage of extracted values -- Check that no errors have been detected during the analysis if Errors_Count = Serious_Errors_Detected then -- Check for useless declaration if Symbol = No_String and then not Exists (Dimensions) then Error_Msg_N ("useless dimension declaration", Aggr); end if; if Symbol /= No_String then Set_Symbol (Def_Id, Symbol); end if; if Exists (Dimensions) then Set_Dimensions (Def_Id, Dimensions); end if; end if; end Analyze_Aspect_Dimension; ------------------------------------- -- Analyze_Aspect_Dimension_System -- ------------------------------------- -- with Dimension_System => (DIMENSION {, DIMENSION}); -- DIMENSION ::= ( -- [Unit_Name =>] IDENTIFIER, -- [Unit_Symbol =>] SYMBOL, -- [Dim_Symbol =>] SYMBOL) procedure Analyze_Aspect_Dimension_System (N : Node_Id; Id : Entity_Id; Aggr : Node_Id) is function Is_Derived_Numeric_Type (N : Node_Id) return Boolean; -- Determine whether type declaration N denotes a numeric derived type ------------------------------- -- Is_Derived_Numeric_Type -- ------------------------------- function Is_Derived_Numeric_Type (N : Node_Id) return Boolean is begin return Nkind (N) = N_Full_Type_Declaration and then Nkind (Type_Definition (N)) = N_Derived_Type_Definition and then Is_Numeric_Type (Entity (Subtype_Indication (Type_Definition (N)))); end Is_Derived_Numeric_Type; -- Local variables Assoc : Node_Id; Choice : Node_Id; Dim_Aggr : Node_Id; Dim_Symbol : Node_Id; Dim_Symbols : Symbol_Array := No_Symbols; Dim_System : System_Type := Null_System; Position : Dimension_Position := Invalid_Position; Unit_Name : Node_Id; Unit_Names : Name_Array := No_Names; Unit_Symbol : Node_Id; Unit_Symbols : Symbol_Array := No_Symbols; Errors_Count : Nat; -- Errors_Count is a count of errors detected by the compiler so far -- just before the extraction of names and symbols in the aggregate -- (Step 3). -- -- At the end of the analysis, there is a check to verify that this -- count equals Serious_Errors_Detected i.e. no errors have been -- encountered during the process. Otherwise the System_Table is -- not filled. -- Start of processing for Analyze_Aspect_Dimension_System begin -- STEP 1: Legality of aspect if not Is_Derived_Numeric_Type (N) then Error_Msg_NE ("aspect& must apply to numeric derived type declaration", N, Id); return; end if; if Nkind (Aggr) /= N_Aggregate then Error_Msg_N ("aggregate expected", Aggr); return; end if; -- STEP 2: Structural verification of the dimension aggregate if Present (Component_Associations (Aggr)) then Error_Msg_N ("expected positional aggregate", Aggr); return; end if; -- STEP 3: Name and Symbol extraction Dim_Aggr := First (Expressions (Aggr)); Errors_Count := Serious_Errors_Detected; while Present (Dim_Aggr) loop if Position = High_Position_Bound then Error_Msg_N ("too many dimensions in system", Aggr); exit; end if; Position := Position + 1; if Nkind (Dim_Aggr) /= N_Aggregate then Error_Msg_N ("aggregate expected", Dim_Aggr); else if Present (Component_Associations (Dim_Aggr)) and then Present (Expressions (Dim_Aggr)) then Error_Msg_N ("mixed positional/named aggregate not allowed here", Dim_Aggr); -- Verify each dimension aggregate has three arguments elsif List_Length (Component_Associations (Dim_Aggr)) /= 3 and then List_Length (Expressions (Dim_Aggr)) /= 3 then Error_Msg_N ("three components expected in aggregate", Dim_Aggr); else -- Named dimension aggregate if Present (Component_Associations (Dim_Aggr)) then -- Check first argument denotes the unit name Assoc := First (Component_Associations (Dim_Aggr)); Choice := First (Choices (Assoc)); Unit_Name := Expression (Assoc); if Present (Next (Choice)) or else Nkind (Choice) /= N_Identifier then Error_Msg_NE ("wrong syntax for aspect&", Choice, Id); elsif Chars (Choice) /= Name_Unit_Name then Error_Msg_N ("expected Unit_Name, found&", Choice); end if; -- Check the second argument denotes the unit symbol Next (Assoc); Choice := First (Choices (Assoc)); Unit_Symbol := Expression (Assoc); if Present (Next (Choice)) or else Nkind (Choice) /= N_Identifier then Error_Msg_NE ("wrong syntax for aspect&", Choice, Id); elsif Chars (Choice) /= Name_Unit_Symbol then Error_Msg_N ("expected Unit_Symbol, found&", Choice); end if; -- Check the third argument denotes the dimension symbol Next (Assoc); Choice := First (Choices (Assoc)); Dim_Symbol := Expression (Assoc); if Present (Next (Choice)) or else Nkind (Choice) /= N_Identifier then Error_Msg_NE ("wrong syntax for aspect&", Choice, Id); elsif Chars (Choice) /= Name_Dim_Symbol then Error_Msg_N ("expected Dim_Symbol, found&", Choice); end if; -- Positional dimension aggregate else Unit_Name := First (Expressions (Dim_Aggr)); Unit_Symbol := Next (Unit_Name); Dim_Symbol := Next (Unit_Symbol); end if; -- Check the first argument for each dimension aggregate is -- a name. if Nkind (Unit_Name) = N_Identifier then Unit_Names (Position) := Chars (Unit_Name); else Error_Msg_N ("expected unit name", Unit_Name); end if; -- Check the second argument for each dimension aggregate is -- a string or a character. if Nkind (Unit_Symbol) not in N_String_Literal | N_Character_Literal then Error_Msg_N ("expected unit symbol (string or character)", Unit_Symbol); else -- String case if Nkind (Unit_Symbol) = N_String_Literal then Unit_Symbols (Position) := Strval (Unit_Symbol); -- Character case else Start_String; Store_String_Char (UI_To_CC (Char_Literal_Value (Unit_Symbol))); Unit_Symbols (Position) := End_String; end if; -- Verify that the string is not empty if String_Length (Unit_Symbols (Position)) = 0 then Error_Msg_N ("empty string not allowed here", Unit_Symbol); end if; end if; -- Check the third argument for each dimension aggregate is -- a string or a character. if Nkind (Dim_Symbol) not in N_String_Literal | N_Character_Literal then Error_Msg_N ("expected dimension symbol (string or character)", Dim_Symbol); else -- String case if Nkind (Dim_Symbol) = N_String_Literal then Dim_Symbols (Position) := Strval (Dim_Symbol); -- Character case else Start_String; Store_String_Char (UI_To_CC (Char_Literal_Value (Dim_Symbol))); Dim_Symbols (Position) := End_String; end if; -- Verify that the string is not empty if String_Length (Dim_Symbols (Position)) = 0 then Error_Msg_N ("empty string not allowed here", Dim_Symbol); end if; end if; end if; end if; Next (Dim_Aggr); end loop; -- STEP 4: Storage of extracted values -- Check that no errors have been detected during the analysis if Errors_Count = Serious_Errors_Detected then Dim_System.Type_Decl := N; Dim_System.Unit_Names := Unit_Names; Dim_System.Unit_Symbols := Unit_Symbols; Dim_System.Dim_Symbols := Dim_Symbols; Dim_System.Count := Position; System_Table.Append (Dim_System); end if; end Analyze_Aspect_Dimension_System; ----------------------- -- Analyze_Dimension -- ----------------------- -- This dispatch routine propagates dimensions for each node procedure Analyze_Dimension (N : Node_Id) is begin -- Aspect is an Ada 2012 feature. Note that there is no need to check -- dimensions for nodes that don't come from source, except for subtype -- declarations where the dimensions are inherited from the base type, -- for explicit dereferences generated when expanding iterators, and -- for object declarations generated for inlining. if Ada_Version < Ada_2012 then return; -- Inlined bodies have already been checked for dimensionality elsif In_Inlined_Body then return; elsif not Comes_From_Source (N) then if Nkind (N) not in N_Explicit_Dereference | N_Identifier | N_Object_Declaration | N_Subtype_Declaration then return; end if; end if; case Nkind (N) is when N_Assignment_Statement => Analyze_Dimension_Assignment_Statement (N); when N_Binary_Op => Analyze_Dimension_Binary_Op (N); when N_Case_Expression => Analyze_Dimension_Case_Expression (N); when N_Component_Declaration => Analyze_Dimension_Component_Declaration (N); when N_Extended_Return_Statement => Analyze_Dimension_Extended_Return_Statement (N); when N_Attribute_Reference | N_Expanded_Name | N_Explicit_Dereference | N_Function_Call | N_Indexed_Component | N_Qualified_Expression | N_Selected_Component | N_Slice | N_Unchecked_Type_Conversion => Analyze_Dimension_Has_Etype (N); -- In the presence of a repaired syntax error, an identifier may be -- introduced without a usable type. when N_Identifier => if Present (Etype (N)) then Analyze_Dimension_Has_Etype (N); end if; when N_If_Expression => Analyze_Dimension_If_Expression (N); when N_Number_Declaration => Analyze_Dimension_Number_Declaration (N); when N_Object_Declaration => Analyze_Dimension_Object_Declaration (N); when N_Object_Renaming_Declaration => Analyze_Dimension_Object_Renaming_Declaration (N); when N_Simple_Return_Statement => if not Comes_From_Extended_Return_Statement (N) then Analyze_Dimension_Simple_Return_Statement (N); end if; when N_Subtype_Declaration => Analyze_Dimension_Subtype_Declaration (N); when N_Type_Conversion => Analyze_Dimension_Type_Conversion (N); when N_Unary_Op => Analyze_Dimension_Unary_Op (N); when others => null; end case; end Analyze_Dimension; --------------------------------------- -- Analyze_Dimension_Array_Aggregate -- --------------------------------------- procedure Analyze_Dimension_Array_Aggregate (N : Node_Id; Comp_Typ : Entity_Id) is Comp_Ass : constant List_Id := Component_Associations (N); Dims_Of_Comp_Typ : constant Dimension_Type := Dimensions_Of (Comp_Typ); Exps : constant List_Id := Expressions (N); Comp : Node_Id; Dims_Of_Expr : Dimension_Type; Expr : Node_Id; Error_Detected : Boolean := False; -- This flag is used in order to indicate if an error has been detected -- so far by the compiler in this routine. begin -- Aspect is an Ada 2012 feature. Nothing to do here if the component -- base type is not a dimensioned type. -- Inlined bodies have already been checked for dimensionality. -- Note that here the original node must come from source since the -- original array aggregate may not have been entirely decorated. if Ada_Version < Ada_2012 or else In_Inlined_Body or else not Comes_From_Source (Original_Node (N)) or else not Has_Dimension_System (Base_Type (Comp_Typ)) then return; end if; -- Check whether there is any positional component association if Is_Empty_List (Exps) then Comp := First (Comp_Ass); else Comp := First (Exps); end if; while Present (Comp) loop -- Get the expression from the component if Nkind (Comp) = N_Component_Association then Expr := Expression (Comp); else Expr := Comp; end if; -- Issue an error if the dimensions of the component type and the -- dimensions of the component mismatch. -- Note that we must ensure the expression has been fully analyzed -- since it may not be decorated at this point. We also don't want to -- issue the same error message multiple times on the same expression -- (may happen when an aggregate is converted into a positional -- aggregate). We also must verify that this is a scalar component, -- and not a subaggregate of a multidimensional aggregate. -- The expression may be an identifier that has been copied several -- times during expansion, its dimensions are those of its type. if Is_Entity_Name (Expr) then Dims_Of_Expr := Dimensions_Of (Etype (Expr)); else Dims_Of_Expr := Dimensions_Of (Expr); end if; if Comes_From_Source (Original_Node (Expr)) and then Present (Etype (Expr)) and then Is_Numeric_Type (Etype (Expr)) and then Dims_Of_Expr /= Dims_Of_Comp_Typ and then Sloc (Comp) /= Sloc (Prev (Comp)) then -- Check if an error has already been encountered so far if not Error_Detected then Error_Msg_N ("dimensions mismatch in array aggregate", N); Error_Detected := True; end if; Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Comp_Typ) & ", found " & Dimensions_Msg_Of (Expr), Expr); end if; -- Look at the named components right after the positional components if not Present (Next (Comp)) and then List_Containing (Comp) = Exps then Comp := First (Comp_Ass); else Next (Comp); end if; end loop; end Analyze_Dimension_Array_Aggregate; -------------------------------------------- -- Analyze_Dimension_Assignment_Statement -- -------------------------------------------- procedure Analyze_Dimension_Assignment_Statement (N : Node_Id) is Lhs : constant Node_Id := Name (N); Dims_Of_Lhs : constant Dimension_Type := Dimensions_Of (Lhs); Rhs : constant Node_Id := Expression (N); Dims_Of_Rhs : constant Dimension_Type := Dimensions_Of (Rhs); procedure Error_Dim_Msg_For_Assignment_Statement (N : Node_Id; Lhs : Node_Id; Rhs : Node_Id); -- Error using Error_Msg_N at node N. Output the dimensions of left -- and right hand sides. -------------------------------------------- -- Error_Dim_Msg_For_Assignment_Statement -- -------------------------------------------- procedure Error_Dim_Msg_For_Assignment_Statement (N : Node_Id; Lhs : Node_Id; Rhs : Node_Id) is begin Error_Msg_N ("dimensions mismatch in assignment", N); Error_Msg_N ("\left-hand side " & Dimensions_Msg_Of (Lhs, True), N); Error_Msg_N ("\right-hand side " & Dimensions_Msg_Of (Rhs, True), N); end Error_Dim_Msg_For_Assignment_Statement; -- Start of processing for Analyze_Dimension_Assignment begin if Dims_Of_Lhs /= Dims_Of_Rhs then Error_Dim_Msg_For_Assignment_Statement (N, Lhs, Rhs); end if; end Analyze_Dimension_Assignment_Statement; --------------------------------- -- Analyze_Dimension_Binary_Op -- --------------------------------- -- Check and propagate the dimensions for binary operators -- Note that when the dimensions mismatch, no dimension is propagated to N. procedure Analyze_Dimension_Binary_Op (N : Node_Id) is N_Kind : constant Node_Kind := Nkind (N); function Dimensions_Of_Operand (N : Node_Id) return Dimension_Type; -- If the operand is a numeric literal that comes from a declared -- constant, use the dimensions of the constant which were computed -- from the expression of the constant declaration. Otherwise the -- dimensions are those of the operand, or the type of the operand. -- This takes care of node rewritings from validity checks, where the -- dimensions of the operand itself may not be preserved, while the -- type comes from context and must have dimension information. procedure Error_Dim_Msg_For_Binary_Op (N, L, R : Node_Id); -- Error using Error_Msg_NE and Error_Msg_N at node N. Output the -- dimensions of both operands. --------------------------- -- Dimensions_Of_Operand -- --------------------------- function Dimensions_Of_Operand (N : Node_Id) return Dimension_Type is Dims : constant Dimension_Type := Dimensions_Of (N); begin if Exists (Dims) then return Dims; elsif Is_Entity_Name (N) then return Dimensions_Of (Etype (Entity (N))); elsif Nkind (N) = N_Real_Literal then if Present (Original_Entity (N)) then return Dimensions_Of (Original_Entity (N)); else return Dimensions_Of (Etype (N)); end if; -- Otherwise return the default dimensions else return Dims; end if; end Dimensions_Of_Operand; --------------------------------- -- Error_Dim_Msg_For_Binary_Op -- --------------------------------- procedure Error_Dim_Msg_For_Binary_Op (N, L, R : Node_Id) is begin Error_Msg_NE ("both operands for operation& must have same dimensions", N, Entity (N)); Error_Msg_N ("\left operand " & Dimensions_Msg_Of (L, True), N); Error_Msg_N ("\right operand " & Dimensions_Msg_Of (R, True), N); end Error_Dim_Msg_For_Binary_Op; -- Start of processing for Analyze_Dimension_Binary_Op begin -- If the node is already analyzed, do not examine the operands. At the -- end of the analysis their dimensions have been removed, and the node -- itself may have been rewritten. if Analyzed (N) then return; end if; if N_Kind in N_Op_Add | N_Op_Expon | N_Op_Subtract | N_Multiplying_Operator | N_Op_Compare then declare L : constant Node_Id := Left_Opnd (N); Dims_Of_L : constant Dimension_Type := Dimensions_Of_Operand (L); L_Has_Dimensions : constant Boolean := Exists (Dims_Of_L); R : constant Node_Id := Right_Opnd (N); Dims_Of_R : constant Dimension_Type := Dimensions_Of_Operand (R); R_Has_Dimensions : constant Boolean := Exists (Dims_Of_R); Dims_Of_N : Dimension_Type := Null_Dimension; begin -- N_Op_Add, N_Op_Mod, N_Op_Rem or N_Op_Subtract case if N_Kind in N_Op_Add | N_Op_Mod | N_Op_Rem | N_Op_Subtract then -- Check both operands have same dimension if Dims_Of_L /= Dims_Of_R then Error_Dim_Msg_For_Binary_Op (N, L, R); else -- Check both operands are not dimensionless if Exists (Dims_Of_L) then Set_Dimensions (N, Dims_Of_L); end if; end if; -- N_Op_Multiply or N_Op_Divide case elsif N_Kind in N_Op_Multiply | N_Op_Divide then -- Check at least one operand is not dimensionless if L_Has_Dimensions or R_Has_Dimensions then -- Multiplication case -- Get both operands dimensions and add them if N_Kind = N_Op_Multiply then for Position in Dimension_Type'Range loop Dims_Of_N (Position) := Dims_Of_L (Position) + Dims_Of_R (Position); end loop; -- Division case -- Get both operands dimensions and subtract them else for Position in Dimension_Type'Range loop Dims_Of_N (Position) := Dims_Of_L (Position) - Dims_Of_R (Position); end loop; end if; if Exists (Dims_Of_N) then Set_Dimensions (N, Dims_Of_N); end if; end if; -- Exponentiation case -- Note: a rational exponent is allowed for dimensioned operand elsif N_Kind = N_Op_Expon then -- Check the left operand is not dimensionless. Note that the -- value of the exponent must be known compile time. Otherwise, -- the exponentiation evaluation will return an error message. if L_Has_Dimensions then if not Compile_Time_Known_Value (R) then Error_Msg_N ("exponent of dimensioned operand must be " & "known at compile time", N); end if; declare Exponent_Value : Rational := Zero; begin -- Real operand case if Is_Real_Type (Etype (L)) then -- Define the exponent as a Rational number Exponent_Value := Create_Rational_From (R, False); -- Verify that the exponent cannot be interpreted -- as a rational, otherwise interpret the exponent -- as an integer. if Exponent_Value = No_Rational then Exponent_Value := +Whole (UI_To_Int (Expr_Value (R))); end if; -- Integer operand case. -- For integer operand, the exponent cannot be -- interpreted as a rational. else Exponent_Value := +Whole (UI_To_Int (Expr_Value (R))); end if; for Position in Dimension_Type'Range loop Dims_Of_N (Position) := Dims_Of_L (Position) * Exponent_Value; end loop; if Exists (Dims_Of_N) then Set_Dimensions (N, Dims_Of_N); end if; end; end if; -- Comparison cases -- For relational operations, only dimension checking is -- performed (no propagation). If one operand is the result -- of constant folding the dimensions may have been lost -- in a tree copy, so assume that preanalysis has verified -- that dimensions are correct. elsif N_Kind in N_Op_Compare then if (L_Has_Dimensions or R_Has_Dimensions) and then Dims_Of_L /= Dims_Of_R then if Nkind (L) = N_Real_Literal and then not (Comes_From_Source (L)) and then Expander_Active then null; elsif Nkind (R) = N_Real_Literal and then not (Comes_From_Source (R)) and then Expander_Active then null; -- Numeric literal case. Issue a warning to indicate the -- literal is treated as if its dimension matches the type -- dimension. elsif Nkind (Original_Node (L)) in N_Integer_Literal | N_Real_Literal then Dim_Warning_For_Numeric_Literal (L, Etype (R)); elsif Nkind (Original_Node (R)) in N_Integer_Literal | N_Real_Literal then Dim_Warning_For_Numeric_Literal (R, Etype (L)); else Error_Dim_Msg_For_Binary_Op (N, L, R); end if; end if; end if; -- If expander is active, remove dimension information from each -- operand, as only dimensions of result are relevant. if Expander_Active then Remove_Dimensions (L); Remove_Dimensions (R); end if; end; end if; end Analyze_Dimension_Binary_Op; ---------------------------- -- Analyze_Dimension_Call -- ---------------------------- procedure Analyze_Dimension_Call (N : Node_Id; Nam : Entity_Id) is Actuals : constant List_Id := Parameter_Associations (N); Actual : Node_Id; Dims_Of_Formal : Dimension_Type; Formal : Node_Id; Formal_Typ : Entity_Id; Error_Detected : Boolean := False; -- This flag is used in order to indicate if an error has been detected -- so far by the compiler in this routine. begin -- Aspect is an Ada 2012 feature. Note that there is no need to check -- dimensions for calls in inlined bodies, or calls that don't come -- from source, or those that may have semantic errors. if Ada_Version < Ada_2012 or else In_Inlined_Body or else not Comes_From_Source (N) or else Error_Posted (N) then return; end if; -- Check the dimensions of the actuals, if any if not Is_Empty_List (Actuals) then -- Special processing for elementary functions -- For Sqrt call, the resulting dimensions equal to half the -- dimensions of the actual. For all other elementary calls, this -- routine check that every actual is dimensionless. if Nkind (N) = N_Function_Call then Elementary_Function_Calls : declare Dims_Of_Call : Dimension_Type; Ent : Entity_Id := Nam; function Is_Elementary_Function_Entity (Sub_Id : Entity_Id) return Boolean; -- Given Sub_Id, the original subprogram entity, return True -- if call is to an elementary function (see Ada.Numerics. -- Generic_Elementary_Functions). ----------------------------------- -- Is_Elementary_Function_Entity -- ----------------------------------- function Is_Elementary_Function_Entity (Sub_Id : Entity_Id) return Boolean is Loc : constant Source_Ptr := Sloc (Sub_Id); begin -- Is entity in Ada.Numerics.Generic_Elementary_Functions? return Loc > No_Location and then Is_RTU (Cunit_Entity (Get_Source_Unit (Loc)), Ada_Numerics_Generic_Elementary_Functions); end Is_Elementary_Function_Entity; -- Start of processing for Elementary_Function_Calls begin -- Get original subprogram entity following the renaming chain if Present (Alias (Ent)) then Ent := Alias (Ent); end if; -- Check the call is an Elementary function call if Is_Elementary_Function_Entity (Ent) then -- Sqrt function call case if Chars (Ent) = Name_Sqrt then Dims_Of_Call := Dimensions_Of (First_Actual (N)); -- Evaluates the resulting dimensions (i.e. half the -- dimensions of the actual). if Exists (Dims_Of_Call) then for Position in Dims_Of_Call'Range loop Dims_Of_Call (Position) := Dims_Of_Call (Position) * Rational'(Numerator => 1, Denominator => 2); end loop; Set_Dimensions (N, Dims_Of_Call); end if; -- All other elementary functions case. Note that every -- actual here should be dimensionless. else Actual := First_Actual (N); while Present (Actual) loop if Exists (Dimensions_Of (Actual)) then -- Check if error has already been encountered if not Error_Detected then Error_Msg_NE ("dimensions mismatch in call of&", N, Name (N)); Error_Detected := True; end if; Error_Msg_N ("\expected dimension '['], found " & Dimensions_Msg_Of (Actual), Actual); end if; Next_Actual (Actual); end loop; end if; -- Nothing more to do for elementary functions return; end if; end Elementary_Function_Calls; end if; -- General case. Check, for each parameter, the dimensions of the -- actual and its corresponding formal match. Otherwise, complain. Actual := First_Actual (N); Formal := First_Formal (Nam); while Present (Formal) loop -- A missing corresponding actual indicates that the analysis of -- the call was aborted due to a previous error. if No (Actual) then Check_Error_Detected; return; end if; Formal_Typ := Etype (Formal); Dims_Of_Formal := Dimensions_Of (Formal_Typ); -- If the formal is not dimensionless, check dimensions of formal -- and actual match. Otherwise, complain. if Exists (Dims_Of_Formal) and then Dimensions_Of (Actual) /= Dims_Of_Formal then -- Check if an error has already been encountered so far if not Error_Detected then Error_Msg_NE ("dimensions mismatch in& call", N, Name (N)); Error_Detected := True; end if; Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Formal_Typ) & ", found " & Dimensions_Msg_Of (Actual), Actual); end if; Next_Actual (Actual); Next_Formal (Formal); end loop; end if; -- For function calls, propagate the dimensions from the returned type if Nkind (N) = N_Function_Call then Analyze_Dimension_Has_Etype (N); end if; end Analyze_Dimension_Call; --------------------------------------- -- Analyze_Dimension_Case_Expression -- --------------------------------------- procedure Analyze_Dimension_Case_Expression (N : Node_Id) is Frst : constant Node_Id := First (Alternatives (N)); Frst_Expr : constant Node_Id := Expression (Frst); Dims : constant Dimension_Type := Dimensions_Of (Frst_Expr); Alt : Node_Id; begin Alt := Next (Frst); while Present (Alt) loop if Dimensions_Of (Expression (Alt)) /= Dims then Error_Msg_N ("dimension mismatch in case expression", Alt); exit; end if; Next (Alt); end loop; Copy_Dimensions (Frst_Expr, N); end Analyze_Dimension_Case_Expression; --------------------------------------------- -- Analyze_Dimension_Component_Declaration -- --------------------------------------------- procedure Analyze_Dimension_Component_Declaration (N : Node_Id) is Expr : constant Node_Id := Expression (N); Id : constant Entity_Id := Defining_Identifier (N); Etyp : constant Entity_Id := Etype (Id); Dims_Of_Etyp : constant Dimension_Type := Dimensions_Of (Etyp); Dims_Of_Expr : Dimension_Type; procedure Error_Dim_Msg_For_Component_Declaration (N : Node_Id; Etyp : Entity_Id; Expr : Node_Id); -- Error using Error_Msg_N at node N. Output the dimensions of the -- type Etyp and the expression Expr of N. --------------------------------------------- -- Error_Dim_Msg_For_Component_Declaration -- --------------------------------------------- procedure Error_Dim_Msg_For_Component_Declaration (N : Node_Id; Etyp : Entity_Id; Expr : Node_Id) is begin Error_Msg_N ("dimensions mismatch in component declaration", N); Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Etyp) & ", found " & Dimensions_Msg_Of (Expr), Expr); end Error_Dim_Msg_For_Component_Declaration; -- Start of processing for Analyze_Dimension_Component_Declaration begin -- Expression is present if Present (Expr) then Dims_Of_Expr := Dimensions_Of (Expr); -- Check dimensions match if Dims_Of_Etyp /= Dims_Of_Expr then -- Numeric literal case. Issue a warning if the object type is not -- dimensionless to indicate the literal is treated as if its -- dimension matches the type dimension. if Nkind (Original_Node (Expr)) in N_Real_Literal | N_Integer_Literal then Dim_Warning_For_Numeric_Literal (Expr, Etyp); -- Issue a dimension mismatch error for all other cases else Error_Dim_Msg_For_Component_Declaration (N, Etyp, Expr); end if; end if; end if; end Analyze_Dimension_Component_Declaration; ------------------------------------------------- -- Analyze_Dimension_Extended_Return_Statement -- ------------------------------------------------- procedure Analyze_Dimension_Extended_Return_Statement (N : Node_Id) is Return_Ent : constant Entity_Id := Return_Statement_Entity (N); Return_Etyp : constant Entity_Id := Etype (Return_Applies_To (Return_Ent)); Return_Obj_Decls : constant List_Id := Return_Object_Declarations (N); Return_Obj_Decl : Node_Id; Return_Obj_Id : Entity_Id; Return_Obj_Typ : Entity_Id; procedure Error_Dim_Msg_For_Extended_Return_Statement (N : Node_Id; Return_Etyp : Entity_Id; Return_Obj_Typ : Entity_Id); -- Error using Error_Msg_N at node N. Output dimensions of the returned -- type Return_Etyp and the returned object type Return_Obj_Typ of N. ------------------------------------------------- -- Error_Dim_Msg_For_Extended_Return_Statement -- ------------------------------------------------- procedure Error_Dim_Msg_For_Extended_Return_Statement (N : Node_Id; Return_Etyp : Entity_Id; Return_Obj_Typ : Entity_Id) is begin Error_Msg_N ("dimensions mismatch in extended return statement", N); Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Return_Etyp) & ", found " & Dimensions_Msg_Of (Return_Obj_Typ), N); end Error_Dim_Msg_For_Extended_Return_Statement; -- Start of processing for Analyze_Dimension_Extended_Return_Statement begin if Present (Return_Obj_Decls) then Return_Obj_Decl := First (Return_Obj_Decls); while Present (Return_Obj_Decl) loop if Nkind (Return_Obj_Decl) = N_Object_Declaration then Return_Obj_Id := Defining_Identifier (Return_Obj_Decl); if Is_Return_Object (Return_Obj_Id) then Return_Obj_Typ := Etype (Return_Obj_Id); -- Issue an error message if dimensions mismatch if Dimensions_Of (Return_Etyp) /= Dimensions_Of (Return_Obj_Typ) then Error_Dim_Msg_For_Extended_Return_Statement (N, Return_Etyp, Return_Obj_Typ); return; end if; end if; end if; Next (Return_Obj_Decl); end loop; end if; end Analyze_Dimension_Extended_Return_Statement; ----------------------------------------------------- -- Analyze_Dimension_Extension_Or_Record_Aggregate -- ----------------------------------------------------- procedure Analyze_Dimension_Extension_Or_Record_Aggregate (N : Node_Id) is Comp : Node_Id; Comp_Id : Entity_Id; Comp_Typ : Entity_Id; Expr : Node_Id; Error_Detected : Boolean := False; -- This flag is used in order to indicate if an error has been detected -- so far by the compiler in this routine. begin -- Aspect is an Ada 2012 feature. Note that there is no need to check -- dimensions in inlined bodies, or for aggregates that don't come -- from source, or if we are within an initialization procedure, whose -- expressions have been checked at the point of record declaration. if Ada_Version < Ada_2012 or else In_Inlined_Body or else not Comes_From_Source (N) or else Inside_Init_Proc then return; end if; Comp := First (Component_Associations (N)); while Present (Comp) loop Comp_Id := Entity (First (Choices (Comp))); Comp_Typ := Etype (Comp_Id); -- Check the component type is either a dimensioned type or a -- dimensioned subtype. if Has_Dimension_System (Base_Type (Comp_Typ)) then Expr := Expression (Comp); -- A box-initialized component needs no checking. if No (Expr) and then Box_Present (Comp) then null; -- Issue an error if the dimensions of the component type and the -- dimensions of the component mismatch. elsif Dimensions_Of (Expr) /= Dimensions_Of (Comp_Typ) then -- Check if an error has already been encountered so far if not Error_Detected then -- Extension aggregate case if Nkind (N) = N_Extension_Aggregate then Error_Msg_N ("dimensions mismatch in extension aggregate", N); -- Record aggregate case else Error_Msg_N ("dimensions mismatch in record aggregate", N); end if; Error_Detected := True; end if; Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Comp_Typ) & ", found " & Dimensions_Msg_Of (Expr), Comp); end if; end if; Next (Comp); end loop; end Analyze_Dimension_Extension_Or_Record_Aggregate; ------------------------------- -- Analyze_Dimension_Formals -- ------------------------------- procedure Analyze_Dimension_Formals (N : Node_Id; Formals : List_Id) is Dims_Of_Typ : Dimension_Type; Formal : Node_Id; Typ : Entity_Id; begin -- Aspect is an Ada 2012 feature. Note that there is no need to check -- dimensions for sub specs that don't come from source. if Ada_Version < Ada_2012 or else not Comes_From_Source (N) then return; end if; Formal := First (Formals); while Present (Formal) loop Typ := Parameter_Type (Formal); Dims_Of_Typ := Dimensions_Of (Typ); if Exists (Dims_Of_Typ) then declare Expr : constant Node_Id := Expression (Formal); begin -- Issue a warning if Expr is a numeric literal and if its -- dimensions differ with the dimensions of the formal type. if Present (Expr) and then Dims_Of_Typ /= Dimensions_Of (Expr) and then Nkind (Original_Node (Expr)) in N_Real_Literal | N_Integer_Literal then Dim_Warning_For_Numeric_Literal (Expr, Etype (Typ)); end if; end; end if; Next (Formal); end loop; end Analyze_Dimension_Formals; --------------------------------- -- Analyze_Dimension_Has_Etype -- --------------------------------- procedure Analyze_Dimension_Has_Etype (N : Node_Id) is Etyp : constant Entity_Id := Etype (N); Dims_Of_Etyp : Dimension_Type := Dimensions_Of (Etyp); begin -- General case. Propagation of the dimensions from the type if Exists (Dims_Of_Etyp) then Set_Dimensions (N, Dims_Of_Etyp); -- Identifier case. Propagate the dimensions from the entity for -- identifier whose entity is a non-dimensionless constant. elsif Nkind (N) = N_Identifier then Analyze_Dimension_Identifier : declare Id : constant Entity_Id := Entity (N); begin -- If Id is missing, abnormal tree, assume previous error if No (Id) then Check_Error_Detected; return; elsif Ekind (Id) in E_Constant | E_Named_Real and then Exists (Dimensions_Of (Id)) then Set_Dimensions (N, Dimensions_Of (Id)); end if; end Analyze_Dimension_Identifier; -- Attribute reference case. Propagate the dimensions from the prefix. elsif Nkind (N) = N_Attribute_Reference and then Has_Dimension_System (Base_Type (Etyp)) then Dims_Of_Etyp := Dimensions_Of (Prefix (N)); -- Check the prefix is not dimensionless if Exists (Dims_Of_Etyp) then Set_Dimensions (N, Dims_Of_Etyp); end if; end if; -- Remove dimensions from inner expressions, to prevent dimensions -- table from growing uselessly. case Nkind (N) is when N_Attribute_Reference | N_Indexed_Component => declare Exprs : constant List_Id := Expressions (N); Expr : Node_Id; begin if Present (Exprs) then Expr := First (Exprs); while Present (Expr) loop Remove_Dimensions (Expr); Next (Expr); end loop; end if; end; when N_Qualified_Expression | N_Type_Conversion | N_Unchecked_Type_Conversion => Remove_Dimensions (Expression (N)); when N_Selected_Component => Remove_Dimensions (Selector_Name (N)); when others => null; end case; end Analyze_Dimension_Has_Etype; ------------------------------------- -- Analyze_Dimension_If_Expression -- ------------------------------------- procedure Analyze_Dimension_If_Expression (N : Node_Id) is Then_Expr : constant Node_Id := Next (First (Expressions (N))); Else_Expr : constant Node_Id := Next (Then_Expr); begin if Dimensions_Of (Then_Expr) /= Dimensions_Of (Else_Expr) then Error_Msg_N ("dimensions mismatch in conditional expression", N); else Copy_Dimensions (Then_Expr, N); end if; end Analyze_Dimension_If_Expression; ------------------------------------------ -- Analyze_Dimension_Number_Declaration -- ------------------------------------------ procedure Analyze_Dimension_Number_Declaration (N : Node_Id) is Expr : constant Node_Id := Expression (N); Id : constant Entity_Id := Defining_Identifier (N); Dim_Of_Expr : constant Dimension_Type := Dimensions_Of (Expr); begin if Exists (Dim_Of_Expr) then Set_Dimensions (Id, Dim_Of_Expr); Set_Etype (Id, Etype (Expr)); end if; end Analyze_Dimension_Number_Declaration; ------------------------------------------ -- Analyze_Dimension_Object_Declaration -- ------------------------------------------ procedure Analyze_Dimension_Object_Declaration (N : Node_Id) is Expr : constant Node_Id := Expression (N); Id : constant Entity_Id := Defining_Identifier (N); Etyp : constant Entity_Id := Etype (Id); Dim_Of_Etyp : constant Dimension_Type := Dimensions_Of (Etyp); Dim_Of_Expr : Dimension_Type; procedure Error_Dim_Msg_For_Object_Declaration (N : Node_Id; Etyp : Entity_Id; Expr : Node_Id); -- Error using Error_Msg_N at node N. Output the dimensions of the -- type Etyp and of the expression Expr. ------------------------------------------ -- Error_Dim_Msg_For_Object_Declaration -- ------------------------------------------ procedure Error_Dim_Msg_For_Object_Declaration (N : Node_Id; Etyp : Entity_Id; Expr : Node_Id) is begin Error_Msg_N ("dimensions mismatch in object declaration", N); Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Etyp) & ", found " & Dimensions_Msg_Of (Expr), Expr); end Error_Dim_Msg_For_Object_Declaration; -- Start of processing for Analyze_Dimension_Object_Declaration begin -- Expression is present if Present (Expr) then Dim_Of_Expr := Dimensions_Of (Expr); -- Check dimensions match if Dim_Of_Expr /= Dim_Of_Etyp then -- Numeric literal case. Issue a warning if the object type is -- not dimensionless to indicate the literal is treated as if -- its dimension matches the type dimension. if Nkind (Original_Node (Expr)) in N_Real_Literal | N_Integer_Literal then Dim_Warning_For_Numeric_Literal (Expr, Etyp); -- Case of object is a constant whose type is a dimensioned type elsif Constant_Present (N) and then not Exists (Dim_Of_Etyp) then -- Propagate dimension from expression to object entity Set_Dimensions (Id, Dim_Of_Expr); -- Expression may have been constant-folded. If nominal type has -- dimensions, verify that expression has same type. elsif Exists (Dim_Of_Etyp) and then Etype (Expr) = Etyp then null; -- For all other cases, issue an error message else Error_Dim_Msg_For_Object_Declaration (N, Etyp, Expr); end if; end if; -- Remove dimensions in expression after checking consistency with -- given type. Remove_Dimensions (Expr); end if; end Analyze_Dimension_Object_Declaration; --------------------------------------------------- -- Analyze_Dimension_Object_Renaming_Declaration -- --------------------------------------------------- procedure Analyze_Dimension_Object_Renaming_Declaration (N : Node_Id) is Renamed_Name : constant Node_Id := Name (N); Sub_Mark : constant Node_Id := Subtype_Mark (N); procedure Error_Dim_Msg_For_Object_Renaming_Declaration (N : Node_Id; Sub_Mark : Node_Id; Renamed_Name : Node_Id); -- Error using Error_Msg_N at node N. Output the dimensions of -- Sub_Mark and of Renamed_Name. --------------------------------------------------- -- Error_Dim_Msg_For_Object_Renaming_Declaration -- --------------------------------------------------- procedure Error_Dim_Msg_For_Object_Renaming_Declaration (N : Node_Id; Sub_Mark : Node_Id; Renamed_Name : Node_Id) is begin Error_Msg_N ("dimensions mismatch in object renaming declaration", N); Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Sub_Mark) & ", found " & Dimensions_Msg_Of (Renamed_Name), Renamed_Name); end Error_Dim_Msg_For_Object_Renaming_Declaration; -- Start of processing for Analyze_Dimension_Object_Renaming_Declaration begin if Dimensions_Of (Renamed_Name) /= Dimensions_Of (Sub_Mark) then Error_Dim_Msg_For_Object_Renaming_Declaration (N, Sub_Mark, Renamed_Name); end if; end Analyze_Dimension_Object_Renaming_Declaration; ----------------------------------------------- -- Analyze_Dimension_Simple_Return_Statement -- ----------------------------------------------- procedure Analyze_Dimension_Simple_Return_Statement (N : Node_Id) is Expr : constant Node_Id := Expression (N); Return_Ent : constant Entity_Id := Return_Statement_Entity (N); Return_Etyp : constant Entity_Id := Etype (Return_Applies_To (Return_Ent)); Dims_Of_Return_Etyp : constant Dimension_Type := Dimensions_Of (Return_Etyp); procedure Error_Dim_Msg_For_Simple_Return_Statement (N : Node_Id; Return_Etyp : Entity_Id; Expr : Node_Id); -- Error using Error_Msg_N at node N. Output the dimensions of the -- returned type Return_Etyp and the returned expression Expr of N. ----------------------------------------------- -- Error_Dim_Msg_For_Simple_Return_Statement -- ----------------------------------------------- procedure Error_Dim_Msg_For_Simple_Return_Statement (N : Node_Id; Return_Etyp : Entity_Id; Expr : Node_Id) is begin Error_Msg_N ("dimensions mismatch in return statement", N); Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Return_Etyp) & ", found " & Dimensions_Msg_Of (Expr), Expr); end Error_Dim_Msg_For_Simple_Return_Statement; -- Start of processing for Analyze_Dimension_Simple_Return_Statement begin if Dims_Of_Return_Etyp /= Dimensions_Of (Expr) then Error_Dim_Msg_For_Simple_Return_Statement (N, Return_Etyp, Expr); Remove_Dimensions (Expr); end if; end Analyze_Dimension_Simple_Return_Statement; ------------------------------------------- -- Analyze_Dimension_Subtype_Declaration -- ------------------------------------------- procedure Analyze_Dimension_Subtype_Declaration (N : Node_Id) is Id : constant Entity_Id := Defining_Identifier (N); Dims_Of_Id : constant Dimension_Type := Dimensions_Of (Id); Dims_Of_Etyp : Dimension_Type; Etyp : Node_Id; begin -- No constraint case in subtype declaration if Nkind (Subtype_Indication (N)) /= N_Subtype_Indication then Etyp := Etype (Subtype_Indication (N)); Dims_Of_Etyp := Dimensions_Of (Etyp); if Exists (Dims_Of_Etyp) then -- If subtype already has a dimension (from Aspect_Dimension), it -- cannot inherit different dimensions from its subtype. if Exists (Dims_Of_Id) and then Dims_Of_Etyp /= Dims_Of_Id then Error_Msg_NE ("subtype& already " & Dimensions_Msg_Of (Id, True), N, Id); else Set_Dimensions (Id, Dims_Of_Etyp); Set_Symbol (Id, Symbol_Of (Etyp)); end if; end if; -- Constraint present in subtype declaration else Etyp := Etype (Subtype_Mark (Subtype_Indication (N))); Dims_Of_Etyp := Dimensions_Of (Etyp); if Exists (Dims_Of_Etyp) then Set_Dimensions (Id, Dims_Of_Etyp); Set_Symbol (Id, Symbol_Of (Etyp)); end if; end if; end Analyze_Dimension_Subtype_Declaration; --------------------------------------- -- Analyze_Dimension_Type_Conversion -- --------------------------------------- procedure Analyze_Dimension_Type_Conversion (N : Node_Id) is Expr_Root : constant Entity_Id := Dimension_System_Root (Etype (Expression (N))); Target_Root : constant Entity_Id := Dimension_System_Root (Etype (N)); begin -- If the expression has dimensions and the target type has dimensions, -- the conversion has the dimensions of the expression. Consistency is -- checked below. Converting to a non-dimensioned type such as Float -- ignores the dimensions of the expression. if Exists (Dimensions_Of (Expression (N))) and then Present (Target_Root) then Set_Dimensions (N, Dimensions_Of (Expression (N))); -- Otherwise the dimensions are those of the target type. else Analyze_Dimension_Has_Etype (N); end if; -- A conversion between types in different dimension systems (e.g. MKS -- and British units) must respect the dimensions of expression and -- type, It is up to the user to provide proper conversion factors. -- Upward conversions to root type of a dimensioned system are legal, -- and correspond to "view conversions", i.e. preserve the dimensions -- of the expression; otherwise conversion must be between types with -- then same dimensions. Conversions to a non-dimensioned type such as -- Float lose the dimensions of the expression. if Present (Expr_Root) and then Present (Target_Root) and then Etype (N) /= Target_Root and then Dimensions_Of (Expression (N)) /= Dimensions_Of (Etype (N)) then Error_Msg_N ("dimensions mismatch in conversion", N); Error_Msg_N ("\expression " & Dimensions_Msg_Of (Expression (N), True), N); Error_Msg_N ("\target type " & Dimensions_Msg_Of (Etype (N), True), N); end if; end Analyze_Dimension_Type_Conversion; -------------------------------- -- Analyze_Dimension_Unary_Op -- -------------------------------- procedure Analyze_Dimension_Unary_Op (N : Node_Id) is begin case Nkind (N) is -- Propagate the dimension if the operand is not dimensionless when N_Op_Abs | N_Op_Minus | N_Op_Plus => declare R : constant Node_Id := Right_Opnd (N); begin Move_Dimensions (R, N); end; when others => null; end case; end Analyze_Dimension_Unary_Op; --------------------------------- -- Check_Expression_Dimensions -- --------------------------------- procedure Check_Expression_Dimensions (Expr : Node_Id; Typ : Entity_Id) is begin if Is_Floating_Point_Type (Etype (Expr)) then Analyze_Dimension (Expr); if Dimensions_Of (Expr) /= Dimensions_Of (Typ) then Error_Msg_N ("dimensions mismatch in array aggregate", Expr); Error_Msg_N ("\expected dimension " & Dimensions_Msg_Of (Typ) & ", found " & Dimensions_Msg_Of (Expr), Expr); end if; end if; end Check_Expression_Dimensions; --------------------- -- Copy_Dimensions -- --------------------- procedure Copy_Dimensions (From : Node_Id; To : Node_Id) is Dims_Of_From : constant Dimension_Type := Dimensions_Of (From); begin -- Ignore if not Ada 2012 or beyond if Ada_Version < Ada_2012 then return; -- For Ada 2012, Copy the dimension of 'From to 'To' elsif Exists (Dims_Of_From) then Set_Dimensions (To, Dims_Of_From); end if; end Copy_Dimensions; ----------------------------------- -- Copy_Dimensions_Of_Components -- ----------------------------------- procedure Copy_Dimensions_Of_Components (Rec : Entity_Id) is C : Entity_Id; begin C := First_Component (Rec); while Present (C) loop if Nkind (Parent (C)) = N_Component_Declaration then Copy_Dimensions (Expression (Parent (Corresponding_Record_Component (C))), Expression (Parent (C))); end if; Next_Component (C); end loop; end Copy_Dimensions_Of_Components; -------------------------- -- Create_Rational_From -- -------------------------- -- RATIONAL ::= [-] NUMERAL [/ NUMERAL] -- A rational number is a number that can be expressed as the quotient or -- fraction a/b of two integers, where b is non-zero positive. function Create_Rational_From (Expr : Node_Id; Complain : Boolean) return Rational is Or_Node_Of_Expr : constant Node_Id := Original_Node (Expr); Result : Rational := No_Rational; function Process_Minus (N : Node_Id) return Rational; -- Create a rational from a N_Op_Minus node function Process_Divide (N : Node_Id) return Rational; -- Create a rational from a N_Op_Divide node function Process_Literal (N : Node_Id) return Rational; -- Create a rational from a N_Integer_Literal node ------------------- -- Process_Minus -- ------------------- function Process_Minus (N : Node_Id) return Rational is Right : constant Node_Id := Original_Node (Right_Opnd (N)); Result : Rational; begin -- Operand is an integer literal if Nkind (Right) = N_Integer_Literal then Result := -Process_Literal (Right); -- Operand is a divide operator elsif Nkind (Right) = N_Op_Divide then Result := -Process_Divide (Right); else Result := No_Rational; end if; return Result; end Process_Minus; -------------------- -- Process_Divide -- -------------------- function Process_Divide (N : Node_Id) return Rational is Left : constant Node_Id := Original_Node (Left_Opnd (N)); Right : constant Node_Id := Original_Node (Right_Opnd (N)); Left_Rat : Rational; Result : Rational := No_Rational; Right_Rat : Rational; begin -- Both left and right operands are integer literals if Nkind (Left) = N_Integer_Literal and then Nkind (Right) = N_Integer_Literal then Left_Rat := Process_Literal (Left); Right_Rat := Process_Literal (Right); Result := Left_Rat / Right_Rat; end if; return Result; end Process_Divide; --------------------- -- Process_Literal -- --------------------- function Process_Literal (N : Node_Id) return Rational is begin return +Whole (UI_To_Int (Intval (N))); end Process_Literal; -- Start of processing for Create_Rational_From begin -- Check the expression is either a division of two integers or an -- integer itself. Note that the check applies to the original node -- since the node could have already been rewritten. -- Integer literal case if Nkind (Or_Node_Of_Expr) = N_Integer_Literal then Result := Process_Literal (Or_Node_Of_Expr); -- Divide operator case elsif Nkind (Or_Node_Of_Expr) = N_Op_Divide then Result := Process_Divide (Or_Node_Of_Expr); -- Minus operator case elsif Nkind (Or_Node_Of_Expr) = N_Op_Minus then Result := Process_Minus (Or_Node_Of_Expr); end if; -- When Expr cannot be interpreted as a rational and Complain is true, -- generate an error message. if Complain and then Result = No_Rational then Error_Msg_N ("rational expected", Expr); end if; return Result; end Create_Rational_From; ------------------- -- Dimensions_Of -- ------------------- function Dimensions_Of (N : Node_Id) return Dimension_Type is begin return Dimension_Table.Get (N); end Dimensions_Of; ----------------------- -- Dimensions_Msg_Of -- ----------------------- function Dimensions_Msg_Of (N : Node_Id; Description_Needed : Boolean := False) return String is Dims_Of_N : constant Dimension_Type := Dimensions_Of (N); Dimensions_Msg : Name_Id; System : System_Type; begin -- Initialization of Name_Buffer Name_Len := 0; -- N is not dimensionless if Exists (Dims_Of_N) then System := System_Of (Base_Type (Etype (N))); -- When Description_Needed, add to string "has dimension " before the -- actual dimension. if Description_Needed then Add_Str_To_Name_Buffer ("has dimension "); end if; Append (Global_Name_Buffer, From_Dim_To_Str_Of_Dim_Symbols (Dims_Of_N, System, True)); -- N is dimensionless -- When Description_Needed, return "is dimensionless" elsif Description_Needed then Add_Str_To_Name_Buffer ("is dimensionless"); -- Otherwise, return "'[']" else Add_Str_To_Name_Buffer ("'[']"); end if; Dimensions_Msg := Name_Find; return Get_Name_String (Dimensions_Msg); end Dimensions_Msg_Of; -------------------------- -- Dimension_Table_Hash -- -------------------------- function Dimension_Table_Hash (Key : Node_Id) return Dimension_Table_Range is begin return Dimension_Table_Range (Key mod 511); end Dimension_Table_Hash; ------------------------------------- -- Dim_Warning_For_Numeric_Literal -- ------------------------------------- procedure Dim_Warning_For_Numeric_Literal (N : Node_Id; Typ : Entity_Id) is begin -- Consider the literal zero (integer 0 or real 0.0) to be of any -- dimension. case Nkind (Original_Node (N)) is when N_Real_Literal => if Expr_Value_R (N) = Ureal_0 then return; end if; when N_Integer_Literal => if Expr_Value (N) = Uint_0 then return; end if; when others => null; end case; -- Initialize name buffer Name_Len := 0; Append (Global_Name_Buffer, String_From_Numeric_Literal (N)); -- Insert a blank between the literal and the symbol Add_Char_To_Name_Buffer (' '); Append (Global_Name_Buffer, Symbol_Of (Typ)); Error_Msg_Name_1 := Name_Find; Error_Msg_N ("assumed to be%%??", N); end Dim_Warning_For_Numeric_Literal; ---------------------- -- Dimensions_Match -- ---------------------- function Dimensions_Match (T1 : Entity_Id; T2 : Entity_Id) return Boolean is begin return not Has_Dimension_System (Base_Type (T1)) or else Dimensions_Of (T1) = Dimensions_Of (T2); end Dimensions_Match; --------------------------- -- Dimension_System_Root -- --------------------------- function Dimension_System_Root (T : Entity_Id) return Entity_Id is Root : Entity_Id; begin Root := Base_Type (T); if Has_Dimension_System (Root) then return First_Subtype (Root); -- for example Dim_Mks else return Empty; end if; end Dimension_System_Root; ---------------------------------------- -- Eval_Op_Expon_For_Dimensioned_Type -- ---------------------------------------- -- Evaluate the expon operator for real dimensioned type. -- Note that if the exponent is an integer (denominator = 1) the node is -- evaluated by the regular Eval_Op_Expon routine (see Sem_Eval). procedure Eval_Op_Expon_For_Dimensioned_Type (N : Node_Id; Btyp : Entity_Id) is R : constant Node_Id := Right_Opnd (N); R_Value : Rational := No_Rational; begin if Is_Real_Type (Btyp) then R_Value := Create_Rational_From (R, False); end if; -- Check that the exponent is not an integer if R_Value /= No_Rational and then R_Value.Denominator /= 1 then Eval_Op_Expon_With_Rational_Exponent (N, R_Value); else Eval_Op_Expon (N); end if; end Eval_Op_Expon_For_Dimensioned_Type; ------------------------------------------ -- Eval_Op_Expon_With_Rational_Exponent -- ------------------------------------------ -- For dimensioned operand in exponentiation, exponent is allowed to be a -- Rational and not only an Integer like for dimensionless operands. For -- that particular case, the left operand is rewritten as a function call -- using the function Expon_LLF from s-llflex.ads. procedure Eval_Op_Expon_With_Rational_Exponent (N : Node_Id; Exponent_Value : Rational) is Loc : constant Source_Ptr := Sloc (N); Dims_Of_N : constant Dimension_Type := Dimensions_Of (N); L : constant Node_Id := Left_Opnd (N); Etyp_Of_L : constant Entity_Id := Etype (L); Btyp_Of_L : constant Entity_Id := Base_Type (Etyp_Of_L); Actual_1 : Node_Id; Actual_2 : Node_Id; Dim_Power : Rational; List_Of_Dims : List_Id; New_Aspect : Node_Id; New_Aspects : List_Id; New_Id : Entity_Id; New_N : Node_Id; New_Subtyp_Decl_For_L : Node_Id; System : System_Type; begin -- Case when the operand is not dimensionless if Exists (Dims_Of_N) then -- Get the corresponding System_Type to know the exact number of -- dimensions in the system. System := System_Of (Btyp_Of_L); -- Generation of a new subtype with the proper dimensions -- In order to rewrite the operator as a type conversion, a new -- dimensioned subtype with the resulting dimensions of the -- exponentiation must be created. -- Generate: -- Btyp_Of_L : constant Entity_Id := Base_Type (Etyp_Of_L); -- System : constant System_Id := -- Get_Dimension_System_Id (Btyp_Of_L); -- Num_Of_Dims : constant Number_Of_Dimensions := -- Dimension_Systems.Table (System).Dimension_Count; -- subtype T is Btyp_Of_L -- with -- Dimension => ( -- Dims_Of_N (1).Numerator / Dims_Of_N (1).Denominator, -- Dims_Of_N (2).Numerator / Dims_Of_N (2).Denominator, -- ... -- Dims_Of_N (Num_Of_Dims).Numerator / -- Dims_Of_N (Num_Of_Dims).Denominator); -- Step 1: Generate the new aggregate for the aspect Dimension New_Aspects := Empty_List; List_Of_Dims := New_List; for Position in Dims_Of_N'First .. System.Count loop Dim_Power := Dims_Of_N (Position); Append_To (List_Of_Dims, Make_Op_Divide (Loc, Left_Opnd => Make_Integer_Literal (Loc, Int (Dim_Power.Numerator)), Right_Opnd => Make_Integer_Literal (Loc, Int (Dim_Power.Denominator)))); end loop; -- Step 2: Create the new Aspect Specification for Aspect Dimension New_Aspect := Make_Aspect_Specification (Loc, Identifier => Make_Identifier (Loc, Name_Dimension), Expression => Make_Aggregate (Loc, Expressions => List_Of_Dims)); -- Step 3: Make a temporary identifier for the new subtype New_Id := Make_Temporary (Loc, 'T'); Set_Is_Internal (New_Id); -- Step 4: Declaration of the new subtype New_Subtyp_Decl_For_L := Make_Subtype_Declaration (Loc, Defining_Identifier => New_Id, Subtype_Indication => New_Occurrence_Of (Btyp_Of_L, Loc)); Append (New_Aspect, New_Aspects); Set_Parent (New_Aspects, New_Subtyp_Decl_For_L); Set_Aspect_Specifications (New_Subtyp_Decl_For_L, New_Aspects); Analyze (New_Subtyp_Decl_For_L); -- Case where the operand is dimensionless else New_Id := Btyp_Of_L; end if; -- Replacement of N by New_N -- Generate: -- Actual_1 := Long_Long_Float (L), -- Actual_2 := Long_Long_Float (Exponent_Value.Numerator) / -- Long_Long_Float (Exponent_Value.Denominator); -- (T (Expon_LLF (Actual_1, Actual_2))); -- where T is the subtype declared in step 1 -- The node is rewritten as a type conversion -- Step 1: Creation of the two parameters of Expon_LLF function call Actual_1 := Make_Type_Conversion (Loc, Subtype_Mark => New_Occurrence_Of (Standard_Long_Long_Float, Loc), Expression => Relocate_Node (L)); Actual_2 := Make_Op_Divide (Loc, Left_Opnd => Make_Real_Literal (Loc, UR_From_Uint (UI_From_Int (Int (Exponent_Value.Numerator)))), Right_Opnd => Make_Real_Literal (Loc, UR_From_Uint (UI_From_Int (Int (Exponent_Value.Denominator))))); -- Step 2: Creation of New_N New_N := Make_Type_Conversion (Loc, Subtype_Mark => New_Occurrence_Of (New_Id, Loc), Expression => Make_Function_Call (Loc, Name => New_Occurrence_Of (RTE (RE_Expon_LLF), Loc), Parameter_Associations => New_List ( Actual_1, Actual_2))); -- Step 3: Rewrite N with the result Rewrite (N, New_N); Set_Etype (N, New_Id); Analyze_And_Resolve (N, New_Id); end Eval_Op_Expon_With_Rational_Exponent; ------------ -- Exists -- ------------ function Exists (Dim : Dimension_Type) return Boolean is begin return Dim /= Null_Dimension; end Exists; function Exists (Str : String_Id) return Boolean is begin return Str /= No_String; end Exists; function Exists (Sys : System_Type) return Boolean is begin return Sys /= Null_System; end Exists; --------------------------------- -- Expand_Put_Call_With_Symbol -- --------------------------------- -- For procedure Put (resp. Put_Dim_Of) and function Image, defined in -- System.Dim.Float_IO or System.Dim.Integer_IO, the default string -- parameter is rewritten to include the unit symbol (or the dimension -- symbols if not a defined quantity) in the output of a dimensioned -- object. If a value is already supplied by the user for the parameter -- Symbol, it is used as is. -- Case 1. Item is dimensionless -- * Put : Item appears without a suffix -- * Put_Dim_Of : the output is [] -- Obj : Mks_Type := 2.6; -- Put (Obj, 1, 1, 0); -- Put_Dim_Of (Obj); -- The corresponding outputs are: -- $2.6 -- $[] -- Case 2. Item has a dimension -- * Put : If the type of Item is a dimensioned subtype whose -- symbol is not empty, then the symbol appears as a -- suffix. Otherwise, a new string is created and appears -- as a suffix of Item. This string results in the -- successive concatenations between each unit symbol -- raised by its corresponding dimension power from the -- dimensions of Item. -- * Put_Dim_Of : The output is a new string resulting in the successive -- concatenations between each dimension symbol raised by -- its corresponding dimension power from the dimensions of -- Item. -- subtype Random is Mks_Type -- with -- Dimension => ( -- Meter => 3, -- Candela => -1, -- others => 0); -- Obj : Random := 5.0; -- Put (Obj); -- Put_Dim_Of (Obj); -- The corresponding outputs are: -- $5.0 m**3.cd**(-1) -- $[l**3.J**(-1)] -- The function Image returns the string identical to that produced by -- a call to Put whose first parameter is a string. procedure Expand_Put_Call_With_Symbol (N : Node_Id) is Actuals : constant List_Id := Parameter_Associations (N); Loc : constant Source_Ptr := Sloc (N); Name_Call : constant Node_Id := Name (N); New_Actuals : constant List_Id := New_List; Actual : Node_Id; Dims_Of_Actual : Dimension_Type; Etyp : Entity_Id; New_Str_Lit : Node_Id := Empty; Symbols : String_Id; Is_Put_Dim_Of : Boolean := False; -- This flag is used in order to differentiate routines Put and -- Put_Dim_Of. Set to True if the procedure is one of the Put_Dim_Of -- defined in System.Dim.Float_IO or System.Dim.Integer_IO. function Has_Symbols return Boolean; -- Return True if the current Put call already has a parameter -- association for parameter "Symbols" with the correct string of -- symbols. function Is_Procedure_Put_Call return Boolean; -- Return True if the current call is a call of an instantiation of a -- procedure Put defined in the package System.Dim.Float_IO and -- System.Dim.Integer_IO. function Item_Actual return Node_Id; -- Return the item actual parameter node in the output call ----------------- -- Has_Symbols -- ----------------- function Has_Symbols return Boolean is Actual : Node_Id; Actual_Str : Node_Id; begin -- Look for a symbols parameter association in the list of actuals Actual := First (Actuals); while Present (Actual) loop -- Positional parameter association case when the actual is a -- string literal. if Nkind (Actual) = N_String_Literal then Actual_Str := Actual; -- Named parameter association case when selector name is Symbol elsif Nkind (Actual) = N_Parameter_Association and then Chars (Selector_Name (Actual)) = Name_Symbol then Actual_Str := Explicit_Actual_Parameter (Actual); -- Ignore all other cases else Actual_Str := Empty; end if; if Present (Actual_Str) then -- Return True if the actual comes from source or if the string -- of symbols doesn't have the default value (i.e. it is ""), -- in which case it is used as suffix of the generated string. if Comes_From_Source (Actual) or else String_Length (Strval (Actual_Str)) /= 0 then return True; else return False; end if; end if; Next (Actual); end loop; -- At this point, the call has no parameter association. Look to the -- last actual since the symbols parameter is the last one. return Nkind (Last (Actuals)) = N_String_Literal; end Has_Symbols; --------------------------- -- Is_Procedure_Put_Call -- --------------------------- function Is_Procedure_Put_Call return Boolean is Ent : Entity_Id; Loc : Source_Ptr; begin -- There are three different Put (resp. Put_Dim_Of) routines in each -- generic dim IO package. Verify the current procedure call is one -- of them. if Is_Entity_Name (Name_Call) then Ent := Entity (Name_Call); -- Get the original subprogram entity following the renaming chain if Present (Alias (Ent)) then Ent := Alias (Ent); end if; Loc := Sloc (Ent); -- Check the name of the entity subprogram is Put (resp. -- Put_Dim_Of) and verify this entity is located in either -- System.Dim.Float_IO or System.Dim.Integer_IO. if Loc > No_Location and then Is_Dim_IO_Package_Entity (Cunit_Entity (Get_Source_Unit (Loc))) then if Chars (Ent) = Name_Put_Dim_Of then Is_Put_Dim_Of := True; return True; elsif Chars (Ent) = Name_Put or else Chars (Ent) = Name_Image then return True; end if; end if; end if; return False; end Is_Procedure_Put_Call; ----------------- -- Item_Actual -- ----------------- function Item_Actual return Node_Id is Actual : Node_Id; begin -- Look for the item actual as a parameter association Actual := First (Actuals); while Present (Actual) loop if Nkind (Actual) = N_Parameter_Association and then Chars (Selector_Name (Actual)) = Name_Item then return Explicit_Actual_Parameter (Actual); end if; Next (Actual); end loop; -- Case where the item has been defined without an association Actual := First (Actuals); -- Depending on the procedure Put, Item actual could be first or -- second in the list of actuals. if Has_Dimension_System (Base_Type (Etype (Actual))) then return Actual; else return Next (Actual); end if; end Item_Actual; -- Start of processing for Expand_Put_Call_With_Symbol begin if Is_Procedure_Put_Call and then not Has_Symbols then Actual := Item_Actual; Dims_Of_Actual := Dimensions_Of (Actual); Etyp := Etype (Actual); -- Put_Dim_Of case if Is_Put_Dim_Of then -- Check that the item is not dimensionless -- Create the new String_Literal with the new String_Id generated -- by the routine From_Dim_To_Str_Of_Dim_Symbols. if Exists (Dims_Of_Actual) then New_Str_Lit := Make_String_Literal (Loc, From_Dim_To_Str_Of_Dim_Symbols (Dims_Of_Actual, System_Of (Base_Type (Etyp)))); -- If dimensionless, the output is [] else New_Str_Lit := Make_String_Literal (Loc, "[]"); end if; -- Put case else -- Add the symbol as a suffix of the value if the subtype has a -- unit symbol or if the parameter is not dimensionless. if Exists (Symbol_Of (Etyp)) then Symbols := Symbol_Of (Etyp); else Symbols := From_Dim_To_Str_Of_Unit_Symbols (Dims_Of_Actual, System_Of (Base_Type (Etyp))); end if; -- Check Symbols exists if Exists (Symbols) then Start_String; -- Put a space between the value and the dimension Store_String_Char (' '); Store_String_Chars (Symbols); New_Str_Lit := Make_String_Literal (Loc, End_String); end if; end if; if Present (New_Str_Lit) then -- Insert all actuals in New_Actuals Actual := First (Actuals); while Present (Actual) loop -- Copy every actuals in New_Actuals except the Symbols -- parameter association. if Nkind (Actual) = N_Parameter_Association and then Chars (Selector_Name (Actual)) /= Name_Symbol then Append_To (New_Actuals, Make_Parameter_Association (Loc, Selector_Name => New_Copy (Selector_Name (Actual)), Explicit_Actual_Parameter => New_Copy (Explicit_Actual_Parameter (Actual)))); elsif Nkind (Actual) /= N_Parameter_Association then Append_To (New_Actuals, New_Copy (Actual)); end if; Next (Actual); end loop; -- Create new Symbols param association and append to New_Actuals Append_To (New_Actuals, Make_Parameter_Association (Loc, Selector_Name => Make_Identifier (Loc, Name_Symbol), Explicit_Actual_Parameter => New_Str_Lit)); -- Rewrite and analyze the procedure call if Chars (Name_Call) = Name_Image then Rewrite (N, Make_Function_Call (Loc, Name => New_Copy (Name_Call), Parameter_Associations => New_Actuals)); Analyze_And_Resolve (N); else Rewrite (N, Make_Procedure_Call_Statement (Loc, Name => New_Copy (Name_Call), Parameter_Associations => New_Actuals)); Analyze (N); end if; end if; end if; end Expand_Put_Call_With_Symbol; ------------------------------------ -- From_Dim_To_Str_Of_Dim_Symbols -- ------------------------------------ -- Given a dimension vector and the corresponding dimension system, create -- a String_Id to output dimension symbols corresponding to the dimensions -- Dims. If In_Error_Msg is True, there is a special handling for character -- asterisk * which is an insertion character in error messages. function From_Dim_To_Str_Of_Dim_Symbols (Dims : Dimension_Type; System : System_Type; In_Error_Msg : Boolean := False) return String_Id is Dim_Power : Rational; First_Dim : Boolean := True; procedure Store_String_Oexpon; -- Store the expon operator symbol "**" in the string. In error -- messages, asterisk * is a special character and must be quoted -- to be placed literally into the message. ------------------------- -- Store_String_Oexpon -- ------------------------- procedure Store_String_Oexpon is begin if In_Error_Msg then Store_String_Chars ("'*'*"); else Store_String_Chars ("**"); end if; end Store_String_Oexpon; -- Start of processing for From_Dim_To_Str_Of_Dim_Symbols begin -- Initialization of the new String_Id Start_String; -- Store the dimension symbols inside boxes if In_Error_Msg then Store_String_Chars ("'["); else Store_String_Char ('['); end if; for Position in Dimension_Type'Range loop Dim_Power := Dims (Position); if Dim_Power /= Zero then if First_Dim then First_Dim := False; else Store_String_Char ('.'); end if; Store_String_Chars (System.Dim_Symbols (Position)); -- Positive dimension case if Dim_Power.Numerator > 0 then -- Integer case if Dim_Power.Denominator = 1 then if Dim_Power.Numerator /= 1 then Store_String_Oexpon; Store_String_Int (Int (Dim_Power.Numerator)); end if; -- Rational case when denominator /= 1 else Store_String_Oexpon; Store_String_Char ('('); Store_String_Int (Int (Dim_Power.Numerator)); Store_String_Char ('/'); Store_String_Int (Int (Dim_Power.Denominator)); Store_String_Char (')'); end if; -- Negative dimension case else Store_String_Oexpon; Store_String_Char ('('); Store_String_Char ('-'); Store_String_Int (Int (-Dim_Power.Numerator)); -- Integer case if Dim_Power.Denominator = 1 then Store_String_Char (')'); -- Rational case when denominator /= 1 else Store_String_Char ('/'); Store_String_Int (Int (Dim_Power.Denominator)); Store_String_Char (')'); end if; end if; end if; end loop; if In_Error_Msg then Store_String_Chars ("']"); else Store_String_Char (']'); end if; return End_String; end From_Dim_To_Str_Of_Dim_Symbols; ------------------------------------- -- From_Dim_To_Str_Of_Unit_Symbols -- ------------------------------------- -- Given a dimension vector and the corresponding dimension system, -- create a String_Id to output the unit symbols corresponding to the -- dimensions Dims. function From_Dim_To_Str_Of_Unit_Symbols (Dims : Dimension_Type; System : System_Type) return String_Id is Dim_Power : Rational; First_Dim : Boolean := True; begin -- Return No_String if dimensionless if not Exists (Dims) then return No_String; end if; -- Initialization of the new String_Id Start_String; for Position in Dimension_Type'Range loop Dim_Power := Dims (Position); if Dim_Power /= Zero then if First_Dim then First_Dim := False; else Store_String_Char ('.'); end if; Store_String_Chars (System.Unit_Symbols (Position)); -- Positive dimension case if Dim_Power.Numerator > 0 then -- Integer case if Dim_Power.Denominator = 1 then if Dim_Power.Numerator /= 1 then Store_String_Chars ("**"); Store_String_Int (Int (Dim_Power.Numerator)); end if; -- Rational case when denominator /= 1 else Store_String_Chars ("**"); Store_String_Char ('('); Store_String_Int (Int (Dim_Power.Numerator)); Store_String_Char ('/'); Store_String_Int (Int (Dim_Power.Denominator)); Store_String_Char (')'); end if; -- Negative dimension case else Store_String_Chars ("**"); Store_String_Char ('('); Store_String_Char ('-'); Store_String_Int (Int (-Dim_Power.Numerator)); -- Integer case if Dim_Power.Denominator = 1 then Store_String_Char (')'); -- Rational case when denominator /= 1 else Store_String_Char ('/'); Store_String_Int (Int (Dim_Power.Denominator)); Store_String_Char (')'); end if; end if; end if; end loop; return End_String; end From_Dim_To_Str_Of_Unit_Symbols; --------- -- GCD -- --------- function GCD (Left, Right : Whole) return Int is L : Whole; R : Whole; begin L := Left; R := Right; while R /= 0 loop L := L mod R; if L = 0 then return Int (R); end if; R := R mod L; end loop; return Int (L); end GCD; -------------------------- -- Has_Dimension_System -- -------------------------- function Has_Dimension_System (Typ : Entity_Id) return Boolean is begin return Exists (System_Of (Typ)); end Has_Dimension_System; ------------------------------ -- Is_Dim_IO_Package_Entity -- ------------------------------ function Is_Dim_IO_Package_Entity (E : Entity_Id) return Boolean is begin -- Check the package entity corresponds to System.Dim.Float_IO or -- System.Dim.Integer_IO. return Is_RTU (E, System_Dim_Float_IO) or else Is_RTU (E, System_Dim_Integer_IO); end Is_Dim_IO_Package_Entity; ------------------------------------- -- Is_Dim_IO_Package_Instantiation -- ------------------------------------- function Is_Dim_IO_Package_Instantiation (N : Node_Id) return Boolean is Gen_Id : constant Node_Id := Name (N); begin -- Check that the instantiated package is either System.Dim.Float_IO -- or System.Dim.Integer_IO. return Is_Entity_Name (Gen_Id) and then Is_Dim_IO_Package_Entity (Entity (Gen_Id)); end Is_Dim_IO_Package_Instantiation; ---------------- -- Is_Invalid -- ---------------- function Is_Invalid (Position : Dimension_Position) return Boolean is begin return Position = Invalid_Position; end Is_Invalid; --------------------- -- Move_Dimensions -- --------------------- procedure Move_Dimensions (From, To : Node_Id) is begin if Ada_Version < Ada_2012 then return; end if; -- Copy the dimension of 'From to 'To' and remove dimension of 'From' Copy_Dimensions (From, To); Remove_Dimensions (From); end Move_Dimensions; --------------------------------------- -- New_Copy_Tree_And_Copy_Dimensions -- --------------------------------------- function New_Copy_Tree_And_Copy_Dimensions (Source : Node_Id; Map : Elist_Id := No_Elist; New_Sloc : Source_Ptr := No_Location; New_Scope : Entity_Id := Empty) return Node_Id is New_Copy : constant Node_Id := New_Copy_Tree (Source, Map, New_Sloc, New_Scope); begin -- Move the dimensions of Source to New_Copy Copy_Dimensions (Source, New_Copy); return New_Copy; end New_Copy_Tree_And_Copy_Dimensions; ------------ -- Reduce -- ------------ function Reduce (X : Rational) return Rational is begin if X.Numerator = 0 then return Zero; end if; declare G : constant Int := GCD (X.Numerator, X.Denominator); begin return Rational'(Numerator => Whole (Int (X.Numerator) / G), Denominator => Whole (Int (X.Denominator) / G)); end; end Reduce; ----------------------- -- Remove_Dimensions -- ----------------------- procedure Remove_Dimensions (N : Node_Id) is Dims_Of_N : constant Dimension_Type := Dimensions_Of (N); begin if Exists (Dims_Of_N) then Dimension_Table.Remove (N); end if; end Remove_Dimensions; ----------------------------------- -- Remove_Dimension_In_Statement -- ----------------------------------- -- Removal of dimension in statement as part of the Analyze_Statements -- routine (see package Sem_Ch5). procedure Remove_Dimension_In_Statement (Stmt : Node_Id) is begin if Ada_Version < Ada_2012 then return; end if; -- Remove dimension in parameter specifications for accept statement if Nkind (Stmt) = N_Accept_Statement then declare Param : Node_Id := First (Parameter_Specifications (Stmt)); begin while Present (Param) loop Remove_Dimensions (Param); Next (Param); end loop; end; -- Remove dimension of name and expression in assignments elsif Nkind (Stmt) = N_Assignment_Statement then Remove_Dimensions (Expression (Stmt)); Remove_Dimensions (Name (Stmt)); end if; end Remove_Dimension_In_Statement; -------------------- -- Set_Dimensions -- -------------------- procedure Set_Dimensions (N : Node_Id; Val : Dimension_Type) is begin pragma Assert (OK_For_Dimension (Nkind (N))); pragma Assert (Exists (Val)); Dimension_Table.Set (N, Val); end Set_Dimensions; ---------------- -- Set_Symbol -- ---------------- procedure Set_Symbol (E : Entity_Id; Val : String_Id) is begin Symbol_Table.Set (E, Val); end Set_Symbol; --------------- -- Symbol_Of -- --------------- function Symbol_Of (E : Entity_Id) return String_Id is Subtype_Symbol : constant String_Id := Symbol_Table.Get (E); begin if Subtype_Symbol /= No_String then return Subtype_Symbol; else return From_Dim_To_Str_Of_Unit_Symbols (Dimensions_Of (E), System_Of (Base_Type (E))); end if; end Symbol_Of; ----------------------- -- Symbol_Table_Hash -- ----------------------- function Symbol_Table_Hash (Key : Entity_Id) return Symbol_Table_Range is begin return Symbol_Table_Range (Key mod 511); end Symbol_Table_Hash; --------------- -- System_Of -- --------------- function System_Of (E : Entity_Id) return System_Type is begin if Present (E) then declare Type_Decl : constant Node_Id := Parent (E); begin -- Look for Type_Decl in System_Table for Dim_Sys in 1 .. System_Table.Last loop if Type_Decl = System_Table.Table (Dim_Sys).Type_Decl then return System_Table.Table (Dim_Sys); end if; end loop; end; end if; return Null_System; end System_Of; end Sem_Dim;
reznikmm/matreshka
Ada
218,770
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Visitors; with ODF.DOM.Number_Am_Pm_Elements; with ODF.DOM.Anim_Animate_Elements; with ODF.DOM.Anim_AnimateColor_Elements; with ODF.DOM.Anim_AnimateMotion_Elements; with ODF.DOM.Anim_AnimateTransform_Elements; with ODF.DOM.Anim_Audio_Elements; with ODF.DOM.Anim_Command_Elements; with ODF.DOM.Anim_Iterate_Elements; with ODF.DOM.Anim_Par_Elements; with ODF.DOM.Anim_Param_Elements; with ODF.DOM.Anim_Seq_Elements; with ODF.DOM.Anim_Set_Elements; with ODF.DOM.Anim_TransitionFilter_Elements; with ODF.DOM.Office_Annotation_Elements; with ODF.DOM.Office_Annotation_End_Elements; with ODF.DOM.Db_Application_Connection_Settings_Elements; with ODF.DOM.Db_Auto_Increment_Elements; with ODF.DOM.Chart_Axis_Elements; with ODF.DOM.Number_Boolean_Elements; with ODF.DOM.Number_Boolean_Style_Elements; with ODF.DOM.Form_Button_Elements; with ODF.DOM.Chart_Categories_Elements; with ODF.DOM.Db_Character_Set_Elements; with ODF.DOM.Chart_Chart_Elements; with ODF.DOM.Form_Checkbox_Elements; with ODF.DOM.Db_Column_Elements; with ODF.DOM.Form_Column_Elements; with ODF.DOM.Db_Column_Definition_Elements; with ODF.DOM.Db_Column_Definitions_Elements; with ODF.DOM.Db_Columns_Elements; with ODF.DOM.Form_Combobox_Elements; with ODF.DOM.Db_Component_Elements; with ODF.DOM.Db_Component_Collection_Elements; with ODF.DOM.Chart_Data_Label_Elements; with ODF.DOM.Chart_Data_Point_Elements; with ODF.DOM.Chart_Domain_Elements; with ODF.DOM.Chart_Equation_Elements; with ODF.DOM.Chart_Error_Indicator_Elements; with ODF.DOM.Chart_Floor_Elements; with ODF.DOM.Chart_Footer_Elements; with ODF.DOM.Chart_Grid_Elements; with ODF.DOM.Chart_Label_Separator_Elements; with ODF.DOM.Chart_Legend_Elements; with ODF.DOM.Chart_Mean_Value_Elements; with ODF.DOM.Chart_Plot_Area_Elements; with ODF.DOM.Chart_Regression_Curve_Elements; with ODF.DOM.Chart_Series_Elements; with ODF.DOM.Chart_Stock_Gain_Marker_Elements; with ODF.DOM.Chart_Stock_Loss_Marker_Elements; with ODF.DOM.Chart_Stock_Range_Line_Elements; with ODF.DOM.Chart_Subtitle_Elements; with ODF.DOM.Chart_Symbol_Image_Elements; with ODF.DOM.Chart_Title_Elements; with ODF.DOM.Chart_Wall_Elements; with ODF.DOM.Draw_A_Elements; with ODF.DOM.Presentation_Animation_Group_Elements; with ODF.DOM.Presentation_Animations_Elements; with ODF.DOM.Draw_Applet_Elements; with ODF.DOM.Draw_Area_Circle_Elements; with ODF.DOM.Draw_Area_Polygon_Elements; with ODF.DOM.Draw_Area_Rectangle_Elements; with ODF.DOM.Draw_Caption_Elements; with ODF.DOM.Draw_Circle_Elements; with ODF.DOM.Text_A_Elements; with ODF.DOM.Text_Alphabetical_Index_Elements; with ODF.DOM.Text_Alphabetical_Index_Auto_Mark_File_Elements; with ODF.DOM.Text_Alphabetical_Index_Entry_Template_Elements; with ODF.DOM.Text_Alphabetical_Index_Mark_Elements; with ODF.DOM.Text_Alphabetical_Index_Mark_End_Elements; with ODF.DOM.Text_Alphabetical_Index_Mark_Start_Elements; with ODF.DOM.Text_Alphabetical_Index_Source_Elements; with ODF.DOM.Text_Author_Initials_Elements; with ODF.DOM.Text_Author_Name_Elements; with ODF.DOM.Meta_Auto_Reload_Elements; with ODF.DOM.Office_Automatic_Styles_Elements; with ODF.DOM.Style_Background_Image_Elements; with ODF.DOM.Style_Chart_Properties_Elements; with ODF.DOM.Style_Column_Elements; with ODF.DOM.Style_Column_Sep_Elements; with ODF.DOM.Style_Columns_Elements; with ODF.DOM.Table_Background_Elements; with ODF.DOM.Text_Bibliography_Configuration_Elements; with ODF.DOM.Office_Binary_Data_Elements; with ODF.DOM.Table_Body_Elements; with ODF.DOM.Table_Calculation_Settings_Elements; with ODF.DOM.Table_Cell_Address_Elements; with ODF.DOM.Table_Cell_Content_Change_Elements; with ODF.DOM.Table_Cell_Content_Deletion_Elements; with ODF.DOM.Table_Cell_Range_Source_Elements; with ODF.DOM.Table_Change_Deletion_Elements; with ODF.DOM.Table_Change_Track_Table_Cell_Elements; with ODF.DOM.Text_Bibliography_Elements; with ODF.DOM.Text_Bibliography_Entry_Template_Elements; with ODF.DOM.Text_Bibliography_Mark_Elements; with ODF.DOM.Text_Bibliography_Source_Elements; with ODF.DOM.Text_Bookmark_Elements; with ODF.DOM.Text_Bookmark_End_Elements; with ODF.DOM.Text_Bookmark_Ref_Elements; with ODF.DOM.Text_Bookmark_Start_Elements; with ODF.DOM.Text_Change_Elements; with ODF.DOM.Text_Change_End_Elements; with ODF.DOM.Office_Change_Info_Elements; with ODF.DOM.Text_Change_Start_Elements; with ODF.DOM.Text_Changed_Region_Elements; with ODF.DOM.Text_Chapter_Elements; with ODF.DOM.Text_Character_Count_Elements; with ODF.DOM.Text_Conditional_Text_Elements; with ODF.DOM.Config_Config_Item_Elements; with ODF.DOM.Config_Config_Item_Map_Entry_Elements; with ODF.DOM.Config_Config_Item_Map_Indexed_Elements; with ODF.DOM.Config_Config_Item_Map_Named_Elements; with ODF.DOM.Config_Config_Item_Set_Elements; with ODF.DOM.Db_Connection_Data_Elements; with ODF.DOM.Db_Connection_Resource_Elements; with ODF.DOM.Db_Data_Source_Elements; with ODF.DOM.Db_Data_Source_Setting_Elements; with ODF.DOM.Db_Data_Source_Setting_Value_Elements; with ODF.DOM.Db_Data_Source_Settings_Elements; with ODF.DOM.Db_Database_Description_Elements; with ODF.DOM.Db_Delimiter_Elements; with ODF.DOM.Db_Driver_Settings_Elements; with ODF.DOM.Db_File_Based_Database_Elements; with ODF.DOM.Draw_Fill_Image_Elements; with ODF.DOM.Db_Filter_Statement_Elements; with ODF.DOM.Db_Forms_Elements; with ODF.DOM.Db_Index_Elements; with ODF.DOM.Db_Index_Column_Elements; with ODF.DOM.Db_Index_Columns_Elements; with ODF.DOM.Db_Indices_Elements; with ODF.DOM.Db_Key_Elements; with ODF.DOM.Db_Key_Column_Elements; with ODF.DOM.Db_Key_Columns_Elements; with ODF.DOM.Db_Keys_Elements; with ODF.DOM.Db_Login_Elements; with ODF.DOM.Db_Order_Statement_Elements; with ODF.DOM.Db_Queries_Elements; with ODF.DOM.Db_Query_Elements; with ODF.DOM.Db_Query_Collection_Elements; with ODF.DOM.Db_Reports_Elements; with ODF.DOM.Db_Schema_Definition_Elements; with ODF.DOM.Db_Server_Database_Elements; with ODF.DOM.Db_Table_Definition_Elements; with ODF.DOM.Db_Table_Definitions_Elements; with ODF.DOM.Db_Table_Exclude_Filter_Elements; with ODF.DOM.Db_Table_Filter_Elements; with ODF.DOM.Db_Table_Filter_Pattern_Elements; with ODF.DOM.Db_Table_Include_Filter_Elements; with ODF.DOM.Db_Table_Representation_Elements; with ODF.DOM.Db_Table_Representations_Elements; with ODF.DOM.Db_Table_Setting_Elements; with ODF.DOM.Db_Table_Settings_Elements; with ODF.DOM.Db_Table_Type_Elements; with ODF.DOM.Db_Table_Type_Filter_Elements; with ODF.DOM.Db_Update_Table_Elements; with ODF.DOM.Draw_Connector_Elements; with ODF.DOM.Draw_Contour_Path_Elements; with ODF.DOM.Draw_Contour_Polygon_Elements; with ODF.DOM.Draw_Control_Elements; with ODF.DOM.Form_Connection_Resource_Elements; with ODF.DOM.Table_Consolidation_Elements; with ODF.DOM.Table_Content_Validation_Elements; with ODF.DOM.Table_Content_Validations_Elements; with ODF.DOM.Table_Covered_Table_Cell_Elements; with ODF.DOM.Meta_Creation_Date_Elements; with ODF.DOM.Text_Creation_Date_Elements; with ODF.DOM.Text_Creation_Time_Elements; with ODF.DOM.Dc_Creator_Elements; with ODF.DOM.Dr3d_Cube_Elements; with ODF.DOM.Number_Currency_Style_Elements; with ODF.DOM.Number_Currency_Symbol_Elements; with ODF.DOM.Draw_Custom_Shape_Elements; with ODF.DOM.Form_Date_Elements; with ODF.DOM.Meta_Date_String_Elements; with ODF.DOM.Number_Date_Style_Elements; with ODF.DOM.Number_Day_Elements; with ODF.DOM.Number_Day_Of_Week_Elements; with ODF.DOM.Number_Embedded_Text_Elements; with ODF.DOM.Office_Database_Elements; with ODF.DOM.Office_Dde_Source_Elements; with ODF.DOM.Presentation_Date_Time_Elements; with ODF.DOM.Presentation_Date_Time_Decl_Elements; with ODF.DOM.Style_Default_Page_Layout_Elements; with ODF.DOM.Style_Default_Style_Elements; with ODF.DOM.Style_Drawing_Page_Properties_Elements; with ODF.DOM.Style_Drop_Cap_Elements; with ODF.DOM.Svg_Definition_Src_Elements; with ODF.DOM.Table_Dde_Link_Elements; with ODF.DOM.Presentation_Dim_Elements; with ODF.DOM.Draw_Enhanced_Geometry_Elements; with ODF.DOM.Dr3d_Extrude_Elements; with ODF.DOM.Dr3d_Light_Elements; with ODF.DOM.Dr3d_Rotate_Elements; with ODF.DOM.Dr3d_Scene_Elements; with ODF.DOM.Dr3d_Sphere_Elements; with ODF.DOM.Svg_Desc_Elements; with ODF.DOM.Draw_Ellipse_Elements; with ODF.DOM.Draw_Equation_Elements; with ODF.DOM.Number_Era_Elements; with ODF.DOM.Table_Even_Columns_Elements; with ODF.DOM.Table_Even_Rows_Elements; with ODF.DOM.Script_Event_Listener_Elements; with ODF.DOM.Form_File_Elements; with ODF.DOM.Form_Fixed_Text_Elements; with ODF.DOM.Presentation_Event_Listener_Elements; with ODF.DOM.Draw_Floating_Frame_Elements; with ODF.DOM.Form_Form_Elements; with ODF.DOM.Form_Formatted_Text_Elements; with ODF.DOM.Number_Fraction_Elements; with ODF.DOM.Draw_Frame_Elements; with ODF.DOM.Form_Frame_Elements; with ODF.DOM.Form_Generic_Control_Elements; with ODF.DOM.Office_Event_Listeners_Elements; with ODF.DOM.Style_Font_Face_Elements; with ODF.DOM.Svg_Font_Face_Format_Elements; with ODF.DOM.Svg_Font_Face_Name_Elements; with ODF.DOM.Svg_Font_Face_Src_Elements; with ODF.DOM.Svg_Font_Face_Uri_Elements; with ODF.DOM.Table_First_Column_Elements; with ODF.DOM.Table_First_Row_Elements; with ODF.DOM.Office_Forms_Elements; with ODF.DOM.Presentation_Footer_Elements; with ODF.DOM.Style_Footer_Elements; with ODF.DOM.Presentation_Footer_Decl_Elements; with ODF.DOM.Style_Footer_Left_Elements; with ODF.DOM.Style_Footer_Style_Elements; with ODF.DOM.Style_Footnote_Sep_Elements; with ODF.DOM.Draw_G_Elements; with ODF.DOM.Draw_Glue_Point_Elements; with ODF.DOM.Draw_Gradient_Elements; with ODF.DOM.Style_Graphic_Properties_Elements; with ODF.DOM.Form_Grid_Elements; with ODF.DOM.Draw_Handle_Elements; with ODF.DOM.Draw_Hatch_Elements; with ODF.DOM.Form_Hidden_Elements; with ODF.DOM.Number_Hours_Elements; with ODF.DOM.Form_Image_Elements; with ODF.DOM.Form_Image_Frame_Elements; with ODF.DOM.Presentation_Header_Elements; with ODF.DOM.Style_Header_Elements; with ODF.DOM.Presentation_Header_Decl_Elements; with ODF.DOM.Style_Header_Footer_Properties_Elements; with ODF.DOM.Style_Header_Left_Elements; with ODF.DOM.Style_Header_Style_Elements; with ODF.DOM.Presentation_Hide_Shape_Elements; with ODF.DOM.Presentation_Hide_Text_Elements; with ODF.DOM.Draw_Image_Elements; with ODF.DOM.Draw_Image_Map_Elements; with ODF.DOM.Form_Item_Elements; with ODF.DOM.Draw_Layer_Elements; with ODF.DOM.Draw_Layer_Set_Elements; with ODF.DOM.Draw_Line_Elements; with ODF.DOM.Style_List_Level_Label_Alignment_Elements; with ODF.DOM.Style_List_Level_Properties_Elements; with ODF.DOM.Draw_Marker_Elements; with ODF.DOM.Svg_LinearGradient_Elements; with ODF.DOM.Form_List_Property_Elements; with ODF.DOM.Form_List_Value_Elements; with ODF.DOM.Form_Listbox_Elements; with ODF.DOM.Style_Map_Elements; with ODF.DOM.Style_Master_Page_Elements; with ODF.DOM.Math_Math_Elements; with ODF.DOM.Draw_Measure_Elements; with ODF.DOM.Number_Minutes_Elements; with ODF.DOM.Number_Month_Elements; with ODF.DOM.Presentation_Notes_Elements; with ODF.DOM.Form_Number_Elements; with ODF.DOM.Number_Number_Elements; with ODF.DOM.Number_Number_Style_Elements; with ODF.DOM.Draw_Object_Elements; with ODF.DOM.Draw_Object_Ole_Elements; with ODF.DOM.Draw_Opacity_Elements; with ODF.DOM.Form_Option_Elements; with ODF.DOM.Draw_Page_Elements; with ODF.DOM.Style_Page_Layout_Elements; with ODF.DOM.Style_Page_Layout_Properties_Elements; with ODF.DOM.Draw_Page_Thumbnail_Elements; with ODF.DOM.Style_Paragraph_Properties_Elements; with ODF.DOM.Draw_Param_Elements; with ODF.DOM.Form_Password_Elements; with ODF.DOM.Draw_Path_Elements; with ODF.DOM.Number_Percentage_Style_Elements; with ODF.DOM.Presentation_Placeholder_Elements; with ODF.DOM.Draw_Plugin_Elements; with ODF.DOM.Draw_Polygon_Elements; with ODF.DOM.Draw_Polyline_Elements; with ODF.DOM.Style_Presentation_Page_Layout_Elements; with ODF.DOM.Form_Properties_Elements; with ODF.DOM.Form_Property_Elements; with ODF.DOM.Number_Quarter_Elements; with ODF.DOM.Svg_RadialGradient_Elements; with ODF.DOM.Form_Radio_Elements; with ODF.DOM.Draw_Rect_Elements; with ODF.DOM.Style_Region_Center_Elements; with ODF.DOM.Style_Region_Left_Elements; with ODF.DOM.Style_Region_Right_Elements; with ODF.DOM.Draw_Regular_Polygon_Elements; with ODF.DOM.Style_Ruby_Properties_Elements; with ODF.DOM.Draw_Stroke_Dash_Elements; with ODF.DOM.Number_Scientific_Number_Elements; with ODF.DOM.Number_Seconds_Elements; with ODF.DOM.Style_Section_Properties_Elements; with ODF.DOM.Svg_Stop_Elements; with ODF.DOM.Number_Text_Elements; with ODF.DOM.Style_Style_Elements; with ODF.DOM.Style_Tab_Stop_Elements; with ODF.DOM.Style_Tab_Stops_Elements; with ODF.DOM.Style_Table_Cell_Properties_Elements; with ODF.DOM.Style_Table_Column_Properties_Elements; with ODF.DOM.Style_Table_Properties_Elements; with ODF.DOM.Style_Table_Row_Properties_Elements; with ODF.DOM.Form_Text_Elements; with ODF.DOM.Draw_Text_Box_Elements; with ODF.DOM.Number_Text_Content_Elements; with ODF.DOM.Style_Text_Properties_Elements; with ODF.DOM.Number_Text_Style_Elements; with ODF.DOM.Form_Textarea_Elements; with ODF.DOM.Form_Time_Elements; with ODF.DOM.Number_Time_Style_Elements; with ODF.DOM.Form_Value_Range_Elements; with ODF.DOM.Number_Week_Of_Year_Elements; with ODF.DOM.Number_Year_Elements; with ODF.DOM.Table_Cut_Offs_Elements; with ODF.DOM.Table_Data_Pilot_Display_Info_Elements; with ODF.DOM.Table_Data_Pilot_Field_Elements; with ODF.DOM.Table_Data_Pilot_Field_Reference_Elements; with ODF.DOM.Table_Data_Pilot_Group_Elements; with ODF.DOM.Table_Data_Pilot_Group_Member_Elements; with ODF.DOM.Table_Data_Pilot_Groups_Elements; with ODF.DOM.Table_Data_Pilot_Layout_Info_Elements; with ODF.DOM.Table_Data_Pilot_Level_Elements; with ODF.DOM.Table_Data_Pilot_Member_Elements; with ODF.DOM.Table_Data_Pilot_Members_Elements; with ODF.DOM.Table_Data_Pilot_Sort_Info_Elements; with ODF.DOM.Table_Data_Pilot_Subtotal_Elements; with ODF.DOM.Table_Data_Pilot_Subtotals_Elements; with ODF.DOM.Table_Data_Pilot_Table_Elements; with ODF.DOM.Table_Data_Pilot_Tables_Elements; with ODF.DOM.Table_Database_Range_Elements; with ODF.DOM.Table_Database_Ranges_Elements; with ODF.DOM.Table_Database_Source_Query_Elements; with ODF.DOM.Table_Database_Source_Sql_Elements; with ODF.DOM.Table_Database_Source_Table_Elements; with ODF.DOM.Table_Dde_Links_Elements; with ODF.DOM.Table_Deletion_Elements; with ODF.DOM.Table_Deletions_Elements; with ODF.DOM.Table_Dependencies_Elements; with ODF.DOM.Table_Dependency_Elements; with ODF.DOM.Table_Desc_Elements; with ODF.DOM.Table_Last_Column_Elements; with ODF.DOM.Table_Last_Row_Elements; with ODF.DOM.Table_Odd_Columns_Elements; with ODF.DOM.Table_Odd_Rows_Elements; with ODF.DOM.Table_Table_Template_Elements; with ODF.DOM.Text_Creator_Elements; with ODF.DOM.Text_Database_Display_Elements; with ODF.DOM.Text_Database_Name_Elements; with ODF.DOM.Text_Database_Next_Elements; with ODF.DOM.Text_Database_Row_Number_Elements; with ODF.DOM.Text_Database_Row_Select_Elements; with ODF.DOM.Dc_Date_Elements; with ODF.DOM.Text_Date_Elements; with ODF.DOM.Text_Dde_Connection_Elements; with ODF.DOM.Text_Dde_Connection_Decl_Elements; with ODF.DOM.Text_Dde_Connection_Decls_Elements; with ODF.DOM.Text_Deletion_Elements; with ODF.DOM.Dc_Description_Elements; with ODF.DOM.Table_Detective_Elements; with ODF.DOM.Text_Description_Elements; with ODF.DOM.Meta_Document_Statistic_Elements; with ODF.DOM.Meta_Editing_Cycles_Elements; with ODF.DOM.Meta_Editing_Duration_Elements; with ODF.DOM.Dc_Language_Elements; with ODF.DOM.Dc_Subject_Elements; with ODF.DOM.Dc_Title_Elements; with ODF.DOM.Meta_Generator_Elements; with ODF.DOM.Meta_Hyperlink_Behaviour_Elements; with ODF.DOM.Meta_Initial_Creator_Elements; with ODF.DOM.Meta_Keyword_Elements; with ODF.DOM.Meta_Print_Date_Elements; with ODF.DOM.Meta_Printed_By_Elements; with ODF.DOM.Meta_Template_Elements; with ODF.DOM.Meta_User_Defined_Elements; with ODF.DOM.Office_Body_Elements; with ODF.DOM.Office_Chart_Elements; with ODF.DOM.Office_Document_Elements; with ODF.DOM.Office_Document_Content_Elements; with ODF.DOM.Office_Document_Meta_Elements; with ODF.DOM.Office_Document_Settings_Elements; with ODF.DOM.Office_Document_Styles_Elements; with ODF.DOM.Office_Drawing_Elements; with ODF.DOM.Style_Handout_Master_Elements; with ODF.DOM.Table_Error_Macro_Elements; with ODF.DOM.Table_Error_Message_Elements; with ODF.DOM.Table_Filter_Elements; with ODF.DOM.Table_Filter_And_Elements; with ODF.DOM.Table_Filter_Condition_Elements; with ODF.DOM.Table_Filter_Or_Elements; with ODF.DOM.Table_Filter_Set_Item_Elements; with ODF.DOM.Table_Help_Message_Elements; with ODF.DOM.Table_Highlighted_Range_Elements; with ODF.DOM.Text_Editing_Cycles_Elements; with ODF.DOM.Text_Editing_Duration_Elements; with ODF.DOM.Text_Execute_Macro_Elements; with ODF.DOM.Text_Expression_Elements; with ODF.DOM.Text_File_Name_Elements; with ODF.DOM.Office_Font_Face_Decls_Elements; with ODF.DOM.Text_Format_Change_Elements; with ODF.DOM.Text_H_Elements; with ODF.DOM.Text_Hidden_Paragraph_Elements; with ODF.DOM.Text_Hidden_Text_Elements; with ODF.DOM.Text_Illustration_Index_Elements; with ODF.DOM.Text_Illustration_Index_Entry_Template_Elements; with ODF.DOM.Text_Illustration_Index_Source_Elements; with ODF.DOM.Office_Image_Elements; with ODF.DOM.Table_Insertion_Elements; with ODF.DOM.Table_Insertion_Cut_Off_Elements; with ODF.DOM.Table_Iteration_Elements; with ODF.DOM.Table_Label_Range_Elements; with ODF.DOM.Table_Label_Ranges_Elements; with ODF.DOM.Text_Image_Count_Elements; with ODF.DOM.Text_Index_Body_Elements; with ODF.DOM.Text_Index_Entry_Bibliography_Elements; with ODF.DOM.Text_Index_Entry_Chapter_Elements; with ODF.DOM.Text_Index_Entry_Link_End_Elements; with ODF.DOM.Text_Index_Entry_Link_Start_Elements; with ODF.DOM.Text_Index_Entry_Page_Number_Elements; with ODF.DOM.Text_Index_Entry_Span_Elements; with ODF.DOM.Text_Index_Entry_Tab_Stop_Elements; with ODF.DOM.Text_Index_Entry_Text_Elements; with ODF.DOM.Text_Index_Source_Style_Elements; with ODF.DOM.Text_Index_Source_Styles_Elements; with ODF.DOM.Text_Index_Title_Elements; with ODF.DOM.Text_Index_Title_Template_Elements; with ODF.DOM.Text_Initial_Creator_Elements; with ODF.DOM.Text_Insertion_Elements; with ODF.DOM.Text_Keywords_Elements; with ODF.DOM.Text_Line_Break_Elements; with ODF.DOM.Text_Linenumbering_Configuration_Elements; with ODF.DOM.Text_Linenumbering_Separator_Elements; with ODF.DOM.Text_List_Elements; with ODF.DOM.Text_List_Header_Elements; with ODF.DOM.Text_List_Item_Elements; with ODF.DOM.Text_List_Level_Style_Bullet_Elements; with ODF.DOM.Text_List_Level_Style_Image_Elements; with ODF.DOM.Text_List_Level_Style_Number_Elements; with ODF.DOM.Text_List_Style_Elements; with ODF.DOM.Office_Master_Styles_Elements; with ODF.DOM.Text_Measure_Elements; with ODF.DOM.Office_Meta_Elements; with ODF.DOM.Presentation_Play_Elements; with ODF.DOM.Presentation_Settings_Elements; with ODF.DOM.Presentation_Show_Elements; with ODF.DOM.Presentation_Show_Shape_Elements; with ODF.DOM.Presentation_Show_Text_Elements; with ODF.DOM.Presentation_Sound_Elements; with ODF.DOM.Svg_Title_Elements; with ODF.DOM.Table_Movement_Elements; with ODF.DOM.Table_Movement_Cut_Off_Elements; with ODF.DOM.Table_Named_Expression_Elements; with ODF.DOM.Table_Named_Expressions_Elements; with ODF.DOM.Table_Named_Range_Elements; with ODF.DOM.Table_Null_Date_Elements; with ODF.DOM.Table_Operation_Elements; with ODF.DOM.Table_Previous_Elements; with ODF.DOM.Table_Scenario_Elements; with ODF.DOM.Table_Shapes_Elements; with ODF.DOM.Table_Sort_Elements; with ODF.DOM.Table_Sort_By_Elements; with ODF.DOM.Table_Sort_Groups_Elements; with ODF.DOM.Table_Source_Cell_Range_Elements; with ODF.DOM.Table_Source_Range_Address_Elements; with ODF.DOM.Table_Source_Service_Elements; with ODF.DOM.Table_Subtotal_Field_Elements; with ODF.DOM.Table_Subtotal_Rule_Elements; with ODF.DOM.Table_Subtotal_Rules_Elements; with ODF.DOM.Table_Table_Elements; with ODF.DOM.Table_Table_Cell_Elements; with ODF.DOM.Table_Table_Column_Elements; with ODF.DOM.Table_Table_Column_Group_Elements; with ODF.DOM.Table_Table_Columns_Elements; with ODF.DOM.Table_Table_Header_Columns_Elements; with ODF.DOM.Table_Table_Header_Rows_Elements; with ODF.DOM.Table_Table_Row_Elements; with ODF.DOM.Table_Table_Row_Group_Elements; with ODF.DOM.Table_Table_Rows_Elements; with ODF.DOM.Table_Table_Source_Elements; with ODF.DOM.Table_Target_Range_Address_Elements; with ODF.DOM.Table_Title_Elements; with ODF.DOM.Table_Tracked_Changes_Elements; with ODF.DOM.Text_Meta_Elements; with ODF.DOM.Text_Meta_Field_Elements; with ODF.DOM.Xforms_Model_Elements; with ODF.DOM.Text_Modification_Date_Elements; with ODF.DOM.Text_Modification_Time_Elements; with ODF.DOM.Text_Note_Elements; with ODF.DOM.Text_Note_Body_Elements; with ODF.DOM.Text_Note_Citation_Elements; with ODF.DOM.Text_Note_Continuation_Notice_Backward_Elements; with ODF.DOM.Text_Note_Continuation_Notice_Forward_Elements; with ODF.DOM.Text_Note_Ref_Elements; with ODF.DOM.Text_Notes_Configuration_Elements; with ODF.DOM.Text_Number_Elements; with ODF.DOM.Text_Numbered_Paragraph_Elements; with ODF.DOM.Text_Object_Count_Elements; with ODF.DOM.Text_Object_Index_Elements; with ODF.DOM.Text_Object_Index_Entry_Template_Elements; with ODF.DOM.Text_Object_Index_Source_Elements; with ODF.DOM.Text_Outline_Level_Style_Elements; with ODF.DOM.Text_Outline_Style_Elements; with ODF.DOM.Text_P_Elements; with ODF.DOM.Text_Page_Elements; with ODF.DOM.Text_Page_Continuation_Elements; with ODF.DOM.Text_Page_Count_Elements; with ODF.DOM.Text_Page_Number_Elements; with ODF.DOM.Text_Page_Sequence_Elements; with ODF.DOM.Text_Page_Variable_Get_Elements; with ODF.DOM.Text_Page_Variable_Set_Elements; with ODF.DOM.Text_Paragraph_Count_Elements; with ODF.DOM.Text_Placeholder_Elements; with ODF.DOM.Office_Presentation_Elements; with ODF.DOM.Text_Print_Date_Elements; with ODF.DOM.Text_Print_Time_Elements; with ODF.DOM.Text_Printed_By_Elements; with ODF.DOM.Text_Reference_Mark_Elements; with ODF.DOM.Text_Reference_Mark_End_Elements; with ODF.DOM.Text_Reference_Mark_Start_Elements; with ODF.DOM.Text_Reference_Ref_Elements; with ODF.DOM.Text_Ruby_Elements; with ODF.DOM.Text_Ruby_Base_Elements; with ODF.DOM.Text_Ruby_Text_Elements; with ODF.DOM.Text_S_Elements; with ODF.DOM.Office_Script_Elements; with ODF.DOM.Text_Script_Elements; with ODF.DOM.Office_Scripts_Elements; with ODF.DOM.Text_Section_Elements; with ODF.DOM.Text_Section_Source_Elements; with ODF.DOM.Text_Sender_City_Elements; with ODF.DOM.Text_Sender_Company_Elements; with ODF.DOM.Text_Sender_Country_Elements; with ODF.DOM.Text_Sender_Email_Elements; with ODF.DOM.Text_Sender_Fax_Elements; with ODF.DOM.Text_Sender_Firstname_Elements; with ODF.DOM.Text_Sender_Initials_Elements; with ODF.DOM.Text_Sender_Lastname_Elements; with ODF.DOM.Text_Sender_Phone_Private_Elements; with ODF.DOM.Text_Sender_Phone_Work_Elements; with ODF.DOM.Text_Sender_Position_Elements; with ODF.DOM.Text_Sender_Postal_Code_Elements; with ODF.DOM.Text_Sender_State_Or_Province_Elements; with ODF.DOM.Text_Sender_Street_Elements; with ODF.DOM.Text_Sender_Title_Elements; with ODF.DOM.Text_Sequence_Elements; with ODF.DOM.Text_Sequence_Decl_Elements; with ODF.DOM.Text_Sequence_Decls_Elements; with ODF.DOM.Text_Sequence_Ref_Elements; with ODF.DOM.Office_Settings_Elements; with ODF.DOM.Text_Sheet_Name_Elements; with ODF.DOM.Text_Soft_Page_Break_Elements; with ODF.DOM.Text_Sort_Key_Elements; with ODF.DOM.Text_Span_Elements; with ODF.DOM.Office_Spreadsheet_Elements; with ODF.DOM.Office_Styles_Elements; with ODF.DOM.Text_Subject_Elements; with ODF.DOM.Text_Tab_Elements; with ODF.DOM.Text_Table_Count_Elements; with ODF.DOM.Text_Table_Formula_Elements; with ODF.DOM.Text_Table_Index_Elements; with ODF.DOM.Text_Table_Index_Entry_Template_Elements; with ODF.DOM.Text_Table_Index_Source_Elements; with ODF.DOM.Text_Table_Of_Content_Elements; with ODF.DOM.Text_Table_Of_Content_Entry_Template_Elements; with ODF.DOM.Text_Table_Of_Content_Source_Elements; with ODF.DOM.Text_Template_Name_Elements; with ODF.DOM.Office_Text_Elements; with ODF.DOM.Text_Text_Input_Elements; with ODF.DOM.Text_Time_Elements; with ODF.DOM.Text_Title_Elements; with ODF.DOM.Text_Toc_Mark_Elements; with ODF.DOM.Text_Toc_Mark_End_Elements; with ODF.DOM.Text_Toc_Mark_Start_Elements; with ODF.DOM.Text_Tracked_Changes_Elements; with ODF.DOM.Text_User_Defined_Elements; with ODF.DOM.Text_User_Field_Decl_Elements; with ODF.DOM.Text_User_Field_Decls_Elements; with ODF.DOM.Text_User_Field_Get_Elements; with ODF.DOM.Text_User_Field_Input_Elements; with ODF.DOM.Text_User_Index_Elements; with ODF.DOM.Text_User_Index_Entry_Template_Elements; with ODF.DOM.Text_User_Index_Mark_Elements; with ODF.DOM.Text_User_Index_Mark_End_Elements; with ODF.DOM.Text_User_Index_Mark_Start_Elements; with ODF.DOM.Text_User_Index_Source_Elements; with ODF.DOM.Text_Variable_Decl_Elements; with ODF.DOM.Text_Variable_Decls_Elements; with ODF.DOM.Text_Variable_Get_Elements; with ODF.DOM.Text_Variable_Input_Elements; with ODF.DOM.Text_Variable_Set_Elements; with ODF.DOM.Text_Word_Count_Elements; with ODF.DOM.Visitors; package ODF.DOM.Iterators is pragma Preelaborate; type Abstract_ODF_Iterator is limited interface and XML.DOM.Visitors.Abstract_Iterator; not overriding procedure Visit_Number_Am_Pm (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Am_Pm_Elements.ODF_Number_Am_Pm_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Animate (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Animate_Elements.ODF_Anim_Animate_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_AnimateColor (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_AnimateColor_Elements.ODF_Anim_AnimateColor_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_AnimateMotion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_AnimateMotion_Elements.ODF_Anim_AnimateMotion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_AnimateTransform (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_AnimateTransform_Elements.ODF_Anim_AnimateTransform_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Audio (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Audio_Elements.ODF_Anim_Audio_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Command (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Command_Elements.ODF_Anim_Command_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Iterate (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Iterate_Elements.ODF_Anim_Iterate_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Par (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Par_Elements.ODF_Anim_Par_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Param (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Param_Elements.ODF_Anim_Param_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Seq (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Seq_Elements.ODF_Anim_Seq_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_Set (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_Set_Elements.ODF_Anim_Set_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Anim_TransitionFilter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Anim_TransitionFilter_Elements.ODF_Anim_TransitionFilter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Annotation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Annotation_Elements.ODF_Office_Annotation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Annotation_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Annotation_End_Elements.ODF_Office_Annotation_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Application_Connection_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Application_Connection_Settings_Elements.ODF_Db_Application_Connection_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Auto_Increment (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Auto_Increment_Elements.ODF_Db_Auto_Increment_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Axis (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Axis_Elements.ODF_Chart_Axis_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Boolean (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Boolean_Elements.ODF_Number_Boolean_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Boolean_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Boolean_Style_Elements.ODF_Number_Boolean_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Button (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Button_Elements.ODF_Form_Button_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Categories (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Categories_Elements.ODF_Chart_Categories_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Character_Set (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Character_Set_Elements.ODF_Db_Character_Set_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Chart (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Chart_Elements.ODF_Chart_Chart_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Checkbox (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Checkbox_Elements.ODF_Form_Checkbox_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Column_Elements.ODF_Db_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Column_Elements.ODF_Form_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Column_Definition (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Column_Definition_Elements.ODF_Db_Column_Definition_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Column_Definitions (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Column_Definitions_Elements.ODF_Db_Column_Definitions_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Columns_Elements.ODF_Db_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Combobox (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Combobox_Elements.ODF_Form_Combobox_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Component (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Component_Elements.ODF_Db_Component_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Component_Collection (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Component_Collection_Elements.ODF_Db_Component_Collection_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Data_Label (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Data_Label_Elements.ODF_Chart_Data_Label_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Data_Point (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Data_Point_Elements.ODF_Chart_Data_Point_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Domain (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Domain_Elements.ODF_Chart_Domain_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Equation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Equation_Elements.ODF_Chart_Equation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Error_Indicator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Error_Indicator_Elements.ODF_Chart_Error_Indicator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Floor (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Floor_Elements.ODF_Chart_Floor_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Footer (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Footer_Elements.ODF_Chart_Footer_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Grid (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Grid_Elements.ODF_Chart_Grid_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Label_Separator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Label_Separator_Elements.ODF_Chart_Label_Separator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Legend (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Legend_Elements.ODF_Chart_Legend_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Mean_Value (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Mean_Value_Elements.ODF_Chart_Mean_Value_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Plot_Area (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Plot_Area_Elements.ODF_Chart_Plot_Area_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Regression_Curve (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Regression_Curve_Elements.ODF_Chart_Regression_Curve_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Series (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Series_Elements.ODF_Chart_Series_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Stock_Gain_Marker (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Stock_Gain_Marker_Elements.ODF_Chart_Stock_Gain_Marker_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Stock_Loss_Marker (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Stock_Loss_Marker_Elements.ODF_Chart_Stock_Loss_Marker_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Stock_Range_Line (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Stock_Range_Line_Elements.ODF_Chart_Stock_Range_Line_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Subtitle (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Subtitle_Elements.ODF_Chart_Subtitle_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Symbol_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Symbol_Image_Elements.ODF_Chart_Symbol_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Title_Elements.ODF_Chart_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Chart_Wall (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Chart_Wall_Elements.ODF_Chart_Wall_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_A (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_A_Elements.ODF_Draw_A_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Animation_Group (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Animation_Group_Elements.ODF_Presentation_Animation_Group_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Animations (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Animations_Elements.ODF_Presentation_Animations_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Applet (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Applet_Elements.ODF_Draw_Applet_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Area_Circle (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Area_Circle_Elements.ODF_Draw_Area_Circle_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Area_Polygon (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Area_Polygon_Elements.ODF_Draw_Area_Polygon_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Area_Rectangle (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Area_Rectangle_Elements.ODF_Draw_Area_Rectangle_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Caption (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Caption_Elements.ODF_Draw_Caption_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Circle (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Circle_Elements.ODF_Draw_Circle_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_A (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_A_Elements.ODF_Text_A_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Elements.ODF_Text_Alphabetical_Index_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index_Auto_Mark_File (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Auto_Mark_File_Elements.ODF_Text_Alphabetical_Index_Auto_Mark_File_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Entry_Template_Elements.ODF_Text_Alphabetical_Index_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index_Mark (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Mark_Elements.ODF_Text_Alphabetical_Index_Mark_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index_Mark_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Mark_End_Elements.ODF_Text_Alphabetical_Index_Mark_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index_Mark_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Mark_Start_Elements.ODF_Text_Alphabetical_Index_Mark_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Alphabetical_Index_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Alphabetical_Index_Source_Elements.ODF_Text_Alphabetical_Index_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Author_Initials (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Author_Initials_Elements.ODF_Text_Author_Initials_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Author_Name (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Author_Name_Elements.ODF_Text_Author_Name_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Auto_Reload (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Auto_Reload_Elements.ODF_Meta_Auto_Reload_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Automatic_Styles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Automatic_Styles_Elements.ODF_Office_Automatic_Styles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Background_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Background_Image_Elements.ODF_Style_Background_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Chart_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Chart_Properties_Elements.ODF_Style_Chart_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Column_Elements.ODF_Style_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Column_Sep (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Column_Sep_Elements.ODF_Style_Column_Sep_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Columns_Elements.ODF_Style_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Background (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Background_Elements.ODF_Table_Background_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bibliography_Configuration (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bibliography_Configuration_Elements.ODF_Text_Bibliography_Configuration_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Binary_Data (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Binary_Data_Elements.ODF_Office_Binary_Data_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Body (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Body_Elements.ODF_Table_Body_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Calculation_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Calculation_Settings_Elements.ODF_Table_Calculation_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Cell_Address (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Cell_Address_Elements.ODF_Table_Cell_Address_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Cell_Content_Change (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Cell_Content_Change_Elements.ODF_Table_Cell_Content_Change_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Cell_Content_Deletion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Cell_Content_Deletion_Elements.ODF_Table_Cell_Content_Deletion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Cell_Range_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Cell_Range_Source_Elements.ODF_Table_Cell_Range_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Change_Deletion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Change_Deletion_Elements.ODF_Table_Change_Deletion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Change_Track_Table_Cell (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Change_Track_Table_Cell_Elements.ODF_Table_Change_Track_Table_Cell_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bibliography (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bibliography_Elements.ODF_Text_Bibliography_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bibliography_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bibliography_Entry_Template_Elements.ODF_Text_Bibliography_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bibliography_Mark (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bibliography_Mark_Elements.ODF_Text_Bibliography_Mark_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bibliography_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bibliography_Source_Elements.ODF_Text_Bibliography_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bookmark (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bookmark_Elements.ODF_Text_Bookmark_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bookmark_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bookmark_End_Elements.ODF_Text_Bookmark_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bookmark_Ref (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bookmark_Ref_Elements.ODF_Text_Bookmark_Ref_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Bookmark_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Bookmark_Start_Elements.ODF_Text_Bookmark_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Change (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Change_Elements.ODF_Text_Change_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Change_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Change_End_Elements.ODF_Text_Change_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Change_Info (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Change_Info_Elements.ODF_Office_Change_Info_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Change_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Change_Start_Elements.ODF_Text_Change_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Changed_Region (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Changed_Region_Elements.ODF_Text_Changed_Region_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Chapter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Chapter_Elements.ODF_Text_Chapter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Character_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Character_Count_Elements.ODF_Text_Character_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Conditional_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Conditional_Text_Elements.ODF_Text_Conditional_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Config_Config_Item (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Config_Config_Item_Elements.ODF_Config_Config_Item_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Config_Config_Item_Map_Entry (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Config_Config_Item_Map_Entry_Elements.ODF_Config_Config_Item_Map_Entry_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Config_Config_Item_Map_Indexed (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Config_Config_Item_Map_Indexed_Elements.ODF_Config_Config_Item_Map_Indexed_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Config_Config_Item_Map_Named (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Config_Config_Item_Map_Named_Elements.ODF_Config_Config_Item_Map_Named_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Config_Config_Item_Set (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Config_Config_Item_Set_Elements.ODF_Config_Config_Item_Set_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Connection_Data (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Connection_Data_Elements.ODF_Db_Connection_Data_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Connection_Resource (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Connection_Resource_Elements.ODF_Db_Connection_Resource_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Data_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Data_Source_Elements.ODF_Db_Data_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Data_Source_Setting (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Data_Source_Setting_Elements.ODF_Db_Data_Source_Setting_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Data_Source_Setting_Value (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Data_Source_Setting_Value_Elements.ODF_Db_Data_Source_Setting_Value_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Data_Source_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Data_Source_Settings_Elements.ODF_Db_Data_Source_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Database_Description (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Database_Description_Elements.ODF_Db_Database_Description_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Delimiter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Delimiter_Elements.ODF_Db_Delimiter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Driver_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Driver_Settings_Elements.ODF_Db_Driver_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_File_Based_Database (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_File_Based_Database_Elements.ODF_Db_File_Based_Database_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Fill_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Fill_Image_Elements.ODF_Draw_Fill_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Filter_Statement (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Filter_Statement_Elements.ODF_Db_Filter_Statement_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Forms (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Forms_Elements.ODF_Db_Forms_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Index (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Index_Elements.ODF_Db_Index_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Index_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Index_Column_Elements.ODF_Db_Index_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Index_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Index_Columns_Elements.ODF_Db_Index_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Indices (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Indices_Elements.ODF_Db_Indices_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Key (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Key_Elements.ODF_Db_Key_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Key_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Key_Column_Elements.ODF_Db_Key_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Key_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Key_Columns_Elements.ODF_Db_Key_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Keys (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Keys_Elements.ODF_Db_Keys_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Login (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Login_Elements.ODF_Db_Login_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Order_Statement (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Order_Statement_Elements.ODF_Db_Order_Statement_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Queries (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Queries_Elements.ODF_Db_Queries_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Query (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Query_Elements.ODF_Db_Query_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Query_Collection (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Query_Collection_Elements.ODF_Db_Query_Collection_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Reports (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Reports_Elements.ODF_Db_Reports_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Schema_Definition (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Schema_Definition_Elements.ODF_Db_Schema_Definition_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Server_Database (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Server_Database_Elements.ODF_Db_Server_Database_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Definition (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Definition_Elements.ODF_Db_Table_Definition_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Definitions (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Definitions_Elements.ODF_Db_Table_Definitions_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Exclude_Filter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Exclude_Filter_Elements.ODF_Db_Table_Exclude_Filter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Filter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Filter_Elements.ODF_Db_Table_Filter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Filter_Pattern (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Filter_Pattern_Elements.ODF_Db_Table_Filter_Pattern_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Include_Filter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Include_Filter_Elements.ODF_Db_Table_Include_Filter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Representation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Representation_Elements.ODF_Db_Table_Representation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Representations (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Representations_Elements.ODF_Db_Table_Representations_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Setting (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Setting_Elements.ODF_Db_Table_Setting_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Settings_Elements.ODF_Db_Table_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Type (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Type_Elements.ODF_Db_Table_Type_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Table_Type_Filter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Table_Type_Filter_Elements.ODF_Db_Table_Type_Filter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Db_Update_Table (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Db_Update_Table_Elements.ODF_Db_Update_Table_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Connector (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Connector_Elements.ODF_Draw_Connector_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Contour_Path (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Contour_Path_Elements.ODF_Draw_Contour_Path_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Contour_Polygon (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Contour_Polygon_Elements.ODF_Draw_Contour_Polygon_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Control (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Control_Elements.ODF_Draw_Control_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Connection_Resource (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Connection_Resource_Elements.ODF_Form_Connection_Resource_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Consolidation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Consolidation_Elements.ODF_Table_Consolidation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Content_Validation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Content_Validation_Elements.ODF_Table_Content_Validation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Content_Validations (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Content_Validations_Elements.ODF_Table_Content_Validations_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Covered_Table_Cell (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Covered_Table_Cell_Elements.ODF_Table_Covered_Table_Cell_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Creation_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Creation_Date_Elements.ODF_Meta_Creation_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Creation_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Creation_Date_Elements.ODF_Text_Creation_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Creation_Time (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Creation_Time_Elements.ODF_Text_Creation_Time_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dc_Creator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dc_Creator_Elements.ODF_Dc_Creator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dr3d_Cube (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dr3d_Cube_Elements.ODF_Dr3d_Cube_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Currency_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Currency_Style_Elements.ODF_Number_Currency_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Currency_Symbol (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Currency_Symbol_Elements.ODF_Number_Currency_Symbol_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Custom_Shape (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Custom_Shape_Elements.ODF_Draw_Custom_Shape_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Date_Elements.ODF_Form_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Date_String (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Date_String_Elements.ODF_Meta_Date_String_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Date_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Date_Style_Elements.ODF_Number_Date_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Day (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Day_Elements.ODF_Number_Day_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Day_Of_Week (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Day_Of_Week_Elements.ODF_Number_Day_Of_Week_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Embedded_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Embedded_Text_Elements.ODF_Number_Embedded_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Database (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Database_Elements.ODF_Office_Database_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Dde_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Dde_Source_Elements.ODF_Office_Dde_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Date_Time (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Date_Time_Elements.ODF_Presentation_Date_Time_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Date_Time_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Date_Time_Decl_Elements.ODF_Presentation_Date_Time_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Default_Page_Layout (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Default_Page_Layout_Elements.ODF_Style_Default_Page_Layout_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Default_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Default_Style_Elements.ODF_Style_Default_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Drawing_Page_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Drawing_Page_Properties_Elements.ODF_Style_Drawing_Page_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Drop_Cap (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Drop_Cap_Elements.ODF_Style_Drop_Cap_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Definition_Src (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Definition_Src_Elements.ODF_Svg_Definition_Src_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Dde_Link (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Dde_Link_Elements.ODF_Table_Dde_Link_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Dim (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Dim_Elements.ODF_Presentation_Dim_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Enhanced_Geometry (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Enhanced_Geometry_Elements.ODF_Draw_Enhanced_Geometry_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dr3d_Extrude (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dr3d_Extrude_Elements.ODF_Dr3d_Extrude_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dr3d_Light (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dr3d_Light_Elements.ODF_Dr3d_Light_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dr3d_Rotate (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dr3d_Rotate_Elements.ODF_Dr3d_Rotate_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dr3d_Scene (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dr3d_Scene_Elements.ODF_Dr3d_Scene_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dr3d_Sphere (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dr3d_Sphere_Elements.ODF_Dr3d_Sphere_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Desc (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Desc_Elements.ODF_Svg_Desc_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Ellipse (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Ellipse_Elements.ODF_Draw_Ellipse_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Equation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Equation_Elements.ODF_Draw_Equation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Era (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Era_Elements.ODF_Number_Era_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Even_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Even_Columns_Elements.ODF_Table_Even_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Even_Rows (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Even_Rows_Elements.ODF_Table_Even_Rows_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Script_Event_Listener (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Script_Event_Listener_Elements.ODF_Script_Event_Listener_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_File (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_File_Elements.ODF_Form_File_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Fixed_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Fixed_Text_Elements.ODF_Form_Fixed_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Event_Listener (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Event_Listener_Elements.ODF_Presentation_Event_Listener_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Floating_Frame (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Floating_Frame_Elements.ODF_Draw_Floating_Frame_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Form (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Form_Elements.ODF_Form_Form_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Formatted_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Formatted_Text_Elements.ODF_Form_Formatted_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Fraction (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Fraction_Elements.ODF_Number_Fraction_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Frame (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Frame_Elements.ODF_Draw_Frame_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Frame (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Frame_Elements.ODF_Form_Frame_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Generic_Control (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Generic_Control_Elements.ODF_Form_Generic_Control_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Event_Listeners (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Event_Listeners_Elements.ODF_Office_Event_Listeners_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Font_Face (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Font_Face_Elements.ODF_Style_Font_Face_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Font_Face_Format (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Font_Face_Format_Elements.ODF_Svg_Font_Face_Format_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Font_Face_Name (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Font_Face_Name_Elements.ODF_Svg_Font_Face_Name_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Font_Face_Src (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Font_Face_Src_Elements.ODF_Svg_Font_Face_Src_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Font_Face_Uri (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Font_Face_Uri_Elements.ODF_Svg_Font_Face_Uri_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_First_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_First_Column_Elements.ODF_Table_First_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_First_Row (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_First_Row_Elements.ODF_Table_First_Row_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Forms (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Forms_Elements.ODF_Office_Forms_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Footer (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Footer_Elements.ODF_Presentation_Footer_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Footer (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Footer_Elements.ODF_Style_Footer_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Footer_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Footer_Decl_Elements.ODF_Presentation_Footer_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Footer_Left (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Footer_Left_Elements.ODF_Style_Footer_Left_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Footer_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Footer_Style_Elements.ODF_Style_Footer_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Footnote_Sep (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Footnote_Sep_Elements.ODF_Style_Footnote_Sep_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_G (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_G_Elements.ODF_Draw_G_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Glue_Point (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Glue_Point_Elements.ODF_Draw_Glue_Point_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Gradient (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Gradient_Elements.ODF_Draw_Gradient_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Graphic_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Graphic_Properties_Elements.ODF_Style_Graphic_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Grid (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Grid_Elements.ODF_Form_Grid_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Handle (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Handle_Elements.ODF_Draw_Handle_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Hatch (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Hatch_Elements.ODF_Draw_Hatch_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Hidden (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Hidden_Elements.ODF_Form_Hidden_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Hours (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Hours_Elements.ODF_Number_Hours_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Image_Elements.ODF_Form_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Image_Frame (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Image_Frame_Elements.ODF_Form_Image_Frame_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Header (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Header_Elements.ODF_Presentation_Header_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Header (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Header_Elements.ODF_Style_Header_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Header_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Header_Decl_Elements.ODF_Presentation_Header_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Header_Footer_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Header_Footer_Properties_Elements.ODF_Style_Header_Footer_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Header_Left (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Header_Left_Elements.ODF_Style_Header_Left_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Header_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Header_Style_Elements.ODF_Style_Header_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Hide_Shape (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Hide_Shape_Elements.ODF_Presentation_Hide_Shape_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Hide_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Hide_Text_Elements.ODF_Presentation_Hide_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Image_Elements.ODF_Draw_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Image_Map (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Image_Map_Elements.ODF_Draw_Image_Map_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Item (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Item_Elements.ODF_Form_Item_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Layer (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Layer_Elements.ODF_Draw_Layer_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Layer_Set (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Layer_Set_Elements.ODF_Draw_Layer_Set_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Line (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Line_Elements.ODF_Draw_Line_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_List_Level_Label_Alignment (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_List_Level_Label_Alignment_Elements.ODF_Style_List_Level_Label_Alignment_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_List_Level_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_List_Level_Properties_Elements.ODF_Style_List_Level_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Marker (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Marker_Elements.ODF_Draw_Marker_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_LinearGradient (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_LinearGradient_Elements.ODF_Svg_LinearGradient_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_List_Property (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_List_Property_Elements.ODF_Form_List_Property_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_List_Value (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_List_Value_Elements.ODF_Form_List_Value_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Listbox (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Listbox_Elements.ODF_Form_Listbox_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Map (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Map_Elements.ODF_Style_Map_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Master_Page (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Master_Page_Elements.ODF_Style_Master_Page_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Math_Math (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Math_Math_Elements.ODF_Math_Math_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Measure (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Measure_Elements.ODF_Draw_Measure_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Minutes (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Minutes_Elements.ODF_Number_Minutes_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Month (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Month_Elements.ODF_Number_Month_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Notes (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Notes_Elements.ODF_Presentation_Notes_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Number_Elements.ODF_Form_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Number_Elements.ODF_Number_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Number_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Number_Style_Elements.ODF_Number_Number_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Object (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Object_Elements.ODF_Draw_Object_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Object_Ole (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Object_Ole_Elements.ODF_Draw_Object_Ole_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Opacity (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Opacity_Elements.ODF_Draw_Opacity_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Option (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Option_Elements.ODF_Form_Option_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Page (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Page_Elements.ODF_Draw_Page_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Page_Layout (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Page_Layout_Elements.ODF_Style_Page_Layout_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Page_Layout_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Page_Layout_Properties_Elements.ODF_Style_Page_Layout_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Page_Thumbnail (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Page_Thumbnail_Elements.ODF_Draw_Page_Thumbnail_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Paragraph_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Paragraph_Properties_Elements.ODF_Style_Paragraph_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Param (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Param_Elements.ODF_Draw_Param_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Password (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Password_Elements.ODF_Form_Password_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Path (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Path_Elements.ODF_Draw_Path_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Percentage_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Percentage_Style_Elements.ODF_Number_Percentage_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Placeholder (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Placeholder_Elements.ODF_Presentation_Placeholder_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Plugin (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Plugin_Elements.ODF_Draw_Plugin_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Polygon (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Polygon_Elements.ODF_Draw_Polygon_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Polyline (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Polyline_Elements.ODF_Draw_Polyline_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Presentation_Page_Layout (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Presentation_Page_Layout_Elements.ODF_Style_Presentation_Page_Layout_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Properties_Elements.ODF_Form_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Property (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Property_Elements.ODF_Form_Property_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Quarter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Quarter_Elements.ODF_Number_Quarter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_RadialGradient (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_RadialGradient_Elements.ODF_Svg_RadialGradient_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Radio (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Radio_Elements.ODF_Form_Radio_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Rect (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Rect_Elements.ODF_Draw_Rect_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Region_Center (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Region_Center_Elements.ODF_Style_Region_Center_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Region_Left (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Region_Left_Elements.ODF_Style_Region_Left_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Region_Right (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Region_Right_Elements.ODF_Style_Region_Right_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Regular_Polygon (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Regular_Polygon_Elements.ODF_Draw_Regular_Polygon_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Ruby_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Ruby_Properties_Elements.ODF_Style_Ruby_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Stroke_Dash (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Stroke_Dash_Elements.ODF_Draw_Stroke_Dash_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Scientific_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Scientific_Number_Elements.ODF_Number_Scientific_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Seconds (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Seconds_Elements.ODF_Number_Seconds_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Section_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Section_Properties_Elements.ODF_Style_Section_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Stop (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Stop_Elements.ODF_Svg_Stop_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Text_Elements.ODF_Number_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Style_Elements.ODF_Style_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Tab_Stop (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Tab_Stop_Elements.ODF_Style_Tab_Stop_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Tab_Stops (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Tab_Stops_Elements.ODF_Style_Tab_Stops_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Table_Cell_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Table_Cell_Properties_Elements.ODF_Style_Table_Cell_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Table_Column_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Table_Column_Properties_Elements.ODF_Style_Table_Column_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Table_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Table_Properties_Elements.ODF_Style_Table_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Table_Row_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Table_Row_Properties_Elements.ODF_Style_Table_Row_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Text_Elements.ODF_Form_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Draw_Text_Box (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Draw_Text_Box_Elements.ODF_Draw_Text_Box_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Text_Content (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Text_Content_Elements.ODF_Number_Text_Content_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Text_Properties (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Text_Properties_Elements.ODF_Style_Text_Properties_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Text_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Text_Style_Elements.ODF_Number_Text_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Textarea (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Textarea_Elements.ODF_Form_Textarea_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Time (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Time_Elements.ODF_Form_Time_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Time_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Time_Style_Elements.ODF_Number_Time_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Form_Value_Range (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Form_Value_Range_Elements.ODF_Form_Value_Range_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Week_Of_Year (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Week_Of_Year_Elements.ODF_Number_Week_Of_Year_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Number_Year (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Number_Year_Elements.ODF_Number_Year_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Cut_Offs (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Cut_Offs_Elements.ODF_Table_Cut_Offs_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Display_Info (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Display_Info_Elements.ODF_Table_Data_Pilot_Display_Info_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Field (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Field_Elements.ODF_Table_Data_Pilot_Field_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Field_Reference (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Field_Reference_Elements.ODF_Table_Data_Pilot_Field_Reference_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Group (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Group_Elements.ODF_Table_Data_Pilot_Group_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Group_Member (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Group_Member_Elements.ODF_Table_Data_Pilot_Group_Member_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Groups (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Groups_Elements.ODF_Table_Data_Pilot_Groups_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Layout_Info (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Layout_Info_Elements.ODF_Table_Data_Pilot_Layout_Info_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Level (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Level_Elements.ODF_Table_Data_Pilot_Level_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Member (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Member_Elements.ODF_Table_Data_Pilot_Member_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Members (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Members_Elements.ODF_Table_Data_Pilot_Members_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Sort_Info (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Sort_Info_Elements.ODF_Table_Data_Pilot_Sort_Info_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Subtotal (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Subtotal_Elements.ODF_Table_Data_Pilot_Subtotal_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Subtotals (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Subtotals_Elements.ODF_Table_Data_Pilot_Subtotals_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Table (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Table_Elements.ODF_Table_Data_Pilot_Table_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Data_Pilot_Tables (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Data_Pilot_Tables_Elements.ODF_Table_Data_Pilot_Tables_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Database_Range (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Database_Range_Elements.ODF_Table_Database_Range_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Database_Ranges (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Database_Ranges_Elements.ODF_Table_Database_Ranges_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Database_Source_Query (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Database_Source_Query_Elements.ODF_Table_Database_Source_Query_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Database_Source_Sql (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Database_Source_Sql_Elements.ODF_Table_Database_Source_Sql_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Database_Source_Table (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Database_Source_Table_Elements.ODF_Table_Database_Source_Table_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Dde_Links (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Dde_Links_Elements.ODF_Table_Dde_Links_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Deletion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Deletion_Elements.ODF_Table_Deletion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Deletions (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Deletions_Elements.ODF_Table_Deletions_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Dependencies (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Dependencies_Elements.ODF_Table_Dependencies_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Dependency (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Dependency_Elements.ODF_Table_Dependency_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Desc (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Desc_Elements.ODF_Table_Desc_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Last_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Last_Column_Elements.ODF_Table_Last_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Last_Row (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Last_Row_Elements.ODF_Table_Last_Row_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Odd_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Odd_Columns_Elements.ODF_Table_Odd_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Odd_Rows (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Odd_Rows_Elements.ODF_Table_Odd_Rows_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Template_Elements.ODF_Table_Table_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Creator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Creator_Elements.ODF_Text_Creator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Database_Display (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Database_Display_Elements.ODF_Text_Database_Display_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Database_Name (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Database_Name_Elements.ODF_Text_Database_Name_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Database_Next (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Database_Next_Elements.ODF_Text_Database_Next_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Database_Row_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Database_Row_Number_Elements.ODF_Text_Database_Row_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Database_Row_Select (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Database_Row_Select_Elements.ODF_Text_Database_Row_Select_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dc_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dc_Date_Elements.ODF_Dc_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Date_Elements.ODF_Text_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Dde_Connection (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Dde_Connection_Elements.ODF_Text_Dde_Connection_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Dde_Connection_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Dde_Connection_Decl_Elements.ODF_Text_Dde_Connection_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Dde_Connection_Decls (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Dde_Connection_Decls_Elements.ODF_Text_Dde_Connection_Decls_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Deletion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Deletion_Elements.ODF_Text_Deletion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dc_Description (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dc_Description_Elements.ODF_Dc_Description_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Detective (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Detective_Elements.ODF_Table_Detective_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Description (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Description_Elements.ODF_Text_Description_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Document_Statistic (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Document_Statistic_Elements.ODF_Meta_Document_Statistic_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Editing_Cycles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Editing_Cycles_Elements.ODF_Meta_Editing_Cycles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Editing_Duration (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Editing_Duration_Elements.ODF_Meta_Editing_Duration_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dc_Language (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dc_Language_Elements.ODF_Dc_Language_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dc_Subject (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dc_Subject_Elements.ODF_Dc_Subject_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Dc_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Dc_Title_Elements.ODF_Dc_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Generator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Generator_Elements.ODF_Meta_Generator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Hyperlink_Behaviour (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Hyperlink_Behaviour_Elements.ODF_Meta_Hyperlink_Behaviour_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Initial_Creator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Initial_Creator_Elements.ODF_Meta_Initial_Creator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Keyword (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Keyword_Elements.ODF_Meta_Keyword_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Print_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Print_Date_Elements.ODF_Meta_Print_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Printed_By (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Printed_By_Elements.ODF_Meta_Printed_By_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_Template_Elements.ODF_Meta_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Meta_User_Defined (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Meta_User_Defined_Elements.ODF_Meta_User_Defined_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Body (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Body_Elements.ODF_Office_Body_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Chart (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Chart_Elements.ODF_Office_Chart_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Document (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Document_Elements.ODF_Office_Document_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Document_Content (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Document_Content_Elements.ODF_Office_Document_Content_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Document_Meta (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Document_Meta_Elements.ODF_Office_Document_Meta_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Document_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Document_Settings_Elements.ODF_Office_Document_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Document_Styles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Document_Styles_Elements.ODF_Office_Document_Styles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Drawing (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Drawing_Elements.ODF_Office_Drawing_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Style_Handout_Master (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Style_Handout_Master_Elements.ODF_Style_Handout_Master_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Error_Macro (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Error_Macro_Elements.ODF_Table_Error_Macro_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Error_Message (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Error_Message_Elements.ODF_Table_Error_Message_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Filter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Filter_Elements.ODF_Table_Filter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Filter_And (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Filter_And_Elements.ODF_Table_Filter_And_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Filter_Condition (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Filter_Condition_Elements.ODF_Table_Filter_Condition_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Filter_Or (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Filter_Or_Elements.ODF_Table_Filter_Or_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Filter_Set_Item (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Filter_Set_Item_Elements.ODF_Table_Filter_Set_Item_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Help_Message (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Help_Message_Elements.ODF_Table_Help_Message_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Highlighted_Range (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Highlighted_Range_Elements.ODF_Table_Highlighted_Range_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Editing_Cycles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Editing_Cycles_Elements.ODF_Text_Editing_Cycles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Editing_Duration (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Editing_Duration_Elements.ODF_Text_Editing_Duration_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Execute_Macro (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Execute_Macro_Elements.ODF_Text_Execute_Macro_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Expression (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Expression_Elements.ODF_Text_Expression_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_File_Name (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_File_Name_Elements.ODF_Text_File_Name_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Font_Face_Decls (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Font_Face_Decls_Elements.ODF_Office_Font_Face_Decls_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Format_Change (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Format_Change_Elements.ODF_Text_Format_Change_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_H (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_H_Elements.ODF_Text_H_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Hidden_Paragraph (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Hidden_Paragraph_Elements.ODF_Text_Hidden_Paragraph_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Hidden_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Hidden_Text_Elements.ODF_Text_Hidden_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Illustration_Index (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Illustration_Index_Elements.ODF_Text_Illustration_Index_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Illustration_Index_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Illustration_Index_Entry_Template_Elements.ODF_Text_Illustration_Index_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Illustration_Index_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Illustration_Index_Source_Elements.ODF_Text_Illustration_Index_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Image_Elements.ODF_Office_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Insertion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Insertion_Elements.ODF_Table_Insertion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Insertion_Cut_Off (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Insertion_Cut_Off_Elements.ODF_Table_Insertion_Cut_Off_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Iteration (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Iteration_Elements.ODF_Table_Iteration_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Label_Range (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Label_Range_Elements.ODF_Table_Label_Range_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Label_Ranges (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Label_Ranges_Elements.ODF_Table_Label_Ranges_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Image_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Image_Count_Elements.ODF_Text_Image_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Body (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Body_Elements.ODF_Text_Index_Body_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Bibliography (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Bibliography_Elements.ODF_Text_Index_Entry_Bibliography_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Chapter (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Chapter_Elements.ODF_Text_Index_Entry_Chapter_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Link_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Link_End_Elements.ODF_Text_Index_Entry_Link_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Link_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Link_Start_Elements.ODF_Text_Index_Entry_Link_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Page_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Page_Number_Elements.ODF_Text_Index_Entry_Page_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Span (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Span_Elements.ODF_Text_Index_Entry_Span_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Tab_Stop (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Tab_Stop_Elements.ODF_Text_Index_Entry_Tab_Stop_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Entry_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Entry_Text_Elements.ODF_Text_Index_Entry_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Source_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Source_Style_Elements.ODF_Text_Index_Source_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Source_Styles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Source_Styles_Elements.ODF_Text_Index_Source_Styles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Title_Elements.ODF_Text_Index_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Index_Title_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Index_Title_Template_Elements.ODF_Text_Index_Title_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Initial_Creator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Initial_Creator_Elements.ODF_Text_Initial_Creator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Insertion (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Insertion_Elements.ODF_Text_Insertion_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Keywords (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Keywords_Elements.ODF_Text_Keywords_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Line_Break (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Line_Break_Elements.ODF_Text_Line_Break_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Linenumbering_Configuration (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Linenumbering_Configuration_Elements.ODF_Text_Linenumbering_Configuration_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Linenumbering_Separator (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Linenumbering_Separator_Elements.ODF_Text_Linenumbering_Separator_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Elements.ODF_Text_List_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List_Header (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Header_Elements.ODF_Text_List_Header_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List_Item (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Item_Elements.ODF_Text_List_Item_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List_Level_Style_Bullet (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Level_Style_Bullet_Elements.ODF_Text_List_Level_Style_Bullet_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List_Level_Style_Image (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Level_Style_Image_Elements.ODF_Text_List_Level_Style_Image_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List_Level_Style_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Level_Style_Number_Elements.ODF_Text_List_Level_Style_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_List_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_List_Style_Elements.ODF_Text_List_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Master_Styles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Master_Styles_Elements.ODF_Office_Master_Styles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Measure (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Measure_Elements.ODF_Text_Measure_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Meta (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Meta_Elements.ODF_Office_Meta_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Play (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Play_Elements.ODF_Presentation_Play_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Settings_Elements.ODF_Presentation_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Show (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Show_Elements.ODF_Presentation_Show_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Show_Shape (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Show_Shape_Elements.ODF_Presentation_Show_Shape_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Show_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Show_Text_Elements.ODF_Presentation_Show_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Presentation_Sound (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Presentation_Sound_Elements.ODF_Presentation_Sound_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Svg_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Svg_Title_Elements.ODF_Svg_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Movement (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Movement_Elements.ODF_Table_Movement_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Movement_Cut_Off (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Movement_Cut_Off_Elements.ODF_Table_Movement_Cut_Off_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Named_Expression (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Named_Expression_Elements.ODF_Table_Named_Expression_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Named_Expressions (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Named_Expressions_Elements.ODF_Table_Named_Expressions_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Named_Range (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Named_Range_Elements.ODF_Table_Named_Range_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Null_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Null_Date_Elements.ODF_Table_Null_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Operation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Operation_Elements.ODF_Table_Operation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Previous (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Previous_Elements.ODF_Table_Previous_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Scenario (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Scenario_Elements.ODF_Table_Scenario_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Shapes (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Shapes_Elements.ODF_Table_Shapes_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Sort (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Sort_Elements.ODF_Table_Sort_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Sort_By (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Sort_By_Elements.ODF_Table_Sort_By_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Sort_Groups (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Sort_Groups_Elements.ODF_Table_Sort_Groups_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Source_Cell_Range (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Source_Cell_Range_Elements.ODF_Table_Source_Cell_Range_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Source_Range_Address (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Source_Range_Address_Elements.ODF_Table_Source_Range_Address_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Source_Service (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Source_Service_Elements.ODF_Table_Source_Service_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Subtotal_Field (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Subtotal_Field_Elements.ODF_Table_Subtotal_Field_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Subtotal_Rule (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Subtotal_Rule_Elements.ODF_Table_Subtotal_Rule_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Subtotal_Rules (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Subtotal_Rules_Elements.ODF_Table_Subtotal_Rules_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Elements.ODF_Table_Table_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Cell (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Cell_Elements.ODF_Table_Table_Cell_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Column (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Column_Elements.ODF_Table_Table_Column_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Column_Group (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Column_Group_Elements.ODF_Table_Table_Column_Group_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Columns_Elements.ODF_Table_Table_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Header_Columns (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Header_Columns_Elements.ODF_Table_Table_Header_Columns_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Header_Rows (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Header_Rows_Elements.ODF_Table_Table_Header_Rows_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Row (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Row_Elements.ODF_Table_Table_Row_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Row_Group (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Row_Group_Elements.ODF_Table_Table_Row_Group_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Rows (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Rows_Elements.ODF_Table_Table_Rows_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Table_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Table_Source_Elements.ODF_Table_Table_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Target_Range_Address (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Target_Range_Address_Elements.ODF_Table_Target_Range_Address_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Title_Elements.ODF_Table_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Table_Tracked_Changes (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Table_Tracked_Changes_Elements.ODF_Table_Tracked_Changes_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Meta (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Meta_Elements.ODF_Text_Meta_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Meta_Field (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Meta_Field_Elements.ODF_Text_Meta_Field_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Xforms_Model (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Xforms_Model_Elements.ODF_Xforms_Model_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Modification_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Modification_Date_Elements.ODF_Text_Modification_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Modification_Time (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Modification_Time_Elements.ODF_Text_Modification_Time_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Note (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Note_Elements.ODF_Text_Note_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Note_Body (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Note_Body_Elements.ODF_Text_Note_Body_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Note_Citation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Note_Citation_Elements.ODF_Text_Note_Citation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Note_Continuation_Notice_Backward (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Note_Continuation_Notice_Backward_Elements.ODF_Text_Note_Continuation_Notice_Backward_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Note_Continuation_Notice_Forward (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Note_Continuation_Notice_Forward_Elements.ODF_Text_Note_Continuation_Notice_Forward_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Note_Ref (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Note_Ref_Elements.ODF_Text_Note_Ref_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Notes_Configuration (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Notes_Configuration_Elements.ODF_Text_Notes_Configuration_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Number_Elements.ODF_Text_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Numbered_Paragraph (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Numbered_Paragraph_Elements.ODF_Text_Numbered_Paragraph_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Object_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Object_Count_Elements.ODF_Text_Object_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Object_Index (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Object_Index_Elements.ODF_Text_Object_Index_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Object_Index_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Object_Index_Entry_Template_Elements.ODF_Text_Object_Index_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Object_Index_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Object_Index_Source_Elements.ODF_Text_Object_Index_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Outline_Level_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Outline_Level_Style_Elements.ODF_Text_Outline_Level_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Outline_Style (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Outline_Style_Elements.ODF_Text_Outline_Style_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_P (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_P_Elements.ODF_Text_P_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Elements.ODF_Text_Page_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page_Continuation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Continuation_Elements.ODF_Text_Page_Continuation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Count_Elements.ODF_Text_Page_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page_Number (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Number_Elements.ODF_Text_Page_Number_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page_Sequence (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Sequence_Elements.ODF_Text_Page_Sequence_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page_Variable_Get (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Variable_Get_Elements.ODF_Text_Page_Variable_Get_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Page_Variable_Set (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Page_Variable_Set_Elements.ODF_Text_Page_Variable_Set_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Paragraph_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Paragraph_Count_Elements.ODF_Text_Paragraph_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Placeholder (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Placeholder_Elements.ODF_Text_Placeholder_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Presentation (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Presentation_Elements.ODF_Office_Presentation_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Print_Date (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Print_Date_Elements.ODF_Text_Print_Date_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Print_Time (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Print_Time_Elements.ODF_Text_Print_Time_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Printed_By (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Printed_By_Elements.ODF_Text_Printed_By_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Reference_Mark (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Reference_Mark_Elements.ODF_Text_Reference_Mark_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Reference_Mark_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Reference_Mark_End_Elements.ODF_Text_Reference_Mark_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Reference_Mark_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Reference_Mark_Start_Elements.ODF_Text_Reference_Mark_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Reference_Ref (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Reference_Ref_Elements.ODF_Text_Reference_Ref_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Ruby (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Ruby_Elements.ODF_Text_Ruby_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Ruby_Base (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Ruby_Base_Elements.ODF_Text_Ruby_Base_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Ruby_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Ruby_Text_Elements.ODF_Text_Ruby_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_S (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_S_Elements.ODF_Text_S_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Script (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Script_Elements.ODF_Office_Script_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Script (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Script_Elements.ODF_Text_Script_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Scripts (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Scripts_Elements.ODF_Office_Scripts_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Section (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Section_Elements.ODF_Text_Section_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Section_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Section_Source_Elements.ODF_Text_Section_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_City (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_City_Elements.ODF_Text_Sender_City_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Company (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Company_Elements.ODF_Text_Sender_Company_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Country (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Country_Elements.ODF_Text_Sender_Country_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Email (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Email_Elements.ODF_Text_Sender_Email_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Fax (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Fax_Elements.ODF_Text_Sender_Fax_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Firstname (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Firstname_Elements.ODF_Text_Sender_Firstname_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Initials (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Initials_Elements.ODF_Text_Sender_Initials_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Lastname (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Lastname_Elements.ODF_Text_Sender_Lastname_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Phone_Private (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Phone_Private_Elements.ODF_Text_Sender_Phone_Private_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Phone_Work (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Phone_Work_Elements.ODF_Text_Sender_Phone_Work_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Position (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Position_Elements.ODF_Text_Sender_Position_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Postal_Code (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Postal_Code_Elements.ODF_Text_Sender_Postal_Code_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_State_Or_Province (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_State_Or_Province_Elements.ODF_Text_Sender_State_Or_Province_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Street (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Street_Elements.ODF_Text_Sender_Street_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sender_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sender_Title_Elements.ODF_Text_Sender_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sequence (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sequence_Elements.ODF_Text_Sequence_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sequence_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sequence_Decl_Elements.ODF_Text_Sequence_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sequence_Decls (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sequence_Decls_Elements.ODF_Text_Sequence_Decls_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sequence_Ref (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sequence_Ref_Elements.ODF_Text_Sequence_Ref_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Settings (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Settings_Elements.ODF_Office_Settings_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sheet_Name (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sheet_Name_Elements.ODF_Text_Sheet_Name_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Soft_Page_Break (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Soft_Page_Break_Elements.ODF_Text_Soft_Page_Break_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Sort_Key (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Sort_Key_Elements.ODF_Text_Sort_Key_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Span (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Span_Elements.ODF_Text_Span_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Spreadsheet (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Spreadsheet_Elements.ODF_Office_Spreadsheet_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Styles (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Styles_Elements.ODF_Office_Styles_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Subject (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Subject_Elements.ODF_Text_Subject_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Tab (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Tab_Elements.ODF_Text_Tab_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Count_Elements.ODF_Text_Table_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Formula (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Formula_Elements.ODF_Text_Table_Formula_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Index (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Index_Elements.ODF_Text_Table_Index_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Index_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Index_Entry_Template_Elements.ODF_Text_Table_Index_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Index_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Index_Source_Elements.ODF_Text_Table_Index_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Of_Content (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Of_Content_Elements.ODF_Text_Table_Of_Content_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Of_Content_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Of_Content_Entry_Template_Elements.ODF_Text_Table_Of_Content_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Table_Of_Content_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Table_Of_Content_Source_Elements.ODF_Text_Table_Of_Content_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Template_Name (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Template_Name_Elements.ODF_Text_Template_Name_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Office_Text (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Office_Text_Elements.ODF_Office_Text_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Text_Input (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Text_Input_Elements.ODF_Text_Text_Input_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Time (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Time_Elements.ODF_Text_Time_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Title (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Title_Elements.ODF_Text_Title_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Toc_Mark (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Toc_Mark_Elements.ODF_Text_Toc_Mark_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Toc_Mark_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Toc_Mark_End_Elements.ODF_Text_Toc_Mark_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Toc_Mark_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Toc_Mark_Start_Elements.ODF_Text_Toc_Mark_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Tracked_Changes (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Tracked_Changes_Elements.ODF_Text_Tracked_Changes_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Defined (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Defined_Elements.ODF_Text_User_Defined_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Field_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Field_Decl_Elements.ODF_Text_User_Field_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Field_Decls (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Field_Decls_Elements.ODF_Text_User_Field_Decls_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Field_Get (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Field_Get_Elements.ODF_Text_User_Field_Get_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Field_Input (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Field_Input_Elements.ODF_Text_User_Field_Input_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Index (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Index_Elements.ODF_Text_User_Index_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Index_Entry_Template (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Index_Entry_Template_Elements.ODF_Text_User_Index_Entry_Template_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Index_Mark (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Index_Mark_Elements.ODF_Text_User_Index_Mark_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Index_Mark_End (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Index_Mark_End_Elements.ODF_Text_User_Index_Mark_End_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Index_Mark_Start (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Index_Mark_Start_Elements.ODF_Text_User_Index_Mark_Start_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_User_Index_Source (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_User_Index_Source_Elements.ODF_Text_User_Index_Source_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Variable_Decl (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Variable_Decl_Elements.ODF_Text_Variable_Decl_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Variable_Decls (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Variable_Decls_Elements.ODF_Text_Variable_Decls_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Variable_Get (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Variable_Get_Elements.ODF_Text_Variable_Get_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Variable_Input (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Variable_Input_Elements.ODF_Text_Variable_Input_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Variable_Set (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Variable_Set_Elements.ODF_Text_Variable_Set_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; not overriding procedure Visit_Text_Word_Count (Self : in out Abstract_ODF_Iterator; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Node : not null ODF.DOM.Text_Word_Count_Elements.ODF_Text_Word_Count_Access; Control : in out XML.DOM.Visitors.Traverse_Control) is null; end ODF.DOM.Iterators;
reznikmm/matreshka
Ada
4,299
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Nodes; with XML.DOM.Attributes.Internals; package body ODF.DOM.Attributes.Style.Flow_With_Text.Internals is ------------ -- Create -- ------------ function Create (Node : Matreshka.ODF_Attributes.Style.Flow_With_Text.Style_Flow_With_Text_Access) return ODF.DOM.Attributes.Style.Flow_With_Text.ODF_Style_Flow_With_Text is begin return (XML.DOM.Attributes.Internals.Create (Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record); end Create; ---------- -- Wrap -- ---------- function Wrap (Node : Matreshka.ODF_Attributes.Style.Flow_With_Text.Style_Flow_With_Text_Access) return ODF.DOM.Attributes.Style.Flow_With_Text.ODF_Style_Flow_With_Text is begin return (XML.DOM.Attributes.Internals.Wrap (Matreshka.DOM_Nodes.Attribute_Access (Node)) with null record); end Wrap; end ODF.DOM.Attributes.Style.Flow_With_Text.Internals;
zhmu/ananas
Ada
6,704
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W C H _ J I S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body System.WCh_JIS is type Byte is mod 256; EUC_Hankaku_Kana : constant Byte := 16#8E#; -- Prefix byte in EUC for Hankaku Kana (small Katakana). Such characters -- in EUC are represented by a prefix byte followed by the code, which -- is in the upper half (the corresponding JIS internal code is in the -- range 16#0080# - 16#00FF#). function EUC_To_JIS (EUC1, EUC2 : Character) return Wide_Character is EUC1B : constant Byte := Character'Pos (EUC1); EUC2B : constant Byte := Character'Pos (EUC2); begin if EUC2B not in 16#A0# .. 16#FE# then raise Constraint_Error; end if; if EUC1B = EUC_Hankaku_Kana then return Wide_Character'Val (EUC2B); else if EUC1B not in 16#A0# .. 16#FE# then raise Constraint_Error; else return Wide_Character'Val (256 * Natural (EUC1B and 16#7F#) + Natural (EUC2B and 16#7F#)); end if; end if; end EUC_To_JIS; ---------------- -- JIS_To_EUC -- ---------------- procedure JIS_To_EUC (J : Wide_Character; EUC1 : out Character; EUC2 : out Character) is JIS1 : constant Natural := Wide_Character'Pos (J) / 256; JIS2 : constant Natural := Wide_Character'Pos (J) rem 256; begin -- Special case of small Katakana if JIS1 = 0 then -- The value must be in the range 16#80# to 16#FF# so that the upper -- bit is set in both bytes. if JIS2 < 16#80# then raise Constraint_Error; end if; EUC1 := Character'Val (EUC_Hankaku_Kana); EUC2 := Character'Val (JIS2); -- The upper bit of both characters must be clear, or this is not -- a valid character for representation in EUC form. elsif JIS1 > 16#7F# or else JIS2 > 16#7F# then raise Constraint_Error; -- Result is just the two characters with upper bits set else EUC1 := Character'Val (JIS1 + 16#80#); EUC2 := Character'Val (JIS2 + 16#80#); end if; end JIS_To_EUC; ---------------------- -- JIS_To_Shift_JIS -- ---------------------- procedure JIS_To_Shift_JIS (J : Wide_Character; SJ1 : out Character; SJ2 : out Character) is JIS1 : Byte; JIS2 : Byte; begin -- The following is the required algorithm, it's hard to make any -- more intelligent comments. This was copied from a public domain -- C program called etos.c (author unknown). JIS1 := Byte (Natural (Wide_Character'Pos (J) / 256)); JIS2 := Byte (Natural (Wide_Character'Pos (J) rem 256)); if JIS1 > 16#5F# then JIS1 := JIS1 + 16#80#; end if; if (JIS1 mod 2) = 0 then SJ1 := Character'Val ((JIS1 - 16#30#) / 2 + 16#88#); SJ2 := Character'Val (JIS2 + 16#7E#); else if JIS2 >= 16#60# then JIS2 := JIS2 + 16#01#; end if; SJ1 := Character'Val ((JIS1 - 16#31#) / 2 + 16#89#); SJ2 := Character'Val (JIS2 + 16#1F#); end if; end JIS_To_Shift_JIS; ---------------------- -- Shift_JIS_To_JIS -- ---------------------- function Shift_JIS_To_JIS (SJ1, SJ2 : Character) return Wide_Character is SJIS1 : Byte; SJIS2 : Byte; JIS1 : Byte; JIS2 : Byte; begin -- The following is the required algorithm, it's hard to make any -- more intelligent comments. This was copied from a public domain -- C program called stoj.c written by [email protected]. SJIS1 := Character'Pos (SJ1); SJIS2 := Character'Pos (SJ2); if SJIS1 >= 16#E0# then SJIS1 := SJIS1 - 16#40#; end if; if SJIS2 >= 16#9F# then JIS1 := (SJIS1 - 16#88#) * 2 + 16#30#; JIS2 := SJIS2 - 16#7E#; else if SJIS2 >= 16#7F# then SJIS2 := SJIS2 - 16#01#; end if; JIS1 := (SJIS1 - 16#89#) * 2 + 16#31#; JIS2 := SJIS2 - 16#1F#; end if; if JIS1 not in 16#20# .. 16#7E# or else JIS2 not in 16#20# .. 16#7E# then raise Constraint_Error; else return Wide_Character'Val (256 * Natural (JIS1) + Natural (JIS2)); end if; end Shift_JIS_To_JIS; end System.WCh_JIS;
reznikmm/matreshka
Ada
7,339
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Helpers; with AMF.Internals.Tables.Utp_Attributes; with AMF.UML.Dependencies; with AMF.Visitors.Utp_Iterators; with AMF.Visitors.Utp_Visitors; package body AMF.Internals.Utp_Default_Applications is ------------------------- -- Get_Base_Dependency -- ------------------------- overriding function Get_Base_Dependency (Self : not null access constant Utp_Default_Application_Proxy) return AMF.UML.Dependencies.UML_Dependency_Access is begin return AMF.UML.Dependencies.UML_Dependency_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.Utp_Attributes.Internal_Get_Base_Dependency (Self.Element))); end Get_Base_Dependency; ------------------------- -- Set_Base_Dependency -- ------------------------- overriding procedure Set_Base_Dependency (Self : not null access Utp_Default_Application_Proxy; To : AMF.UML.Dependencies.UML_Dependency_Access) is begin AMF.Internals.Tables.Utp_Attributes.Internal_Set_Base_Dependency (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Base_Dependency; -------------------- -- Get_Repetition -- -------------------- overriding function Get_Repetition (Self : not null access constant Utp_Default_Application_Proxy) return AMF.Unlimited_Natural is begin return AMF.Internals.Tables.Utp_Attributes.Internal_Get_Repetition (Self.Element); end Get_Repetition; -------------------- -- Set_Repetition -- -------------------- overriding procedure Set_Repetition (Self : not null access Utp_Default_Application_Proxy; To : AMF.Unlimited_Natural) is begin AMF.Internals.Tables.Utp_Attributes.Internal_Set_Repetition (Self.Element, To); end Set_Repetition; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant Utp_Default_Application_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then AMF.Visitors.Utp_Visitors.Utp_Visitor'Class (Visitor).Enter_Default_Application (AMF.Utp.Default_Applications.Utp_Default_Application_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant Utp_Default_Application_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.Utp_Visitors.Utp_Visitor'Class then AMF.Visitors.Utp_Visitors.Utp_Visitor'Class (Visitor).Leave_Default_Application (AMF.Utp.Default_Applications.Utp_Default_Application_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant Utp_Default_Application_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.Utp_Iterators.Utp_Iterator'Class then AMF.Visitors.Utp_Iterators.Utp_Iterator'Class (Iterator).Visit_Default_Application (Visitor, AMF.Utp.Default_Applications.Utp_Default_Application_Access (Self), Control); end if; end Visit_Element; end AMF.Internals.Utp_Default_Applications;
reznikmm/matreshka
Ada
4,620
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); -- GNAT: enforce generation of preinitialized data section instead of -- generation of elaboration code. package Matreshka.Internals.Unicode.Ucd.Core_01F8 is pragma Preelaborate; Group_01F8 : aliased constant Core_Second_Stage := (16#0C# .. 16#0F# => -- 01F80C .. 01F80F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#48# .. 16#4F# => -- 01F848 .. 01F84F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#5A# .. 16#5F# => -- 01F85A .. 01F85F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#88# .. 16#8F# => -- 01F888 .. 01F88F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#AE# .. 16#FF# => -- 01F8AE .. 01F8FF (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), others => (Other_Symbol, Neutral, Other, Other, Other, Alphabetic, (Grapheme_Base => True, others => False))); end Matreshka.Internals.Unicode.Ucd.Core_01F8;
reznikmm/matreshka
Ada
4,648
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Style.Script_Complex_Attributes is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Style_Script_Complex_Attribute_Node is begin return Self : Style_Script_Complex_Attribute_Node do Matreshka.ODF_Style.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Style_Prefix); end return; end Create; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Style_Script_Complex_Attribute_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Script_Complex_Attribute; end Get_Local_Name; begin Matreshka.DOM_Documents.Register_Attribute (Matreshka.ODF_String_Constants.Style_URI, Matreshka.ODF_String_Constants.Script_Complex_Attribute, Style_Script_Complex_Attribute_Node'Tag); end Matreshka.ODF_Style.Script_Complex_Attributes;
jrcarter/Ada_GUI
Ada
3,106
ads
-- -- -- procedure Copyright (c) Dmitry A. Kazakov -- -- Parsers.Generic_Source.Get_Token Luebeck -- -- Interface Summer, 2005 -- -- -- -- Last revision : 11:37 13 Oct 2007 -- -- -- -- This library is free software; you can redistribute it and/or -- -- modify it under the terms of the GNU General Public License as -- -- published by the Free Software Foundation; either version 2 of -- -- the License, or (at your option) any later version. This library -- -- is distributed in the hope that it will be useful, but WITHOUT -- -- ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have -- -- received a copy of the GNU General Public License along with -- -- this library; if not, write to the Free Software Foundation, -- -- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from -- -- this unit, or you link this unit with other files to produce an -- -- executable, this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- --____________________________________________________________________-- -- -- Get_Token -- Get a token in the source -- -- Code - The source code -- Folder - The table of tokens to match the source against -- Token - The token matched -- Got_It - Set to false if no token was matched -- -- This generic procedure matches the tokens from the table Folder -- against Code. When a token there is matched the value associated -- with it is set into Token and Got_It is set to True. The source -- cursor is then advanced behind the token matched. The longest -- possible token is always matched. When no token matches the source -- Got_It is set to False. The procedure is generic. The parameter is -- an instance of the package Tables. Note that Folder can be any -- descendant of the table type defined in Tables. This includes the -- case-insensitive tables provided by Tables.Names. -- with Tables; generic with package Tokens is new Tables (<>); procedure Parsers.Generic_Source.Get_Token ( Code : in out Source_Type; Folder : Tokens.Table'Class; Token : out Tokens.Tag; Got_It : out Boolean );
datdojp/davu
Ada
751
ads
var ads_zone1615 = new zone(1615, {"html":" <div id=\"slot1\">slot1_content<\/div>","css":"","slot":1,"effect":[0,0],"slots_rotate":null,"slot_type":null,"banner_default":[0,0],"sort_banner_slot":[0,0],"auto_change":false,"cp_zone":0}, 0, 0, null);ads_zone1615.addBanners({"83684":{"bid":83684,"title":"","type":"html","link":null,"alt":null,"src":"<div id=\"ssvzone_1616\"><\/div><script type=\"text\/javascript\" src=\"http:\/\/admicro1.vcmedia.vn\/cpc\/ssvzone_1616.js\" id=\"Script_zone_1616\"><\/script>","width":0,"height":0,"slotIdx":1,"attr":null,"terms":null,"cpname":"1007331","counter":null,"iframe":0,"fix_ie":0,"sort":0,"link_clicks":null,"link_views":null,"location":"","weight":0,"rank":0,"freq":0,"cpm":0}});ads_zone1615.drawZoneTag();
BrickBot/Bound-T-H8-300
Ada
6,325
adb
-- Options.Interval_Sets (body) -- -- A component of the Bound-T Worst-Case Execution Time Tool. -- ------------------------------------------------------------------------------- -- Copyright (c) 1999 .. 2015 Tidorum Ltd -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above copyright notice, -- this list of conditions and the following disclaimer in the documentation -- and/or other materials provided with the distribution. -- -- This software is provided by the copyright holders and contributors "as is" and -- any express or implied warranties, including, but not limited to, the implied -- warranties of merchantability and fitness for a particular purpose are -- disclaimed. In no event shall the copyright owner or contributors be liable for -- any direct, indirect, incidental, special, exemplary, or consequential damages -- (including, but not limited to, procurement of substitute goods or services; -- loss of use, data, or profits; or business interruption) however caused and -- on any theory of liability, whether in contract, strict liability, or tort -- (including negligence or otherwise) arising in any way out of the use of this -- software, even if advised of the possibility of such damage. -- -- Other modules (files) of this software composition should contain their -- own copyright statements, which may have different copyright and usage -- conditions. The above conditions apply to this file. ------------------------------------------------------------------------------- -- -- $Revision: 1.3 $ -- $Date: 2015/10/24 20:05:50 $ -- -- $Log: options-interval_sets.adb,v $ -- Revision 1.3 2015/10/24 20:05:50 niklas -- Moved to free licence. -- -- Revision 1.2 2014/06/01 10:35:35 niklas -- Added the query function Is_Empty. -- -- Revision 1.1 2013-02-03 12:32:36 niklas -- First version. -- with Storage.Bounds.Get; package body Options.Interval_Sets is procedure Add ( Item : in Storage.Bounds.Interval_T; To : in out Interval_Set_T) is use Storage.Bounds; use type Storage.Value_T; Before : Natural := 0; -- The index of the last interval in the set that lies entirely -- before the new interval, with some gap in between, or zero -- if there is no such interval in the set. After : Positive := Length (To) + 1; -- The index of the first interval in the set that lies entirely -- after the new interval, or Length (To) + 1 if there is no -- such interval in the set. Merged : Storage.Bounds.Interval_T := Item; -- The new interval (Item) merged with any intersecting -- or contiguous intervals already in the set. Int : Storage.Bounds.Interval_T; -- An interval from the set. begin if not Void (Item) then -- Find Before and After: for T in First (To) .. Last (To) loop Int := Element (To, T); if (Known (Int.Max) and Known (Item.Min)) and then (Value (Int.Max) < Value (Item.Min) - 1) then -- This Int lies entirely before the new Item, with -- some gap in between. Before := T; end if; if (Known (Int.Min) and Known (Item.Max)) and then (Value (Int.Min) > Value (Item.Max) + 1) then -- This Int lies entirely after the new Item, with -- some gap in between. After := T; exit; -- No point in looking further -- all the later -- intervals will also lie after Item, since the -- intervals are listed in increasing order. end if; end loop; -- The intervals between Before and After (exclusive), if -- any, either intersect the new interval or are contiguous -- with it. These intervals shall be included in the Merged -- interval and then replaced with the Merged interval: for T in Before + 1 .. After - 1 loop Merged := Merged or Element (To, T); end loop; -- The following is a bit wasteful in that it drops all -- the old intervals and then inserts the new one. It would -- be a bit faster to drop all but one of the old intervals -- (when there are some old intervals) and then replace the -- remaining old interval with the new one. Drop_Slice ( First_Drop => Before + 1, Last_Drop => After - 1, From => To); Insert ( Vector => To, Index => Before + 1, Value => Merged); end if; end Add; function Is_Empty (Set : Interval_Set_T) return Boolean is begin return Length (Set) > 0; end Is_Empty; function Max ( Left : Storage.Value_T; Right : Interval_Set_T) return Storage.Value_T is begin if Length (Right) = 0 then -- There are no intervals in the Right set. return Left; else return Storage.Value_T'Max ( Left, Storage.Bounds.Value (Element (Right, Last (Right)).Max)); end if; end Max; overriding function Type_And_Default (Option : access Option_T) return String is begin return "Set of integer intervals, empty by default"; end Type_And_Default; overriding procedure Reset (Option : access Option_T) is begin Truncate_Length (Vector => Option.Value, To => 0); end Reset; overriding procedure Set ( Option : access Option_T; Value : in String) is begin Add ( Item => Storage.Bounds.Get.Interval_Value (From => Value), To => Option.Value); end Set; function To_List (Option : Option_T) return Storage.Bounds.Interval_List_T is begin return To_Vector (Option.Value); end To_List; end Options.Interval_Sets;
kontena/ruby-packer
Ada
5,836
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Form_Demo -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.16 $ -- $Date: 2011/03/23 00:44:12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; with Terminal_Interface.Curses.Forms.Field_User_Data; with Sample.My_Field_Type; use Sample.My_Field_Type; with Sample.Explanation; use Sample.Explanation; with Sample.Form_Demo.Aux; use Sample.Form_Demo.Aux; with Sample.Function_Key_Setting; use Sample.Function_Key_Setting; with Sample.Form_Demo.Handler; with Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; with Terminal_Interface.Curses.Forms.Field_Types.Enumeration; use Terminal_Interface.Curses.Forms.Field_Types.Enumeration; with Terminal_Interface.Curses.Forms.Field_Types.IntField; use Terminal_Interface.Curses.Forms.Field_Types.IntField; package body Sample.Form_Demo is type User_Data is record Data : Integer; end record; type User_Access is access User_Data; package Fld_U is new Terminal_Interface.Curses.Forms.Field_User_Data (User_Data, User_Access); type Weekday is (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); package Weekday_Enum is new Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada (Weekday); Enum_Field : constant Enumeration_Field := Weekday_Enum.Create; procedure Demo is Mft : constant My_Data := (Ch => 'X'); FA : Field_Array_Access := new Field_Array' (Make (0, 14, "Sample Entry Form"), Make (2, 0, "WeekdayEnumeration"), Make (2, 20, "Numeric 1-10"), Make (2, 34, "Only 'X'"), Make (5, 0, "Multiple Lines offscreen(Scroll)"), Make (Width => 18, Top => 3, Left => 0), Make (Width => 12, Top => 3, Left => 20), Make (Width => 12, Top => 3, Left => 34), Make (Width => 46, Top => 6, Left => 0, Height => 4, Off_Screen => 2), Null_Field ); Frm : Terminal_Interface.Curses.Forms.Form := Create (FA); I_F : constant Integer_Field := (Precision => 0, Lower_Limit => 1, Upper_Limit => 10); F1, F2 : User_Access; package Fh is new Sample.Form_Demo.Handler (Default_Driver); begin Push_Environment ("FORM00"); Notepad ("FORM-PAD00"); Default_Labels; Set_Field_Type (FA.all (6), Enum_Field); Set_Field_Type (FA.all (7), I_F); Set_Field_Type (FA.all (8), Mft); F1 := new User_Data'(Data => 4711); Fld_U.Set_User_Data (FA.all (1), F1); Fh.Drive_Me (Frm); Fld_U.Get_User_Data (FA.all (1), F2); pragma Assert (F1 = F2); pragma Assert (F1.Data = F2.Data); Pop_Environment; Delete (Frm); Free (FA, True); end Demo; end Sample.Form_Demo;
charlie5/lace
Ada
143
ads
with any_Math.any_Statistics; package float_Math.Statistics is new float_Math.any_Statistics; pragma Pure (float_Math.Statistics);
sungyeon/drake
Ada
315
ads
pragma License (Unrestricted); -- extended unit with Ada.Environment_Encoding.Generic_Strings; package Ada.Environment_Encoding.Strings is new Generic_Strings ( Character, String); -- Encoding / decoding between String and various encodings. pragma Preelaborate (Ada.Environment_Encoding.Strings);
sungyeon/drake
Ada
1,037
adb
with System.Formatting.Literals; with System.Long_Long_Integer_Types; with System.Value_Errors; package body System.Val_Int is subtype Word_Integer is Long_Long_Integer_Types.Word_Integer; -- implementation function Value_Integer (Str : String) return Integer is Last : Natural; Result : Word_Integer; Error : Boolean; begin Formatting.Literals.Get_Literal (Str, Last, Result, Error); if not Error and then ( Standard'Word_Size = Integer'Size or else Result in Word_Integer (Integer'First) .. Word_Integer (Integer'Last)) then Formatting.Literals.Check_Last (Str, Last, Error); if not Error then return Integer (Result); end if; end if; Value_Errors.Raise_Discrete_Value_Failure ("Integer", Str); declare Uninitialized : Integer; pragma Unmodified (Uninitialized); begin return Uninitialized; end; end Value_Integer; end System.Val_Int;
stcarrez/ada-util
Ada
5,480
ads
----------------------------------------------------------------------- -- util-dates -- Date utilities -- Copyright (C) 2011, 2013, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; with Ada.Calendar.Formatting; with Ada.Calendar.Arithmetic; with Ada.Calendar.Time_Zones; -- = Date Utilities = -- The `Util.Dates` package provides various date utilities to help in formatting and parsing -- dates in various standard formats. It completes the standard `Ada.Calendar.Formatting` and -- other packages by implementing specific formatting and parsing. To use the packages -- described here, use the following GNAT project: -- -- with "utilada_base"; -- -- == Date Operations == -- Several operations allow to compute from a given date: -- -- * `Get_Day_Start`: The start of the day (0:00), -- * `Get_Day_End`: The end of the day (23:59:59), -- * `Get_Week_Start`: The start of the week, -- * `Get_Week_End`: The end of the week, -- * `Get_Month_Start`: The start of the month, -- * `Get_Month_End`: The end of the month -- -- The `Date_Record` type represents a date in a split format allowing -- to access easily the day, month, hour and other information. -- -- Now : Ada.Calendar.Time := Ada.Calendar.Clock; -- Week_Start : Ada.Calendar.Time := Get_Week_Start (Now); -- Week_End : Ada.Calendar.Time := Get_Week_End (Now); -- -- @include util-dates-rfc7231.ads -- @include util-dates-iso8601.ads -- @include util-dates-formats.ads package Util.Dates is -- The Unix equivalent of 'struct tm'. type Date_Record is record Date : Ada.Calendar.Time; Year : Ada.Calendar.Year_Number := 1901; Month : Ada.Calendar.Month_Number := 1; Month_Day : Ada.Calendar.Day_Number := 1; Day : Ada.Calendar.Formatting.Day_Name := Ada.Calendar.Formatting.Tuesday; Hour : Ada.Calendar.Formatting.Hour_Number := 0; Minute : Ada.Calendar.Formatting.Minute_Number := 0; Second : Ada.Calendar.Formatting.Second_Number := 0; Sub_Second : Ada.Calendar.Formatting.Second_Duration := 0.0; Time_Zone : Ada.Calendar.Time_Zones.Time_Offset := 0; Leap_Second : Boolean := False; end record; -- Split the date into a date record (See Ada.Calendar.Formatting.Split). procedure Split (Into : out Date_Record; Date : in Ada.Calendar.Time; Time_Zone : in Ada.Calendar.Time_Zones.Time_Offset := 0); -- Return the date from the date record (See Ada.Calendar.Formatting.Time_Of). function Time_Of (Date : in Date_Record) return Ada.Calendar.Time; -- Returns true if the given year is a leap year. function Is_Leap_Year (Year : in Ada.Calendar.Year_Number) return Boolean; -- Returns true if both dates are on the same day. function Is_Same_Day (Date1, Date2 : in Ada.Calendar.Time) return Boolean; function Is_Same_Day (Date1, Date2 : in Date_Record) return Boolean; -- Get the number of days in the given year. function Get_Day_Count (Year : in Ada.Calendar.Year_Number) return Ada.Calendar.Arithmetic.Day_Count; -- Get the number of days in the given month. function Get_Day_Count (Year : in Ada.Calendar.Year_Number; Month : in Ada.Calendar.Month_Number) return Ada.Calendar.Arithmetic.Day_Count; -- Get a time representing the given date at 00:00:00. function Get_Day_Start (Date : in Date_Record) return Ada.Calendar.Time; function Get_Day_Start (Date : in Ada.Calendar.Time) return Ada.Calendar.Time; -- Get a time representing the given date at 23:59:59. function Get_Day_End (Date : in Date_Record) return Ada.Calendar.Time; function Get_Day_End (Date : in Ada.Calendar.Time) return Ada.Calendar.Time; -- Get a time representing the beginning of the week at 00:00:00. function Get_Week_Start (Date : in Date_Record) return Ada.Calendar.Time; function Get_Week_Start (Date : in Ada.Calendar.Time) return Ada.Calendar.Time; -- Get a time representing the end of the week at 23:59:99. function Get_Week_End (Date : in Date_Record) return Ada.Calendar.Time; function Get_Week_End (Date : in Ada.Calendar.Time) return Ada.Calendar.Time; -- Get a time representing the beginning of the month at 00:00:00. function Get_Month_Start (Date : in Date_Record) return Ada.Calendar.Time; function Get_Month_Start (Date : in Ada.Calendar.Time) return Ada.Calendar.Time; -- Get a time representing the end of the month at 23:59:59. function Get_Month_End (Date : in Date_Record) return Ada.Calendar.Time; function Get_Month_End (Date : in Ada.Calendar.Time) return Ada.Calendar.Time; end Util.Dates;
reznikmm/matreshka
Ada
6,720
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.DOM_Documents; with Matreshka.ODF_String_Constants; with ODF.DOM.Iterators; with ODF.DOM.Visitors; package body Matreshka.ODF_Anim.Par_Elements is ------------ -- Create -- ------------ overriding function Create (Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters) return Anim_Par_Element_Node is begin return Self : Anim_Par_Element_Node do Matreshka.ODF_Anim.Constructors.Initialize (Self'Unchecked_Access, Parameters.Document, Matreshka.ODF_String_Constants.Anim_Prefix); end return; end Create; ---------------- -- Enter_Node -- ---------------- overriding procedure Enter_Node (Self : not null access Anim_Par_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Enter_Anim_Par (ODF.DOM.Anim_Par_Elements.ODF_Anim_Par_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Enter_Node (Visitor, Control); end if; end Enter_Node; -------------------- -- Get_Local_Name -- -------------------- overriding function Get_Local_Name (Self : not null access constant Anim_Par_Element_Node) return League.Strings.Universal_String is pragma Unreferenced (Self); begin return Matreshka.ODF_String_Constants.Par_Element; end Get_Local_Name; ---------------- -- Leave_Node -- ---------------- overriding procedure Leave_Node (Self : not null access Anim_Par_Element_Node; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then ODF.DOM.Visitors.Abstract_ODF_Visitor'Class (Visitor).Leave_Anim_Par (ODF.DOM.Anim_Par_Elements.ODF_Anim_Par_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Leave_Node (Visitor, Control); end if; end Leave_Node; ---------------- -- Visit_Node -- ---------------- overriding procedure Visit_Node (Self : not null access Anim_Par_Element_Node; Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class; Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class; Control : in out XML.DOM.Visitors.Traverse_Control) is begin if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then ODF.DOM.Iterators.Abstract_ODF_Iterator'Class (Iterator).Visit_Anim_Par (Visitor, ODF.DOM.Anim_Par_Elements.ODF_Anim_Par_Access (Self), Control); else Matreshka.DOM_Elements.Abstract_Element_Node (Self.all).Visit_Node (Iterator, Visitor, Control); end if; end Visit_Node; begin Matreshka.DOM_Documents.Register_Element (Matreshka.ODF_String_Constants.Anim_URI, Matreshka.ODF_String_Constants.Par_Element, Anim_Par_Element_Node'Tag); end Matreshka.ODF_Anim.Par_Elements;
Ximalas/synth
Ada
71,848
adb
-- This file is covered by the Internet Software Consortium (ISC) License -- Reference: ../License.txt with Ada.Command_Line; with Ada.Strings.Fixed; with PortScan.Ops; with PortScan.Packages; with PortScan.Buildcycle.Ports; with PortScan.Buildcycle.Pkgsrc; with Signals; with Unix; package body PortScan.Pilot is package CLI renames Ada.Command_Line; package ASF renames Ada.Strings.Fixed; package OPS renames PortScan.Ops; package PKG renames PortScan.Packages; package CYC renames PortScan.Buildcycle; package FPC renames PortScan.Buildcycle.Ports; package NPS renames PortScan.Buildcycle.Pkgsrc; package SIG renames Signals; --------------------- -- store_origins -- --------------------- function store_origins return Boolean is function trimmed_catport (S : String) return String; function trimmed_catport (S : String) return String is last : constant Natural := S'Last; begin if S (last) = '/' then return S (S'First .. last - 1); else return S (S'First .. last); end if; end trimmed_catport; begin if CLI.Argument_Count <= 1 then return False; end if; portlist.Clear; load_index_for_store_origins; if CLI.Argument_Count = 2 then -- Check if this is a file declare Arg2 : constant String := trimmed_catport (CLI.Argument (2)); vfresult : Boolean; begin if AD.Exists (Arg2) then vfresult := valid_file (Arg2); clear_store_origin_data; return vfresult; end if; if input_origin_valid (candidate => Arg2) then if Arg2 /= pkgng then plinsert (Arg2, 2); end if; clear_store_origin_data; return True; else suggest_flavor_for_bad_origin (candidate => Arg2); clear_store_origin_data; return False; end if; end; end if; for k in 2 .. CLI.Argument_Count loop declare Argk : constant String := trimmed_catport (CLI.Argument (k)); begin if input_origin_valid (candidate => Argk) then if Argk /= pkgng then plinsert (Argk, k); end if; else suggest_flavor_for_bad_origin (candidate => Argk); clear_store_origin_data; return False; end if; end; end loop; clear_store_origin_data; return True; end store_origins; ------------------------------- -- prerequisites_available -- ------------------------------- function prerequisites_available return Boolean is begin case software_framework is when ports_collection => return build_pkg8_as_necessary; when pkgsrc => return build_pkgsrc_prerequisites; end case; end prerequisites_available; ------------------------------- -- build_pkg8_as_necessary -- ------------------------------- function build_pkg8_as_necessary return Boolean is pkg_good : Boolean; good_scan : Boolean; stop_now : Boolean; selection : PortScan.port_id; result : Boolean := True; begin OPS.initialize_hooks; REP.initialize (testmode => False, num_cores => PortScan.cores_available); REP.launch_slave (id => PortScan.scan_slave, opts => noprocs); good_scan := PortScan.scan_single_port (catport => pkgng, always_build => False, fatal => stop_now); if good_scan then PortScan.set_build_priority; else TIO.Put_Line ("Unexpected pkg(8) scan failure!"); result := False; goto clean_exit; end if; PKG.limited_sanity_check (repository => JT.USS (PM.configuration.dir_repository), dry_run => False, suppress_remote => True); if SIG.graceful_shutdown_requested or else PKG.queue_is_empty then goto clean_exit; end if; CYC.initialize (test_mode => False, jail_env => REP.jail_environment); selection := OPS.top_buildable_port; if SIG.graceful_shutdown_requested or else selection = port_match_failed then goto clean_exit; end if; TIO.Put ("Stand by, building pkg(8) first ... "); pkg_good := FPC.build_package (id => PortScan.scan_slave, sequence_id => selection); OPS.run_hook_after_build (pkg_good, selection); if not pkg_good then TIO.Put_Line ("Failed!!" & bailing); result := False; goto clean_exit; end if; TIO.Put_Line ("done!"); <<clean_exit>> if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); result := False; end if; REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; reset_ports_tree; return result; end build_pkg8_as_necessary; ---------------------------------- -- build_pkgsrc_prerequisites -- ---------------------------------- function build_pkgsrc_prerequisites return Boolean is function scan_it (the_catport : String) return Boolean; function build_it (desc : String) return Boolean; mk_files : constant String := "pkgtools/bootstrap-mk-files"; cp_bmake : constant String := "devel/bmake"; cp_digest : constant String := "pkgtools/digest"; result : Boolean := True; function scan_it (the_catport : String) return Boolean is good_scan : Boolean; stop_now : Boolean; begin good_scan := PortScan.scan_single_port (catport => the_catport, always_build => False, fatal => stop_now); if good_scan then PortScan.set_build_priority; else TIO.Put_Line ("Unexpected " & the_catport & " scan failure!"); return False; end if; PKG.limited_sanity_check (repository => JT.USS (PM.configuration.dir_repository), dry_run => False, suppress_remote => True); if SIG.graceful_shutdown_requested then return False; end if; return True; end scan_it; function build_it (desc : String) return Boolean is pkg_good : Boolean; selection : PortScan.port_id; begin CYC.initialize (test_mode => False, jail_env => REP.jail_environment); selection := OPS.top_buildable_port; if SIG.graceful_shutdown_requested or else selection = port_match_failed then return False; end if; TIO.Put ("Stand by, building " & desc & " package ... "); pkg_good := NPS.build_package (id => PortScan.scan_slave, sequence_id => selection); OPS.run_hook_after_build (pkg_good, selection); if not pkg_good then TIO.Put_Line ("Failed!!" & bailing); return False; end if; TIO.Put_Line ("done!"); return True; end build_it; begin OPS.initialize_hooks; REP.initialize (testmode => False, num_cores => PortScan.cores_available); REP.launch_slave (id => PortScan.scan_slave, opts => npsboot); if not PLAT.host_pkgsrc_mk_install (id => PortScan.scan_slave) or else not PLAT.host_pkgsrc_bmake_install (id => PortScan.scan_slave) or else not PLAT.host_pkgsrc_pkg8_install (id => PortScan.scan_slave) then TIO.Put_Line ("Failed to install programs from host system."); result := False; goto clean_exit; end if; result := scan_it (mk_files); if not result then goto clean_exit; end if; if not PKG.queue_is_empty then -- the mk files package does not exist or requires rebuilding result := build_it ("mk files"); if not result then goto clean_exit; end if; end if; reset_ports_tree; result := scan_it (cp_bmake); if not result then goto clean_exit; end if; if not PKG.queue_is_empty then -- the bmake package does not exist or requires rebuilding result := build_it ("bmake"); if not result then goto clean_exit; end if; end if; reset_ports_tree; result := scan_it (cp_digest); if not result then goto clean_exit; end if; if not PKG.queue_is_empty then -- the digest package does not exist or requires rebuilding result := build_it ("digest"); if not result then goto clean_exit; end if; end if; reset_ports_tree; result := scan_it (pkgng); if not result then goto clean_exit; end if; if not PKG.queue_is_empty then -- the pkg(8) package does not exist or requires rebuilding result := build_it ("pkg(8)"); end if; <<clean_exit>> if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); result := False; end if; REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; reset_ports_tree; return result; end build_pkgsrc_prerequisites; ---------------------------------- -- scan_stack_of_single_ports -- ---------------------------------- function scan_stack_of_single_ports (testmode : Boolean; always_build : Boolean := False) return Boolean is procedure scan (plcursor : portkey_crate.Cursor); successful : Boolean := True; just_stop_now : Boolean; procedure scan (plcursor : portkey_crate.Cursor) is origin : constant String := JT.USS (portkey_crate.Key (plcursor)); begin if not successful then return; end if; if origin = pkgng then -- we've already built pkg(8) if we get here, just skip it return; end if; if SIG.graceful_shutdown_requested then successful := False; return; end if; if not PortScan.scan_single_port (origin, always_build, just_stop_now) then if just_stop_now then successful := False; else TIO.Put_Line ("Scan of " & origin & " failed" & PortScan.obvious_problem (JT.USS (PM.configuration.dir_portsdir), origin) & ", it will not be considered."); end if; end if; end scan; begin REP.initialize (testmode, PortScan.cores_available); REP.launch_slave (id => PortScan.scan_slave, opts => noprocs); if SIG.graceful_shutdown_requested then goto clean_exit; end if; if not PLAT.standalone_pkg8_install (PortScan.scan_slave) then TIO.Put_Line ("Failed to install pkg(8) scanner" & bailing); successful := False; goto clean_exit; end if; portlist.Iterate (Process => scan'Access); if successful then PortScan.set_build_priority; if PKG.queue_is_empty then successful := False; TIO.Put_Line ("There are no valid ports to build." & bailing); end if; end if; <<clean_exit>> if SIG.graceful_shutdown_requested then successful := False; TIO.Put_Line (shutreq); end if; REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; return successful; end scan_stack_of_single_ports; --------------------------------- -- sanity_check_then_prefail -- --------------------------------- function sanity_check_then_prefail (delete_first : Boolean := False; dry_run : Boolean := False) return Boolean is procedure force_delete (plcursor : portkey_crate.Cursor); ptid : PortScan.port_id; num_skipped : Natural; block_remote : Boolean := True; update_external_repo : constant String := host_pkg8 & " update --quiet --repository "; no_packages : constant String := "No prebuilt packages will be used as a result."; procedure force_delete (plcursor : portkey_crate.Cursor) is origin : JT.Text := portkey_crate.Key (plcursor); pndx : constant port_index := ports_keys.Element (origin); tball : constant String := JT.USS (PM.configuration.dir_repository) & "/" & JT.USS (all_ports (pndx).package_name); begin if AD.Exists (tball) then AD.Delete_File (tball); end if; end force_delete; begin start_time := CAL.Clock; if delete_first and then not dry_run then portlist.Iterate (Process => force_delete'Access); end if; case software_framework is when ports_collection => if not PKG.limited_cached_options_check then -- Error messages emitted by function return False; end if; when pkgsrc => -- There's no analog to cached options on pkgsc. -- We could detect unused settings, but that's it. -- And maybe that should be detected by the framework itself null; end case; if PM.configuration.defer_prebuilt then -- Before any remote operations, find the external repo if PKG.located_external_repository then block_remote := False; -- We're going to use prebuilt packages if available, so let's -- prepare for that case by updating the external repository TIO.Put ("Stand by, updating external repository catalogs ... "); if not Unix.external_command (update_external_repo & PKG.top_external_repository) then TIO.Put_Line ("Failed!"); TIO.Put_Line ("The external repository could not be updated."); TIO.Put_Line (no_packages); block_remote := True; else TIO.Put_Line ("done."); end if; else TIO.Put_Line ("The external repository does not seem to be " & "configured."); TIO.Put_Line (no_packages); end if; end if; OPS.run_start_hook; PKG.limited_sanity_check (repository => JT.USS (PM.configuration.dir_repository), dry_run => dry_run, suppress_remote => block_remote); bld_counter := (OPS.queue_length, 0, 0, 0, 0); if dry_run then return True; end if; if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); return False; end if; OPS.delete_existing_web_history_files; start_logging (total); start_logging (ignored); start_logging (skipped); start_logging (success); start_logging (failure); loop ptid := OPS.next_ignored_port; exit when ptid = PortScan.port_match_failed; exit when SIG.graceful_shutdown_requested; bld_counter (ignored) := bld_counter (ignored) + 1; TIO.Put_Line (Flog (total), CYC.elapsed_now & " " & OPS.port_name (ptid) & " has been ignored: " & OPS.ignore_reason (ptid)); TIO.Put_Line (Flog (ignored), CYC.elapsed_now & " " & OPS.port_name (ptid) & ": " & OPS.ignore_reason (ptid)); OPS.cascade_failed_build (id => ptid, numskipped => num_skipped, logs => Flog); OPS.record_history_ignored (elapsed => CYC.elapsed_now, origin => OPS.port_name (ptid), reason => OPS.ignore_reason (ptid), skips => num_skipped); bld_counter (skipped) := bld_counter (skipped) + num_skipped; end loop; stop_logging (ignored); TIO.Put_Line (Flog (total), CYC.elapsed_now & " Sanity check complete. " & "Ports remaining to build:" & OPS.queue_length'Img); TIO.Flush (Flog (total)); if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); else if OPS.integrity_intact then return True; end if; end if; -- If here, we either got control-C or failed integrity check if not SIG.graceful_shutdown_requested then TIO.Put_Line ("Queue integrity lost! " & bailing); end if; stop_logging (total); stop_logging (skipped); stop_logging (success); stop_logging (failure); return False; end sanity_check_then_prefail; ------------------------ -- perform_bulk_run -- ------------------------ procedure perform_bulk_run (testmode : Boolean) is num_builders : constant builders := PM.configuration.num_builders; show_tally : Boolean := True; begin if PKG.queue_is_empty then TIO.Put_Line ("After inspection, it has been determined that there " & "are no packages that"); TIO.Put_Line ("require rebuilding; the task is therefore complete."); show_tally := False; else REP.initialize (testmode, PortScan.cores_available); CYC.initialize (testmode, REP.jail_environment); OPS.initialize_web_report (num_builders); OPS.initialize_display (num_builders); OPS.parallel_bulk_run (num_builders, Flog); REP.finalize; end if; stop_time := CAL.Clock; stop_logging (total); stop_logging (success); stop_logging (failure); stop_logging (skipped); if show_tally then TIO.Put_Line (LAT.LF & LAT.LF); TIO.Put_Line ("The task is complete. Final tally:"); TIO.Put_Line ("Initial queue size:" & bld_counter (total)'Img); TIO.Put_Line (" packages built:" & bld_counter (success)'Img); TIO.Put_Line (" ignored:" & bld_counter (ignored)'Img); TIO.Put_Line (" skipped:" & bld_counter (skipped)'Img); TIO.Put_Line (" failed:" & bld_counter (failure)'Img); TIO.Put_Line (""); TIO.Put_Line (CYC.log_duration (start_time, stop_time)); TIO.Put_Line ("The build logs can be found at: " & JT.USS (PM.configuration.dir_logs)); end if; end perform_bulk_run; ------------------------------------------- -- verify_desire_to_rebuild_repository -- ------------------------------------------- function verify_desire_to_rebuild_repository return Boolean is answer : Boolean; YN : Character; screen_present : constant Boolean := Unix.screen_attached; begin if not screen_present then return False; end if; if SIG.graceful_shutdown_requested then -- catch previous shutdown request return False; end if; Unix.cone_of_silence (deploy => False); TIO.Put ("Would you like to rebuild the local repository (Y/N)? "); loop TIO.Get_Immediate (YN); case YN is when 'Y' | 'y' => answer := True; exit; when 'N' | 'n' => answer := False; exit; when others => null; end case; end loop; TIO.Put (YN & LAT.LF); Unix.cone_of_silence (deploy => True); return answer; end verify_desire_to_rebuild_repository; ----------------------------------------- -- verify_desire_to_install_packages -- ----------------------------------------- function verify_desire_to_install_packages return Boolean is answer : Boolean; YN : Character; begin Unix.cone_of_silence (deploy => False); TIO.Put ("Would you like to upgrade your system with the new packages now (Y/N)? "); loop TIO.Get_Immediate (YN); case YN is when 'Y' | 'y' => answer := True; exit; when 'N' | 'n' => answer := False; exit; when others => null; end case; end loop; TIO.Put (YN & LAT.LF); Unix.cone_of_silence (deploy => True); return answer; end verify_desire_to_install_packages; ----------------------------- -- fully_scan_ports_tree -- ----------------------------- function fully_scan_ports_tree return Boolean is goodresult : Boolean; begin PortScan.reset_ports_tree; REP.initialize (testmode => False, num_cores => PortScan.cores_available); REP.launch_slave (id => PortScan.scan_slave, opts => noprocs); case software_framework is when ports_collection => null; when pkgsrc => if not PLAT.standalone_pkg8_install (PortScan.scan_slave) then TIO.Put_Line ("Full Tree Scan: Failed to bootstrap builder"); end if; end case; goodresult := PortScan.scan_entire_ports_tree (JT.USS (PM.configuration.dir_portsdir)); REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; if goodresult then PortScan.set_build_priority; return True; else if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); else TIO.Put_Line ("Failed to scan ports tree " & bailing); end if; CLI.Set_Exit_Status (1); return False; end if; end fully_scan_ports_tree; --------------------------------- -- rebuild_local_respository -- --------------------------------- function rebuild_local_respository (remove_invalid_packages : Boolean) return Boolean is repo : constant String := JT.USS (PM.configuration.dir_repository); main : constant String := JT.USS (PM.configuration.dir_packages); xz_meta : constant String := main & "/meta.txz"; xz_digest : constant String := main & "/digests.txz"; xz_pkgsite : constant String := main & "/packagesite.txz"; bs_error : constant String := "Rebuild Repository: Failed to bootstrap builder"; build_res : Boolean; begin if SIG.graceful_shutdown_requested then -- In case it was previously requested return False; end if; if remove_invalid_packages then REP.initialize (testmode => False, num_cores => PortScan.cores_available); REP.launch_slave (id => PortScan.scan_slave, opts => noprocs); case software_framework is when ports_collection => null; when pkgsrc => if not PLAT.standalone_pkg8_install (PortScan.scan_slave) then TIO.Put_Line (bs_error); end if; end case; PKG.preclean_repository (repo); REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); return False; end if; end if; TIO.Put ("Stand by, recursively scanning"); if Natural (portlist.Length) = 1 then TIO.Put (" 1 port"); else TIO.Put (portlist.Length'Img & " ports"); end if; TIO.Put_Line (" serially."); PortScan.reset_ports_tree; if scan_stack_of_single_ports (testmode => False) then PKG.limited_sanity_check (repository => repo, dry_run => False, suppress_remote => True); if SIG.graceful_shutdown_requested then TIO.Put_Line (shutreq); return False; end if; else return False; end if; if AD.Exists (xz_meta) then AD.Delete_File (xz_meta); end if; if AD.Exists (xz_digest) then AD.Delete_File (xz_digest); end if; if AD.Exists (xz_pkgsite) then AD.Delete_File (xz_pkgsite); end if; TIO.Put_Line ("Packages validated, rebuilding local repository."); REP.initialize (testmode => False, num_cores => PortScan.cores_available); REP.launch_slave (id => PortScan.scan_slave, opts => noprocs); case software_framework is when ports_collection => null; when pkgsrc => if not PLAT.standalone_pkg8_install (PortScan.scan_slave) then TIO.Put_Line (bs_error); end if; end case; if valid_signing_command then build_res := REP.build_repository (id => PortScan.scan_slave, sign_command => signing_command); elsif acceptable_RSA_signing_support then build_res := REP.build_repository (PortScan.scan_slave); else build_res := False; end if; REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; if build_res then TIO.Put_Line ("Local repository successfully rebuilt"); return True; else TIO.Put_Line ("Failed to rebuild repository" & bailing); return False; end if; end rebuild_local_respository; ------------------ -- valid_file -- ------------------ function valid_file (path : String) return Boolean is handle : TIO.File_Type; good : Boolean; total : Natural := 0; begin TIO.Open (File => handle, Mode => TIO.In_File, Name => path); good := True; while not TIO.End_Of_File (handle) loop declare line : constant String := JT.trim (TIO.Get_Line (handle)); begin if not JT.IsBlank (line) then if input_origin_valid (candidate => line) then plinsert (line, total); total := total + 1; else suggest_flavor_for_bad_origin (candidate => line); good := False; exit; end if; end if; end; end loop; TIO.Close (handle); return (total > 0) and then good; exception when others => return False; end valid_file; ---------------- -- plinsert -- ---------------- procedure plinsert (key : String; dummy : Natural) is key2 : JT.Text := JT.SUS (key); ptid : constant PortScan.port_id := PortScan.port_id (dummy); begin if not portlist.Contains (key2) then portlist.Insert (key2, ptid); duplist.Insert (key2, ptid); end if; end plinsert; --------------------- -- start_logging -- --------------------- procedure start_logging (flavor : count_type) is logpath : constant String := JT.USS (PM.configuration.dir_logs) & "/" & logname (flavor); begin if AD.Exists (logpath) then AD.Delete_File (logpath); end if; TIO.Create (File => Flog (flavor), Mode => TIO.Out_File, Name => logpath); if flavor = total then TIO.Put_Line (Flog (flavor), "-=> Chronology of last build <=-"); TIO.Put_Line (Flog (flavor), "Started: " & timestamp (start_time)); TIO.Put_Line (Flog (flavor), "Ports to build:" & PKG.original_queue_size'Img); TIO.Put_Line (Flog (flavor), ""); TIO.Put_Line (Flog (flavor), "Purging any ignored/broken ports " & "first ..."); TIO.Flush (Flog (flavor)); end if; exception when others => raise pilot_log with "Failed to create or delete " & logpath & bailing; end start_logging; -------------------- -- stop_logging -- -------------------- procedure stop_logging (flavor : count_type) is begin if flavor = total then TIO.Put_Line (Flog (flavor), "Finished: " & timestamp (stop_time)); TIO.Put_Line (Flog (flavor), CYC.log_duration (start => start_time, stop => stop_time)); TIO.Put_Line (Flog (flavor), LAT.LF & "---------------------------" & LAT.LF & "-- Final Statistics" & LAT.LF & "---------------------------" & LAT.LF & " Initial queue size:" & bld_counter (total)'Img & LAT.LF & " packages built:" & bld_counter (success)'Img & LAT.LF & " ignored:" & bld_counter (ignored)'Img & LAT.LF & " skipped:" & bld_counter (skipped)'Img & LAT.LF & " failed:" & bld_counter (failure)'Img); end if; TIO.Close (Flog (flavor)); end stop_logging; ----------------------- -- purge_distfiles -- ----------------------- procedure purge_distfiles is type disktype is mod 2**64; procedure scan (plcursor : portkey_crate.Cursor); procedure kill (plcursor : portkey_crate.Cursor); procedure walk (name : String); function display_kmg (number : disktype) return String; abort_purge : Boolean := False; bytes_purged : disktype := 0; distfiles : portkey_crate.Map; rmfiles : portkey_crate.Map; procedure scan (plcursor : portkey_crate.Cursor) is origin : JT.Text := portkey_crate.Key (plcursor); tracker : constant port_id := portkey_crate.Element (plcursor); pndx : constant port_index := ports_keys.Element (origin); distinfo : constant String := JT.USS (PM.configuration.dir_portsdir) & "/" & JT.USS (origin) & "/distinfo"; handle : TIO.File_Type; bookend : Natural; begin TIO.Open (File => handle, Mode => TIO.In_File, Name => distinfo); while not TIO.End_Of_File (handle) loop declare Line : String := TIO.Get_Line (handle); begin if Line (1 .. 4) = "SIZE" then bookend := ASF.Index (Line, ")"); declare S : JT.Text := JT.SUS (Line (7 .. bookend - 1)); begin if not distfiles.Contains (S) then distfiles.Insert (S, tracker); end if; exception when failed : others => TIO.Put_Line ("purge_distfiles::scan: " & JT.USS (S)); TIO.Put_Line (EX.Exception_Information (failed)); end; end if; end; end loop; TIO.Close (handle); exception when others => if TIO.Is_Open (handle) then TIO.Close (handle); end if; end scan; procedure walk (name : String) is procedure walkdir (item : AD.Directory_Entry_Type); procedure print (item : AD.Directory_Entry_Type); uniqid : port_id := 0; leftindent : Natural := JT.SU.Length (PM.configuration.dir_distfiles) + 2; procedure walkdir (item : AD.Directory_Entry_Type) is begin if AD.Simple_Name (item) /= "." and then AD.Simple_Name (item) /= ".." then walk (AD.Full_Name (item)); end if; exception when AD.Name_Error => abort_purge := True; TIO.Put_Line ("walkdir: " & name & " directory does not exist"); end walkdir; procedure print (item : AD.Directory_Entry_Type) is FN : constant String := AD.Full_Name (item); tball : JT.Text := JT.SUS (FN (leftindent .. FN'Last)); begin if not distfiles.Contains (tball) then if not rmfiles.Contains (tball) then uniqid := uniqid + 1; rmfiles.Insert (Key => tball, New_Item => uniqid); bytes_purged := bytes_purged + disktype (AD.Size (FN)); end if; end if; end print; begin AD.Search (name, "*", (AD.Ordinary_File => True, others => False), print'Access); AD.Search (name, "", (AD.Directory => True, others => False), walkdir'Access); exception when AD.Name_Error => abort_purge := True; TIO.Put_Line ("The " & name & " directory does not exist"); when AD.Use_Error => abort_purge := True; TIO.Put_Line ("Searching " & name & " directory is not supported"); when failed : others => abort_purge := True; TIO.Put_Line ("purge_distfiles: Unknown error - directory search"); TIO.Put_Line (EX.Exception_Information (failed)); end walk; function display_kmg (number : disktype) return String is type kmgtype is delta 0.01 digits 6; kilo : constant disktype := 1024; mega : constant disktype := kilo * kilo; giga : constant disktype := kilo * mega; XXX : kmgtype; begin if number > giga then XXX := kmgtype (number / giga); return XXX'Img & " gigabytes"; elsif number > mega then XXX := kmgtype (number / mega); return XXX'Img & " megabytes"; else XXX := kmgtype (number / kilo); return XXX'Img & " kilobytes"; end if; end display_kmg; procedure kill (plcursor : portkey_crate.Cursor) is tarball : String := JT.USS (portkey_crate.Key (plcursor)); path : JT.Text := PM.configuration.dir_distfiles; begin JT.SU.Append (path, "/" & tarball); TIO.Put_Line ("Deleting " & tarball); AD.Delete_File (JT.USS (path)); end kill; begin read_flavor_index; TIO.Put ("Scanning the distinfo file of every port in the tree ... "); ports_keys.Iterate (Process => scan'Access); TIO.Put_Line ("done"); walk (name => JT.USS (PM.configuration.dir_distfiles)); if abort_purge then TIO.Put_Line ("Distfile purge operation aborted."); else rmfiles.Iterate (kill'Access); TIO.Put_Line ("Recovered" & display_kmg (bytes_purged)); end if; end purge_distfiles; ------------------------------------------ -- write_pkg_repos_configuration_file -- ------------------------------------------ function write_pkg_repos_configuration_file return Boolean is repdir : constant String := get_repos_dir; target : constant String := repdir & "/00_synth.conf"; pkgdir : constant String := JT.USS (PM.configuration.dir_packages); pubkey : constant String := PM.synth_confdir & "/" & JT.USS (PM.configuration.profile) & "-public.key"; keydir : constant String := PM.synth_confdir & "/keys"; tstdir : constant String := keydir & "/trusted"; autgen : constant String := "# Automatically generated." & LAT.LF; fpfile : constant String := tstdir & "/fingerprint." & JT.USS (PM.configuration.profile); handle : TIO.File_Type; vscmd : Boolean := False; begin if AD.Exists (target) then AD.Delete_File (target); elsif not AD.Exists (repdir) then AD.Create_Path (repdir); end if; TIO.Create (File => handle, Mode => TIO.Out_File, Name => target); TIO.Put_Line (handle, autgen); TIO.Put_Line (handle, "Synth: {"); TIO.Put_Line (handle, " url : file://" & pkgdir & ","); TIO.Put_Line (handle, " priority : 0,"); TIO.Put_Line (handle, " enabled : yes,"); if valid_signing_command then vscmd := True; TIO.Put_Line (handle, " signature_type : FINGERPRINTS,"); TIO.Put_Line (handle, " fingerprints : " & keydir); elsif set_synth_conf_with_RSA then TIO.Put_Line (handle, " signature_type : PUBKEY,"); TIO.Put_Line (handle, " pubkey : " & pubkey); end if; TIO.Put_Line (handle, "}"); TIO.Close (handle); if vscmd then if AD.Exists (fpfile) then AD.Delete_File (fpfile); elsif not AD.Exists (tstdir) then AD.Create_Path (tstdir); end if; TIO.Create (File => handle, Mode => TIO.Out_File, Name => fpfile); TIO.Put_Line (handle, autgen); TIO.Put_Line (handle, "function : sha256"); TIO.Put_Line (handle, "fingerprint : " & profile_fingerprint); TIO.Close (handle); end if; return True; exception when others => TIO.Put_Line ("Error: failed to create " & target); if TIO.Is_Open (handle) then TIO.Close (handle); end if; return False; end write_pkg_repos_configuration_file; --------------------------------- -- upgrade_system_everything -- --------------------------------- procedure upgrade_system_everything (skip_installation : Boolean := False; dry_run : Boolean := False) is command : constant String := host_pkg8 & " upgrade --yes --repository Synth"; query : constant String := host_pkg8 & " query -a %o:%n"; sorry : constant String := "Unfortunately, the system upgrade failed."; begin if not prescanned then read_flavor_index; end if; portlist.Clear; TIO.Put_Line ("Querying system about current package installations."); begin declare comres : constant String := JT.USS (CYC.generic_system_command (query)); markers : JT.Line_Markers; uniqid : Natural := 0; begin JT.initialize_markers (comres, markers); loop exit when not JT.next_line_present (comres, markers); declare line : constant String := JT.extract_line (comres, markers); origin : constant String := JT.part_1 (line, ":"); pkgbase : constant String := JT.part_2 (line, ":"); flvquery : constant String := host_pkg8 & " query %At:%Av " & pkgbase; errprefix : constant String := "Installed package ignored, "; origintxt : JT.Text := JT.SUS (origin); target_id : port_id := port_match_failed; maxprobe : port_index := port_index (so_serial.Length) - 1; found_it : Boolean := False; flvresult : JT.Text; begin -- This approach isn't the greatest, but we're missing information. -- At this port, all_ports array is not populated, so we can't compare the -- package names to determine flavors. So what we do is search so_serial -- for the origin. If it exists, the port has no flavors and we take the -- target id. Otherwise, we have to query the system for the installed -- flavor. It it fail on pre-flavor installations, though. Once all packages -- are completely replaced, this approach should work fine. if so_porthash.Contains (origintxt) then if so_serial.Contains (origintxt) then target_id := so_porthash.Element (origintxt); found_it := True; else flvresult := CYC.generic_system_command (flvquery); declare contents : constant String := JT.USS (flvresult); markers : JT.Line_Markers; begin JT.initialize_markers (contents, markers); if JT.next_line_with_content_present (contents, "flavor:", markers) then declare line : constant String := JT.extract_line (contents, markers); flvorigin : JT.Text; begin flvorigin := JT.SUS (origin & "@" & JT.part_2 (line, ":")); if so_serial.Contains (flvorigin) then target_id := so_serial.Find_Index (flvorigin); found_it := True; end if; end; end if; end; end if; if found_it then uniqid := uniqid + 1; plinsert (get_catport (all_ports (target_id)), uniqid); else TIO.Put_Line (errprefix & origin & " package unmatched"); end if; else TIO.Put_Line (errprefix & "missing from ports: " & origin); end if; end; end loop; end; exception when others => TIO.Put_Line (sorry & " (system query)"); return; end; TIO.Put_Line ("Stand by, comparing installed packages against the ports tree."); if prerequisites_available and then scan_stack_of_single_ports (testmode => False) and then sanity_check_then_prefail (delete_first => False, dry_run => dry_run) then if dry_run then display_results_of_dry_run; return; else perform_bulk_run (testmode => False); end if; else if not SIG.graceful_shutdown_requested then TIO.Put_Line (sorry); end if; return; end if; if SIG.graceful_shutdown_requested then return; end if; if rebuild_local_respository (remove_invalid_packages => True) then if not skip_installation then if not Unix.external_command (command) then TIO.Put_Line (sorry); end if; end if; end if; end upgrade_system_everything; ------------------------------ -- upgrade_system_exactly -- ------------------------------ procedure upgrade_system_exactly is procedure build_train (plcursor : portkey_crate.Cursor); base_command : constant String := host_pkg8 & " install --yes --repository Synth"; caboose : JT.Text; procedure build_train (plcursor : portkey_crate.Cursor) is full_origin : JT.Text renames portkey_crate.Key (plcursor); pix : constant port_index := ports_keys.Element (full_origin); pkgfile : constant String := JT.USS (all_ports (pix).package_name); begin JT.SU.Append (caboose, " " & JT.head (pkgfile, ".")); end build_train; begin duplist.Iterate (Process => build_train'Access); declare command : constant String := base_command & JT.USS (caboose); begin if not Unix.external_command (command) then TIO.Put_Line ("Unfortunately, the system upgraded failed."); end if; end; end upgrade_system_exactly; ------------------------------- -- insufficient_privileges -- ------------------------------- function insufficient_privileges return Boolean is command : constant String := "/usr/bin/id -u"; result : JT.Text := CYC.generic_system_command (command); topline : JT.Text; begin JT.nextline (lineblock => result, firstline => topline); declare resint : constant Integer := Integer'Value (JT.USS (topline)); begin return (resint /= 0); end; end insufficient_privileges; --------------- -- head_n1 -- --------------- function head_n1 (filename : String) return String is handle : TIO.File_Type; begin TIO.Open (File => handle, Mode => TIO.In_File, Name => filename); if TIO.End_Of_File (handle) then TIO.Close (handle); return ""; end if; declare line : constant String := TIO.Get_Line (handle); begin TIO.Close (handle); return line; end; end head_n1; ----------------------- -- already_running -- ----------------------- function already_running return Boolean is pid : Integer; comres : JT.Text; begin if AD.Exists (pidfile) then declare textpid : constant String := head_n1 (pidfile); command : constant String := "/bin/ps -p " & textpid; begin -- test if valid by converting it (exception if fails) pid := Integer'Value (textpid); -- exception raised by line below if pid not found. comres := CYC.generic_system_command (command); if JT.contains (comres, "synth") then return True; else -- pidfile is obsolete, remove it. AD.Delete_File (pidfile); return False; end if; exception when others => -- pidfile contains garbage, remove it AD.Delete_File (pidfile); return False; end; end if; return False; end already_running; ----------------------- -- destroy_pidfile -- ----------------------- procedure destroy_pidfile is begin if AD.Exists (pidfile) then AD.Delete_File (pidfile); end if; exception when others => null; end destroy_pidfile; ---------------------- -- create_pidfile -- ---------------------- procedure create_pidfile is pidtext : constant String := JT.int2str (Get_PID); handle : TIO.File_Type; begin TIO.Create (File => handle, Mode => TIO.Out_File, Name => pidfile); TIO.Put_Line (handle, pidtext); TIO.Close (handle); end create_pidfile; ------------------------------ -- set_replicant_platform -- ------------------------------ procedure set_replicant_platform is begin REP.set_platform; end set_replicant_platform; ------------------------------------ -- previous_run_mounts_detected -- ------------------------------------ function previous_run_mounts_detected return Boolean is begin return REP.synth_mounts_exist; end previous_run_mounts_detected; ------------------------------------- -- previous_realfs_work_detected -- ------------------------------------- function previous_realfs_work_detected return Boolean is begin return REP.disk_workareas_exist; end previous_realfs_work_detected; --------------------------------------- -- old_mounts_successfully_removed -- --------------------------------------- function old_mounts_successfully_removed return Boolean is begin if REP.clear_existing_mounts then TIO.Put_Line ("Dismounting successful!"); return True; end if; TIO.Put_Line ("The attempt failed. " & "Check for stuck or ongoing processes and kill them."); TIO.Put_Line ("After that, try running Synth again or just manually " & "unmount everything"); TIO.Put_Line ("still attached to " & JT.USS (PM.configuration.dir_buildbase)); return False; end old_mounts_successfully_removed; -------------------------------------------- -- old_realfs_work_successfully_removed -- -------------------------------------------- function old_realfs_work_successfully_removed return Boolean is begin if REP.clear_existing_workareas then TIO.Put_Line ("Directory removal successful!"); return True; end if; TIO.Put_Line ("The attempt to remove the work directories located at "); TIO.Put_Line (JT.USS (PM.configuration.dir_buildbase) & "failed."); TIO.Put_Line ("Please remove them manually before continuing"); return False; end old_realfs_work_successfully_removed; ------------------------- -- synthexec_missing -- ------------------------- function synthexec_missing return Boolean is synthexec : constant String := host_localbase & "/libexec/synthexec"; begin if AD.Exists (synthexec) then return False; end if; TIO.Put_Line (synthexec & " missing!" & bailing); return True; end synthexec_missing; ---------------------------------- -- display_results_of_dry_run -- ---------------------------------- procedure display_results_of_dry_run is procedure print (cursor : ranking_crate.Cursor); listlog : TIO.File_Type; filename : constant String := "/var/synth/synth_status_results.txt"; max_lots : constant scanners := get_max_lots; elap_raw : constant String := CYC.log_duration (start => scan_start, stop => scan_stop); elapsed : constant String := elap_raw (elap_raw'First + 10 .. elap_raw'Last); goodlog : Boolean; procedure print (cursor : ranking_crate.Cursor) is id : port_id := ranking_crate.Element (cursor).ap_index; kind : verdiff; diff : constant String := version_difference (id, kind); origin : constant String := get_catport (all_ports (id)); begin case kind is when newbuild => TIO.Put_Line (" N => " & origin); when rebuild => TIO.Put_Line (" R => " & origin); when change => TIO.Put_Line (" U => " & origin & diff); end case; if goodlog then TIO.Put_Line (listlog, origin & diff); end if; end print; begin begin -- Try to defend malicious symlink: https://en.wikipedia.org/wiki/Symlink_race if AD.Exists (filename) then AD.Delete_File (filename); end if; TIO.Create (File => listlog, Mode => TIO.Out_File, Name => filename); goodlog := True; exception when others => goodlog := False; end; TIO.Put_Line ("These are the ports that would be built ([N]ew, " & "[R]ebuild, [U]pgrade):"); rank_queue.Iterate (print'Access); TIO.Put_Line ("Total packages that would be built:" & rank_queue.Length'Img); if goodlog then TIO.Put_Line (listlog, LAT.LF & "------------------------------" & LAT.LF & "-- Statistics" & LAT.LF & "------------------------------" & LAT.LF & " Ports scanned :" & last_port'Img & LAT.LF & " Elapsed time : " & elapsed & LAT.LF & " Parallelism :" & max_lots'Img & " scanners" & LAT.LF & " ncpu :" & number_cores'Img); TIO.Close (listlog); TIO.Put_Line ("The complete build list can also be found at:" & LAT.LF & filename); end if; end display_results_of_dry_run; --------------------- -- get_repos_dir -- --------------------- function get_repos_dir return String is command : String := host_pkg8 & " config repos_dir"; content : JT.Text; topline : JT.Text; crlen1 : Natural; crlen2 : Natural; begin content := CYC.generic_system_command (command); crlen1 := JT.SU.Length (content); loop JT.nextline (lineblock => content, firstline => topline); crlen2 := JT.SU.Length (content); exit when crlen1 = crlen2; crlen1 := crlen2; if not JT.equivalent (topline, "/etc/pkg/") then return JT.USS (topline); end if; end loop; -- fallback, use default return host_localbase & "/etc/pkg/repos"; end get_repos_dir; ------------------------------------ -- interact_with_single_builder -- ------------------------------------ function interact_with_single_builder return Boolean is EA_defined : constant Boolean := Unix.env_variable_defined (brkname); begin if Natural (portlist.Length) /= 1 then return False; end if; if not EA_defined then return False; end if; return CYC.valid_test_phase (Unix.env_variable_value (brkname)); end interact_with_single_builder; ---------------------------------------------- -- bulk_run_then_interact_with_final_port -- ---------------------------------------------- procedure bulk_run_then_interact_with_final_port is uscatport : JT.Text := portkey_crate.Key (Position => portlist.First); brkphase : constant String := Unix.env_variable_value (brkname); buildres : Boolean; ptid : port_id; begin if ports_keys.Contains (Key => uscatport) then ptid := ports_keys.Element (Key => uscatport); end if; OPS.unlist_port (ptid); perform_bulk_run (testmode => True); if SIG.graceful_shutdown_requested then return; end if; if bld_counter (ignored) > 0 or else bld_counter (skipped) > 0 or else bld_counter (failure) > 0 then TIO.Put_Line ("It appears a prerequisite failed, so the interactive" & " build of"); TIO.Put_Line (JT.USS (uscatport) & " has been cancelled."); return; end if; TIO.Put_Line ("Starting interactive build of " & JT.USS (uscatport)); TIO.Put_Line ("Stand by, building up to the point requested ..."); REP.initialize (testmode => True, num_cores => PortScan.cores_available); CYC.initialize (test_mode => True, jail_env => REP.jail_environment); REP.launch_slave (id => PortScan.scan_slave, opts => noprocs); Unix.cone_of_silence (deploy => False); case software_framework is when ports_collection => buildres := FPC.build_package (id => PortScan.scan_slave, sequence_id => ptid, interactive => True, interphase => brkphase); when pkgsrc => if PLAT.standalone_pkg8_install (PortScan.scan_slave) then buildres := NPS.build_package (id => PortScan.scan_slave, sequence_id => ptid, interactive => True, interphase => brkphase); end if; end case; REP.destroy_slave (id => PortScan.scan_slave, opts => noprocs); REP.finalize; end bulk_run_then_interact_with_final_port; -------------------------- -- synth_launch_clash -- -------------------------- function synth_launch_clash return Boolean is function get_usrlocal return String; function get_usrlocal return String is begin if JT.equivalent (PM.configuration.dir_system, "/") then return host_localbase; end if; return JT.USS (PM.configuration.dir_system) & host_localbase; end get_usrlocal; cwd : constant String := AD.Current_Directory; usrlocal : constant String := get_usrlocal; portsdir : constant String := JT.USS (PM.configuration.dir_portsdir); ullen : constant Natural := usrlocal'Length; pdlen : constant Natural := portsdir'Length; begin if cwd = usrlocal or else cwd = portsdir then return True; end if; if cwd'Length > ullen and then cwd (1 .. ullen + 1) = usrlocal & "/" then return True; end if; if cwd'Length > pdlen and then cwd (1 .. pdlen + 1) = portsdir & "/" then return True; end if; return False; exception when others => return True; end synth_launch_clash; -------------------------- -- version_difference -- -------------------------- function version_difference (id : port_id; kind : out verdiff) return String is dir_pkg : constant String := JT.USS (PM.configuration.dir_repository); current : constant String := JT.USS (all_ports (id).package_name); version : constant String := JT.USS (all_ports (id).port_version); begin if AD.Exists (dir_pkg & "/" & current) then kind := rebuild; return " (rebuild " & version & ")"; end if; declare pkgbase : constant String := JT.head (current, "-"); pattern : constant String := pkgbase & "-*.txz"; upgrade : JT.Text; pkg_search : AD.Search_Type; dirent : AD.Directory_Entry_Type; begin AD.Start_Search (Search => pkg_search, Directory => dir_pkg, Filter => (AD.Ordinary_File => True, others => False), Pattern => pattern); while AD.More_Entries (Search => pkg_search) loop AD.Get_Next_Entry (Search => pkg_search, Directory_Entry => dirent); declare sname : String := AD.Simple_Name (dirent); testbase : String := PKG.query_pkgbase (dir_pkg & "/" & sname); testver : String := JT.tail (JT.head (sname, "."), "-"); begin if testbase = pkgbase then upgrade := JT.SUS (" (" & testver & " => " & version & ")"); end if; end; end loop; if not JT.IsBlank (upgrade) then kind := change; return JT.USS (upgrade); end if; end; kind := newbuild; return " (new " & version & ")"; end version_difference; ------------------------ -- file_permissions -- ------------------------ function file_permissions (full_path : String) return String is command : constant String := "/usr/bin/stat -f %Lp " & full_path; content : JT.Text; topline : JT.Text; status : Integer; begin content := Unix.piped_command (command, status); if status /= 0 then return "000"; end if; JT.nextline (lineblock => content, firstline => topline); return JT.USS (topline); end file_permissions; -------------------------------------- -- acceptable_RSA_signing_support -- -------------------------------------- function acceptable_RSA_signing_support return Boolean is file_prefix : constant String := PM.synth_confdir & "/" & JT.USS (PM.configuration.profile) & "-"; key_private : constant String := file_prefix & "private.key"; key_public : constant String := file_prefix & "public.key"; found_private : constant Boolean := AD.Exists (key_private); found_public : constant Boolean := AD.Exists (key_public); sorry : constant String := "The generated repository will not " & "be signed due to the misconfiguration."; repo_key : constant String := JT.USS (PM.configuration.dir_buildbase) & ss_base & "/etc/repo.key"; begin if not found_private and then not found_public then return True; end if; if found_public and then not found_private then TIO.Put_Line ("A public RSA key file has been found without a " & "corresponding private key file."); TIO.Put_Line (sorry); return True; end if; if found_private and then not found_public then TIO.Put_Line ("A private RSA key file has been found without a " & "corresponding public key file."); TIO.Put_Line (sorry); return True; end if; declare mode : constant String := file_permissions (key_private); begin if mode /= "400" then TIO.Put_Line ("The private RSA key file has insecure file " & "permissions (" & mode & ")"); TIO.Put_Line ("Please change the mode of " & key_private & " to 400 before continuing."); return False; end if; end; declare begin AD.Copy_File (Source_Name => key_private, Target_Name => repo_key); return True; exception when failed : others => TIO.Put_Line ("Failed to copy private RSA key to builder."); TIO.Put_Line (EX.Exception_Information (failed)); return False; end; end acceptable_RSA_signing_support; ---------------------------------- -- acceptable_signing_command -- ---------------------------------- function valid_signing_command return Boolean is file_prefix : constant String := PM.synth_confdir & "/" & JT.USS (PM.configuration.profile) & "-"; fingerprint : constant String := file_prefix & "fingerprint"; ext_command : constant String := file_prefix & "signing_command"; found_finger : constant Boolean := AD.Exists (fingerprint); found_command : constant Boolean := AD.Exists (ext_command); sorry : constant String := "The generated repository will not " & "be externally signed due to the misconfiguration."; begin if found_finger and then found_command then if JT.IsBlank (one_line_file_contents (fingerprint)) or else JT.IsBlank (one_line_file_contents (ext_command)) then TIO.Put_Line ("At least one of the profile signing command " & "files is blank"); TIO.Put_Line (sorry); return False; end if; return True; end if; if found_finger then TIO.Put_Line ("The profile fingerprint was found but not the " & "signing command"); TIO.Put_Line (sorry); elsif found_command then TIO.Put_Line ("The profile signing command was found but not " & "the fingerprint"); TIO.Put_Line (sorry); end if; return False; end valid_signing_command; ----------------------- -- signing_command -- ----------------------- function signing_command return String is filename : constant String := PM.synth_confdir & "/" & JT.USS (PM.configuration.profile) & "-signing_command"; begin return one_line_file_contents (filename); end signing_command; --------------------------- -- profile_fingerprint -- --------------------------- function profile_fingerprint return String is filename : constant String := PM.synth_confdir & "/" & JT.USS (PM.configuration.profile) & "-fingerprint"; begin return one_line_file_contents (filename); end profile_fingerprint; ------------------------------- -- set_synth_conf_with_RSA -- ------------------------------- function set_synth_conf_with_RSA return Boolean is file_prefix : constant String := PM.synth_confdir & "/" & JT.USS (PM.configuration.profile) & "-"; key_private : constant String := file_prefix & "private.key"; key_public : constant String := file_prefix & "public.key"; found_private : constant Boolean := AD.Exists (key_private); found_public : constant Boolean := AD.Exists (key_public); begin return found_public and then found_private and then file_permissions (key_private) = "400"; end set_synth_conf_with_RSA; ------------------------------ -- one_line_file_contents -- ------------------------------ function one_line_file_contents (filename : String) return String is target_file : TIO.File_Type; contents : JT.Text := JT.blank; begin TIO.Open (File => target_file, Mode => TIO.In_File, Name => filename); if not TIO.End_Of_File (target_file) then contents := JT.SUS (TIO.Get_Line (target_file)); end if; TIO.Close (target_file); return JT.USS (contents); end one_line_file_contents; ------------------------- -- valid_system_root -- ------------------------- function valid_system_root return Boolean is begin if REP.boot_modules_directory_missing then TIO.Put_Line ("The /boot directory is optional, but when it exists, " & "the /boot/modules directory must also exist."); TIO.Put ("Please create the "); if not JT.equivalent (PM.configuration.dir_system, "/") then TIO.Put (JT.USS (PM.configuration.dir_system)); end if; TIO.Put_Line ("/boot/modules directory and retry."); return False; end if; return True; end valid_system_root; ------------------------------------------ -- host_pkg8_conservative_upgrade_set -- ------------------------------------------ function host_pkg8_conservative_upgrade_set return Boolean is command : constant String := host_pkg8 & " config CONSERVATIVE_UPGRADE"; content : JT.Text; topline : JT.Text; begin content := CYC.generic_system_command (command); JT.nextline (lineblock => content, firstline => topline); return JT.equivalent (topline, "yes"); end host_pkg8_conservative_upgrade_set; ----------------------------------- -- TERM_defined_in_environment -- ----------------------------------- function TERM_defined_in_environment return Boolean is defined : constant Boolean := Unix.env_variable_defined ("TERM"); begin if not defined then TIO.Put_Line ("Please define TERM in environment first and retry."); end if; return defined; end TERM_defined_in_environment; ------------------------- -- ensure_port_index -- ------------------------- function ensure_port_index return Boolean is index_file : constant String := "/var/cache/synth/" & JT.USS (PM.configuration.profile) & "-index"; needs_gen : Boolean := True; tree_newer : Boolean; valid_check : Boolean; answer : Character; portsdir : constant String := JT.USS (PM.configuration.dir_portsdir); command : constant String := "/usr/bin/touch " & index_file; stars : String (1 .. 67) := (others => '*'); msg1 : String := " The ports tree has at least one file newer than the flavor index."; msg2 : String := " However, port directories perfectly match. Should the index be"; msg3 : String := " regenerated? (Y/N) "; begin if AD.Exists (index_file) then tree_newer := index_out_of_date (index_file, valid_check); if not valid_check then return False; end if; if tree_newer then if Unix.env_variable_defined ("TERM") then if tree_directories_match (index_file, portsdir) then TIO.Put_Line (stars); TIO.Put_Line (msg1); TIO.Put_Line (msg2); TIO.Put (msg3); loop Ada.Text_IO.Get_Immediate (answer); case answer is when 'Y' | 'y' => TIO.Put_Line ("yes"); exit; when 'N' | 'n' => TIO.Put_Line ("no"); if Unix.external_command (command) then needs_gen := False; end if; exit; when others => null; end case; end loop; TIO.Put_Line (stars); end if; end if; else needs_gen := False; end if; end if; if needs_gen then return generate_ports_index (index_file, portsdir); else return True; end if; end ensure_port_index; ------------------------- -- index_out_of_date -- ------------------------- function index_out_of_date (index_file : String; valid : out Boolean) return Boolean is index_file_modtime : CAL.Time; result : Boolean; begin valid := False; begin index_file_modtime := AD.Modification_Time (index_file); exception when AD.Use_Error => TIO.Put_Line ("File system doesn't support modification times, must eject!"); return False; when others => TIO.Put_Line ("index_out_of_date: problem getting index file modification time"); return False; end; result := PortScan.tree_newer_than_reference (portsdir => JT.USS (PM.configuration.dir_portsdir), reference => index_file_modtime, valid => valid); if valid then return result; else TIO.Put_Line ("Failed to determine if index is out of date, must eject!"); return False; end if; end index_out_of_date; ------------------------------ -- tree_directories_match -- ------------------------------ function tree_directories_match (index_file, portsdir : String) return Boolean is procedure flavor_line (cursor : string_crate.Cursor); last_entry : JT.Text; broken : Boolean := False; procedure flavor_line (cursor : string_crate.Cursor) is line : constant String := JT.USS (string_crate.Element (Position => cursor)); catport : JT.Text := JT.SUS (JT.part_1 (line, "@")); begin if not broken then if not JT.equivalent (last_entry, catport) then last_entry := catport; if ports_keys.Contains (catport) then ports_keys.Delete (catport); else broken := True; end if; end if; end if; end flavor_line; begin load_index_for_store_origins; prescan_ports_tree (portsdir); so_serial.Iterate (flavor_line'Access); if not broken then -- Every port on the flavor index is present in the ports tree -- We still need to check that there are not ports in the tree not listed in index if not ports_keys.Is_Empty then broken := True; end if; end if; reset_ports_tree; clear_store_origin_data; return not broken; end tree_directories_match; end PortScan.Pilot;
AdaCore/Ada_Drivers_Library
Ada
3,336
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2022, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with HAL; use HAL; with HAL.I2C; use HAL.I2C; -- I2C 8-bit IO expander with quasi bidirectional I/O, no data -- direction, no latch package PCF8574 is subtype PCF8574_Address is I2C_Address range 16#40# .. 16#5F#; type PCF8574_Module (Port : not null Any_I2C_Port; Addr : I2C_Address) is tagged limited private; type Any_PCF8574_Module is access all PCF8574_Module'Class; procedure Set (This : PCF8574_Module; Data : UInt8); function Get (This : PCF8574_Module) return UInt8; procedure Get (This : PCF8574_Module; Data : out UInt8); -- when reading the input from keys (buttons) carefully read the -- datasheet. The input line should be set high before reading. -- E.g. if all lines are key input: -- M.Set (16#FF#); -- Keys := M.Get; private type PCF8574_Module (Port : not null Any_I2C_Port; Addr : I2C_Address) is tagged limited null record; end PCF8574;
onox/orka
Ada
2,179
adb
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Orka.SIMD.AVX.Doubles.Arithmetic; with Orka.SIMD.AVX.Doubles.Swizzle; package body Orka.SIMD.AVX.Doubles.Math is function Reciprocal_Sqrt (Elements : m256d) return m256d is use SIMD.AVX.Doubles.Arithmetic; begin return (others => 1.0) / Sqrt (Elements); end Reciprocal_Sqrt; function Cross_Product (Left, Right : m256d) return m256d is use SIMD.AVX.Doubles.Arithmetic; use SIMD.AVX.Doubles.Swizzle; function Shuffle (Elements : m256d) return m256d with Inline_Always; function Shuffle (Elements : m256d) return m256d is Mask_1_0_1_0 : constant := 1 + 0 * 2 + 1 * 4 + 0 * 8; Mask_1_2_0_0 : constant := 1 + 2 * 16 + 0 * 8 + 0 * 128; Mask_0_1_1_1 : constant := 0 + 1 * 2 + 1 * 4 + 1 * 8; YXWZ : constant m256d := Permute_Within_Lanes (Elements, Mask_1_0_1_0); WZXY : constant m256d := Permute_Lanes (YXWZ, Elements, Mask_1_2_0_0); YZXY : constant m256d := Blend (YXWZ, WZXY, Mask_0_1_1_1); begin return YZXY; end Shuffle; Left_YZX : constant m256d := Shuffle (Left); Right_YZX : constant m256d := Shuffle (Right); -- Z := Left (X) * Right (Y) - Left (Y) * Right (X) -- X := Left (Y) * Right (Z) - Left (Z) * Right (Y) -- Y := Left (Z) * Right (X) - Left (X) * Right (Z) Result_ZXY : constant m256d := Left * Right_YZX - Left_YZX * Right; begin return Shuffle (Result_ZXY); end Cross_Product; end Orka.SIMD.AVX.Doubles.Math;
tum-ei-rcs/StratoX
Ada
12,533
ads
-- This spec has been automatically generated from STM32F40x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; with HAL; with System; package STM32_SVD.I2C is pragma Preelaborate; --------------- -- Registers -- --------------- ------------------ -- CR1_Register -- ------------------ -- Control register 1 type CR1_Register is record -- Peripheral enable PE : Boolean := False; -- SMBus mode SMBUS : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- SMBus type SMBTYPE : Boolean := False; -- ARP enable ENARP : Boolean := False; -- PEC enable ENPEC : Boolean := False; -- General call enable ENGC : Boolean := False; -- Clock stretching disable (Slave mode) NOSTRETCH : Boolean := False; -- Start generation START : Boolean := False; -- Stop generation STOP : Boolean := False; -- Acknowledge enable ACK : Boolean := False; -- Acknowledge/PEC Position (for data reception) POS : Boolean := False; -- Packet error checking PEC : Boolean := False; -- SMBus alert ALERT : Boolean := False; -- unspecified Reserved_14_14 : HAL.Bit := 16#0#; -- Software reset SWRST : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR1_Register use record PE at 0 range 0 .. 0; SMBUS at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; SMBTYPE at 0 range 3 .. 3; ENARP at 0 range 4 .. 4; ENPEC at 0 range 5 .. 5; ENGC at 0 range 6 .. 6; NOSTRETCH at 0 range 7 .. 7; START at 0 range 8 .. 8; STOP at 0 range 9 .. 9; ACK at 0 range 10 .. 10; POS at 0 range 11 .. 11; PEC at 0 range 12 .. 12; ALERT at 0 range 13 .. 13; Reserved_14_14 at 0 range 14 .. 14; SWRST at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------ -- CR2_Register -- ------------------ subtype CR2_FREQ_Field is HAL.UInt6; -- Control register 2 type CR2_Register is record -- Peripheral clock frequency FREQ : CR2_FREQ_Field := 16#0#; -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Error interrupt enable ITERREN : Boolean := False; -- Event interrupt enable ITEVTEN : Boolean := False; -- Buffer interrupt enable ITBUFEN : Boolean := False; -- DMA requests enable DMAEN : Boolean := False; -- DMA last transfer LAST : Boolean := False; -- unspecified Reserved_13_31 : HAL.UInt19 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR2_Register use record FREQ at 0 range 0 .. 5; Reserved_6_7 at 0 range 6 .. 7; ITERREN at 0 range 8 .. 8; ITEVTEN at 0 range 9 .. 9; ITBUFEN at 0 range 10 .. 10; DMAEN at 0 range 11 .. 11; LAST at 0 range 12 .. 12; Reserved_13_31 at 0 range 13 .. 31; end record; ------------------- -- OAR1_Register -- ------------------- subtype OAR1_ADD7_Field is HAL.UInt7; subtype OAR1_ADD10_Field is HAL.UInt2; -- Own address register 1 type OAR1_Register is record -- Interface address ADD0 : Boolean := False; -- Interface address ADD7 : OAR1_ADD7_Field := 16#0#; -- Interface address ADD10 : OAR1_ADD10_Field := 16#0#; -- unspecified Reserved_10_14 : HAL.UInt5 := 16#0#; -- Addressing mode (slave mode) ADDMODE : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OAR1_Register use record ADD0 at 0 range 0 .. 0; ADD7 at 0 range 1 .. 7; ADD10 at 0 range 8 .. 9; Reserved_10_14 at 0 range 10 .. 14; ADDMODE at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------- -- OAR2_Register -- ------------------- subtype OAR2_ADD2_Field is HAL.UInt7; -- Own address register 2 type OAR2_Register is record -- Dual addressing mode enable ENDUAL : Boolean := False; -- Interface address ADD2 : OAR2_ADD2_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for OAR2_Register use record ENDUAL at 0 range 0 .. 0; ADD2 at 0 range 1 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ----------------- -- DR_Register -- ----------------- subtype DR_DR_Field is HAL.Byte; -- Data register type DR_Register is record -- 8-bit data register DR : DR_DR_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DR_Register use record DR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; ------------------ -- SR1_Register -- ------------------ -- Status register 1 type SR1_Register is record -- Read-only. Start bit (Master mode) SB : Boolean := False; -- Read-only. Address sent (master mode)/matched (slave mode) ADDR : Boolean := False; -- Read-only. Byte transfer finished BTF : Boolean := False; -- Read-only. 10-bit header sent (Master mode) ADD10 : Boolean := False; -- Read-only. Stop detection (slave mode) STOPF : Boolean := False; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- Read-only. Data register not empty (receivers) RxNE : Boolean := False; -- Read-only. Data register empty (transmitters) TxE : Boolean := False; -- Bus error BERR : Boolean := False; -- Arbitration lost (master mode) ARLO : Boolean := False; -- Acknowledge failure AF : Boolean := False; -- Overrun/Underrun OVR : Boolean := False; -- PEC Error in reception PECERR : Boolean := False; -- unspecified Reserved_13_13 : HAL.Bit := 16#0#; -- Timeout or Tlow error TIMEOUT : Boolean := False; -- SMBus alert SMBALERT : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR1_Register use record SB at 0 range 0 .. 0; ADDR at 0 range 1 .. 1; BTF at 0 range 2 .. 2; ADD10 at 0 range 3 .. 3; STOPF at 0 range 4 .. 4; Reserved_5_5 at 0 range 5 .. 5; RxNE at 0 range 6 .. 6; TxE at 0 range 7 .. 7; BERR at 0 range 8 .. 8; ARLO at 0 range 9 .. 9; AF at 0 range 10 .. 10; OVR at 0 range 11 .. 11; PECERR at 0 range 12 .. 12; Reserved_13_13 at 0 range 13 .. 13; TIMEOUT at 0 range 14 .. 14; SMBALERT at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------ -- SR2_Register -- ------------------ subtype SR2_PEC_Field is HAL.Byte; -- Status register 2 type SR2_Register is record -- Read-only. Master/slave MSL : Boolean; -- Read-only. Bus busy BUSY : Boolean; -- Read-only. Transmitter/receiver TRA : Boolean; -- unspecified Reserved_3_3 : HAL.Bit; -- Read-only. General call address (Slave mode) GENCALL : Boolean; -- Read-only. SMBus device default address (Slave mode) SMBDEFAULT : Boolean; -- Read-only. SMBus host header (Slave mode) SMBHOST : Boolean; -- Read-only. Dual flag (Slave mode) DUALF : Boolean; -- Read-only. acket error checking register PEC : SR2_PEC_Field; -- unspecified Reserved_16_31 : HAL.Short; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR2_Register use record MSL at 0 range 0 .. 0; BUSY at 0 range 1 .. 1; TRA at 0 range 2 .. 2; Reserved_3_3 at 0 range 3 .. 3; GENCALL at 0 range 4 .. 4; SMBDEFAULT at 0 range 5 .. 5; SMBHOST at 0 range 6 .. 6; DUALF at 0 range 7 .. 7; PEC at 0 range 8 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ------------------ -- CCR_Register -- ------------------ subtype CCR_CCR_Field is HAL.UInt12; -- Clock control register type CCR_Register is record -- Clock control register in Fast/Standard mode (Master mode) CCR : CCR_CCR_Field := 16#0#; -- unspecified Reserved_12_13 : HAL.UInt2 := 16#0#; -- Fast mode duty cycle DUTY : Boolean := False; -- I2C master mode selection F_S : Boolean := False; -- unspecified Reserved_16_31 : HAL.Short := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record CCR at 0 range 0 .. 11; Reserved_12_13 at 0 range 12 .. 13; DUTY at 0 range 14 .. 14; F_S at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -------------------- -- TRISE_Register -- -------------------- subtype TRISE_TRISE_Field is HAL.UInt6; -- TRISE register type TRISE_Register is record -- Maximum rise time in Fast/Standard mode (Master mode) TRISE : TRISE_TRISE_Field := 16#2#; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TRISE_Register use record TRISE at 0 range 0 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Inter-integrated circuit type I2C_Peripheral is record -- Control register 1 CR1 : CR1_Register; -- Control register 2 CR2 : CR2_Register; -- Own address register 1 OAR1 : OAR1_Register; -- Own address register 2 OAR2 : OAR2_Register; -- Data register DR : DR_Register; -- Status register 1 SR1 : SR1_Register; -- Status register 2 SR2 : SR2_Register; -- Clock control register CCR : CCR_Register; -- TRISE register TRISE : TRISE_Register; end record with Volatile; for I2C_Peripheral use record CR1 at 0 range 0 .. 31; CR2 at 4 range 0 .. 31; OAR1 at 8 range 0 .. 31; OAR2 at 12 range 0 .. 31; DR at 16 range 0 .. 31; SR1 at 20 range 0 .. 31; SR2 at 24 range 0 .. 31; CCR at 28 range 0 .. 31; TRISE at 32 range 0 .. 31; end record; -- Inter-integrated circuit I2C1_Periph : aliased I2C_Peripheral with Import, Address => I2C1_Base; -- Inter-integrated circuit I2C2_Periph : aliased I2C_Peripheral with Import, Address => I2C2_Base; -- Inter-integrated circuit I2C3_Periph : aliased I2C_Peripheral with Import, Address => I2C3_Base; end STM32_SVD.I2C;
reznikmm/gela
Ada
2,033
ads
package Asis.Ada_Environments.Containers.Internals is function Convert (Context : Asis.Context; Self : Gela.Unit_Containers.Unit_Container_Access) return Asis.Ada_Environments.Containers.Container; -- Internal puproses convertion function. function To_List (Set : Gela.Compilation_Unit_Sets.Compilation_Unit_Set_Access) return Asis.Compilation_Unit_List; -- Convert units set to list end Asis.Ada_Environments.Containers.Internals; ------------------------------------------------------------------------------ -- Copyright (c) 2013, Maxim Reznik -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- * this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- * notice, this list of conditions and the following disclaimer in the -- * documentation and/or other materials provided with the distribution. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -- POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------
AdaCore/gpr
Ada
2,042
adb
-- -- Copyright (C) 2019-2023, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 -- with Ada.Strings.Fixed; with Ada.Text_IO; with GPR2.Unit; with GPR2.Context; with GPR2.Path_Name; with GPR2.Project.Source.Set; with GPR2.Project.View; with GPR2.Project.Tree; with GPR2.Source_Info.Parser.Ada_Language; procedure Main is use Ada; use GPR2; use GPR2.Project; procedure Check (Project_Name : Filename_Type); -- Do check the given project's sources procedure Output_Filename (Filename : Path_Name.Full_Name); -- Remove the leading tmp directory ----------- -- Check -- ----------- procedure Check (Project_Name : Filename_Type) is Prj : Project.Tree.Object; Ctx : Context.Object; View : Project.View.Object; begin Project.Tree.Load (Prj, Create (Project_Name), Ctx); View := Prj.Root_Project; Text_IO.Put_Line ("Project: " & String (View.Name)); for Source of View.Sources loop declare U : constant Optional_Name_Type := Source.Unit_Name; begin Output_Filename (Source.Path_Name.Value); Text_IO.Set_Col (16); Text_IO.Put (" language: " & Image (Source.Language)); Text_IO.Set_Col (33); Text_IO.Put (" Kind: " & GPR2.Unit.Library_Unit_Type'Image (Source.Kind)); if U /= "" then Text_IO.Put (" unit: " & String (U)); end if; Text_IO.New_Line; end; end loop; exception when GPR2.Project_Error => Prj.Log_Messages.Output_Messages (Information => False); end Check; --------------------- -- Output_Filename -- --------------------- procedure Output_Filename (Filename : Path_Name.Full_Name) is I : constant Positive := Strings.Fixed.Index (Filename, "source-included"); begin Text_IO.Put (" > " & Filename (I + 15 .. Filename'Last)); end Output_Filename; begin Check ("demo.gpr"); end Main;
onox/sdlada
Ada
2,444
adb
-------------------------------------------------------------------------------------------------------------------- -- Copyright (c) 2013-2018 Luke A. Guest -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- -- 3. This notice may not be removed or altered from any source -- distribution. -------------------------------------------------------------------------------------------------------------------- package body SDL is use type C.int; function Initialise (Flags : in Init_Flags := Enable_Everything) return Boolean is function SDL_Init (Flags : in Init_Flags := Enable_Everything) return C.int with Import => True, Convention => C, External_Name => "SDL_Init"; Result : C.int := SDL_Init (Flags); begin return (Result = Success); end Initialise; function Initialise_Sub_System (Flags : in Init_Flags) return Boolean is function SDL_Init_Sub_System (Flags : in Init_Flags) return C.int with Import => True, Convention => C, External_Name => "SDL_InitSubSystem"; Result : C.int := SDL_Init_Sub_System (Flags); begin return (Result = Success); end Initialise_Sub_System; function SDL_Was_Initialised (Flags : in Init_Flags := Null_Init_Flags) return Init_Flags with Import => True, Convention => C, External_Name => "SDL_WasInit"; function Was_Initialised return Init_Flags is begin return SDL_Was_Initialised; end Was_Initialised; function Was_Initialised (Flags : in Init_Flags) return Boolean is begin return (SDL_Was_Initialised (Flags) = Flags); end Was_Initialised; end SDL;
SayCV/rtems-addon-packages
Ada
4,206
ads
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Menu_Demo.Aux -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision$ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Terminal_Interface.Curses.Menus; use Terminal_Interface.Curses.Menus; package Sample.Menu_Demo.Aux is procedure Geometry (M : Menu; L : out Line_Count; C : out Column_Count; Y : out Line_Position; X : out Column_Position); -- Calculate the geometry for a panel being able to be used to display -- the menu. function Create (M : Menu; Title : String; Lin : Line_Position; Col : Column_Position) return Panel; -- Create a panel decorated with a frame and the title at the specified -- position. The dimension of the panel is derived from the menus layout. procedure Destroy (M : Menu; P : in out Panel); -- Destroy all the windowing structures associated with this menu and -- panel. function Get_Request (M : Menu; P : Panel) return Key_Code; -- Centralized request driver for all menus in this sample. This -- gives us a common key binding for all menus. end Sample.Menu_Demo.Aux;
zhmu/ananas
Ada
5,694
adb
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . W I D E _ B O U N D E D _ I O -- -- -- -- B o d y -- -- -- -- Copyright (C) 1997-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; package body Ada.Wide_Text_IO.Wide_Bounded_IO is type Wide_String_Access is access all Wide_String; procedure Free (WSA : in out Wide_String_Access); -- Perform an unchecked deallocation of a non-null string ---------- -- Free -- ---------- procedure Free (WSA : in out Wide_String_Access) is Null_Wide_String : constant Wide_String := ""; procedure Deallocate is new Ada.Unchecked_Deallocation (Wide_String, Wide_String_Access); begin -- Do not try to free statically allocated null string if WSA.all /= Null_Wide_String then Deallocate (WSA); end if; end Free; -------------- -- Get_Line -- -------------- function Get_Line return Wide_Bounded.Bounded_Wide_String is begin return Wide_Bounded.To_Bounded_Wide_String (Get_Line); end Get_Line; -------------- -- Get_Line -- -------------- function Get_Line (File : File_Type) return Wide_Bounded.Bounded_Wide_String is begin return Wide_Bounded.To_Bounded_Wide_String (Get_Line (File)); end Get_Line; -------------- -- Get_Line -- -------------- procedure Get_Line (Item : out Wide_Bounded.Bounded_Wide_String) is Buffer : Wide_String (1 .. 1000); Last : Natural; Str1 : Wide_String_Access; Str2 : Wide_String_Access; begin Get_Line (Buffer, Last); Str1 := new Wide_String'(Buffer (1 .. Last)); while Last = Buffer'Last loop Get_Line (Buffer, Last); Str2 := new Wide_String'(Str1.all & Buffer (1 .. Last)); Free (Str1); Str1 := Str2; end loop; Item := Wide_Bounded.To_Bounded_Wide_String (Str1.all); end Get_Line; -------------- -- Get_Line -- -------------- procedure Get_Line (File : File_Type; Item : out Wide_Bounded.Bounded_Wide_String) is Buffer : Wide_String (1 .. 1000); Last : Natural; Str1 : Wide_String_Access; Str2 : Wide_String_Access; begin Get_Line (File, Buffer, Last); Str1 := new Wide_String'(Buffer (1 .. Last)); while Last = Buffer'Last loop Get_Line (File, Buffer, Last); Str2 := new Wide_String'(Str1.all & Buffer (1 .. Last)); Free (Str1); Str1 := Str2; end loop; Item := Wide_Bounded.To_Bounded_Wide_String (Str1.all); end Get_Line; --------- -- Put -- --------- procedure Put (Item : Wide_Bounded.Bounded_Wide_String) is begin Put (Wide_Bounded.To_Wide_String (Item)); end Put; --------- -- Put -- --------- procedure Put (File : File_Type; Item : Wide_Bounded.Bounded_Wide_String) is begin Put (File, Wide_Bounded.To_Wide_String (Item)); end Put; -------------- -- Put_Line -- -------------- procedure Put_Line (Item : Wide_Bounded.Bounded_Wide_String) is begin Put_Line (Wide_Bounded.To_Wide_String (Item)); end Put_Line; -------------- -- Put_Line -- -------------- procedure Put_Line (File : File_Type; Item : Wide_Bounded.Bounded_Wide_String) is begin Put_Line (File, Wide_Bounded.To_Wide_String (Item)); end Put_Line; end Ada.Wide_Text_IO.Wide_Bounded_IO;
reznikmm/matreshka
Ada
4,073
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Draw_Extrusion_Shininess_Attributes; package Matreshka.ODF_Draw.Extrusion_Shininess_Attributes is type Draw_Extrusion_Shininess_Attribute_Node is new Matreshka.ODF_Draw.Abstract_Draw_Attribute_Node and ODF.DOM.Draw_Extrusion_Shininess_Attributes.ODF_Draw_Extrusion_Shininess_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Draw_Extrusion_Shininess_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Draw_Extrusion_Shininess_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Draw.Extrusion_Shininess_Attributes;
Statkus/json-ada
Ada
2,588
ads
-- Copyright (c) 2016 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Ahven.Framework; package Test_Tokenizers is type Test is new Ahven.Framework.Test_Case with null record; overriding procedure Initialize (T : in out Test); private -- Keyword procedure Test_Null_Token; procedure Test_True_Token; procedure Test_False_Token; -- String procedure Test_Empty_String_Token; procedure Test_Non_Empty_String_Token; procedure Test_Number_String_Token; procedure Test_Escaped_Character_String_Token; procedure Test_Escaped_Quotation_Solidus_String_Token; -- Integer/float number procedure Test_Zero_Number_Token; procedure Test_Integer_Number_Token; procedure Test_Float_Number_Token; procedure Test_Negative_Float_Number_Token; procedure Test_Integer_Exponent_Number_Token; procedure Test_Float_Exponent_Number_Token; procedure Test_Float_Negative_Exponent_Number_Token; -- Array procedure Test_Empty_Array_Tokens; procedure Test_One_Element_Array_Tokens; procedure Test_Two_Elements_Array_Tokens; -- Object procedure Test_Empty_Object_Tokens; procedure Test_One_Pair_Object_Tokens; procedure Test_Two_Pairs_Object_Tokens; -- Exceptions procedure Test_Control_Character_String_Exception; procedure Test_Unexpected_Escaped_Character_String_Exception; procedure Test_Minus_Number_EOF_Exception; procedure Test_Minus_Number_Exception; procedure Test_End_Dot_Number_Exception; procedure Test_End_Exponent_Number_Exception; procedure Test_End_Dot_Exponent_Number_Exception; procedure Test_End_Exponent_Minus_Number_Exception; procedure Test_Prefixed_Plus_Number_Exception; procedure Test_Leading_Zeroes_Integer_Number_Exception; procedure Test_Leading_Zeroes_Float_Number_Exception; procedure Test_Incomplete_True_Text_Exception; procedure Test_Incomplete_False_Text_Exception; procedure Test_Incomplete_Null_Text_Exception; procedure Test_Unknown_Keyword_Text_Exception; end Test_Tokenizers;
reznikmm/matreshka
Ada
4,041
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with ODF.DOM.Presentation_Speed_Attributes; package Matreshka.ODF_Presentation.Speed_Attributes is type Presentation_Speed_Attribute_Node is new Matreshka.ODF_Presentation.Abstract_Presentation_Attribute_Node and ODF.DOM.Presentation_Speed_Attributes.ODF_Presentation_Speed_Attribute with null record; overriding function Create (Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters) return Presentation_Speed_Attribute_Node; overriding function Get_Local_Name (Self : not null access constant Presentation_Speed_Attribute_Node) return League.Strings.Universal_String; end Matreshka.ODF_Presentation.Speed_Attributes;
Fabien-Chouteau/Ada_Drivers_Library
Ada
3,695
ads
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- This package provides routines for drawing shapes, characters, and strings -- on a bit-mapped device or graphical buffer. with BMP_Fonts; use BMP_Fonts; with Hershey_Fonts; use Hershey_Fonts; with HAL; use HAL; with HAL.Bitmap; use HAL.Bitmap; package Bitmapped_Drawing is procedure Draw_Char (Buffer : in out Bitmap_Buffer'Class; Start : Point; Char : Character; Font : BMP_Font; Foreground : UInt32; Background : UInt32); procedure Draw_String (Buffer : in out Bitmap_Buffer'Class; Start : Point; Msg : String; Font : BMP_Font; Foreground : Bitmap_Color; Background : Bitmap_Color); procedure Draw_String (Buffer : in out Bitmap_Buffer'Class; Start : Point; Msg : String; Font : Hershey_Font; Height : Natural; Bold : Boolean; Foreground : Bitmap_Color; Fast : Boolean := True); procedure Draw_String (Buffer : in out Bitmap_Buffer'Class; Area : Rect; Msg : String; Font : Hershey_Font; Bold : Boolean; Outline : Boolean; Foreground : Bitmap_Color; Fast : Boolean := True); end Bitmapped_Drawing;
Rodeo-McCabe/orka
Ada
1,496
ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. private with GL.Fences; generic type Index_Type is mod <>; Maximum_Wait : Duration := 0.010; package Orka.Rendering.Fences is pragma Preelaborate; type Buffer_Fence is tagged private; type Fence_Status is (Not_Initialized, Signaled, Not_Signaled); function Create_Buffer_Fence return Buffer_Fence; procedure Prepare_Index (Object : in out Buffer_Fence; Status : out Fence_Status); -- Perform a client wait sync for the fence corresponding to the -- current index procedure Advance_Index (Object : in out Buffer_Fence); -- Set a fence for the corresponding index and then increment it private type Fence_Array is array (Index_Type) of GL.Fences.Fence; type Buffer_Fence is tagged record Fences : Fence_Array; Index : Index_Type; end record; end Orka.Rendering.Fences;
optikos/oasis
Ada
6,341
ads
-- Copyright (c) 2019 Maxim Reznik <[email protected]> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Lexical_Elements; with Program.Elements.Subtype_Indications; with Program.Elements.Formal_Object_Access_Types; with Program.Element_Visitors; package Program.Nodes.Formal_Object_Access_Types is pragma Preelaborate; type Formal_Object_Access_Type is new Program.Nodes.Node and Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type and Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type_Text with private; function Create (Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Access_Token : not null Program.Lexical_Elements .Lexical_Element_Access; All_Token : Program.Lexical_Elements.Lexical_Element_Access; Constant_Token : Program.Lexical_Elements.Lexical_Element_Access; Subtype_Indication : not null Program.Elements.Subtype_Indications .Subtype_Indication_Access) return Formal_Object_Access_Type; type Implicit_Formal_Object_Access_Type is new Program.Nodes.Node and Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type with private; function Create (Subtype_Indication : not null Program.Elements.Subtype_Indications .Subtype_Indication_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Not_Null : Boolean := False; Has_All : Boolean := False; Has_Constant : Boolean := False) return Implicit_Formal_Object_Access_Type with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Formal_Object_Access_Type is abstract new Program.Nodes.Node and Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type with record Subtype_Indication : not null Program.Elements.Subtype_Indications .Subtype_Indication_Access; end record; procedure Initialize (Self : aliased in out Base_Formal_Object_Access_Type'Class); overriding procedure Visit (Self : not null access Base_Formal_Object_Access_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Subtype_Indication (Self : Base_Formal_Object_Access_Type) return not null Program.Elements.Subtype_Indications .Subtype_Indication_Access; overriding function Is_Formal_Object_Access_Type_Element (Self : Base_Formal_Object_Access_Type) return Boolean; overriding function Is_Formal_Access_Type_Element (Self : Base_Formal_Object_Access_Type) return Boolean; overriding function Is_Formal_Type_Definition_Element (Self : Base_Formal_Object_Access_Type) return Boolean; overriding function Is_Definition_Element (Self : Base_Formal_Object_Access_Type) return Boolean; type Formal_Object_Access_Type is new Base_Formal_Object_Access_Type and Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type_Text with record Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Access_Token : not null Program.Lexical_Elements .Lexical_Element_Access; All_Token : Program.Lexical_Elements.Lexical_Element_Access; Constant_Token : Program.Lexical_Elements.Lexical_Element_Access; end record; overriding function To_Formal_Object_Access_Type_Text (Self : aliased in out Formal_Object_Access_Type) return Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type_Text_Access; overriding function Not_Token (Self : Formal_Object_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Null_Token (Self : Formal_Object_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Access_Token (Self : Formal_Object_Access_Type) return not null Program.Lexical_Elements.Lexical_Element_Access; overriding function All_Token (Self : Formal_Object_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Constant_Token (Self : Formal_Object_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access; overriding function Has_Not_Null (Self : Formal_Object_Access_Type) return Boolean; overriding function Has_All (Self : Formal_Object_Access_Type) return Boolean; overriding function Has_Constant (Self : Formal_Object_Access_Type) return Boolean; type Implicit_Formal_Object_Access_Type is new Base_Formal_Object_Access_Type with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; Has_Not_Null : Boolean; Has_All : Boolean; Has_Constant : Boolean; end record; overriding function To_Formal_Object_Access_Type_Text (Self : aliased in out Implicit_Formal_Object_Access_Type) return Program.Elements.Formal_Object_Access_Types .Formal_Object_Access_Type_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Formal_Object_Access_Type) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Formal_Object_Access_Type) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Formal_Object_Access_Type) return Boolean; overriding function Has_Not_Null (Self : Implicit_Formal_Object_Access_Type) return Boolean; overriding function Has_All (Self : Implicit_Formal_Object_Access_Type) return Boolean; overriding function Has_Constant (Self : Implicit_Formal_Object_Access_Type) return Boolean; end Program.Nodes.Formal_Object_Access_Types;
zhmu/ananas
Ada
5,016
adb
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- F N A M E . S F -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Casing; use Casing; with Fname.UF; use Fname.UF; with SFN_Scan; use SFN_Scan; with Osint; use Osint; with Types; use Types; with System.OS_Lib; use System.OS_Lib; with Unchecked_Conversion; package body Fname.SF is ---------------------- -- Local Procedures -- ---------------------- procedure Set_File_Name (Typ : Character; U : String; F : String; Index : Natural); -- This is a transfer function that is called from Scan_SFN_Pragmas, -- and reformats its parameters appropriately for the version of -- Set_File_Name found in Fname.SF. procedure Set_File_Name_Pattern (Pat : String; Typ : Character; Dot : String; Cas : Character); -- This is a transfer function that is called from Scan_SFN_Pragmas, -- and reformats its parameters appropriately for the version of -- Set_File_Name_Pattern found in Fname.SF. ----------------------------------- -- Read_Source_File_Name_Pragmas -- ----------------------------------- procedure Read_Source_File_Name_Pragmas is FD : File_Descriptor; Src : Source_Buffer_Ptr; Hi : Source_Ptr; begin Read_Source_File (Name_Enter ("gnat.adc"), 1, Hi, Src, FD); if not Null_Source_Buffer_Ptr (Src) then -- We need to strip off the trailing EOF that was added by -- Read_Source_File, because there might be another EOF in -- the file, and two in a row causes Scan_SFN_Pragmas to give -- errors. pragma Assert (Src (Hi) = EOF); Scan_SFN_Pragmas (String (Src (1 .. Hi - 1)), Set_File_Name'Access, Set_File_Name_Pattern'Access); end if; end Read_Source_File_Name_Pragmas; ------------------- -- Set_File_Name -- ------------------- procedure Set_File_Name (Typ : Character; U : String; F : String; Index : Natural) is Unm : Unit_Name_Type; Fnm : File_Name_Type; begin Name_Buffer (1 .. U'Length) := U; Name_Len := U'Length; Set_Casing (All_Lower_Case); Name_Buffer (Name_Len + 1) := '%'; Name_Buffer (Name_Len + 2) := Typ; Name_Len := Name_Len + 2; Unm := Name_Find; Name_Buffer (1 .. F'Length) := F; Name_Len := F'Length; Fnm := Name_Find; Fname.UF.Set_File_Name (Unm, Fnm, Nat (Index)); end Set_File_Name; --------------------------- -- Set_File_Name_Pattern -- --------------------------- procedure Set_File_Name_Pattern (Pat : String; Typ : Character; Dot : String; Cas : Character) is Ctyp : Casing_Type; Patp : constant String_Ptr := new String'(Pat); Dotp : constant String_Ptr := new String'(Dot); begin if Cas = 'l' then Ctyp := All_Lower_Case; elsif Cas = 'u' then Ctyp := All_Upper_Case; else -- Cas = 'm' Ctyp := Mixed_Case; end if; Fname.UF.Set_File_Name_Pattern (Patp, Typ, Dotp, Ctyp); end Set_File_Name_Pattern; end Fname.SF;
dbanetto/uni
Ada
312
ads
package Logger with Spark_Mode is -- boundary package for logging procedure Log(value : String ; New_Line : Boolean := True); procedure New_Line; procedure Log_Int(value : Integer ; New_Line : Boolean := True); procedure Log_Boolean(value : Boolean ; New_Line : Boolean := True); end Logger;
AdaCore/libadalang
Ada
43
adb
procedure Main is begin null; end Main;
Fabien-Chouteau/GESTE-examples
Ada
501
ads
with GESTE; with GESTE_Config; package Render is procedure Push_Pixels (Buffer : GESTE.Output_Buffer); procedure Set_Drawing_Area (Area : GESTE.Pix_Rect); procedure Set_Screen_Offset (Pt : GESTE.Pix_Point); procedure Render_All (Background : GESTE_Config.Output_Color); procedure Render_Dirty (Background : GESTE_Config.Output_Color); procedure Kill; function Dark_Cyan return GESTE_Config.Output_Color; function Black return GESTE_Config.Output_Color; end Render;
sungyeon/drake
Ada
923
ads
pragma License (Unrestricted); -- separated and auto-loaded by compiler private generic type Num is mod <>; package Ada.Wide_Text_IO.Modular_IO is Default_Width : Field := Num'Width; Default_Base : Number_Base := 10; -- procedure Get ( -- File : File_Type; -- Input_File_Type -- Item : out Num; -- Width : Field := 0); -- procedure Get ( -- Item : out Num; -- Width : Field := 0); -- procedure Put ( -- File : File_Type; -- Output_File_Type -- Item : Num; -- Width : Field := Default_Width; -- Base : Number_Base := Default_Base); -- procedure Put ( -- Item : Num; -- Width : Field := Default_Width; -- Base : Number_Base := Default_Base); -- procedure Get ( -- From : String; -- Item : out Num; -- Last : out Positive); -- procedure Put ( -- To : out String; -- Item : Num; -- Base : Number_Base := Default_Base); end Ada.Wide_Text_IO.Modular_IO;
BrickBot/Bound-T-H8-300
Ada
13,043
adb
-- Unbounded_Controlled_Vectors (body) -- -- A component of the Bound-T Worst-Case Execution Time Tool. -- ------------------------------------------------------------------------------- -- Copyright (c) 1999 .. 2015 Tidorum Ltd -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- 2. Redistributions in binary form must reproduce the above copyright notice, -- this list of conditions and the following disclaimer in the documentation -- and/or other materials provided with the distribution. -- -- This software is provided by the copyright holders and contributors "as is" and -- any express or implied warranties, including, but not limited to, the implied -- warranties of merchantability and fitness for a particular purpose are -- disclaimed. In no event shall the copyright owner or contributors be liable for -- any direct, indirect, incidental, special, exemplary, or consequential damages -- (including, but not limited to, procurement of substitute goods or services; -- loss of use, data, or profits; or business interruption) however caused and -- on any theory of liability, whether in contract, strict liability, or tort -- (including negligence or otherwise) arising in any way out of the use of this -- software, even if advised of the possibility of such damage. -- -- Other modules (files) of this software composition should contain their -- own copyright statements, which may have different copyright and usage -- conditions. The above conditions apply to this file. ------------------------------------------------------------------------------- -- -- $Revision: 1.2 $ -- $Date: 2015/10/24 20:05:52 $ -- -- $Log: unbounded_controlled_vectors.adb,v $ -- Revision 1.2 2015/10/24 20:05:52 niklas -- Moved to free licence. -- -- Revision 1.1 2009-10-07 19:26:10 niklas -- BT-CH-0183: Cell-sets are a tagged-type class. -- with Unchecked_Deallocation; package body Unbounded_Controlled_Vectors is procedure Free is new Unchecked_Deallocation ( Object => Shared_Vector_Type, Name => Shared_Vector_Ref); procedure Unreference (Item : in out Shared_Vector_Ref) -- -- Removes one reference from the shared Item, which is -- not null on entry but may be null on return, if the -- Item was the last reference to this shared vector object. -- is begin Item.Ref_Count := Item.Ref_Count - 1; if Item.Ref_Count > 0 or not Deallocate then -- There are other users of this Store, or we -- are asked not to deallocate useless storage. Item := null; else -- This Item was the last reference to Item.all, and -- we are asked to deallocate useless storage. Free (Item); end if; end Unreference; -- overriding procedure Adjust (Object : in out Unbounded_Vector) is begin if Object.Store /= null then Object.Store.Ref_Count := Object.Store.Ref_Count + 1; end if; end Adjust; -- overriding procedure Finalize (Object : in out Unbounded_Vector) is begin if Object.Store /= null then Unreference (Object.Store); end if; end Finalize; function "=" (Left, Right : Unbounded_Vector) return Boolean is Left_Length : constant Natural := Length (Left); begin return Left.Store = Right.Store or else ( Left_Length = Length (Right) and then ( Left_Length = 0 or else Left.Store.Vector (1 .. Left_Length) = Right.Store.Vector(1 .. Left_Length))); -- -- The check for Left_Length = 0 avoids a possible null -- access error in the comparison of the Xxx.Store.Vectors -- that could otherwise happen when one, but not both, of -- Left.Store and Right.Store is null. end "="; function Length (V : Unbounded_Vector) return Natural is begin if V.Store = null then return 0; else return V.Store.Length; end if; end Length; function First (V : Unbounded_Vector) return Index_Type is begin return First_Index; end First; function Last (V : Unbounded_Vector) return Natural is begin return Index_Type'Pred (First (V) + Length (V)); end Last; function Next (V : Unbounded_Vector) return Index_Type is begin return First (V) + Length (V); end Next; function New_Length (Space : Natural) return Natural -- -- The Max_Length for a vector that should have room for -- at least Space elements. -- is Incs : Natural; -- The number of Size_Increments needed. Length : Natural; -- The result. begin if Space <= Initial_Size then Incs := 0; else Incs := (Space - Initial_Size + Size_Increment - 1) / Size_Increment; end if; Length := Initial_Size + Incs * Size_Increment; if Length < Space then raise Program_Error; end if; return Length; end New_Length; function Length_To_Include (Index : Index_Type) return Natural -- -- The minimum Max_Length for a Store such that the Store -- includes the given Index. -- is begin return New_Length (Space => Index - First_Index + 1); end Length_To_Include; procedure Ensure_Ownership ( Vector: in out Unbounded_Vector; Space : in Natural) -- -- Ensures that the Vector is mutable by not sharing its Store -- with any other object, and also that it has a Store with Space -- for at least a given number of elements. -- is Old_Store : Shared_Vector_Ref; -- A reference to the old storage for the Vector. begin if Vector.Store = null then -- No storage, shared or private. if Space > 0 then -- Some storage is needed. Vector.Store := new Shared_Vector_Type'( Max_Length => New_Length (Space), Ref_Count => 1, Length => 0, Vector => <>); end if; elsif Vector.Store.Ref_Count > 1 or Vector.Store.Max_Length < Space then -- New storage must be allocated. Old_Store := Vector.Store; Vector.Store := new Shared_Vector_Type'( Max_Length => Natural'Max ( Old_Store.Max_Length, New_Length (Space)), Ref_Count => 1, Length => Old_Store.Length, Vector => <>); Vector.Store.Vector(First (Vector) .. Last (Vector)) := Old_Store.Vector(First (Vector) .. Last (Vector)); Unreference (Old_Store); end if; end Ensure_Ownership; procedure Set ( Vector : in out Unbounded_Vector; Index : in Index_Type; To : in Element_Type) is begin Ensure_Ownership (Vector, Length_To_Include (Index)); Vector.Store.Vector(Index) := To; if Index >= Last (Vector) then Vector.Store.Length := Index - First_Index + 1; end if; end Set; procedure Append ( Value : in Element_Type; To : in out Unbounded_Vector) is begin Set ( Vector => To, Index => Next (To), To => Value); end Append; procedure Truncate_Length ( Vector : in out Unbounded_Vector; To : in Natural) is begin if To < Length (Vector) then -- Truncating the length of a non-null vector. Ensure_Ownership (Vector => Vector, Space => 0); Vector.Store.Length := To; elsif To > Length (Vector) then -- Attempting to "truncate" a vector to a longer length. raise Constraint_Error; -- -- else To = Length (Vector) and so nothing need be done. end if; end Truncate_Length; procedure Erase (Item : in out Unbounded_Vector) is begin Finalize (Item); end Erase; function Element ( Vector : Unbounded_Vector; Index : Index_Type) return Element_Type is begin return Vector.Store.Vector(Index); end Element; function Index ( Source : Unbounded_Vector; Value : Element_Type) return Index_Type is begin for I in First (Source) .. Last (Source) loop if Source.Store.Vector(I) = Value then return I; end if; end loop; return Index_Type'Succ (Last (Source)); end Index; procedure Drop ( Index : in Index_Type; From : in out Unbounded_Vector) is Last_Index : constant Index_Type := Last (From); begin if Index in First (From) .. Last_Index then -- Valid drop. Ensure_Ownership (Vector => From, Space => 0); From.Store.Vector(Index .. Last_Index - 1) := From.Store.Vector(Index + 1 .. Last_Index); From.Store.Length := From.Store.Length - 1; else -- Aaargh. raise Constraint_Error; end if; end Drop; function Is_Element ( Source : Unbounded_Vector; Value : Element_Type) return Boolean is begin for I in First(Source) .. Last(Source) loop if Source.Store.Vector(I) = Value then return True; end if; end loop; return False; end Is_Element; procedure Find_Or_Add ( Value : in Element_Type; Vector : in out Unbounded_Vector; Index : out Index_Type) is begin Index := Unbounded_Controlled_Vectors.Index ( Source => Vector, Value => Value); if Index > Last (Vector) then -- This Value is not yet in the Vector. Append (To => Vector, Value => Value); Index := Last (Vector); end if; end Find_Or_Add; procedure Add ( Value : in Element_Type; To : in out Unbounded_Vector) is Ignore : Index_Type; begin Find_Or_Add (Value => Value, Vector => To, Index => Ignore); end Add; procedure Move_All ( From : in out Unbounded_Vector; To : in out Unbounded_Vector) is From_Store : Shared_Vector_Ref := From.Store; begin if From_Store = null or else From_Store.Length = 0 then -- Nothing to move, From is empty. null; elsif To.Store = null then -- Simple case: just move the reference. To.Store := From_Store; From.Store := null; elsif From_Store = To.Store then -- No effect on the To vector, but From may become -- empty. From.Store := null; if To.Store = null then -- Aha, From and To are the same object, thus -- From shall not change. From.Store := From_Store; -- This also sets To.Store := From_Store (= original To.Store). else -- From and To are different objects, so From -- shall be empty on return. We leave From.Store -- as null and remove the reference: Unreference (From_Store); end if; else -- From and To are different vector objects and From -- is not null nor empty (and To.Store is not null, -- but that is not important). for I in First (From) .. Last (From) loop Add (Value => Element (From, I), To => To); end loop; Erase (From); end if; end Move_All; Null_Vector : Vector_Type (First_Index .. 0) := (others => <>); -- -- A vector of zero length. -- -- pragma Warnings (Off, Null_Vector); -- -- To suppress the Gnat warning that Null_Vector is not initialized -- and is never assigned a value. function To_Vector (V : Unbounded_Vector) return Vector_Type is begin if Length (V) = 0 then return Null_Vector; else return V.Store.Vector(First (V) .. Last (V)); end if; end To_Vector; procedure Extend ( Vector : in out Unbounded_Vector; To_Index : in Index_Type) is Min_Length : constant Natural := Length_To_Include (To_Index); -- The minimum length that covers To_Index. begin if Vector.Store = null or else Vector.Store.Max_Length < Min_Length then Ensure_Ownership (Vector => Vector, Space => Min_Length); end if; end Extend; procedure Print_Debug_Pool is begin --:dbpool GNAT.Debug_Pools.Print_Info_Stdout (Shared_Vector_Pool); null; end Print_Debug_Pool; end Unbounded_Controlled_Vectors;
damaki/SPARKNaCl
Ada
1,797
adb
with SPARKNaCl; use SPARKNaCl; with SPARKNaCl.Cryptobox; use SPARKNaCl.Cryptobox; with SPARKNaCl.Stream; with Random; use Random; with Ada.Numerics.Discrete_Random; with Ada.Text_IO; use Ada.Text_IO; with Interfaces; use Interfaces; procedure Box8 is Raw_SK : Bytes_32; AliceSK, BobSK : Secret_Key; AlicePK, BobPK : Public_Key; N : Stream.HSalsa20_Nonce; S, S2 : Boolean; begin -- for MLen in N32 range 0 .. 999 loop for MLen in N32 range 0 .. 99 loop Random.Random_Bytes (Raw_SK); Keypair (Raw_SK, AlicePK, AliceSK); Random.Random_Bytes (Raw_SK); Keypair (Raw_SK, BobPK, BobSK); Random.Random_Bytes (Bytes_24 (N)); Put ("Box8 - iteration" & MLen'Img); declare subtype Index is N32 range 0 .. Plaintext_Zero_Bytes + MLen - 1; subtype CIndex is N32 range Ciphertext_Zero_Bytes .. Index'Last; subtype Text is Byte_Seq (Index); package RI is new Ada.Numerics.Discrete_Random (CIndex); G : RI.Generator; M, C, M2 : Text := (others => 0); begin RI.Reset (G); Random.Random_Bytes (M (Plaintext_Zero_Bytes .. M'Last)); Create (C, S, M, N, BobPK, AliceSK); if S then C (RI.Random (G)) := Random_Byte; Open (M2, S2, C, N, AlicePK, BobSK); if S2 then if not Equal (M, M2) then Put_Line (" forgery!"); exit; else Put_Line (" OK"); end if; else Put_Line (" OK"); -- data corruption spotted OK end if; else Put_Line ("bad encryption"); end if; end; end loop; end Box8;
zhmu/ananas
Ada
2,010
adb
-- { dg-do run } with System; with Ada.Unchecked_Conversion; with Ada.Streams; use Ada.Streams; with Ada.Text_IO; procedure SSO1 is type Unsigned_Integer_4 is mod 2 ** 32; for Unsigned_Integer_4'Size use 32; Default_Bit_Order_Pos : constant Natural := System.Bit_Order'Pos (System.Default_Bit_Order); Opposite_Bit_Order_Pos : constant Natural := 1 - Default_Bit_Order_Pos; Opposite_Bit_Order : constant System.Bit_Order := System.Bit_Order'Val (Opposite_Bit_Order_Pos); type Rec is record X, Y : Unsigned_Integer_4; end record; for Rec'Bit_Order use System.Default_Bit_Order; for Rec'Scalar_Storage_Order use System.Default_Bit_Order; for Rec use record X at 0 * 4 range 0 .. 31; Y at 1 * 4 range 0 .. 31; end record; type Nested_Rec is record I : Unsigned_Integer_4; R : Rec; J : Unsigned_Integer_4; end record; for Nested_Rec use record I at 0 * 4 range 0 .. 31; R at 1 * 4 range 0 .. 63; J at 3 * 4 range 0 .. 31; end record; for Nested_Rec'Bit_Order use Opposite_Bit_Order; for Nested_Rec'Scalar_Storage_Order use Opposite_Bit_Order; Nr : Nested_Rec := (I => 1, R => (X => 1, Y => 1), J => 1); subtype Nested_Rec_As_Stream is Ada.Streams.Stream_Element_Array (1 ..16); function To_Stream is new Ada.Unchecked_Conversion (Nested_Rec, Nested_Rec_As_Stream); Nr_Stream : constant Nested_Rec_As_Stream := To_Stream (Nr); Expected : constant array (System.Bit_Order) of Nested_Rec_As_Stream := (System.Low_Order_First => (0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1), System.High_Order_First => (1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0)); begin if Nr_Stream /= Expected (System.Default_Bit_Order) then raise Program_Error; end if; end;
tum-ei-rcs/StratoX
Ada
5,917
adb
-- Description: PIXRACER PROTOTYPING MAIN FILE -- Main System File with Ada.Real_Time; use Ada.Real_Time; with Config; use Config; with Interfaces; use Interfaces; with CPU; with HIL.Devices; with NVRAM; with Logger; with LED_Manager; with Buzzer_Manager; with SDLog; with ULog; with STM32.DWT; package body Main is ---------------- -- Initialize -- ---------------- procedure Initialize is success : Boolean := False; t_next : Ada.Real_Time.Time; logret : Logger.Init_Error_Code; begin CPU.initialize; Logger.Init (logret); Logger.log_console (Logger.INFO, "---------------"); Logger.log_console (Logger.INFO, "CPU initialized"); Buzzer_Manager.Initialize; LED_Manager.LED_switchOff; LED_Manager.Set_Color ((HIL.Devices.RED_LED => True, HIL.Devices.GRN_LED => False, HIL.Devices.BLU_LED => False)); LED_Manager.LED_switchOn; Logger.log_console (Logger.INFO, "Initializing NVRAM..."); NVRAM.Init; if With_SD_Log then Logger.log_console (Logger.INFO, "Start SD Logging..."); Logger.Start_SDLog; else Logger.log_console (Logger.INFO, "SD Log disabled in config."); end if; -- self checks Logger.log_console (Logger.INFO, "Self-Check NVRAM..."); NVRAM.Self_Check (Status => success); -- hang here if self-checks failed if not success then LED_Manager.LED_blink (LED_Manager.FAST); Logger.log_console (Logger.ERROR, "Self checks failed"); t_next := Clock; loop LED_Manager.LED_tick (Config.MAIN_TICK_RATE_MS); LED_Manager.LED_sync; delay until t_next; t_next := t_next + Milliseconds (Config.MAIN_TICK_RATE_MS); end loop; else Logger.log_console (Logger.INFO, "Self checks passed"); delay until Clock + Milliseconds (50); end if; LED_Manager.Set_Color ((HIL.Devices.RED_LED => True, HIL.Devices.GRN_LED => True, HIL.Devices.BLU_LED => False)); LED_Manager.LED_switchOn; end Initialize; -------------- -- Run_Loop -- -------------- procedure Run_Loop is loop_period : constant Time_Span := Milliseconds (MAIN_TICK_RATE_MS); loop_next : Time := Clock; -- gleich : Ada.Real_Time.Time; -- song : constant Buzzer_Manager.Song_Type := -- (('c',6),('d',6),('c',6),('f',6)); PRESCALER : constant := 100; type prescaler_t is mod PRESCALER; p : prescaler_t := 0; type prescaler_gps is mod 20; pg : prescaler_gps := 0; mgps : ULog.Message (ULog.GPS); -- loop measurements cycle_begin : Unsigned_32; cycles_sum : Unsigned_32 := 0; cycles_avg : Unsigned_32; cycles_min : Unsigned_32 := Unsigned_32'Last; cycles_max : Unsigned_32 := Unsigned_32'First; begin LED_Manager.Set_Color ((HIL.Devices.RED_LED => False, HIL.Devices.GRN_LED => True, HIL.Devices.BLU_LED => False)); LED_Manager.LED_blink (LED_Manager.SLOW); -- Buzzer_Manager.Set_Timing -- (period => 0.5 * Second, length => 0.1 * Second); -- Buzzer_Manager.Enable; -- -- gleich := Clock; -- for x in 1 .. song'Length loop -- Buzzer_Manager.Set_Tone (song (x)); -- Buzzer_Manager.Tick; -- gleich := gleich + Milliseconds(250); -- delay until gleich; -- Buzzer_Manager.Tick; -- end loop; -- Buzzer_Manager.Disable; -- gps initial mgps.lat := 48.15; mgps.lon := 11.583; mgps.alt := 560.0; mgps.gps_year := 1908; mgps.gps_month := 1; mgps.gps_sec := 0; mgps.fix := 0; mgps.nsat := 8; loop cycle_begin := STM32.DWT.Read_Cycle_Counter; p := p + 1; -- LED heartbeat LED_Manager.LED_tick (MAIN_TICK_RATE_MS); LED_Manager.LED_sync; -- SD card test if With_SD_Log then if p = 0 then Logger.log_console (Logger.INFO, "Logfile size " & SDLog.Logsize'Img & " B"); end if; -- fake GPS message to test SD log pg := pg + 1; if pg = 0 then mgps.t := Ada.Real_Time.Clock; mgps.lat := mgps.lat - 0.1; mgps.gps_sec := mgps.gps_sec + 1; Logger.log_sd (msg_level => Logger.SENSOR, message => mgps); end if; end if; -- cycle counter declare cycle_end : constant Unsigned_32 := STM32.DWT.Read_Cycle_Counter; cycles_loop : constant Unsigned_32 := cycle_end - cycle_begin; begin cycles_sum := cycles_sum + cycles_loop; cycles_min := (if cycles_loop < cycles_min then cycles_loop else cycles_min); cycles_max := (if cycles_loop > cycles_max then cycles_loop else cycles_max); if p = 0 then -- output cycles_avg := cycles_sum / PRESCALER; Logger.log_console (Logger.INFO, "Loop min/avg/max cyc: " & Unsigned_32'Image (cycles_min) & Unsigned_32'Image (cycles_avg) & Unsigned_32'Image (cycles_max)); -- reset cycles_sum := 0; cycles_min := Unsigned_32'Last; cycles_max := Unsigned_32'First; end if; end; -- wait remaining loop time loop_next := loop_next + loop_period; delay until loop_next; end loop; end Run_Loop; end Main;
reznikmm/matreshka
Ada
3,769
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Table_Number_Rows_Repeated_Attributes is pragma Preelaborate; type ODF_Table_Number_Rows_Repeated_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Table_Number_Rows_Repeated_Attribute_Access is access all ODF_Table_Number_Rows_Repeated_Attribute'Class with Storage_Size => 0; end ODF.DOM.Table_Number_Rows_Repeated_Attributes;
msrLi/portingSources
Ada
2,107
adb
-- Copyright 2009-2014 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. procedure Foo is task type Caller is entry Initialize; entry Call_Break_Me; entry Finalize; end Caller; type Caller_Ptr is access Caller; procedure Break_Me is begin null; end Break_Me; task body Caller is begin accept Initialize do null; end Initialize; accept Call_Break_Me do Break_Me; end Call_Break_Me; accept Finalize do null; end Finalize; end Caller; Task_List : array (1 .. 3) of Caller_Ptr; begin -- Start all our tasks, and call the "Initialize" entry to make -- sure all of them have now been started. We call that entry -- immediately after having created the task in order to make sure -- that we wait for that task to be created before we try to create -- another one. That way, we know that the order in our Task_List -- corresponds to the order in the GNAT runtime. for J in Task_List'Range loop Task_List (J) := new Caller; Task_List (J).Initialize; end loop; -- Next, call their Call_Break_Me entry of each task, using the same -- order as the order used to create them. for J in Task_List'Range loop -- STOP_HERE Task_List (J).Call_Break_Me; end loop; -- And finally, let all the tasks die... for J in Task_List'Range loop Task_List (J).Finalize; end loop; end Foo;
charlie5/lace
Ada
2,804
ads
with lace.Observer, lace.Subject, lace.Response; package lace.Event.Logger -- -- Provides an event logging interface. -- is type Item is limited interface; type View is access all Item'Class; -------- -- Forge -- procedure destruct (Self : in out Item) is null; ------------- -- Operations -- -- Logging of event configuration. -- procedure log_Connection (Self : in out Item; From : in Observer.view; To : in Subject .view; for_Kind : in Event.Kind) is abstract; procedure log_Disconnection (Self : in out Item; From : in Observer.view; To : in Subject .view; for_Kind : in Event.Kind) is abstract; procedure log_new_Response (Self : in out Item; the_Response : in Response.view; of_Observer : in Observer.item'Class; to_Kind : in Event.Kind; from_Subject : in subject_Name) is abstract; procedure log_rid_Response (Self : in out Item; the_Response : in Response.view; of_Observer : in Observer.item'Class; to_Kind : in Event.Kind; from_Subject : in subject_Name) is abstract; -- Logging of event transmission. -- procedure log_Emit (Self : in out Item; From : in Subject .view; To : in Observer.view; the_Event : in Event.item'Class) is abstract; procedure log_Relay (Self : in out Item; From : in Observer.view; To : in Observer.view; the_Event : in Event.item'Class) is abstract; procedure log_Response (Self : in out Item; the_Response : in Response.view; of_Observer : in Observer.view; to_Event : in Event.item'Class; from_Subject : in subject_Name) is abstract; -- Logging of miscellaneous messages. -- procedure log (Self : in out Item; Message : in String) is abstract; -- Log filtering. -- procedure ignore (Self : in out Item; Kind : in Event.Kind) is abstract; end lace.Event.Logger;
stcarrez/ada-util
Ada
3,457
adb
----------------------------------------------------------------------- -- util-encoders-uri -- Encode and decode URI using percent encoding -- Copyright (C) 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Encoders.Base16; package body Util.Encoders.URI is -- ------------------------------ -- Compute the length of the encoded URI string with percent encoding -- and with the given encoding array. Characters for which the `Encoding` array -- returns True are encoded using %HEXDIGIT HEXDIGIT. -- Returns the length of encoded string. -- ------------------------------ function Encoded_Length (URI : in String; Encoding : in Encoding_Array := HREF_STRICT) return Natural is Length : Natural := 0; begin for C of URI loop if Encoding (C) then Length := Length + 3; else Length := Length + 1; end if; end loop; return Length; end Encoded_Length; -- ------------------------------ -- Encode the string using URI percent encoding. -- Characters for which the `Encoding` array returns True are encoded -- using %HEXDIGIT HEXDIGIT. Returns the percent encoded string. -- ------------------------------ function Encode (URI : in String; Encoding : in Encoding_Array := HREF_STRICT) return String is Length : constant Natural := Encoded_Length (URI, Encoding); Result : String (1 .. Length); Write_Pos : Positive := 1; begin for C of URI loop if Encoding (C) then Result (Write_Pos) := '%'; Result (Write_Pos + 1) := Base16.To_Hex_High (C); Result (Write_Pos + 2) := Base16.To_Hex_Low (C); Write_Pos := Write_Pos + 3; else Result (Write_Pos) := C; Write_Pos := Write_Pos + 1; end if; end loop; return Result; end Encode; -- ------------------------------ -- Decode the percent encoded URI string. -- ------------------------------ function Decode (URI : in String) return String is Result : String (1 .. URI'Length); Read_Pos : Natural := URI'First; Write_Pos : Natural := Result'First - 1; C : Character; begin while Read_Pos <= URI'Last loop C := URI (Read_Pos); if C = '%' and then Read_Pos + 2 <= URI'Last then C := Base16.From_Hex (URI (Read_Pos + 1), URI (Read_Pos + 2)); Read_Pos := Read_Pos + 3; else Read_Pos := Read_Pos + 1; end if; Write_Pos := Write_Pos + 1; Result (Write_Pos) := C; end loop; return Result (1 .. Write_Pos); end Decode; end Util.Encoders.URI;
leo-brewin/adm-bssn-numerical
Ada
10,762
adb
with Ada.Text_IO; use Ada.Text_IO; with Support; use Support; with Support.Cmdline; use Support.Cmdline; with Support.Strings; use Support.Strings; with Support.RegEx; use Support.RegEx; procedure cdb2ada is target_line_length : constant := 256; src_file_name : String := read_command_arg ('i',"foo.c"); txt_file_name : String := read_command_arg ('o',"foo.ad"); procedure_name : String := read_command_arg ('n',"foo"); symbol : Character := read_command_arg ('s','t'); -- the 'x' in vars like x0123 or -- the 't' in t321 ----------------------------------------------------------------------------- procedure rewrite_cdb is txt : File_Type; src : File_Type; start_line : Boolean; finished : Boolean; this_lead_in : Integer; break_at : integer; found_at : integer; found : Boolean; beg_at : integer; end_at : integer; var_beg : integer; var_end : integer; rhs_beg : integer; rhs_end : integer; tail_beg : integer; tail_end : integer; max_xvars_width : Integer; procedure write_procedure_begin is re_name : String := "([a-zA-Z0-9_-]+)"; the_name : String := grep (procedure_name, re_name, 1, fail => "no_name"); begin for i in the_name'range loop if the_name (i) = '-' then the_name (i) := '_'; end if; end loop; Put_Line (txt, "Procedure "&the_name&" is"); end write_procedure_begin; procedure write_procedure_end is re_name : String := "([a-zA-Z0-9_-]+)"; the_name : String := grep (procedure_name, re_name, 1, fail => "no_name"); begin for i in the_name'range loop if the_name (i) = '-' then the_name (i) := '_'; end if; end loop; Put_Line (txt, "end "&the_name&";"); end write_procedure_end; procedure add_declarations is src : File_Type; count : integer; max_count : integer; width : integer; target : integer; lead_in : integer; num_chars : integer; tmp_xvars : Integer; num_xvars : Integer; max_width : Integer; type action_list is (wrote_xvar, wrote_type, wrote_space); last_action : action_list; begin -- first pass: count the number of xvars and record max width Open (src, In_File, src_file_name); num_xvars := 0; -- number of xvars max_width := 0; -- maximum widt of the xvars loop begin declare re_numb : String := "^ *"&symbol&"([0-9]+) +="; this_line : String := get_line (src); this_numb : String := grep (this_line, re_numb, 1, fail => "<no-match>"); begin if this_numb /= "<no-match>" then num_xvars := num_xvars + 1; max_width := max (max_width, this_numb'length); end if; end; exception when end_error => exit; end; end loop; Close (src); max_xvars_width := max_width+1; if num_xvars /= 0 then -- second pass, write out declarations for all xvars Open (src, In_File, src_file_name); width := max_width+3; -- +3 = +1 for the symbol, +1 for the comma and +1 for the space lead_in := 3; -- whitespace at start of each line target := 85; -- max length of a line count := 0; -- number of xvars written in this block max_count := 250; -- max number of xvars in any one block Put (txt, spc (lead_in)); num_chars := lead_in; tmp_xvars := 0; -- total number of xvars processed loop begin declare re_numb : String := "^ *"&symbol&"([0-9]+) +="; this_line : String := get_line (src); this_numb : String := grep (this_line, re_numb, 1, fail => "<no-match>"); begin if this_numb /= "<no-match>" then tmp_xvars := tmp_xvars + 1; if (count < max_count) then if tmp_xvars /= num_xvars then Put (txt, str (symbol & cut (this_numb) & ",", width, pad=>' ')); else Put (txt, cut (symbol & cut (this_numb))); end if; num_chars := num_chars + width; count := count + 1; last_action := wrote_xvar; else Put (txt, str (symbol & cut (this_numb) & " : Real;", width+6, pad=>' ')); count := 0; last_action := wrote_type; end if; if tmp_xvars /= num_xvars then if (num_chars > target) or (count = 0) then New_Line (txt); Put (txt, spc (lead_in)); num_chars := lead_in; last_action := wrote_space; end if; end if; end if; end; end; exit when tmp_xvars = num_xvars; end loop; if last_action /= wrote_type then Put_Line (txt, " : Real;"); end if; -- New_Line (txt); Close (src); end if; end add_declarations; procedure find_equal_sign (found : out Boolean; found_at : out Integer; this_line : String) is begin found := false; found_at := this_line'length+1; for i in this_line'range loop if this_line (i) = '=' then found := true; found_at := i; exit; end if; end loop; end find_equal_sign; procedure find_break (found_at : out Integer; beg_at : Integer; end_at : Integer; this_line : String) is found : Boolean; searching : Boolean; begin if end_at-beg_at > target_line_length then found_at := min (this_line'last, beg_at + target_line_length); searching := (found_at > 0); while searching loop if (this_line (found_at) = '+') or (this_line (found_at) = '-') -- or (this_line (found_at) = '*') -- or (this_line (found_at) = '/') then found := True; searching := False; else found := False; searching := (found_at > beg_at); end if; found_at := found_at - 1; end loop; if not found then found_at := end_at; end if; else found_at := end_at; end if; end find_break; begin Create (txt, Out_File, txt_file_name); write_procedure_begin; add_declarations; Open (src, In_File, src_file_name); Put_line (txt, "begin"); loop begin declare re_numb : String := "^ *"&symbol&"([0-9]+) +="; this_line : String := get_line (src); this_line_len : Integer := this_line'length; this_numb : String := grep (this_line, re_numb, 1, fail => "<no-match>"); begin find_equal_sign (found,found_at,this_line); if not found then Put_Line (txt,this_line); else var_beg:=1; var_end:=found_at-1; tail_beg := found_at+1; tail_end := this_line_len; if this_numb = "<no-match>" then this_lead_in := var_end-var_beg+1; else this_lead_in := max_xvars_width+1; end if; start_line := True; finished := False; while (not finished) loop beg_at := tail_beg; end_at := tail_end; find_break (break_at,beg_at,end_at,this_line); rhs_beg := tail_beg; rhs_end := break_at; if start_line then Put (txt, spc(3)); Put (txt, str (this_line(var_beg..var_end),this_lead_in,pad=>' ') ); Put (txt, ":="); Put (txt, this_line(rhs_beg..rhs_end)); New_Line (txt); else Put (txt, spc(3)); Put (txt, spc (this_lead_in)); Put (txt, " "); Put (txt, this_line(rhs_beg..rhs_end)); New_Line (txt); end if; start_line := False; tail_beg := break_at+1; tail_end := this_line_len; finished := tail_beg > tail_end; end loop; end if; end; exception when end_error => exit; end; end loop; Close (src); write_procedure_end; Close (txt); end rewrite_cdb; ----------------------------------------------------------------------------- procedure Show_Usage is begin Put_line (" Usage : cdb2ada -i <src-file> -o <out-file> -s 'symbol' -n 'name for the procedure'"); halt; end Show_Usage; ----------------------------------------------------------------------------- procedure initialize is begin if (not find_command_arg ('i')) or (not find_command_arg ('o')) then Show_Usage; end if; end initialize; begin initialize; rewrite_cdb; end cdb2ada;
reznikmm/matreshka
Ada
3,659
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Elements; package ODF.DOM.Style_Footer_Elements is pragma Preelaborate; type ODF_Style_Footer is limited interface and XML.DOM.Elements.DOM_Element; type ODF_Style_Footer_Access is access all ODF_Style_Footer'Class with Storage_Size => 0; end ODF.DOM.Style_Footer_Elements;
AdaCore/training_material
Ada
177
ads
package Triangles is Number_Of_Sides : constant Natural := 3; type Side_T is range 0 .. 1_000; type Shape_T is array (1 .. Number_Of_Sides) of Side_T; end Triangles;
reznikmm/matreshka
Ada
3,946
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2013, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.ODF_Elements.Style.List_Level_Properties; package ODF.DOM.Elements.Style.List_Level_Properties.Internals is function Create (Node : Matreshka.ODF_Elements.Style.List_Level_Properties.Style_List_Level_Properties_Access) return ODF.DOM.Elements.Style.List_Level_Properties.ODF_Style_List_Level_Properties; function Wrap (Node : Matreshka.ODF_Elements.Style.List_Level_Properties.Style_List_Level_Properties_Access) return ODF.DOM.Elements.Style.List_Level_Properties.ODF_Style_List_Level_Properties; end ODF.DOM.Elements.Style.List_Level_Properties.Internals;
Gabriel-Degret/adalib
Ada
4,226
ads
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual --------------------------------------------------------------------------- generic type Real is digits <>; package Ada.Numerics.Generic_Real_Arrays is pragma Pure (Generic_Real_Arrays); -- Types type Real_Vector is array (Integer range <>) of Real'Base; type Real_Matrix is array (Integer range <>, Integer range <>) of Real'Base; -- Subprograms for Real_Vector types -- Real_Vector arithmetic operations function "+" (Right : in Real_Vector) return Real_Vector; function "-" (Right : in Real_Vector) return Real_Vector; function "abs" (Right : in Real_Vector) return Real_Vector; function "+" (Left : in Real_Vector; Right : Real_Vector) return Real_Vector; function "-" (Left : in Real_Vector; Right : Real_Vector) return Real_Vector; function "*" (Left : in Real_Vector; Right : Real_Vector) return Real'Base; function "abs" (Right : in Real_Vector) return Real'Base; -- Real_Vector scaling operations function "*" (Left : in Real'Base; Right : in Real_Vector) return Real_Vector; function "*" (Left : in Real_Vector; Right : in Real'Base) return Real_Vector; function "/" (Left : in Real_Vector; Right : in Real'Base) return Real_Vector; -- Other Real_Vector operations function Unit_Vector (Index : in Integer; Order : in Positive; First : in Integer := 1) return Real_Vector; -- Subprograms for Real_Matrix types -- Real_Matrix arithmetic operations function "+" (Right : in Real_Matrix) return Real_Matrix; function "-" (Right : in Real_Matrix) return Real_Matrix; function "abs" (Right : in Real_Matrix) return Real_Matrix; function Transpose (X : in Real_Matrix) return Real_Matrix; function "+" (Left : in Real_Matrix; Right : in Real_Matrix) return Real_Matrix; function "-" (Left : in Real_Matrix; Right : in Real_Matrix) return Real_Matrix; function "*" (Left : in Real_Matrix; Right : in Real_Matrix) return Real_Matrix; function "*" (Left : in Real_Matrix; Right : in Real_Vector) return Real_Matrix; function "*" (Left : in Real_Vector; Right : in Real_Matrix) return Real_Vector; function "*" (Left : in Real_Matrix; Right : in Real_Vector) return Real_Vector; -- Real_Matrix scaling operations function "*" (Left : in Real'Base; Right : in Real_Matrix) return Real_Matrix; function "*" (Left : in Real_Matrix; Right : in Real'Base) return Real_Matrix; function "/" (Left : in Real_Matrix; Right : in Real'Base) return Real_Matrix; -- Real_Matrix inversion and related operations function Solve (A : in Real_Matrix; X : in Real_Vector) return Real_Vector; function Solve (A : in Real_Matrix; X : in Real_Matrix) return Real_Matrix; function Inverse (A : in Real_Matrix) return Real_Matrix; function Determinant (A : in Real_Matrix) return Real'Base; -- Eigenvalues and vectors of a real symmetric matrix function Eigenvalues (A : in Real_Matrix) return Real_Vector; procedure Eigensystem (A : in Real_Matrix; Values : out Real_Vector; Vectors : out Real_Matrix); -- Other Real_Matrix operations function Unit_Matrix (Order : Positive; First_1 : Integer := 1; First_2 : Integer := 1) return Real_Matrix; end Ada.Numerics.Generic_Real_Arrays;
zhmu/ananas
Ada
3,999
ads
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . B U B B L E _ S O R T -- -- -- -- S p e c -- -- -- -- Copyright (C) 1995-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Sort Utility (Using Bubblesort Algorithm) -- This package provides a bubblesort routine that works with access to -- subprogram parameters, so that it can be used with different types with -- shared sorting code. -- See also GNAT.Bubble_Sort_G and GNAT.Bubble_Sort_A. These are older -- versions of this routine. In some cases GNAT.Bubble_Sort_G may be a -- little faster than GNAT.Bubble_Sort, at the expense of generic code -- duplication and a less convenient interface. The generic version also -- has the advantage of being Pure, while this unit can only be Preelaborate. package GNAT.Bubble_Sort is pragma Pure; -- The data to be sorted is assumed to be indexed by integer values from -- 1 to N, where N is the number of items to be sorted. type Xchg_Procedure is access procedure (Op1, Op2 : Natural); -- A pointer to a procedure that exchanges the two data items whose -- index values are Op1 and Op2. type Lt_Function is access function (Op1, Op2 : Natural) return Boolean; -- A pointer to a function that compares two items and returns True if -- the item with index value Op1 is less than the item with Index value -- Op2, and False if the Op1 item is greater than or equal to the Op2 -- item. procedure Sort (N : Natural; Xchg : Xchg_Procedure; Lt : Lt_Function); -- This procedures sorts items in the range from 1 to N into ascending -- order making calls to Lt to do required comparisons, and calls to -- Xchg to exchange items. The sort is stable, that is the order of -- equal items in the input is preserved. end GNAT.Bubble_Sort;
charlie5/dynamic_distributed_computing
Ada
593
ads
with DDC.Worker; package DDC.Boss -- -- The central manager which distributes jobs and collects/collates partial calculation results. -- is pragma remote_call_Interface; -- Remote views. -- type remote_Worker is access all DDC.Worker.item'Class with Asynchronous => True; -- Operations -- procedure add (the_Worker : in remote_Worker; Id : out worker_Id); procedure rid (the_Worker : in remote_Worker); procedure calculate; procedure accept_partial (Result : in Float; From : in remote_Worker); end DDC.Boss;
vonNiklasson/KTH-programming-benchmark
Ada
630
adb
with Gnat.Io; use Gnat.Io; procedure col is function collatz(n1: Integer) return Integer is c: Integer; n: Integer; begin n := n1; c := 0; while n /= 1 loop if n mod 2 = 0 then n := n / 2; else n := n * 3 + 1; end if; c := c + 1; end loop; return c; end; f: Integer; begin f := 0; for j in Integer range 1 .. 100 loop for i in Integer range 1 .. 100000 loop f := f + collatz(i); end loop; end loop; Put(f); New_Line; end col;
burratoo/Acton
Ada
4,011
adb
------------------------------------------------------------------------------------------ -- -- -- OAK COMPONENTS -- -- -- -- OAK.MEMORY.CALL_STACK.OPS -- -- -- -- Copyright (C) 2010-2021, Patrick Bernardi -- -- -- ------------------------------------------------------------------------------------------ with Oak.Core_Support_Package.Call_Stack.Ops; use Oak.Core_Support_Package.Call_Stack.Ops; with Oak.Agent; use Oak.Agent; with Oak.Agent.Kernel; use Oak.Agent.Kernel; with Oak.Agent.Oak_Agent; use Oak.Agent.Oak_Agent; package body Oak.Memory.Call_Stack.Ops is -------------------- -- New_Call_Stack -- -------------------- procedure Allocate_Call_Stack (Stack : out Call_Stack_Handler; Size_In_Elements : in Storage_Count := Project_Support_Package.Call_Stack_Size) is Size : Storage_Elements.Storage_Count := Size_In_Elements; begin -- Check to ensure that the stack end doesn't go pass the end of the -- stack space if Stack_Pool_Bottom - Size < Stack_Pointer_End'Address then raise Storage_Error; end if; if (Size mod CSP_Stack.Call_Stack_Allignment) /= 0 then Size := (Size / CSP_Stack.Call_Stack_Allignment + 1) * CSP_Stack.Call_Stack_Allignment; end if; Stack.Top := Stack_Pool_Bottom; Stack.Pointer := Stack_Pool_Bottom; Stack_Pool_Bottom := Stack_Pool_Bottom - Size; Stack.Bottom := Stack_Pool_Bottom; Stack.Secondary_Stack_Pointer := Stack_Pool_Bottom; Stack.Secondary_Stack_Limit := Stack_Pool_Bottom + Oak.Project_Support_Package.Secondary_Stack_Percentage * Size; end Allocate_Call_Stack; --------------------------- -- Initialise_Call_Stack -- --------------------------- procedure Initialise_Call_Stack (Stack : in out Call_Stack_Handler; Start_Instruction : in Address) is begin Set_Task_Instruction_Pointer (Stack => Stack, Instruction_Address => Start_Instruction); end Initialise_Call_Stack; procedure Initialise_Call_Stack (Stack : in out Call_Stack_Handler; Start_Instruction : in Address; Task_Value_Record : in Address) is begin Set_Task_Body_Procedure (Stack => Stack, Procedure_Address => Start_Instruction, Task_Value_Record => Task_Value_Record); end Initialise_Call_Stack; procedure Initialise_Call_Stack (Stack : in out Call_Stack_Handler; Start_Instruction : in Address; Task_Value_Record : in Address := Null_Address; Stack_Address : in Address; Stack_Size : in Storage_Elements.Storage_Count) is begin Stack.Top := Stack_Address + Stack_Size; Stack.Pointer := Stack.Top; Stack.Bottom := Stack_Address; Initialise_Call_Stack (Stack => Stack, Start_Instruction => Start_Instruction, Task_Value_Record => Task_Value_Record); end Initialise_Call_Stack; procedure Stack_Check (Stack_Address : in Address) is This_Agent : constant Oak_Agent_Id := Current_Agent (This_Oak_Kernel); begin if Stack_Address < Stack (This_Agent).Bottom or else Stack_Address > Stack (This_Agent).Top then raise Storage_Error; end if; end Stack_Check; end Oak.Memory.Call_Stack.Ops;
reznikmm/matreshka
Ada
6,246
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Tools Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2015, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Asis.Declarations; with Asis.Elements; -- with League.String_Vectors; with Properties.Tools; package body Properties.Declarations.Package_Declaration is ---------- -- Code -- ---------- function Code (Engine : access Engines.Contexts.Context; Element : Asis.Declaration; Name : Engines.Text_Property) return League.Strings.Universal_String is use type Asis.Element_List; function Body_Declarative_Items (Element : Asis.Declaration) return Asis.Element_List; ---------------------------- -- Body_Declarative_Items -- ---------------------------- function Body_Declarative_Items (Element : Asis.Declaration) return Asis.Element_List is Impl : constant Asis.Declaration := Asis.Declarations.Corresponding_Body (Element); begin if Asis.Elements.Is_Nil (Impl) then return Asis.Nil_Element_List; else return Asis.Declarations.Body_Declarative_Items (Impl); end if; end Body_Declarative_Items; Is_Library_Level : constant Boolean := Asis.Elements.Is_Nil (Asis.Elements.Enclosing_Element (Element)); Inside_Package : constant Boolean := Engine.Boolean.Get_Property (Element, Engines.Inside_Package); Named : League.Strings.Universal_String; Down : League.Strings.Universal_String; Text : League.Strings.Universal_String; List : constant Asis.Element_List := Asis.Declarations.Visible_Part_Declarative_Items (Element) & Asis.Declarations.Private_Part_Declarative_Items (Element) & Body_Declarative_Items (Element); begin Named := Engine.Text.Get_Property (Asis.Declarations.Names (Element) (1), Name); if Is_Library_Level then Text.Append (Properties.Tools.Library_Level_Header (Asis.Elements.Enclosing_Compilation_Unit (Element))); Text.Append ("return "); end if; if not Inside_Package then Text.Append ("var "); Text.Append (Named); Text.Append ("="); end if; Text.Append ("(function (_ec){"); Text.Append ("_ec._nested = function (){};"); Text.Append ("_ec._nested.prototype = _ec;"); Down := Engine.Text.Get_Property (List => List, Name => Name, Empty => League.Strings.Empty_Universal_String, Sum => Properties.Tools.Join'Access); Text.Append (Down); Text.Append ("return _ec;"); Text.Append ("})("); if Inside_Package then Text.Append ("_ec."); Text.Append (Named); Text.Append ("="); end if; Text.Append ("new _ec._nested());"); if Is_Library_Level then Text.Append ("});"); end if; return Text; end Code; end Properties.Declarations.Package_Declaration;
zhmu/ananas
Ada
10,550
ads
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . P E R F E C T _ H A S H _ G E N E R A T O R S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2022, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides a generator of static minimal perfect hash functions. -- To understand what a perfect hash function is, we define several notions. -- These definitions are inspired from the following paper: -- Zbigniew J. Czech, George Havas, and Bohdan S. Majewski ``An Optimal -- Algorithm for Generating Minimal Perfect Hash Functions'', Information -- Processing Letters, 43(1992) pp.257-264, Oct.1992 -- Let W be a set of m words. A hash function h is a function that maps the -- set of words W into some given interval I of integers [0, k-1], where k is -- an integer, usually k >= m. h (w) where w is a word in W computes an -- address or an integer from I for the storage or the retrieval of that -- item. The storage area used to store items is known as a hash table. Words -- for which the same address is computed are called synonyms. Due to the -- existence of synonyms a situation called collision may arise in which two -- items w1 and w2 have the same address. Several schemes for resolving -- collisions are known. A perfect hash function is an injection from the word -- set W to the integer interval I with k >= m. If k = m, then h is a minimal -- perfect hash function. A hash function is order preserving if it puts -- entries into the hash table in a prespecified order. -- A minimal perfect hash function is defined by two properties: -- Since no collisions occur each item can be retrieved from the table in -- *one* probe. This represents the "perfect" property. -- The hash table size corresponds to the exact size of W and *no larger*. -- This represents the "minimal" property. -- The functions generated by this package require the words to be known in -- advance (they are "static" hash functions). The hash functions are also -- order preserving. If w2 is inserted after w1 in the generator, then h (w1) -- < h (w2). These hashing functions are convenient for use with realtime -- applications. package System.Perfect_Hash_Generators is type Optimization is (Memory_Space, CPU_Time); -- Optimize either the memory space or the execution time. Note: in -- practice, the optimization mode has little effect on speed. The tables -- are somewhat smaller with Memory_Space. Verbose : Boolean := False; -- Output the status of the algorithm. For instance, the tables, the random -- graph (edges, vertices) and selected char positions are output between -- two iterations. procedure Initialize (Seed : Natural; V : Positive; Optim : Optimization; Tries : Positive); -- Initialize the generator and its internal structures. Set the number of -- vertices in the random graphs. This value has to be greater than twice -- the number of keys in order for the algorithm to succeed. The word set -- is not modified (in particular when it is already set). For instance, it -- is possible to run several times the generator with different settings -- on the same words. -- -- A classical way of doing is to Insert all the words and then to invoke -- Initialize and Compute. If this fails to find a perfect hash function, -- invoke Initialize again with other configuration parameters (probably -- with a greater number of vertices). Once successful, invoke Define and -- Value, and then Finalize. procedure Finalize; -- Deallocate the internal structures and the words table procedure Insert (Value : String); -- Insert a new word into the table. ASCII.NUL characters are not allowed. Too_Many_Tries : exception; -- Raised after Tries unsuccessful runs procedure Compute (Position : String); -- Compute the hash function. Position allows the definition of selection -- of character positions used in the word hash function. Positions can be -- separated by commas and ranges like x-y may be used. Character '$' -- represents the final character of a word. With an empty position, the -- generator automatically produces positions to reduce the memory usage. -- Raise Too_Many_Tries if the algorithm does not succeed within Tries -- attempts (see Initialize). -- The procedure Define returns the lengths of an internal table and its -- item type size. The function Value returns the value of each item in -- the table. Together they can be used to retrieve the parameters of the -- hash function which has been computed by a call to Compute. -- The hash function has the following form: -- h (w) = (g (f1 (w)) + g (f2 (w))) mod m -- G is a function based on a graph table [0,n-1] -> [0,m-1]. m is the -- number of keys. n is an internally computed value and it can be obtained -- as the length of vector G. -- F1 and F2 are two functions based on two function tables T1 and T2. -- Their definition depends on the chosen optimization mode. -- Only some character positions are used in the words because they are -- significant. They are listed in a character position table (P in the -- pseudo-code below). For instance, in {"jan", "feb", "mar", "apr", "jun", -- "jul", "aug", "sep", "oct", "nov", "dec"}, only positions 2 and 3 are -- significant (the first character can be ignored). In this example, P = -- {2, 3} -- When Optimization is CPU_Time, the first dimension of T1 and T2 -- corresponds to the character position in the word and the second to the -- character set. As all the character set is not used, we define a used -- character table which associates a distinct index to each used character -- (unused characters are mapped to zero). In this case, the second -- dimension of T1 and T2 is reduced to the used character set (C in the -- pseudo-code below). Therefore, the hash function has the following: -- function Hash (S : String) return Natural is -- F : constant Natural := S'First - 1; -- L : constant Natural := S'Length; -- F1, F2 : Natural := 0; -- J : <t>; -- begin -- for K in P'Range loop -- exit when L < P (K); -- J := C (S (P (K) + F)); -- F1 := (F1 + Natural (T1 (K, J))) mod <n>; -- F2 := (F2 + Natural (T2 (K, J))) mod <n>; -- end loop; -- return (Natural (G (F1)) + Natural (G (F2))) mod <m>; -- end Hash; -- When Optimization is Memory_Space, the first dimension of T1 and T2 -- corresponds to the character position in the word and the second -- dimension is ignored. T1 and T2 are no longer matrices but vectors. -- Therefore, the used character table is not available. The hash function -- has the following form: -- function Hash (S : String) return Natural is -- F : constant Natural := S'First - 1; -- L : constant Natural := S'Length; -- F1, F2 : Natural := 0; -- J : <t>; -- begin -- for K in P'Range loop -- exit when L < P (K); -- J := Character'Pos (S (P (K) + F)); -- F1 := (F1 + Natural (T1 (K) * J)) mod <n>; -- F2 := (F2 + Natural (T2 (K) * J)) mod <n>; -- end loop; -- return (Natural (G (F1)) + Natural (G (F2))) mod <m>; -- end Hash; type Table_Name is (Character_Position, Used_Character_Set, Function_Table_1, Function_Table_2, Graph_Table); procedure Define (Name : Table_Name; Item_Size : out Natural; Length_1 : out Natural; Length_2 : out Natural); -- Return the definition of the table Name. This includes the length of -- dimensions 1 and 2 and the size of an unsigned integer item. When -- Length_2 is zero, the table has only one dimension. All the ranges -- start from zero. function Value (Name : Table_Name; J : Natural; K : Natural := 0) return Natural; -- Return the value of the component (J, K) of the table Name. When the -- table has only one dimension, K is ignored. end System.Perfect_Hash_Generators;
vpodzime/ada-util
Ada
2,036
adb
----------------------------------------------------------------------- -- discrete properties -- Generic package for get/set of discrete properties -- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body Util.Properties.Discrete is -- ------------------------------ -- Get the property value -- ------------------------------ function Get (Self : in Manager'Class; Name : in String) return Property_Type is Val : constant String := -Get (Self, Name); begin return Property_Type'Value (Val); end Get; -- ------------------------------ -- Get the property value. -- Return the default if the property does not exist. -- ------------------------------ function Get (Self : in Manager'Class; Name : in String; Default : in Property_Type) return Property_Type is begin return Get (Self, Name); exception when others => return Default; end Get; -- ------------------------------ -- Set the property value -- ------------------------------ procedure Set (Self : in out Manager'Class; Name : in String; Value : in Property_Type) is begin Set (Self, Name, Property_Type'Image (Value)); end Set; end Util.Properties.Discrete;
reznikmm/matreshka
Ada
3,734
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with XML.DOM.Attributes; package ODF.DOM.Form_Page_Step_Size_Attributes is pragma Preelaborate; type ODF_Form_Page_Step_Size_Attribute is limited interface and XML.DOM.Attributes.DOM_Attribute; type ODF_Form_Page_Step_Size_Attribute_Access is access all ODF_Form_Page_Step_Size_Attribute'Class with Storage_Size => 0; end ODF.DOM.Form_Page_Step_Size_Attributes;
reznikmm/matreshka
Ada
26,378
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.UML_Attributes; with AMF.Visitors.UMLDI_Iterators; with AMF.Visitors.UMLDI_Visitors; with League.Strings.Internals; with Matreshka.Internals.Strings; package body AMF.Internals.UMLDI_UML_Package_Diagrams is ----------------- -- Get_Heading -- ----------------- overriding function Get_Heading (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access is begin return AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Heading (Self.Element))); end Get_Heading; ----------------- -- Set_Heading -- ----------------- overriding procedure Set_Heading (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Heading (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Heading; ------------------ -- Get_Is_Frame -- ------------------ overriding function Get_Is_Frame (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Frame (Self.Element); end Get_Is_Frame; ------------------ -- Set_Is_Frame -- ------------------ overriding procedure Set_Is_Frame (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Frame (Self.Element, To); end Set_Is_Frame; ---------------- -- Get_Is_Iso -- ---------------- overriding function Get_Is_Iso (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Iso (Self.Element); end Get_Is_Iso; ---------------- -- Set_Is_Iso -- ---------------- overriding procedure Set_Is_Iso (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Iso (Self.Element, To); end Set_Is_Iso; ----------------- -- Get_Is_Icon -- ----------------- overriding function Get_Is_Icon (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return Boolean is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Icon (Self.Element); end Get_Is_Icon; ----------------- -- Set_Is_Icon -- ----------------- overriding procedure Set_Is_Icon (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : Boolean) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Icon (Self.Element, To); end Set_Is_Icon; --------------------- -- Get_Local_Style -- --------------------- overriding function Get_Local_Style (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access is begin return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style (Self.Element))); end Get_Local_Style; --------------------- -- Set_Local_Style -- --------------------- overriding procedure Set_Local_Style (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Local_Style; ----------------------- -- Get_Model_Element -- ----------------------- overriding function Get_Model_Element (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin raise Program_Error; return X : AMF.UML.Elements.Collections.Set_Of_UML_Element; -- return -- AMF.UML.Elements.Collections.Wrap -- (AMF.Internals.Element_Collections.Wrap -- (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element -- (Self.Element))); end Get_Model_Element; ----------------------- -- Get_Model_Element -- ----------------------- overriding function Get_Model_Element (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.CMOF.Elements.CMOF_Element_Access is begin return AMF.CMOF.Elements.CMOF_Element_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element (Self.Element))); end Get_Model_Element; --------------------- -- Get_Local_Style -- --------------------- overriding function Get_Local_Style (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.DI.Styles.DI_Style_Access is begin return AMF.DI.Styles.DI_Style_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style (Self.Element))); end Get_Local_Style; --------------------- -- Set_Local_Style -- --------------------- overriding procedure Set_Local_Style (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.DI.Styles.DI_Style_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Local_Style; -------------- -- Get_Name -- -------------- overriding function Get_Name (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return League.Strings.Universal_String is begin null; return League.Strings.Internals.Create (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name (Self.Element)); end Get_Name; -------------- -- Set_Name -- -------------- overriding procedure Set_Name (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : League.Strings.Universal_String) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Name (Self.Element, League.Strings.Internals.Internal (To)); end Set_Name; ----------------------- -- Get_Documentation -- ----------------------- overriding function Get_Documentation (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return League.Strings.Universal_String is begin null; return League.Strings.Internals.Create (AMF.Internals.Tables.UML_Attributes.Internal_Get_Documentation (Self.Element)); end Get_Documentation; ----------------------- -- Set_Documentation -- ----------------------- overriding procedure Set_Documentation (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : League.Strings.Universal_String) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Documentation (Self.Element, League.Strings.Internals.Internal (To)); end Set_Documentation; -------------------- -- Get_Resolution -- -------------------- overriding function Get_Resolution (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.Real is begin return AMF.Internals.Tables.UML_Attributes.Internal_Get_Resolution (Self.Element); end Get_Resolution; -------------------- -- Set_Resolution -- -------------------- overriding procedure Set_Resolution (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.Real) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Resolution (Self.Element, To); end Set_Resolution; --------------------------- -- Get_Client_Dependency -- --------------------------- overriding function Get_Client_Dependency (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is begin return AMF.UML.Dependencies.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency (Self.Element))); end Get_Client_Dependency; -------------- -- Get_Name -- -------------- overriding function Get_Name (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.UML_Attributes.Internal_Get_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Name; -------------- -- Set_Name -- -------------- overriding procedure Set_Name (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.Optional_String) is begin if To.Is_Empty then AMF.Internals.Tables.UML_Attributes.Internal_Set_Name (Self.Element, null); else AMF.Internals.Tables.UML_Attributes.Internal_Set_Name (Self.Element, League.Strings.Internals.Internal (To.Value)); end if; end Set_Name; ------------------------- -- Get_Name_Expression -- ------------------------- overriding function Get_Name_Expression (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access is begin return AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression (Self.Element))); end Get_Name_Expression; ------------------------- -- Set_Name_Expression -- ------------------------- overriding procedure Set_Name_Expression (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Name_Expression; ------------------- -- Get_Namespace -- ------------------- overriding function Get_Namespace (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin return AMF.UML.Namespaces.UML_Namespace_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace (Self.Element))); end Get_Namespace; ------------------------ -- Get_Qualified_Name -- ------------------------ overriding function Get_Qualified_Name (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Qualified_Name; ----------------------- -- Get_Owned_Comment -- ----------------------- overriding function Get_Owned_Comment (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Comments.Collections.Set_Of_UML_Comment is begin return AMF.UML.Comments.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Comment (Self.Element))); end Get_Owned_Comment; ----------------------- -- Get_Owned_Element -- ----------------------- overriding function Get_Owned_Element (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Element (Self.Element))); end Get_Owned_Element; --------------- -- Get_Owner -- --------------- overriding function Get_Owner (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Elements.UML_Element_Access is begin return AMF.UML.Elements.UML_Element_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owner (Self.Element))); end Get_Owner; ----------------------------------- -- Get_Owning_Template_Parameter -- ----------------------------------- overriding function Get_Owning_Template_Parameter (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter (Self.Element))); end Get_Owning_Template_Parameter; ----------------------------------- -- Set_Owning_Template_Parameter -- ----------------------------------- overriding procedure Set_Owning_Template_Parameter (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owning_Template_Parameter; ---------------------------- -- Get_Template_Parameter -- ---------------------------- overriding function Get_Template_Parameter (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter (Self.Element))); end Get_Template_Parameter; ---------------------------- -- Set_Template_Parameter -- ---------------------------- overriding procedure Set_Template_Parameter (Self : not null access UMLDI_UML_Package_Diagram_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Template_Parameter; -------------------- -- All_Namespaces -- -------------------- overriding function All_Namespaces (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.All_Namespaces"; return All_Namespaces (Self); end All_Namespaces; ------------------------- -- All_Owning_Packages -- ------------------------- overriding function All_Owning_Packages (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.All_Owning_Packages"; return All_Owning_Packages (Self); end All_Owning_Packages; ----------------------------- -- Is_Distinguishable_From -- ----------------------------- overriding function Is_Distinguishable_From (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.Is_Distinguishable_From"; return Is_Distinguishable_From (Self, N, Ns); end Is_Distinguishable_From; --------------- -- Namespace -- --------------- overriding function Namespace (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.Namespace"; return Namespace (Self); end Namespace; -------------------- -- Qualified_Name -- -------------------- overriding function Qualified_Name (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return League.Strings.Universal_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.Qualified_Name"; return Qualified_Name (Self); end Qualified_Name; --------------- -- Separator -- --------------- overriding function Separator (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return League.Strings.Universal_String is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Separator unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.Separator"; return Separator (Self); end Separator; ------------------------ -- All_Owned_Elements -- ------------------------ overriding function All_Owned_Elements (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.All_Owned_Elements"; return All_Owned_Elements (Self); end All_Owned_Elements; ------------------------ -- Is_Compatible_With -- ------------------------ overriding function Is_Compatible_With (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy; P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.Is_Compatible_With"; return Is_Compatible_With (Self, P); end Is_Compatible_With; --------------------------- -- Is_Template_Parameter -- --------------------------- overriding function Is_Template_Parameter (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented"); raise Program_Error with "Unimplemented procedure UMLDI_UML_Package_Diagram_Proxy.Is_Template_Parameter"; return Is_Template_Parameter (Self); end Is_Template_Parameter; ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class (Visitor).Enter_UML_Package_Diagram (AMF.UMLDI.UML_Package_Diagrams.UMLDI_UML_Package_Diagram_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class (Visitor).Leave_UML_Package_Diagram (AMF.UMLDI.UML_Package_Diagrams.UMLDI_UML_Package_Diagram_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant UMLDI_UML_Package_Diagram_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class then AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class (Iterator).Visit_UML_Package_Diagram (Visitor, AMF.UMLDI.UML_Package_Diagrams.UMLDI_UML_Package_Diagram_Access (Self), Control); end if; end Visit_Element; end AMF.Internals.UMLDI_UML_Package_Diagrams;
Fabien-Chouteau/coffee-clock
Ada
1,908
ads
------------------------------------------------------------------------------- -- -- -- Coffee Clock -- -- -- -- Copyright (C) 2016-2017 Fabien Chouteau -- -- -- -- Coffee Clock is free software: you can redistribute it and/or -- -- modify it under the terms of the GNU General Public License as -- -- published by the Free Software Foundation, either version 3 of the -- -- License, or (at your option) any later version. -- -- -- -- Coffee Clock is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. -- -- -- -- You should have received a copy of the GNU General Public License -- -- along with We Noise Maker. If not, see <http://www.gnu.org/licenses/>. -- -- -- ------------------------------------------------------------------------------- with HAL.Real_Time_Clock; package Real_Time_Clock is procedure Set (Time : HAL.Real_Time_Clock.RTC_Time; Date : HAL.Real_Time_Clock.RTC_Date); function Get_Time return HAL.Real_Time_Clock.RTC_Time; function Get_Date return HAL.Real_Time_Clock.RTC_Date; end Real_Time_Clock;
drm343/Space-War-3000
Ada
1,034
adb
with Ada.Text_IO; with ship; with Planet; with Player; with Rule; procedure main is my_ship: ship.Ship_Data := ship.is_StarShip; my_homeworld : Planet.Object := Planet.Build ("Earth", 1, 3, 1); your_homeworld : Planet.Object := Planet.Build ("Moon", 1, 3, 1); player1 : Player.Object := Player.Build ("human", Rule.starship_power, Rule.hard_build, Rule.military, my_homeworld); begin Ada.Text_IO.Put_Line ("my ship: " & ship.show_me_ship_type (my_ship)); Ada.Text_IO.Put_Line ("my ship before build: " & Integer'Image (ship.show_me_ship_data (my_ship, ship.build))); ship.modify_ship_data (my_ship, ship.build, 1); Ada.Text_IO.Put_Line ("my ship after build: " & Integer'Image (ship.show_me_ship_data (my_ship, ship.build))); Ada.Text_IO.Put_Line (my_homeworld.show); Ada.Text_IO.Put_Line (your_homeworld.show); end main;
reznikmm/matreshka
Ada
4,872
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2016-2017, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with League.Strings; with WUI.Grid_Models; with WebAPI.DOM.Documents; with WebAPI.DOM.Elements; with WebAPI.HTML.Elements; package WUI.Widgets.Grid_Views is type Grid_View is new WUI.Widgets.Abstract_Widget with private; type Grid_View_Access is access all Grid_View'Class; type Grid_Header is limited interface; type Grid_Header_Access is access all Grid_Header'Class; not overriding function Text (Self : not null access Grid_Header; Column : Positive) return League.Strings.Universal_String is abstract; not overriding function Width (Self : not null access Grid_Header; Column : Positive) return Natural is abstract; type Align is (Left, Center, Right); not overriding function Text_Align (Self : not null access Grid_Header; Column : Positive) return WUI.Widgets.Grid_Views.Align is abstract; not overriding procedure Set_Model (Self : in out Grid_View; Header : not null WUI.Widgets.Grid_Views.Grid_Header_Access; Model : not null WUI.Grid_Models.Grid_Model_Access); package Constructors is procedure Initialize (Self : in out Grid_View'Class; Parent : not null access WUI.Widgets.Abstract_Widget'Class); end Constructors; private type Grid_View is new WUI.Widgets.Abstract_Widget with record Document : WebAPI.DOM.Documents.Document_Access; Header : WebAPI.DOM.Elements.Element_Access; Data : WebAPI.DOM.Elements.Element_Access; end record; end WUI.Widgets.Grid_Views;
sungyeon/drake
Ada
605
ads
pragma License (Unrestricted); -- implementation unit package System.UTF_Conversions.From_8_To_32 is pragma Pure; pragma Suppress (All_Checks); -- for instantiation procedure Convert is new Convert_Procedure ( Character, String, Wide_Wide_Character, Wide_Wide_String, From_UTF_8, To_UTF_32); function Convert is new Convert_Function ( Character, String, Wide_Wide_Character, Wide_Wide_String, Expanding_From_8_To_32, Convert); end System.UTF_Conversions.From_8_To_32;
HeisenbugLtd/open_weather_map_api
Ada
1,455
adb
-------------------------------------------------------------------------------- -- Copyright (C) 2020 by Heisenbug Ltd. ([email protected]) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hocevar. See the LICENSE file for more details. -------------------------------------------------------------------------------- pragma License (Unrestricted); package body Open_Weather_Map.API.Query is My_Debug : constant not null GNATCOLL.Traces.Trace_Handle := GNATCOLL.Traces.Create (Unit_Name => "OWM.API.QUERY"); ----------------------------------------------------------------------------- -- Initialize ----------------------------------------------------------------------------- procedure Initialize (Self : out T) is begin My_Debug.all.Trace (Message => "Initialize"); Self.Last_Query := Ada.Real_Time.Time_First; end Initialize; ----------------------------------------------------------------------------- -- Set_Last_Query ----------------------------------------------------------------------------- procedure Set_Last_Query (Self : in out T; Value : in Ada.Real_Time.Time) is begin My_Debug.all.Trace (Message => "Set_Last_Query"); Self.Last_Query := Value; end Set_Last_Query; end Open_Weather_Map.API.Query;
pchapin/acrypto
Ada
2,063
ads
--------------------------------------------------------------------------- -- FILE : aco-crypto-stream_cipher.ads -- SUBJECT : General interface to stream cipher abstract types. -- AUTHOR : (C) Copyright 2008 by Peter Chapin -- -- Please send comments or bug reports to -- -- Peter Chapin <[email protected]> --------------------------------------------------------------------------- with Ada.Finalization; with ACO; use ACO; with ACO.Access_Types; use ACO.Access_Types; with ACO.Crypto.Block_Cipher; use ACO.Crypto.Block_Cipher; package ACO.Crypto.Stream_Cipher is --------------------- -- Type Stream_Cipher --------------------- type Stream_Cipher is abstract new Ada.Finalization.Controlled with private; type Stream_Cipher_Access is access all Stream_Cipher'Class; -- In-place form. procedure Encrypt(S : in out Stream_Cipher; Data : in out Octet); procedure Decrypt(S : in out Stream_Cipher; Data : in out Octet); -- Copying form. procedure Encrypt(S : in out Stream_Cipher; Input_Data : in Octet; Output_Data : out Octet); procedure Decrypt(S : in out Stream_Cipher; Input_Data : in Octet; Output_Data : out Octet); ---------------- -- Type CFB_Mode ---------------- type CFB_Mode is new Stream_Cipher with private; not overriding procedure Make (S : out CFB_Mode; Underlying : in Block_Cipher_Access; IV : in Octet_Array); overriding procedure Finalize(S : in out CFB_Mode); overriding procedure Encrypt(S : in out CFB_Mode; Data : in out Octet); overriding procedure Decrypt(S : in out CFB_Mode; Data : in out Octet); private type Stream_Cipher is abstract new Ada.Finalization.Controlled with record Mode : Cipher_Mode := Neither_Mode; end record; type CFB_Mode is new Stream_Cipher with record Size : Natural; Engine : Block_Cipher_Access; Initial : Octet_Array_Access; end record; end ACO.Crypto.Stream_Cipher;
AdaCore/Ada_Drivers_Library
Ada
3,009
adb
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with System; package body STM32.Device_Id is ID_Address : constant System.Address := System'To_Address (16#1FFF_7A10#); --------------- -- Unique_Id -- --------------- function Unique_Id return Device_Id_Image is Result : Device_Id_Image; for Result'Address use ID_Address; pragma Import (Ada, Result); begin return Result; end Unique_Id; --------------- -- Unique_Id -- --------------- function Unique_Id return Device_Id_Tuple is Result : Device_Id_Tuple; for Result'Address use ID_Address; begin return Result; end Unique_Id; end STM32.Device_Id;
AdaCore/Ada_Drivers_Library
Ada
2,070
ads
-- This spec has been automatically generated from STM32F7x9.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.CRC is pragma Preelaborate; --------------- -- Registers -- --------------- subtype IDR_IDR_Field is HAL.UInt8; -- Independent Data register type IDR_Register is record -- Independent Data register IDR : IDR_IDR_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IDR_Register use record IDR at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Control register type CR_Register is record -- Write-only. Control regidter CR : Boolean := False; -- unspecified Reserved_1_31 : HAL.UInt31 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record CR at 0 range 0 .. 0; Reserved_1_31 at 0 range 1 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Cyclic Redundancy Check (CRC) unit type CRC_Peripheral is record -- Data register DR : aliased HAL.UInt32; -- Independent Data register IDR : aliased IDR_Register; -- Control register CR : aliased CR_Register; -- Initial CRC value INIT : aliased HAL.UInt32; -- CRC polynomial POL : aliased HAL.UInt32; end record with Volatile; for CRC_Peripheral use record DR at 16#0# range 0 .. 31; IDR at 16#4# range 0 .. 31; CR at 16#8# range 0 .. 31; INIT at 16#C# range 0 .. 31; POL at 16#10# range 0 .. 31; end record; -- Cyclic Redundancy Check (CRC) unit CRC_Periph : aliased CRC_Peripheral with Import, Address => System'To_Address (16#40023000#); end STM32_SVD.CRC;
reznikmm/matreshka
Ada
5,901
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Open Document Toolkit -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Text_IO; with GNAT.Expect; with Matreshka.DOM_Builders; with Matreshka.DOM_Nodes; with XML.DOM.Documents; with XML.SAX.File_Input_Sources; with XML.SAX.Simple_Readers; with Matreshka.ODF_Packages; package body ODF.Packages is procedure Load_XML_File (The_Package : not null ODF.DOM.Packages.ODF_Package_Access; File_Name : League.Strings.Universal_String); ---------- -- Load -- ---------- function Load (File_Name : League.Strings.Universal_String) return ODF.DOM.Packages.ODF_Package_Access is use type League.Strings.Universal_String; Result : constant Matreshka.DOM_Nodes.Node_Access := new Matreshka.ODF_Packages.Package_Node; Temp : constant League.Strings.Universal_String := League.Strings.To_Universal_String ("tmp/document"); begin Matreshka.ODF_Packages.Constructors.Initialize (Matreshka.ODF_Packages.Package_Node (Result.all)'Unchecked_Access); -- Unpack ZIP archive. declare Status : aliased Integer; Output : constant String := GNAT.Expect.Get_Command_Output ("unzip", (1 => new String'("-o"), 2 => new String'(File_Name.To_UTF_8_String), 3 => new String'("-d"), 4 => new String'(Temp.To_UTF_8_String)), "", Status'Access, True); begin if Status /= 0 then Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, Output); raise Program_Error; end if; end; Load_XML_File (ODF.DOM.Packages.ODF_Package_Access (Result), Temp & "/styles.xml"); Load_XML_File (ODF.DOM.Packages.ODF_Package_Access (Result), Temp & "/content.xml"); return ODF.DOM.Packages.ODF_Package_Access (Result); end Load; ------------------- -- Load_XML_File -- ------------------- procedure Load_XML_File (The_Package : not null ODF.DOM.Packages.ODF_Package_Access; File_Name : League.Strings.Universal_String) is Input : aliased XML.SAX.File_Input_Sources.File_Input_Source; Builder : aliased Matreshka.DOM_Builders.DOM_Builder; Reader : XML.SAX.Simple_Readers.Simple_Reader; begin Builder.Set_Document (XML.DOM.Documents.DOM_Document_Access (The_Package)); Reader.Set_Content_Handler (Builder'Unchecked_Access); Input.Open_By_File_Name (File_Name); Reader.Parse (Input'Unchecked_Access); end Load_XML_File; end ODF.Packages;
reznikmm/matreshka
Ada
21,299
adb
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2014, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Matreshka.XML_Schema.AST.Attribute_Declarations; with Matreshka.XML_Schema.AST.Attribute_Groups; with Matreshka.XML_Schema.AST.Attribute_Uses; with Matreshka.XML_Schema.AST.Assertions; with Matreshka.XML_Schema.AST.Complex_Types; with Matreshka.XML_Schema.AST.Element_Declarations; with Matreshka.XML_Schema.AST.Identity_Constraints; with Matreshka.XML_Schema.AST.Model_Groups; with Matreshka.XML_Schema.AST.Models; with Matreshka.XML_Schema.AST.Namespaces; with Matreshka.XML_Schema.AST.Particles; with Matreshka.XML_Schema.AST.Schemas; with Matreshka.XML_Schema.AST.Type_Alternatives; with Matreshka.XML_Schema.AST.Simple_Types; with Matreshka.XML_Schema.AST.Types; with Matreshka.XML_Schema.AST.Wildcards; package body Matreshka.XML_Schema.Containment_Iterators is use type Matreshka.XML_Schema.Visitors.Traverse_Control; --------------------------------- -- Visit_Attribute_Declaration -- --------------------------------- overriding procedure Visit_Attribute_Declaration (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Attribute_Declaration_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type Matreshka.XML_Schema.AST.Simple_Type_Definition_Access; begin if AST.Is_Empty (Node.Type_Name) and Node.Type_Definition /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Type_Definition), Control); end if; end Visit_Attribute_Declaration; -------------------------------------- -- Visit_Attribute_Group_Definition -- -------------------------------------- overriding procedure Visit_Attribute_Group_Definition (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Attribute_Group_Definition_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type Matreshka.XML_Schema.AST.Wildcard_Access; begin for Item of Node.Attribute_Uses loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit attribute wildcard. if Node.Attribute_Wildcard /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Attribute_Wildcard), Control); end if; end Visit_Attribute_Group_Definition; ------------------------- -- Visit_Attribute_Use -- ------------------------- overriding procedure Visit_Attribute_Use (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Attribute_Use_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type Matreshka.XML_Schema.AST.Attribute_Declaration_Access; begin if AST.Is_Empty (Node.Ref) and Node.Attribute_Declaration /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Attribute_Declaration), Control); end if; end Visit_Attribute_Use; ----------------------------------- -- Visit_Complex_Type_Definition -- ----------------------------------- overriding procedure Visit_Complex_Type_Definition (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Complex_Type_Definition_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type Matreshka.XML_Schema.AST.Type_Definition_Access; use type Matreshka.XML_Schema.AST.Wildcard_Access; begin if AST.Is_Empty (Node.Restriction_Base) and AST.Is_Empty (Node.Extension_Base) and not Node.Any_Type_Restriction and Node.Base_Type_Definition /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Base_Type_Definition), Control); end if; -- Visit attribute uses. for Index in 1 .. Node.Attribute_Uses.Length loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Attribute_Uses.Item (Index)), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit attribute wildcard. if Node.Attribute_Wildcard /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Attribute_Wildcard), Control); end if; -- Visit content type. case Node.Content_Type.Variety is when Matreshka.XML_Schema.AST.Complex_Types.Element_Only | Matreshka.XML_Schema.AST.Complex_Types.Mixed => Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Content_Type.Particle), Control); if Node.Content_Type.Open_Content.Wildcard /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Content_Type.Open_Content.Wildcard), Control); end if; when Matreshka.XML_Schema.AST.Complex_Types.Simple => -- No visit to base type in simple content need, because it's -- always reference to type definred elsewhere null; when Matreshka.XML_Schema.AST.Complex_Types.Empty => null; end case; -- Visit assertions. for Item of Node.Assertions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end Visit_Complex_Type_Definition; ------------------------------- -- Visit_Element_Declaration -- ------------------------------- overriding procedure Visit_Element_Declaration (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Element_Declaration_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type Matreshka.XML_Schema.AST.Type_Definition_Access; begin if AST.Is_Empty (Node.Type_Name) and Node.Type_Definition /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Type_Definition), Control); end if; if not Node.Type_Table.Is_Null then -- Visit sequence of Type Alternative components for Item of Node.Type_Table.Alternatives loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Type_Table.Default_Type_Definition), Control); end if; -- Visit set of Identity-Constraint Definition components for Item of Node.Identity_Constraint_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end Visit_Element_Declaration; ----------------- -- Visit_Model -- ----------------- overriding procedure Visit_Model (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Model_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin -- Visit namespaces. for Item of Node.Namespaces loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end Visit_Model; ----------------------- -- Visit_Model_Group -- ----------------------- overriding procedure Visit_Model_Group (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Model_Group_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin -- Visit particles. for Index in 1 .. Node.Particles.Length loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Particles.Item (Index)), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end Visit_Model_Group; ---------------------------------- -- Visit_Model_Group_Definition -- ---------------------------------- overriding procedure Visit_Model_Group_Definition (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Model_Group_Definition_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Model_Group), Control); end Visit_Model_Group_Definition; --------------------- -- Visit_Namespace -- --------------------- overriding procedure Visit_Namespace (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Namespace_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin -- Visit type definitions. for Item of Node.Type_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit element declarations. for Item of Node.Element_Declarations loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit attribute declarations. for Item of Node.Attribute_Declarations loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit attribute group definitions. for Item of Node.Attribute_Group_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit model group definitions. for Item of Node.Model_Group_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end Visit_Namespace; -------------------- -- Visit_Particle -- -------------------- overriding procedure Visit_Particle (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Particle_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type AST.Types.Term_Access; begin if AST.Is_Empty (Node.Element_Ref) and AST.Is_Empty (Node.Group_Ref) and Node.Term /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Term), Control); end if; end Visit_Particle; ------------------ -- Visit_Schema -- ------------------ overriding procedure Visit_Schema (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Schema_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is begin -- Visit type definitions. for Item of Node.Type_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit attribute declarations. for Item of Node.Attribute_Declarations loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit element declarations. for Item of Node.Element_Declarations loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit attribute group definitions. for Item of Node.Attribute_Group_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit model group definitions. for Item of Node.Model_Group_Definitions loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end Visit_Schema; ---------------------------------- -- Visit_Simple_Type_Definition -- ---------------------------------- overriding procedure Visit_Simple_Type_Definition (Self : in out Containment_Iterator; Visitor : in out Matreshka.XML_Schema.Visitors.Abstract_Visitor'Class; Node : not null Matreshka.XML_Schema.AST.Simple_Type_Definition_Access; Control : in out Matreshka.XML_Schema.Visitors.Traverse_Control) is use type Matreshka.XML_Schema.AST.Simple_Type_Definition_Access; use type Matreshka.XML_Schema.AST.Type_Definition_Access; use type Matreshka.XML_Schema.AST.Wildcard_Access; begin if AST.Is_Empty (Node.Restriction_Base) and Node.Base_Type_Definition /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Base_Type_Definition), Control); end if; -- Visit facets. for Item of Node.Facets loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Item), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; -- Visit simple type definition if Node.Simple_Type_Definition /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Simple_Type_Definition), Control); end if; -- Visit item type definition if AST.Is_Empty (Node.Item_Type) and Node.Item_Type_Definition /= null then Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Item_Type_Definition), Control); end if; -- Visit member types. if Node.Member_Types.Is_Empty then for Index in 1 .. Node.Member_Type_Definitions.Length loop Matreshka.XML_Schema.Visitors.Visit (Self, Visitor, Matreshka.XML_Schema.AST.Node_Access (Node.Member_Type_Definitions.Item (Index)), Control); exit when Control /= Matreshka.XML_Schema.Visitors.Continue; end loop; end if; end Visit_Simple_Type_Definition; end Matreshka.XML_Schema.Containment_Iterators;
reznikmm/matreshka
Ada
3,615
ads
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <[email protected]> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.UML.Activity_Nodes.Hash is new AMF.Elements.Generic_Hash (UML_Activity_Node, UML_Activity_Node_Access);
stcarrez/dynamo
Ada
20,652
ads
------------------------------------------------------------------------------ -- -- -- ASIS-for-GNAT IMPLEMENTATION COMPONENTS -- -- -- -- A 4 G . A _ T Y P E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1995-2012, Free Software Foundation, Inc. -- -- -- -- ASIS-for-GNAT is free software; you can redistribute it and/or modify it -- -- under terms of the GNU General Public License as published by the Free -- -- Software Foundation; either version 2, or (at your option) any later -- -- version. ASIS-for-GNAT is distributed in the hope that it will be use- -- -- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- -- -- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -- -- Public License for more details. You should have received a copy of the -- -- GNU General Public License distributed with ASIS-for-GNAT; see file -- -- COPYING. If not, write to the Free Software Foundation, 51 Franklin -- -- Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the -- -- Software Engineering Laboratory of the Swiss Federal Institute of -- -- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the -- -- Scientific Research Computer Center of Moscow State University (SRCC -- -- MSU), Russia, with funding partially provided by grants from the Swiss -- -- National Science Foundation and the Swiss Academy of Engineering -- -- Sciences. ASIS-for-GNAT is now maintained by AdaCore -- -- (http://www.adacore.com). -- -- -- ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; with Ada.Characters.Handling; use Ada.Characters.Handling; with GNAT.OS_Lib; use GNAT.OS_Lib; package A4G.A_Types is pragma Elaborate_Body (A4G.A_Types); -- This package is the ASIS implementation's analog of the GNAT Types -- package (except the part related to the ASIS_OS_Time type). -- It contains host independent type and constant definitions -- which is supposed to be used in more than one unit in the ASIS -- implementation. ------------------ -- ASIS_OS_Time -- ------------------ -- To check, that a given abstraction is valid in the sense defined by the -- ASIS standard (that is, that the enclosing Context of the given -- abstraction has not been closed after creating this abstraction), ASIS -- needs some kind of logical time (or logical time stamp). This logical -- time is increased each time when any ASIS Context is opened. It is not -- reset when ASIS is initialized, because it may lead to collisions in -- validity checks -- An ASIS abstraction is valid if its logical time stamp is equal or -- greater than the time stamp of its enclosing Context. type ASIS_OS_Time is private; Nil_ASIS_OS_Time : constant ASIS_OS_Time; Last_ASIS_OS_Time : constant ASIS_OS_Time; procedure Increase_ASIS_OS_Time; -- Increases the ASIS logical "clock" function A_OS_Time return ASIS_OS_Time; -- Gets the current value of the ASIS logical "clock" function Later (L, R : ASIS_OS_Time) return Boolean; -- Compares time stamps. ----------------------------------------- -- Types for Context and Context Table -- ----------------------------------------- Inconsistent_Incremental_Context : exception; -- raised when any inconsistency found for Incremental Tree processing -- mode Context_Low_Bound : constant := 0; Context_High_Bound : constant := 1_000_000; type Context_Id is range Context_Low_Bound .. Context_High_Bound; -- Type used to identify entries in ASIS Context table Non_Associated : constant Context_Id := Context_Low_Bound; Nil_Context_Id : constant Context_Id := Context_Low_Bound; First_Context_Id : constant Context_Id := Context_Low_Bound + 1; --------------------------------------------- -- Types for Container and Container Table -- --------------------------------------------- Container_Low_Bound : constant := 0; Container_High_Bound : constant := 100; type Container_Id is range Container_Low_Bound .. Container_High_Bound; -- Type used to identify entries in ASIS Container table Nil_Container_Id : constant Container_Id := Container_Low_Bound; First_Container_Id : constant Container_Id := Container_Low_Bound + 1; ----------------------------------------------- -- Types for Compilation_Unit and Unit Table -- ----------------------------------------------- Unit_Low_Bound : constant := 0; Unit_High_Bound : constant := 100_000; type Unit_Id is range Unit_Low_Bound .. Unit_High_Bound; -- Type used to identify entries in the ASIS Unit table Nil_Unit : constant Unit_Id := Unit_Low_Bound; No_Unit_Id : Unit_Id renames Nil_Unit; First_Unit_Id : constant Unit_Id := Unit_Low_Bound + 1; Standard_Id : constant Unit_Id := First_Unit_Id; -- The entry in the Unit table corresponding to the package Standard -- Standard goes first in any Unit table Config_Comp_Id : constant Unit_Id := Standard_Id + 1; -- The entry in the Unit table corresponding to the artificial -- A_Configuration_Compilation unit. We may have at most one such unit. -- If there is no configuration pragmas in the Context, there is no harm -- to allocate such a unit, because the only way for an ASIS client to get -- it is to get the enclosing unit for a configuration pragma. type Unit_Id_List is array (Natural range <>) of Unit_Id; Nil_Unit_Id_List : constant Unit_Id_List (1 .. 0) := (others => Nil_Unit); -------------------------- -- Types for Tree Table -- -------------------------- Tree_Low_Bound : constant := 0; Tree_High_Bound : constant := 100_000; type Tree_Id is range Tree_Low_Bound .. Tree_High_Bound; -- Type used to identify entries in ASIS Tree table Nil_Tree : constant Tree_Id := Tree_Low_Bound; No_Tree_Name : Tree_Id renames Nil_Tree; -- ??? First_Tree_Id : constant Tree_Id := Tree_Low_Bound + 1; ----------------------------------------------- -- Types for Search Directories Paths Tables -- ----------------------------------------------- No_Dir : constant := 0; First_Dir_Id : constant := 1; Last_Dir_Id : constant := 1_000; type Dir_Id is range No_Dir .. Last_Dir_Id; type Search_Dir_Kinds is ( Source, -- for source search path Object, -- for object search path Tree); -- for tree search path -- this type may be further expanded -------------------------------------------- -- Types for Internal Element Structure -- -------------------------------------------- type Special_Cases is ( -- this enumeration type is needed to distinguish some special -- cases in Element constructing and handling Not_A_Special_Case, A_Dummy_Block_Statement, -- the result of an obsolescent function -- Declarations.Body_Block_Statement Predefined_Operation, -- indicates the predefined operation for a user-defined type -- (or component thereof???). Note, that such an operation is -- defined not in the Standard package. Explicit_From_Standard, -- indicates the explicit Element obtained from the package -- Standard. "Explicit" means here any construct which is -- contained in the "source" text of Standard included in RM95 -- plus explicit constants substituting "implementation-defined" -- italic strings in this "source" Numeric_Error_Renaming, -- Indicates the artificial ASIS Element created to represent the -- obsolete renaming of Numeric_Error in the package Standard -- (see B712-005) Implicit_From_Standard, -- indicates the implicit Element obtained from the package -- Standard, that is, implicitly declared predefined operations -- and their components, and root and universal numeric type -- definitions and declarations Stand_Char_Literal, -- indicates the defining character literal declared in the -- definition of the predefined type Standard.Character -- or Standard.Wide_Character. An ASIS Element representing such -- a literal has no corresponding node in the tree, and it is -- based on the N_Defining_Identifier node for the corresponding -- type Expanded_Package_Instantiation, -- indicates A_Package_Declaration element which represents the -- package declaration which is the result of an instantiation -- of a generic package Expanded_Subprogram_Instantiation, -- indicates A_Procedure_Declaration or A_Function_Declaration -- element which represents the package declaration which is the -- result of an instantiation of a generic package Configuration_File_Pragma, -- Indicates a configuration pragma belonging not to the source of some -- Ada compilation unit, but to the configuration file (an components -- thereof) Rewritten_Named_Number, -- Indicates An_Identifier Element representing a named number in the -- situation when the corresponding tree structure is rewritten into -- N_Integer/Real_Literal node and no original tree structure is -- available (see BB10-002) Is_From_Gen_Association, -- See D722-012. -- The problem here is that in case of a formal object, the front-end -- creates the renaming declaration as a means to pass an actual -- parameter, and the parameter itself (the corresponding tree node) -- is used as a part of this renaming declaration. So we have a problem -- with Enclosing_Element. The Parent pointer from this actual points -- to the renaming declaration structure. In case if we are not in the -- expanded code, we may compare levels of instantiation and it helps, -- but in general case it is too complicated. So the solution is to -- mark the corresponding node if it comes from the generic association -- (and we can gen into this node only by means of a structural query!) -- and to use this mark in the Enclosing_Element processing. Is_From_Imp_Neq_Declaration, -- Indicates if the given element is an implicit declaration of the -- "/=" operation corresponding to the explicit redefinition of "=" or -- a subcomponent thereof -- Implicit_Inherited_Subprogram -- indicates the declaration of an implicit inherited user-defined -- subprogram or a component thereof. -- may be continued... Dummy_Base_Attribute_Designator, Dummy_Class_Attribute_Designator, Dummy_Base_Attribute_Prefix, Dummy_Class_Attribute_Prefix, -- These four values are used to mark components of the artificial -- 'Base and 'Class attribute reference that ASIS has to simulate when -- processing references to a formal type in the instantiation in case -- when a formal type is an unconstrained type, and the actual type is a -- 'Class attribute, or when an actual is a 'Base attribute and the -- front-end creates too much of artificial data structures in the tree. From_Limited_View -- The corresponding Element is (a part of) a package or type limited -- view, see RM 05 10.1.1 (12.1/2 .. 12.5.2) -- may be continued... ); type Normalization_Cases is ( -- This enumeration type represents the different possible states of -- An_Association Elements in respect to normalization of associations Is_Not_Normalized, Is_Normalized, -- normalized association created for an actual parameter which itself -- is presented at the place of the call/instantiation Is_Normalized_Defaulted, -- normalized association created for an actual parameter which itself -- is NOT presented at the place of the call/instantiation, so the -- default value should be used Is_Normalized_Defaulted_For_Box); -- normalized association created for an actual parameter which itself -- is NOT presented at the place of the instantiation and the definition -- of the formal parameter includes box as the default value, so the -- actual parameter should be found at the place of the instantiation subtype Expanded_Spec is Special_Cases range Expanded_Package_Instantiation .. Expanded_Subprogram_Instantiation; subtype Normalized_Association is Normalization_Cases range Is_Normalized .. Is_Normalized_Defaulted_For_Box; subtype Defaulted_Association is Normalization_Cases range Is_Normalized_Defaulted .. Is_Normalized_Defaulted_For_Box; subtype Predefined is Special_Cases range Predefined_Operation .. Stand_Char_Literal; -- COMMENTS -- -- *1* Handling the Parenthesized Expressions and -- One_Pair_Of_Parentheses_Away and Two_Pairs_Of_Parentheses_Away -- Special Cases. -- -- An Asis Element of A_Parenthesized_Expression could be built -- on the base of any tree node which could be used for building the -- elements of all other An_Expresion subordinate kinds. -- A_Parenthesized_Expression kind is determined by comparing (during -- the automatic Internal_Element_Kinds determination only!!!) the -- Paren_Count field of the node with zero - see Sinfo.ads, the -- documentation item for "4.4 (Primary)" RM subsection, and -- Atree.ads the documentation item related to the Paren_Count field. -- -- When a subexpression is to be selected from the element of -- A_Parenthesized_Expression kind by the -- Asis_Definition.Expression_Parenthesized function, the result will -- be built on the base of just the same node as the argument having, -- just the same value of the Paren_Count field. If the argument has -- more than one pair of parentheses, the result will also be of -- A_Parenthesized_Expression kind, and the Special_Cases values -- One_Pair_Of_Parentheses_Away and Two_Pairs_Of_Parentheses_Away -- are intended to be used to count the pairs of parentheses remained -- in the result element. All the corresponding element kind -- determination and element construction should be performed in -- "by-hand" mode, except the case when the argument parenthesized -- expression has only one pair of parentheses. -- -- GNAT cannot distinguish more than three levels of the enclosing -- pairs of parentheses for a non-parenthesized enclosed expression. -- (Paren_Count = 3 stands for any number of the enclosing parentheses -- equal or greater than 3.) So ASIS-for-GNAT implementation cannot -- do more than GNAT itself (of course, we could do some search in the -- source buffer, but we prefer to agree with GNAT team that even -- Paren_Count = 3 already is a pathological case :). -- -- See also Asis_Definition.Expression_Parenthesized (body) and -- A4G.Mapping.Node_To_Element (body) -- -- *2* Root/Universal types definitions - we do not need any special -- value for representing elements of Root_Type_Kinds, because for -- each value there may be only one Element of the corresponding kind -- in a given opened Context. -- ------------------------- -- Nil String constants-- ------------------------- Nil_Asis_String : constant String := ""; Nil_Asis_Wide_String : constant Wide_String := ""; ------------------------------------------------- -- Constants for the Diagnosis string buffer -- ------------------------------------------------- ASIS_Line_Terminator : constant String := (1 => LF); -- what about DOS-like end-of-line? Diagnosis_String_Length : constant Positive := 76 + ASIS_Line_Terminator'Length; -- We are trying to set ASIS_Line_Terminator in the Diagnosis string to -- keep text strings at most 76 characters long Max_Diagnosis_Length : constant Positive := 32 * Diagnosis_String_Length; -- The length of the buffer in which the Diagnosis string is formed, -- now it is at most 32 lines 76 character each. Should be enough for -- any practically meaningful diagnosis Asis_Wide_Line_Terminator : constant Wide_String := (1 => To_Wide_Character (LF)); -- -- the physical line terminator, is used in the Diagnosis string -- to separate the parts of the diagnosis message -- See also documentation of the Skip_Line_Terminators procedure -- in the (GNAT.)sinput.adb ASIS_Line_Terminator_Len : constant Positive := ASIS_Line_Terminator'Length; Incorrect_Setting : constant String := "Attempt to set Not_An_Error " & "status with non-nil diagnosis string"; Incorrect_Setting_Len : constant Positive := Incorrect_Setting'Length; ------------------- -- Miscellaneous -- ------------------- ASIS_Path_Separator : Character; -- Is initialized in the package body. Takes into account that in VMS -- ',' should be used instead of GNAT.OS_Lib.Path_Separator. ASIS_Current_Directory : String_Access; -- Is initialized in the package body. "[]" in VMS, "." otherwise function Asis_Normalize_Pathname (Name : String; Directory : String := ""; Resolve_Links : Boolean := True; Case_Sensitive : Boolean := True) return String; -- ASIS version of GNAT.OS_Lib.Normalize_Pathname. It applies -- To_Host_Dir_Spec to the result of GNAT.OS_Lib.Normalize_Pathname. -- Should be applied to directory names only! For file names -- GNAT.OS_Lib.Normalize_Pathname should be used. -- ??? Is this the right place for this subprogram??? Internal_Implementation_Error : exception; -- Means exactly this. Is supposed to be raised in control statement -- paths which should never be reached. We need this exception mostly -- because some parts of old ASIS code (developed at the research stage of -- the ASIS project) sometimes are not structured properly. function Parameter_String_To_List (Par_String : String) return Argument_List_Access; -- Take a string that is a converted to the String type Parameters string -- of the ASIS query Initialize, Associate or Finalize (??? Should we -- process the original Wide_String Parameters string without converting -- it to String?) and parse it into an Argument_List. -- -- This function is similar to GNAT.OS_Int.Argument_String_To_List, but -- it does not treat '\' as a backquoting character. private type ASIS_OS_Time is new Long_Integer range 0 .. Long_Integer'Last; ASIS_Clock : ASIS_OS_Time := 1; -- This is the ASIS logical "clock" used to ret ASIS logical time. Nil_ASIS_OS_Time : constant ASIS_OS_Time := 0; Last_ASIS_OS_Time : constant ASIS_OS_Time := ASIS_OS_Time'Last; end A4G.A_Types;
zhmu/ananas
Ada
154
adb
-- { dg-do compile } -- { dg-options "-O -gnatn" } with Taft_Type4_Pkg; use Taft_Type4_Pkg; procedure Taft_Type4 is Obj : T; begin Proc (Obj); end;
persan/protobuf-ada
Ada
69
ads
package Google.Protobuf.Testing is end Google.Protobuf.Testing;
kontena/ruby-packer
Ada
17,272
adb
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2011,2014 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno <[email protected]> 2000 -- Version Control -- $Revision: 1.7 $ -- $Date: 2014/09/13 19:10:18 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with ncurses2.util; use ncurses2.util; with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; with Terminal_Interface.Curses.Forms.Field_User_Data; with Ada.Characters.Handling; with Ada.Strings; with Ada.Strings.Bounded; procedure ncurses2.demo_forms is package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (80); type myptr is access Integer; -- The C version stores a pointer in the userptr and -- converts it into a long integer. -- The correct, but inconvenient way to do it is to use a -- pointer to long and keep the pointer constant. -- It just adds one memory piece to allocate and deallocate (not done here) package StringData is new Terminal_Interface.Curses.Forms.Field_User_Data (Integer, myptr); function edit_secure (me : Field; c_in : Key_Code) return Key_Code; function form_virtualize (f : Form; w : Window) return Key_Code; function my_form_driver (f : Form; c : Key_Code) return Boolean; function make_label (frow : Line_Position; fcol : Column_Position; label : String) return Field; function make_field (frow : Line_Position; fcol : Column_Position; rows : Line_Count; cols : Column_Count; secure : Boolean) return Field; procedure display_form (f : Form); procedure erase_form (f : Form); -- prints '*' instead of characters. -- Not that this keeps a bug from the C version: -- type in the psasword field then move off and back. -- the cursor is at position one, but -- this assumes it as at the end so text gets appended instead -- of overwtitting. function edit_secure (me : Field; c_in : Key_Code) return Key_Code is rows, frow : Line_Position; nrow : Natural; cols, fcol : Column_Position; nbuf : Buffer_Number; c : Key_Code := c_in; c2 : Character; use StringData; begin Info (me, rows, cols, frow, fcol, nrow, nbuf); -- TODO if result = Form_Ok and nbuf > 0 then -- C version checked the return value -- of Info, the Ada binding throws an exception I think. if nbuf > 0 then declare temp : BS.Bounded_String; temps : String (1 .. 10); -- TODO Get_Buffer povides no information on the field length? len : myptr; begin Get_Buffer (me, 1, Str => temps); -- strcpy(temp, field_buffer(me, 1)); Get_User_Data (me, len); temp := BS.To_Bounded_String (temps (1 .. len.all)); if c <= Key_Max then c2 := Code_To_Char (c); if Ada.Characters.Handling.Is_Graphic (c2) then BS.Append (temp, c2); len.all := len.all + 1; Set_Buffer (me, 1, BS.To_String (temp)); c := Character'Pos ('*'); else c := 0; end if; else case c is when REQ_BEG_FIELD | REQ_CLR_EOF | REQ_CLR_EOL | REQ_DEL_LINE | REQ_DEL_WORD | REQ_DOWN_CHAR | REQ_END_FIELD | REQ_INS_CHAR | REQ_INS_LINE | REQ_LEFT_CHAR | REQ_NEW_LINE | REQ_NEXT_WORD | REQ_PREV_WORD | REQ_RIGHT_CHAR | REQ_UP_CHAR => c := 0; -- we don't want to do inline editing when REQ_CLR_FIELD => if len.all /= 0 then temp := BS.To_Bounded_String (""); Set_Buffer (me, 1, BS.To_String (temp)); len.all := 0; end if; when REQ_DEL_CHAR | REQ_DEL_PREV => if len.all /= 0 then BS.Delete (temp, BS.Length (temp), BS.Length (temp)); Set_Buffer (me, 1, BS.To_String (temp)); len.all := len.all - 1; end if; when others => null; end case; end if; end; end if; return c; end edit_secure; mode : Key_Code := REQ_INS_MODE; function form_virtualize (f : Form; w : Window) return Key_Code is type lookup_t is record code : Key_Code; result : Key_Code; -- should be Form_Request_Code, but we need MAX_COMMAND + 1 end record; lookup : constant array (Positive range <>) of lookup_t := ( ( Character'Pos ('A') mod 16#20#, REQ_NEXT_CHOICE ), ( Character'Pos ('B') mod 16#20#, REQ_PREV_WORD ), ( Character'Pos ('C') mod 16#20#, REQ_CLR_EOL ), ( Character'Pos ('D') mod 16#20#, REQ_DOWN_FIELD ), ( Character'Pos ('E') mod 16#20#, REQ_END_FIELD ), ( Character'Pos ('F') mod 16#20#, REQ_NEXT_PAGE ), ( Character'Pos ('G') mod 16#20#, REQ_DEL_WORD ), ( Character'Pos ('H') mod 16#20#, REQ_DEL_PREV ), ( Character'Pos ('I') mod 16#20#, REQ_INS_CHAR ), ( Character'Pos ('K') mod 16#20#, REQ_CLR_EOF ), ( Character'Pos ('L') mod 16#20#, REQ_LEFT_FIELD ), ( Character'Pos ('M') mod 16#20#, REQ_NEW_LINE ), ( Character'Pos ('N') mod 16#20#, REQ_NEXT_FIELD ), ( Character'Pos ('O') mod 16#20#, REQ_INS_LINE ), ( Character'Pos ('P') mod 16#20#, REQ_PREV_FIELD ), ( Character'Pos ('R') mod 16#20#, REQ_RIGHT_FIELD ), ( Character'Pos ('S') mod 16#20#, REQ_BEG_FIELD ), ( Character'Pos ('U') mod 16#20#, REQ_UP_FIELD ), ( Character'Pos ('V') mod 16#20#, REQ_DEL_CHAR ), ( Character'Pos ('W') mod 16#20#, REQ_NEXT_WORD ), ( Character'Pos ('X') mod 16#20#, REQ_CLR_FIELD ), ( Character'Pos ('Y') mod 16#20#, REQ_DEL_LINE ), ( Character'Pos ('Z') mod 16#20#, REQ_PREV_CHOICE ), ( Character'Pos ('[') mod 16#20#, -- ESCAPE Form_Request_Code'Last + 1 ), ( Key_Backspace, REQ_DEL_PREV ), ( KEY_DOWN, REQ_DOWN_CHAR ), ( Key_End, REQ_LAST_FIELD ), ( Key_Home, REQ_FIRST_FIELD ), ( KEY_LEFT, REQ_LEFT_CHAR ), ( KEY_LL, REQ_LAST_FIELD ), ( Key_Next, REQ_NEXT_FIELD ), ( KEY_NPAGE, REQ_NEXT_PAGE ), ( KEY_PPAGE, REQ_PREV_PAGE ), ( Key_Previous, REQ_PREV_FIELD ), ( KEY_RIGHT, REQ_RIGHT_CHAR ), ( KEY_UP, REQ_UP_CHAR ), ( Character'Pos ('Q') mod 16#20#, -- QUIT Form_Request_Code'Last + 1 -- TODO MAX_FORM_COMMAND + 1 ) ); c : Key_Code := Getchar (w); me : constant Field := Current (f); begin if c = Character'Pos (']') mod 16#20# then if mode = REQ_INS_MODE then mode := REQ_OVL_MODE; else mode := REQ_INS_MODE; end if; c := mode; else for n in lookup'Range loop if lookup (n).code = c then c := lookup (n).result; exit; end if; end loop; end if; -- Force the field that the user is typing into to be in reverse video, -- while the other fields are shown underlined. if c <= Key_Max then c := edit_secure (me, c); Set_Background (me, (Reverse_Video => True, others => False)); elsif c <= Form_Request_Code'Last then c := edit_secure (me, c); Set_Background (me, (Under_Line => True, others => False)); end if; return c; end form_virtualize; function my_form_driver (f : Form; c : Key_Code) return Boolean is flag : constant Driver_Result := Driver (f, F_Validate_Field); begin if c = Form_Request_Code'Last + 1 and flag = Form_Ok then return True; else Beep; return False; end if; end my_form_driver; function make_label (frow : Line_Position; fcol : Column_Position; label : String) return Field is f : constant Field := Create (1, label'Length, frow, fcol, 0, 0); o : Field_Option_Set := Get_Options (f); begin if f /= Null_Field then Set_Buffer (f, 0, label); o.Active := False; Set_Options (f, o); end if; return f; end make_label; function make_field (frow : Line_Position; fcol : Column_Position; rows : Line_Count; cols : Column_Count; secure : Boolean) return Field is f : Field; use StringData; len : myptr; begin if secure then f := Create (rows, cols, frow, fcol, 0, 1); else f := Create (rows, cols, frow, fcol, 0, 0); end if; if f /= Null_Field then Set_Background (f, (Under_Line => True, others => False)); len := new Integer; len.all := 0; Set_User_Data (f, len); end if; return f; end make_field; procedure display_form (f : Form) is w : Window; rows : Line_Count; cols : Column_Count; begin Scale (f, rows, cols); w := New_Window (rows + 2, cols + 4, 0, 0); if w /= Null_Window then Set_Window (f, w); Set_Sub_Window (f, Derived_Window (w, rows, cols, 1, 2)); Box (w); -- 0,0 Set_KeyPad_Mode (w, True); end if; -- TODO if Post(f) /= Form_Ok then it's a procedure declare begin Post (f); exception when Eti_System_Error | Eti_Bad_Argument | Eti_Posted | Eti_Connected | Eti_Bad_State | Eti_No_Room | Eti_Not_Posted | Eti_Unknown_Command | Eti_No_Match | Eti_Not_Selectable | Eti_Not_Connected | Eti_Request_Denied | Eti_Invalid_Field | Eti_Current => Refresh (w); end; -- end if; end display_form; procedure erase_form (f : Form) is w : Window := Get_Window (f); s : Window := Get_Sub_Window (f); begin Post (f, False); Erase (w); Refresh (w); Delete (s); Delete (w); end erase_form; finished : Boolean := False; f : constant Field_Array_Access := new Field_Array (1 .. 12); secure : Field; myform : Form; w : Window; c : Key_Code; result : Driver_Result; begin Move_Cursor (Line => 18, Column => 0); Add (Str => "Defined form-traversal keys: ^Q/ESC- exit form"); Add (Ch => newl); Add (Str => "^N -- go to next field ^P -- go to previous field"); Add (Ch => newl); Add (Str => "Home -- go to first field End -- go to last field"); Add (Ch => newl); Add (Str => "^L -- go to field to left ^R -- go to field to right"); Add (Ch => newl); Add (Str => "^U -- move upward to field ^D -- move downward to field"); Add (Ch => newl); Add (Str => "^W -- go to next word ^B -- go to previous word"); Add (Ch => newl); Add (Str => "^S -- go to start of field ^E -- go to end of field"); Add (Ch => newl); Add (Str => "^H -- delete previous char ^Y -- delete line"); Add (Ch => newl); Add (Str => "^G -- delete current word ^C -- clear to end of line"); Add (Ch => newl); Add (Str => "^K -- clear to end of field ^X -- clear field"); Add (Ch => newl); Add (Str => "Arrow keys move within a field as you would expect."); Add (Line => 4, Column => 57, Str => "Forms Entry Test"); Refresh; -- describe the form f.all (1) := make_label (0, 15, "Sample Form"); f.all (2) := make_label (2, 0, "Last Name"); f.all (3) := make_field (3, 0, 1, 18, False); f.all (4) := make_label (2, 20, "First Name"); f.all (5) := make_field (3, 20, 1, 12, False); f.all (6) := make_label (2, 34, "Middle Name"); f.all (7) := make_field (3, 34, 1, 12, False); f.all (8) := make_label (5, 0, "Comments"); f.all (9) := make_field (6, 0, 4, 46, False); f.all (10) := make_label (5, 20, "Password:"); f.all (11) := make_field (5, 30, 1, 9, True); secure := f.all (11); f.all (12) := Null_Field; myform := New_Form (f); display_form (myform); w := Get_Window (myform); Set_Raw_Mode (SwitchOn => True); Set_NL_Mode (SwitchOn => True); -- lets us read ^M's while not finished loop c := form_virtualize (myform, w); result := Driver (myform, c); case result is when Form_Ok => Add (Line => 5, Column => 57, Str => Get_Buffer (secure, 1)); Clear_To_End_Of_Line; Refresh; when Unknown_Request => finished := my_form_driver (myform, c); when others => Beep; end case; end loop; erase_form (myform); -- TODO Free_Form(myform); -- for (c = 0; f[c] != 0; c++) free_field(f[c]); Set_Raw_Mode (SwitchOn => False); Set_NL_Mode (SwitchOn => True); end ncurses2.demo_forms;