repo_name
stringlengths 9
74
| language
stringclasses 1
value | length_bytes
int64 11
9.34M
| extension
stringclasses 2
values | content
stringlengths 11
9.34M
|
---|---|---|---|---|
reznikmm/matreshka | Ada | 7,001 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-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 Matreshka.Internals.Strings.Configuration;
with Matreshka.Internals.Unicode.Characters.Latin;
with Matreshka.Internals.Utf16;
package body Matreshka.Internals.Text_Codecs.ISO88591 is
use Matreshka.Internals.Strings.Configuration;
use Matreshka.Internals.Unicode.Characters.Latin;
use type Matreshka.Internals.Utf16.Utf16_String_Index;
-------------------
-- Decode_Append --
-------------------
overriding procedure Decode_Append
(Self : in out ISO88591_Decoder;
Data : Ada.Streams.Stream_Element_Array;
String : in out Matreshka.Internals.Strings.Shared_String_Access) is
begin
Matreshka.Internals.Strings.Mutate (String, String.Unused + Data'Length);
for J in Data'Range loop
Self.Unchecked_Append
(Self,
String,
Matreshka.Internals.Unicode.Code_Point (Data (J)));
end loop;
String_Handler.Fill_Null_Terminator (String);
end Decode_Append;
-------------
-- Decoder --
-------------
function Decoder (Mode : Decoder_Mode) return Abstract_Decoder'Class is
begin
case Mode is
when Raw =>
return
ISO88591_Decoder'
(Skip_LF => False,
Unchecked_Append => Unchecked_Append_Raw'Access);
when XML_1_0 =>
return
ISO88591_Decoder'
(Skip_LF => False,
Unchecked_Append => Unchecked_Append_XML10'Access);
when XML_1_1 =>
return
ISO88591_Decoder'
(Skip_LF => False,
Unchecked_Append => Unchecked_Append_XML11'Access);
end case;
end Decoder;
------------
-- Encode --
------------
overriding procedure Encode
(Self : in out ISO88591_Encoder;
String : not null Matreshka.Internals.Strings.Shared_String_Access;
Buffer : out MISEV.Shared_Stream_Element_Vector_Access)
is
pragma Unreferenced (Self);
use Matreshka.Internals.Stream_Element_Vectors;
use Ada.Streams;
Code : Matreshka.Internals.Unicode.Code_Point;
Position : Matreshka.Internals.Utf16.Utf16_String_Index := 0;
Element : Ada.Streams.Stream_Element;
begin
null;
if String.Unused = 0 then
Buffer := Empty_Shared_Stream_Element_Vector'Access;
else
Buffer :=
Allocate (Ada.Streams.Stream_Element_Offset (String.Unused));
while Position < String.Unused loop
Matreshka.Internals.Utf16.Unchecked_Next
(String.Value, Position, Code);
if Code in 16#0000# .. 16#00FF# then
-- Direct mapping.
Element := Stream_Element (Code);
else
Element := Question_Mark;
end if;
Buffer.Value (Buffer.Length) := Element;
Buffer.Length := Buffer.Length + 1;
end loop;
end if;
end Encode;
-------------
-- Encoder --
-------------
function Encoder return Abstract_Encoder'Class is
begin
return ISO88591_Encoder'(null record);
end Encoder;
--------------
-- Is_Error --
--------------
overriding function Is_Error (Self : ISO88591_Decoder) return Boolean is
pragma Unreferenced (Self);
begin
return False;
end Is_Error;
-------------------
-- Is_Mailformed --
-------------------
overriding function Is_Mailformed
(Self : ISO88591_Decoder) return Boolean
is
pragma Unreferenced (Self);
begin
return False;
end Is_Mailformed;
end Matreshka.Internals.Text_Codecs.ISO88591;
|
stcarrez/dynamo | Ada | 3,108 | adb | -----------------------------------------------------------------------
-- gen-artifacts-distribs-copies -- Copy based distribution artifact
-- Copyright (C) 2012, 2013 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.Directories;
with Util.Log.Loggers;
-- The <b>Gen.Artifacts.Distribs.Copies</b> package provides distribution rules
-- to copy a file or a directory to the distribution area.
package body Gen.Artifacts.Distribs.Copies is
use Util.Log;
Log : constant Loggers.Logger := Loggers.Create ("Gen.Artifacts.Distribs.Copies");
-- ------------------------------
-- Create a distribution rule to copy a set of files or directories.
-- ------------------------------
function Create_Rule (Node : in DOM.Core.Node;
Copy_First_File : in Boolean) return Distrib_Rule_Access is
pragma Unreferenced (Node);
Result : constant Copy_Rule_Access := new Copy_Rule;
begin
Result.Copy_First_File := Copy_First_File;
return Result.all'Access;
end Create_Rule;
-- ------------------------------
-- Get a name to qualify the installation rule (used for logs).
-- ------------------------------
overriding
function Get_Install_Name (Rule : in Copy_Rule) return String is
pragma Unreferenced (Rule);
begin
return "copy";
end Get_Install_Name;
overriding
procedure Install (Rule : in Copy_Rule;
Path : in String;
Files : in File_Vector;
Context : in out Generator'Class) is
pragma Unreferenced (Context);
use type Ada.Containers.Count_Type;
Source : constant String := Get_Source_Path (Files, Rule.Copy_First_File);
Dir : constant String := Ada.Directories.Containing_Directory (Path);
begin
if Files.Length > 1 then
Log.Info ("copy {0} to {1} (ignoring {2} files)", Source, Path,
Natural'Image (Natural (Files.Length) - 1));
else
Log.Info ("copy {0} to {1}", Source, Path);
end if;
Ada.Directories.Create_Path (Dir);
Ada.Directories.Copy_File (Source_Name => Source,
Target_Name => Path,
Form => "preserve=all_attributes, mode=overwrite");
end Install;
end Gen.Artifacts.Distribs.Copies;
|
charlie5/cBound | Ada | 1,572 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with swig;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_focus_in_event_t is
-- Item
--
type Item is record
response_type : aliased Interfaces.Unsigned_8;
detail : aliased Interfaces.Unsigned_8;
sequence : aliased Interfaces.Unsigned_16;
event : aliased xcb.xcb_window_t;
mode : aliased Interfaces.Unsigned_8;
pad0 : aliased swig.int8_t_Array (0 .. 2);
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_focus_in_event_t.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_focus_in_event_t.Item,
Element_Array => xcb.xcb_focus_in_event_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_focus_in_event_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_focus_in_event_t.Pointer,
Element_Array => xcb.xcb_focus_in_event_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_focus_in_event_t;
|
zhmu/ananas | Ada | 9,051 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 5 0 --
-- --
-- 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 System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_50 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_50;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
-- The following declarations are for the case where the address
-- passed to GetU_50 or SetU_50 is not guaranteed to be aligned.
-- These routines are used when the packed array is itself a
-- component of a packed record, and therefore may not be aligned.
type ClusterU is new Cluster;
for ClusterU'Alignment use 1;
type ClusterU_Ref is access ClusterU;
type Rev_ClusterU is new ClusterU
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_ClusterU_Ref is access Rev_ClusterU;
------------
-- Get_50 --
------------
function Get_50
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_50
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_50;
-------------
-- GetU_50 --
-------------
function GetU_50
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_50
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : ClusterU_Ref with Address => A'Address, Import;
RC : Rev_ClusterU_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end GetU_50;
------------
-- Set_50 --
------------
procedure Set_50
(Arr : System.Address;
N : Natural;
E : Bits_50;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_50;
-------------
-- SetU_50 --
-------------
procedure SetU_50
(Arr : System.Address;
N : Natural;
E : Bits_50;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : ClusterU_Ref with Address => A'Address, Import;
RC : Rev_ClusterU_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end SetU_50;
end System.Pack_50;
|
reznikmm/matreshka | Ada | 4,520 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools 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 WSDL.Iterators;
with WSDL.Visitors;
package body WSDL.AST.Descriptions is
-----------
-- Enter --
-----------
overriding procedure Enter
(Self : not null access Description_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control) is
begin
Visitor.Enter_Description (Description_Access (Self), Control);
end Enter;
-----------
-- Leave --
-----------
overriding procedure Leave
(Self : not null access Description_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control) is
begin
Visitor.Leave_Description (Description_Access (Self), Control);
end Leave;
-----------
-- Visit --
-----------
overriding procedure Visit
(Self : not null access Description_Node;
Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control) is
begin
Iterator.Visit_Description (Visitor, Description_Access (Self), Control);
end Visit;
end WSDL.AST.Descriptions;
|
zhmu/ananas | Ada | 17,758 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
-- Copyright (C) 1995-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/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is the HP-UX version of this package
-- This package encapsulates all direct interfaces to OS services
-- that are needed by the tasking run-time (libgnarl).
-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
with Ada.Unchecked_Conversion;
with Interfaces.C;
with System.Parameters;
package System.OS_Interface is
pragma Preelaborate;
pragma Linker_Options ("-lcma");
subtype int is Interfaces.C.int;
subtype short is Interfaces.C.short;
subtype long is Interfaces.C.long;
subtype unsigned is Interfaces.C.unsigned;
subtype unsigned_short is Interfaces.C.unsigned_short;
subtype unsigned_long is Interfaces.C.unsigned_long;
subtype unsigned_char is Interfaces.C.unsigned_char;
subtype plain_char is Interfaces.C.plain_char;
subtype size_t is Interfaces.C.size_t;
-----------
-- Errno --
-----------
function errno return int;
pragma Import (C, errno, "__get_errno");
EAGAIN : constant := 11;
EINTR : constant := 4;
EINVAL : constant := 22;
ENOMEM : constant := 12;
ETIME : constant := 52;
ETIMEDOUT : constant := 238;
FUNC_ERR : constant := -1;
-------------
-- Signals --
-------------
Max_Interrupt : constant := 44;
type Signal is new int range 0 .. Max_Interrupt;
for Signal'Size use int'Size;
SIGHUP : constant := 1; -- hangup
SIGINT : constant := 2; -- interrupt (rubout)
SIGQUIT : constant := 3; -- quit (ASCD FS)
SIGILL : constant := 4; -- illegal instruction (not reset)
SIGTRAP : constant := 5; -- trace trap (not reset)
SIGIOT : constant := 6; -- IOT instruction
SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
SIGEMT : constant := 7; -- EMT instruction
SIGFPE : constant := 8; -- floating point exception
SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
SIGBUS : constant := 10; -- bus error
SIGSEGV : constant := 11; -- segmentation violation
SIGSYS : constant := 12; -- bad argument to system call
SIGPIPE : constant := 13; -- write on a pipe with no one to read it
SIGALRM : constant := 14; -- alarm clock
SIGTERM : constant := 15; -- software termination signal from kill
SIGUSR1 : constant := 16; -- user defined signal 1
SIGUSR2 : constant := 17; -- user defined signal 2
SIGCLD : constant := 18; -- alias for SIGCHLD
SIGCHLD : constant := 18; -- child status change
SIGPWR : constant := 19; -- power-fail restart
SIGVTALRM : constant := 20; -- virtual timer alarm
SIGPROF : constant := 21; -- profiling timer alarm
SIGIO : constant := 22; -- asynchronous I/O
SIGPOLL : constant := 22; -- pollable event occurred
SIGWINCH : constant := 23; -- window size change
SIGSTOP : constant := 24; -- stop (cannot be caught or ignored)
SIGTSTP : constant := 25; -- user stop requested from tty
SIGCONT : constant := 26; -- stopped process has been continued
SIGTTIN : constant := 27; -- background tty read attempted
SIGTTOU : constant := 28; -- background tty write attempted
SIGURG : constant := 29; -- urgent condition on IO channel
SIGLOST : constant := 30; -- remote lock lost (NFS)
SIGDIL : constant := 32; -- DIL signal
SIGXCPU : constant := 33; -- CPU time limit exceeded (setrlimit)
SIGXFSZ : constant := 34; -- file size limit exceeded (setrlimit)
SIGADAABORT : constant := SIGABRT;
-- Note: on other targets, we usually use SIGABRT, but on HP/UX, it
-- appears that SIGABRT can't be used in sigwait(), so we use SIGTERM.
type Signal_Set is array (Natural range <>) of Signal;
Unmasked : constant Signal_Set :=
(SIGBUS, SIGTRAP, SIGTTIN, SIGTTOU, SIGTSTP);
Reserved : constant Signal_Set := (SIGKILL, SIGSTOP);
type sigset_t is private;
type isr_address is access procedure (sig : int);
pragma Convention (C, isr_address);
function intr_attach (sig : int; handler : isr_address) return long;
Intr_Attach_Reset : constant Boolean := True;
-- True if intr_attach is reset after an interrupt handler is called
function sigaddset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigaddset, "sigaddset");
function sigdelset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigdelset, "sigdelset");
function sigfillset (set : access sigset_t) return int;
pragma Import (C, sigfillset, "sigfillset");
function sigismember (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigismember, "sigismember");
function sigemptyset (set : access sigset_t) return int;
pragma Import (C, sigemptyset, "sigemptyset");
type Signal_Handler is access procedure (signo : Signal);
type struct_sigaction is record
sa_handler : System.Address;
sa_mask : sigset_t;
sa_flags : int;
end record;
pragma Convention (C, struct_sigaction);
type struct_sigaction_ptr is access all struct_sigaction;
SA_RESTART : constant := 16#40#;
SA_SIGINFO : constant := 16#10#;
SA_ONSTACK : constant := 16#01#;
SIG_BLOCK : constant := 0;
SIG_UNBLOCK : constant := 1;
SIG_SETMASK : constant := 2;
SIG_DFL : constant := 0;
SIG_IGN : constant := 1;
SIG_ERR : constant := -1;
function sigaction
(sig : Signal;
act : struct_sigaction_ptr;
oact : struct_sigaction_ptr) return int;
pragma Import (C, sigaction, "sigaction");
----------
-- Time --
----------
type timespec is private;
function nanosleep (rqtp, rmtp : access timespec) return int;
pragma Import (C, nanosleep);
type clockid_t is new int;
function Clock_Gettime
(Clock_Id : clockid_t; Tp : access timespec) return int;
pragma Import (C, Clock_Gettime);
function To_Duration (TS : timespec) return Duration;
pragma Inline (To_Duration);
function To_Timespec (D : Duration) return timespec;
pragma Inline (To_Timespec);
-------------------------
-- Priority Scheduling --
-------------------------
SCHED_FIFO : constant := 0;
SCHED_RR : constant := 1;
SCHED_OTHER : constant := 2;
-------------
-- Process --
-------------
type pid_t is private;
function kill (pid : pid_t; sig : Signal) return int;
pragma Import (C, kill, "kill");
function getpid return pid_t;
pragma Import (C, getpid, "getpid");
-------------
-- Threads --
-------------
type Thread_Body is access
function (arg : System.Address) return System.Address;
pragma Convention (C, Thread_Body);
function Thread_Body_Access is new
Ada.Unchecked_Conversion (System.Address, Thread_Body);
type pthread_t is private;
subtype Thread_Id is pthread_t;
type pthread_mutex_t is limited private;
type pthread_cond_t is limited private;
type pthread_attr_t is limited private;
type pthread_mutexattr_t is limited private;
type pthread_condattr_t is limited private;
type pthread_key_t is private;
-- Read/Write lock not supported on HPUX. To add support both types
-- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
-- with the associated routines pthread_rwlock_[init/destroy] and
-- pthread_rwlock_[rdlock/wrlock/unlock].
subtype pthread_rwlock_t is pthread_mutex_t;
subtype pthread_rwlockattr_t is pthread_mutexattr_t;
-----------
-- Stack --
-----------
function Get_Stack_Base (thread : pthread_t) return Address;
pragma Inline (Get_Stack_Base);
-- This is a dummy procedure to share some GNULLI files
---------------------------------------
-- Nonstandard Thread Initialization --
---------------------------------------
procedure pthread_init;
pragma Inline (pthread_init);
-- This is a dummy procedure to share some GNULLI files
-------------------------
-- POSIX.1c Section 3 --
-------------------------
function sigwait (set : access sigset_t) return int;
pragma Import (C, sigwait, "cma_sigwait");
function sigwait
(set : access sigset_t;
sig : access Signal) return int;
pragma Inline (sigwait);
-- DCE_THREADS has a nonstandard sigwait
function pthread_kill
(thread : pthread_t;
sig : Signal) return int;
pragma Inline (pthread_kill);
-- DCE_THREADS doesn't have pthread_kill
function pthread_sigmask
(how : int;
set : access sigset_t;
oset : access sigset_t) return int;
-- DCE THREADS does not have pthread_sigmask. Instead, it uses sigprocmask
-- to do the signal handling when the thread library is sucked in.
pragma Import (C, pthread_sigmask, "sigprocmask");
--------------------------
-- POSIX.1c Section 11 --
--------------------------
function pthread_mutexattr_init
(attr : access pthread_mutexattr_t) return int;
-- DCE_THREADS has a nonstandard pthread_mutexattr_init
function pthread_mutexattr_destroy
(attr : access pthread_mutexattr_t) return int;
-- DCE_THREADS has a nonstandard pthread_mutexattr_destroy
function pthread_mutex_init
(mutex : access pthread_mutex_t;
attr : access pthread_mutexattr_t) return int;
-- DCE_THREADS has a nonstandard pthread_mutex_init
function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
-- DCE_THREADS has a nonstandard pthread_mutex_destroy
function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_mutex_lock);
-- DCE_THREADS has nonstandard pthread_mutex_lock
function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_mutex_unlock);
-- DCE_THREADS has nonstandard pthread_mutex_lock
function pthread_condattr_init
(attr : access pthread_condattr_t) return int;
-- DCE_THREADS has nonstandard pthread_condattr_init
function pthread_condattr_destroy
(attr : access pthread_condattr_t) return int;
-- DCE_THREADS has nonstandard pthread_condattr_destroy
function pthread_cond_init
(cond : access pthread_cond_t;
attr : access pthread_condattr_t) return int;
-- DCE_THREADS has nonstandard pthread_cond_init
function pthread_cond_destroy (cond : access pthread_cond_t) return int;
-- DCE_THREADS has nonstandard pthread_cond_destroy
function pthread_cond_signal (cond : access pthread_cond_t) return int;
pragma Inline (pthread_cond_signal);
-- DCE_THREADS has nonstandard pthread_cond_signal
function pthread_cond_wait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t) return int;
pragma Inline (pthread_cond_wait);
-- DCE_THREADS has a nonstandard pthread_cond_wait
function pthread_cond_timedwait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t;
abstime : access timespec) return int;
pragma Inline (pthread_cond_timedwait);
-- DCE_THREADS has a nonstandard pthread_cond_timedwait
--------------------------
-- POSIX.1c Section 13 --
--------------------------
type struct_sched_param is record
sched_priority : int; -- scheduling priority
end record;
function pthread_setschedparam
(thread : pthread_t;
policy : int;
param : access struct_sched_param) return int;
pragma Inline (pthread_setschedparam);
-- DCE_THREADS has a nonstandard pthread_setschedparam
function sched_yield return int;
pragma Inline (sched_yield);
-- DCE_THREADS has a nonstandard sched_yield
---------------------------
-- P1003.1c - Section 16 --
---------------------------
function pthread_attr_init (attributes : access pthread_attr_t) return int;
pragma Inline (pthread_attr_init);
-- DCE_THREADS has a nonstandard pthread_attr_init
function pthread_attr_destroy
(attributes : access pthread_attr_t) return int;
pragma Inline (pthread_attr_destroy);
-- DCE_THREADS has a nonstandard pthread_attr_destroy
function pthread_attr_setstacksize
(attr : access pthread_attr_t;
stacksize : size_t) return int;
pragma Inline (pthread_attr_setstacksize);
-- DCE_THREADS has a nonstandard pthread_attr_setstacksize
function pthread_create
(thread : access pthread_t;
attributes : access pthread_attr_t;
start_routine : Thread_Body;
arg : System.Address) return int;
pragma Inline (pthread_create);
-- DCE_THREADS has a nonstandard pthread_create
procedure pthread_detach (thread : access pthread_t);
pragma Import (C, pthread_detach);
procedure pthread_exit (status : System.Address);
pragma Import (C, pthread_exit, "pthread_exit");
function pthread_self return pthread_t;
pragma Import (C, pthread_self, "pthread_self");
--------------------------
-- POSIX.1c Section 17 --
--------------------------
function pthread_setspecific
(key : pthread_key_t;
value : System.Address) return int;
pragma Inline (pthread_setspecific);
-- DCE_THREADS has a nonstandard pthread_setspecific
function pthread_getspecific (key : pthread_key_t) return System.Address;
pragma Inline (pthread_getspecific);
-- DCE_THREADS has a nonstandard pthread_getspecific
type destructor_pointer is access procedure (arg : System.Address);
pragma Convention (C, destructor_pointer);
function pthread_key_create
(key : access pthread_key_t;
destructor : destructor_pointer) return int;
pragma Inline (pthread_key_create);
-- DCE_THREADS has a nonstandard pthread_key_create
private
type array_type_1 is array (Integer range 0 .. 7) of unsigned_long;
type sigset_t is record
X_X_sigbits : array_type_1;
end record;
pragma Convention (C, sigset_t);
type pid_t is new int;
type time_t is range -2 ** (System.Parameters.time_t_bits - 1)
.. 2 ** (System.Parameters.time_t_bits - 1) - 1;
type timespec is record
tv_sec : time_t;
tv_nsec : long;
end record;
pragma Convention (C, timespec);
CLOCK_REALTIME : constant clockid_t := 1;
type cma_t_address is new System.Address;
type cma_t_handle is record
field1 : cma_t_address;
field2 : Short_Integer;
field3 : Short_Integer;
end record;
for cma_t_handle'Size use 64;
type pthread_attr_t is new cma_t_handle;
pragma Convention (C_Pass_By_Copy, pthread_attr_t);
type pthread_condattr_t is new cma_t_handle;
pragma Convention (C_Pass_By_Copy, pthread_condattr_t);
type pthread_mutexattr_t is new cma_t_handle;
pragma Convention (C_Pass_By_Copy, pthread_mutexattr_t);
type pthread_t is new cma_t_handle;
pragma Convention (C_Pass_By_Copy, pthread_t);
type pthread_mutex_t is new cma_t_handle;
pragma Convention (C_Pass_By_Copy, pthread_mutex_t);
type pthread_cond_t is new cma_t_handle;
pragma Convention (C_Pass_By_Copy, pthread_cond_t);
type pthread_key_t is new int;
end System.OS_Interface;
|
glencornell/ada-socketcan | Ada | 1,212 | ads | -- MIT License
--
-- Copyright (c) 2021 Glen Cornell <[email protected]>
--
-- 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, 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
-- AUTHORS OR 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.
package Sockets is
pragma Pure;
end Sockets;
|
jhumphry/PRNG_Zoo | Ada | 3,459 | adb | --
-- PRNG Zoo
-- Copyright (c) 2014 - 2015, James Humphry
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-- PERFORMANCE OF THIS SOFTWARE.
with PRNG_Zoo.Stats;
with Ada.Characters.Latin_1;
package body PRNG_Zoo.Tests.Distributions is
--------------
-- Run_Test --
--------------
procedure Run_Test(G : in out PRNG'Class;
D : in out Dist.Distribution'Class;
T : in out Test_Distribution'Class;
iterations : Positive := 1_000_000) is
begin
for I in 1..iterations loop
T.Feed(D.Generate(G));
end loop;
T.Compute_Result;
end Run_Test;
-----------
-- Reset --
-----------
procedure Reset (T : in out NormalChi2) is
begin
Stats.Make_Normal_Bins(B => Binned(T));
T.chi2_cdf_result := -1.0;
end Reset;
----------
-- Feed --
----------
procedure Feed
(T : in out NormalChi2;
X : in Dist.Float_Type)
is
Success : Boolean := False;
begin
for I in T.Bin_Counts'First..(T.Bin_Counts'Last-1) loop
if Long_Float(X) < T.Bin_Boundary(I) then
T.Bin_Counts(I) := T.Bin_Counts(I) + 1;
Success := True;
exit;
end if;
end loop;
if not Success then
T.Bin_Counts(T.Bin_Counts'Last) := T.Bin_Counts(T.Bin_Counts'Last) + 1;
end if;
end Feed;
--------------------
-- Compute_Result --
--------------------
procedure Compute_Result (T : in out NormalChi2) is
begin
T.chi2_value := Stats.Chi2_Value_Bins(Binned(T));
T.chi2_cdf_result := Stats.Chi2_CDF(T.chi2_value,
T.N - T.Distribution_DF);
end Compute_Result;
------------------
-- Result_Ready --
------------------
function Result_Ready(T: NormalChi2) return Boolean is
begin
return T.chi2_cdf_result /= -1.0;
end Result_Ready;
------------
-- Passed --
------------
function Passed
(T : in NormalChi2;
p : in Long_Float := 0.01)
return Boolean
is
begin
return T.chi2_cdf_result > p and T.chi2_cdf_result < (1.0-p);
end Passed;
-------
-- p --
-------
function p (T : in NormalChi2) return Long_Float is
begin
return T.chi2_cdf_result;
end p;
---------------------
-- Describe_Result --
---------------------
function Describe_Result (T : in NormalChi2) return String is
LF : Character renames Ada.Characters.Latin_1.LF;
begin
return "Normal Chi2 distribution test for " & Integer'Image(T.N) &
" bins with chi2 value := " & Long_Float'Image(T.chi2_value) & LF &
"corresponding to chi2 CDF := " & Long_Float'Image(T.chi2_cdf_result);
end Describe_Result;
end PRNG_Zoo.Tests.Distributions;
|
sungyeon/drake | Ada | 2,823 | ads | pragma License (Unrestricted);
package System.Machine_Code is
pragma Pure;
type Asm_Output_Operand is private;
No_Output_Operands : constant Asm_Output_Operand;
type Asm_Output_Operand_List is
array (Integer range <>) of Asm_Output_Operand;
type Asm_Input_Operand is private;
No_Input_Operands : constant Asm_Input_Operand;
type Asm_Input_Operand_List is
array (Integer range <>) of Asm_Input_Operand;
type Asm_Insn (<>) is private;
procedure Asm (
Template : String;
Outputs : Asm_Output_Operand_List;
Inputs : Asm_Input_Operand_List;
Clobber : String := "";
Volatile : Boolean := False)
with Import, Convention => Intrinsic;
procedure Asm (
Template : String;
Outputs : Asm_Output_Operand := No_Output_Operands;
Inputs : Asm_Input_Operand_List;
Clobber : String := "";
Volatile : Boolean := False)
with Import, Convention => Intrinsic;
procedure Asm (
Template : String;
Outputs : Asm_Output_Operand_List;
Inputs : Asm_Input_Operand := No_Input_Operands;
Clobber : String := "";
Volatile : Boolean := False)
with Import, Convention => Intrinsic;
procedure Asm (
Template : String;
Outputs : Asm_Output_Operand := No_Output_Operands;
Inputs : Asm_Input_Operand := No_Input_Operands;
Clobber : String := "";
Volatile : Boolean := False)
with Import, Convention => Intrinsic;
function Asm (
Template : String;
Outputs : Asm_Output_Operand_List;
Inputs : Asm_Input_Operand_List;
Clobber : String := "";
Volatile : Boolean := False)
return Asm_Insn
with Import, Convention => Intrinsic;
function Asm (
Template : String;
Outputs : Asm_Output_Operand := No_Output_Operands;
Inputs : Asm_Input_Operand_List;
Clobber : String := "";
Volatile : Boolean := False)
return Asm_Insn
with Import, Convention => Intrinsic;
function Asm (
Template : String;
Outputs : Asm_Output_Operand_List;
Inputs : Asm_Input_Operand := No_Input_Operands;
Clobber : String := "";
Volatile : Boolean := False)
return Asm_Insn
with Import, Convention => Intrinsic;
function Asm (
Template : String;
Outputs : Asm_Output_Operand := No_Output_Operands;
Inputs : Asm_Input_Operand := No_Input_Operands;
Clobber : String := "";
Volatile : Boolean := False)
return Asm_Insn
with Import, Convention => Intrinsic;
private
type Asm_Output_Operand is new Integer;
No_Output_Operands : constant Asm_Output_Operand := 0;
type Asm_Input_Operand is new Integer;
No_Input_Operands : constant Asm_Input_Operand := 0;
type Asm_Insn is new Integer;
end System.Machine_Code;
|
GauBen/Arbre-Genealogique | Ada | 1,796 | adb | with Arbre_Genealogique; use Arbre_Genealogique;
with Date; use Date;
with Ada.Text_Io; use Ada.Text_Io;
with Ada.Integer_Text_Io; use Ada.Integer_Text_Io;
procedure Scenario_Genealogique is
Arbre : T_Arbre_Genealogique;
Personne : T_Personne;
Personne2 : T_Personne;
Cle : Integer;
Cle2 : Integer;
Liste : T_Liste_Relations;
Arete : T_Arete_Etiquetee;
begin
Initialiser (Arbre);
Personne :=
(Sb.To_Bounded_String ("Jean Bon"),
Sb.To_Bounded_String ("Jean, Eude Bon"), Masculin,
Creer_Date (31, 1, 1960), Sb.To_Bounded_String ("Paris, France"));
Personne2 :=
(Sb.To_Bounded_String ("Kevin Bon"),
Sb.To_Bounded_String ("Kevin, Junior Bon"), Masculin,
Creer_Date (1, 4, 1999), Sb.To_Bounded_String ("Toulouse, France"));
Ajouter_Personne (Arbre, Personne, Cle);
Ajouter_Personne (Arbre, Personne2, Cle2);
Ajouter_Relation (Arbre, Cle, A_Pour_Enfant, Cle2);
Put (Sb.To_String (Lire_Registre (Arbre, Cle).Nom_Usuel));
Put (Sb.To_String (Lire_Registre (Arbre, Cle2).Nom_Usuel));
Liste_Relations (Liste, Arbre, Cle2);
while Liste_Non_Vide (Liste) loop
Relation_Suivante (Liste, Arete);
Put (Cle2, 0);
Put (" " & T_Etiquette_Arete'Image (Arete.Etiquette) & " ");
Put (Arete.Destination, 0);
New_Line;
end loop;
-- ajouter_relation(truc, cle1, cle2, relation);
Supprimer_Relation(Arbre,Cle,A_Pour_Enfant,Cle2);
New_Line;
Liste_Relations(Liste,Arbre,Cle);
while Liste_Non_Vide(Liste) loop
Relation_Suivante(Liste,Arete);
Put(Cle,0);
Put(" " & T_Etiquette_Arete'Image(Arete.Etiquette) & " ");
Put(Arete.Destination, 0);
New_Line;
end loop;
Detruire (Arbre);
end Scenario_Genealogique;
|
zertovitch/hac | Ada | 6,919 | adb | -- HAC: command-line build and execution tool for HAC (HAC Ada Compiler)
-- Usage, license etc. : see `Help` below and the HAC_Sys package (hac_sys.ads).
-- For a small version, see HAC_Mini (hac_mini.adb).
--
with HAC_Pkg;
with HAC_Sys.Builder,
HAC_Sys.Co_Defs,
HAC_Sys.Defs,
HAC_Sys.PCode.Interpreter.In_Defs;
with HAT;
with Ada.Calendar,
Ada.Command_Line,
Ada.Text_IO.Text_Streams;
procedure HAC is
asm_dump_file_name, cmp_dump_file_name : HAT.VString;
compile_only : Boolean := False;
remarks : HAC_Sys.Defs.Remark_Set := HAC_Sys.Defs.default_remarks;
use HAC_Pkg;
procedure Compile_and_interpret_file (Ada_file_name : String; arg_pos : Positive) is
use Ada.Calendar, Ada.Text_IO;
f : Ada.Text_IO.File_Type;
t1, t2 : Ada.Calendar.Time;
BD : HAC_Sys.Builder.Build_Data;
shebang_offset : Natural;
trace : constant HAC_Sys.Co_Defs.Compilation_Trace_Parameters :=
(pipe => null,
progress => Compilation_Feedback'Access,
detail_level => verbosity);
begin
main_Ada_file_name := HAT.To_VString (Ada_file_name);
if verbosity > 1 then
New_Line;
Put_Line (HAC_margin_1 & "HAC is free and open-source. Type ""hac"" for license.");
end if;
Open (f, In_File, Ada_file_name);
HAC_Sys.Builder.Skip_Shebang (f, shebang_offset);
BD.Set_Diagnostic_File_Names (HAT.To_String (asm_dump_file_name), HAT.To_String (cmp_dump_file_name));
BD.Set_Remark_Set (remarks);
BD.Set_Main_Source_Stream (Text_Streams.Stream (f), Ada_file_name, shebang_offset);
BD.Set_Message_Feedbacks (trace);
BD.Set_Target (target);
BD.LD.Set_Source_Access
(Exists_Source'Access,
Open_Source'Access,
Close_Source'Access);
t1 := Clock;
BD.Build_Main;
t2 := Clock;
Close (f);
if verbosity >= 2 then
Put_Line (
HAC_margin_2 & "Build finished in" &
Duration'Image (t2 - t1) &
" seconds." &
Integer'Image (BD.Total_Compiled_Lines) & " lines compiled in total."
);
end if;
--
if not BD.Build_Successful then
PLCE ("Errors found, build failed.");
HAC_Pkg.Failure;
return;
end if;
if verbosity >= 2 then
Put_Line (HAC_margin_2 & "Target . : " & BD.CD.target.Name);
Put_Line (HAC_margin_2 & "CPU . . : " & BD.CD.target.CPU);
Put_Line (HAC_margin_2 & "OS . . . : " & BD.CD.target.OS);
--
if BD.CD.Is_HAC_VM then
Put_Line
(HAC_margin_2 & "Object code size:" &
Natural'Image (BD.Object_Code_Size) &
" of" &
Natural'Image (HAC_Sys.Builder.Maximum_Object_Code_Size) &
" Virtual Machine instructions.");
if BD.Folded_Instructions + BD.Specialized_Instructions > 0 then
Put_Line (HAC_margin_2 & "Code optimization:");
Put_Line
(HAC_margin_2 & " " & Natural'Image (BD.Folded_Instructions) &
" instructions folded");
Put_Line
(HAC_margin_2 & " " & Natural'Image (BD.Specialized_Instructions) &
" instructions specialized");
end if;
end if;
end if;
if compile_only then
return;
end if;
Run (BD, arg_pos);
exception
when Name_Error =>
PLCE
(HAC_margin_3 &
"Error: file """ & Ada_file_name &
""" not found (perhaps in exm or test subdirectory ?)");
HAC_Pkg.Failure;
end Compile_and_interpret_file;
hac_ing : Boolean := False;
quit : Boolean := False;
help_level : Positive := 1;
procedure Argument_Error (msg : String) is
begin
PLCE (msg);
NLCE;
quit := True;
delay 1.0;
end Argument_Error;
procedure Process_Argument (arg : String; arg_pos : Positive) is
opt : constant String := arg (arg'First + 1 .. arg'Last);
unknown_warning : Boolean;
use HAT;
begin
if arg (arg'First) = '-' then
if opt'Length = 0 then
Argument_Error ("Missing option code after '-'");
return;
end if;
case opt (opt'First) is
when 'a' =>
asm_dump_file_name := To_VString (assembler_output_name);
when 'c' =>
compile_only := True;
when 'd' =>
cmp_dump_file_name := To_VString (compiler_dump_name);
when 'h' =>
if opt'Length > 1 and then opt (opt'First + 1) = '2' then
help_level := 2;
end if;
quit := True;
when 't' =>
if opt'Length = 1 then
Argument_Error ("Missing target");
else
declare
new_target_name : constant String := opt (opt'First + 1 .. opt'Last);
begin
Set_Target (new_target_name);
exception
when Constraint_Error =>
Argument_Error ("Unknown target " & new_target_name);
end;
end if;
when 'w' =>
if opt'Length = 1 then
Argument_Error ("Missing warning / note switch");
else
unknown_warning := True;
for w in HAC_Sys.Defs.Compile_Remark loop
if HAC_Sys.Defs.remark_letter (w) = opt (opt'First + 1) then
remarks (w) := True;
unknown_warning := False;
elsif To_Upper (HAC_Sys.Defs.remark_letter (w)) = opt (opt'First + 1) then
remarks (w) := False;
unknown_warning := False;
end if;
end loop;
if unknown_warning then
Argument_Error ("Unknown warning / note switch '" & opt (opt'First + 1) & ''');
end if;
end if;
when 'I' =>
if command_line_source_path /= "" then
command_line_source_path := command_line_source_path & ';';
end if;
command_line_source_path :=
command_line_source_path & To_VString (opt (opt'First + 1 .. opt'Last));
when 'v' =>
verbosity := 1;
if opt'Length > 1 and then opt (opt'First + 1) in '0' .. '9' then
verbosity := Character'Pos (opt (opt'First + 1)) - Character'Pos ('0');
end if;
when others =>
Argument_Error ("Unknown option: """ & arg & '"');
end case;
else
Compile_and_interpret_file (arg, arg_pos);
hac_ing := True;
quit := True; -- The other arguments are for the HAC program.
end if;
end Process_Argument;
use Ada.Command_Line;
begin
for i in 1 .. Argument_Count loop
Process_Argument (Argument (i), i);
exit when quit;
end loop;
if not hac_ing then
Help (help_level);
if verbosity > 1 then
Ada.Text_IO.Put_Line ("Size of a HAC VM memory unit:" &
Integer'Image (HAC_Sys.PCode.Interpreter.In_Defs.Data_Type'Size / 8) &
" bytes"
);
end if;
end if;
end HAC;
|
AntoineLestrade/Automatic_Shutdown | Ada | 2,349 | adb | with Interfaces.C.Strings;
with System;
with Gtkada.Types; use Gtkada.Types;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Widgets.Countdown_Widget is
-------------
-- Gtk_New --
-------------
procedure Gtk_New (Self : out Countdown_Widget_Acc) is
begin
Self := new Countdown_Widget_Record;
Widgets.Countdown_Widget.Initialize(Self);
end Gtk_New;
----------------
-- Initialize --
----------------
procedure Initialize (Self : access Countdown_Widget_Record'Class) is
begin
G_New(Self, Get_Type);
Gtk.Box.Initialize_Vbox(Self);
Gtk.Label.Gtk_New(Self.Lbl_Countdown, "");
Self.Pack_Start(Self.Lbl_Countdown);
end Initialize;
--------------
-- Get_Type --
--------------
function Get_Type return Glib.Gtype is
Signals : chars_ptr_array := String(Signal_Exit) + "dummy_signal";
begin
if Initialize_Class_Record(Ancestor => Gtk.Box.Get_Vbox_Type,
Class_Record => Klass'Access,
Type_Name => "Countdown_Widget",
Signals => Signals)
then
null;
end if;
return Klass.The_Type;
end Get_Type;
procedure Set_Label(Self : access Countdown_Widget_Record'Class; Time_To_Action : Duration) is
Text : Ada.Strings.Unbounded.Unbounded_String;
Dur : Integer := Integer(Time_To_Action);
Duration_Part : Integer;
begin
Text := To_Unbounded_String("The computer will shut down in ");
if Dur >= 3600 then
Duration_Part := Dur / 3600;
Append(Text, Integer'Image(Duration_Part));
Append(Text, " hour");
if Dur > 1 then Append(Text, "s"); end if;
end if;
-- minutes
Duration_Part := (Dur mod 3600) / 60;
Append(Text, " ");
Append (Text, Integer'Image(Duration_Part));
Append(Text, " minute");
if Duration_Part > 1 then Append(Text, "s"); end if;
--seconds
Duration_Part := Dur mod 60;
Append(Text, " ");
Append(Text, Integer'Image(Duration_Part));
Append(Text, " second");
if Duration_Part > 1 then Append(Text, "s"); end if;
Append(Text, ".");
Self.Lbl_Countdown.Set_Text(To_String(Text));
end Set_Label;
end Widgets.Countdown_Widget;
|
AdaCore/langkit | Ada | 58,818 | adb | --
-- Copyright (C) 2014-2022, AdaCore
-- SPDX-License-Identifier: Apache-2.0
--
with Ada.Tags; use Ada.Tags;
with Ada.Unchecked_Conversion;
with Langkit_Support.Errors; use Langkit_Support.Errors;
with Langkit_Support.Internal.Analysis; use Langkit_Support.Internal.Analysis;
with Langkit_Support.Internal.Conversions;
use Langkit_Support.Internal.Conversions;
with Langkit_Support.Internal.Descriptor;
use Langkit_Support.Internal.Descriptor;
with Langkit_Support.Internal.Introspection;
use Langkit_Support.Internal.Introspection;
-- Even though we don't directly use entities from the Internal.Descriptor
-- package, we still need to import it to get visibility over the
-- Language_Descriptor type (and access its components).
pragma Unreferenced (Langkit_Support.Internal.Descriptor);
package body Langkit_Support.Generic_API.Introspection is
use Langkit_Support.Errors.Introspection;
-- Conversion helpers between the access types in the Generic API private
-- part and in the internal API. We need to have different access types
-- because of issues with the Ada privacy rules.
function "+" is new Ada.Unchecked_Conversion
(Langkit_Support.Internal.Introspection.Internal_Value_Access,
Langkit_Support.Generic_API.Introspection.Internal_Value_Access);
function "+" is new Ada.Unchecked_Conversion
(Langkit_Support.Generic_API.Introspection.Internal_Value_Access,
Langkit_Support.Internal.Introspection.Internal_Value_Access);
procedure Check_Same_Language (Left, Right : Language_Id);
-- Raise a ``Precondition_Failure`` exception if ``Left`` and ``Right`` are
-- different.
procedure Check_Type (T : Type_Ref);
-- Raise a ``Precondition_Failure`` if ``T`` is ``No_Type_Ref``
procedure Check_Type (Id : Language_Id; T : Type_Index);
-- If ``T`` is not a valid type for the given language, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Value (Value : Value_Ref);
-- Raise a ``Precondition_Failure`` exception if ``Value`` is null
procedure Check_Value_Type
(Value : Value_Ref;
T : Type_Index;
Message : String := "unexpected value type");
-- Raise a ``Precondition_Failure`` exception with ``Message`` if ``Value``
-- does not match ``T``.
procedure Check_Enum_Type (Enum : Type_Ref);
-- If ``Enum`` is not a valid enum type, raise a ``Precondition_Failure``
-- exception.
procedure Check_Enum_Value (Value : Enum_Value_Ref);
-- If ``Value`` is not a valid enum value, raise a ``Precondition_Failure``
-- exception.
procedure Check_Enum_Value (Enum : Type_Ref; Index : Enum_Value_Index);
-- If ``Enum`` is not a valid enum type or if ``Index`` is not a valid
-- value for that type, raise a ``Precondition_Failure`` exception.
procedure Check_Array_Type (T : Type_Ref);
-- If ``T`` is not a valid array type for the given language, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Iterator_Type (T : Type_Ref);
-- If ``T`` is not a valid iterator type for the given language, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Base_Struct_Type (T : Type_Ref);
-- If ``T`` is not a valid base struct type for the given language, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Struct_Type (T : Type_Ref);
-- If ``T`` is not a valid struct type for the given language, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Node_Type (Node : Type_Ref);
-- If ``Node`` is not a valid node type for the given language, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Struct_Member (Member : Struct_Member_Ref);
-- Raise a ``Precondition_Failure`` if ``Member`` is
-- ``No_Struct_Member_Ref``.
procedure Check_Struct_Owns_Member
(Struct : Type_Ref; Member : Struct_Member_Ref);
-- Raise a ``Precondition_Failure`` if ``Member`` is not a member of
-- ``Struct``.
procedure Check_Struct_Member
(Id : Language_Id; Member : Struct_Member_Index);
-- If ``Member`` is not a valid struct member for the given language, raise
-- a ``Precondition_Failure`` exception.
procedure Check_Struct_Member_Argument
(Member : Struct_Member_Ref; Argument : Argument_Index);
-- If ``Member`` is not a valid struct member for the given language or if
-- ``Argument`` is not a valid argument for that member, raise a
-- ``Precondition_Failure`` exception.
procedure Check_Symbol (Symbol : Symbol_Type);
-- If ``Symbol`` is null, raise a ``Precondition_Failure`` exception
function Type_Range
(Id : Language_Id; First, Last : Any_Type_Index) return Type_Ref_Array;
-- Return the array of ``Type_Ref`` objects corresponding to the given
-- range of type indexes.
function Create_Value
(Id : Language_Id; Value : Internal_Value_Access) return Value_Ref;
-- Initialize ``Value`` with ``Id``, set it a ref-count of 1 and return it
-- wrapped as a ``Value_Ref``.
-------------------------
-- Check_Same_Language --
-------------------------
procedure Check_Same_Language (Left, Right : Language_Id) is
begin
if Left /= Right then
raise Precondition_Failure with "inconsistent languages";
end if;
end Check_Same_Language;
----------------
-- Check_Type --
----------------
procedure Check_Type (T : Type_Ref) is
begin
if T.Id = null then
raise Precondition_Failure with "null type reference";
end if;
end Check_Type;
----------------
-- Check_Type --
----------------
procedure Check_Type (Id : Language_Id; T : Type_Index) is
begin
if T > Last_Type (Id) then
raise Precondition_Failure with "invalid type index";
end if;
end Check_Type;
----------------
-- Debug_Name --
----------------
function Debug_Name (T : Type_Ref) return String is
begin
if T = No_Type_Ref then
return "<No_Type_Ref>";
else
return T.Id.Types (T.Index).Debug_Name.all;
end if;
end Debug_Name;
----------------
-- Type_Range --
----------------
function Type_Range
(Id : Language_Id; First, Last : Any_Type_Index) return Type_Ref_Array
is
Prev : Natural := 0;
begin
return Result : Type_Ref_Array (1 .. Natural (Last - First + 1)) do
for I in First .. Last loop
Prev := Prev + 1;
Result (Prev) := From_Index (Id, I);
end loop;
end return;
end Type_Range;
---------------
-- All_Types --
---------------
function All_Types (Id : Language_Id) return Type_Ref_Array is
begin
return Type_Range (Id, 1, Last_Type (Id));
end All_Types;
--------------
-- Language --
--------------
function Language (T : Type_Ref) return Language_Id is
begin
Check_Type (T);
return T.Id;
end Language;
--------------
-- To_Index --
--------------
function To_Index (T : Type_Ref) return Type_Index is
begin
Check_Type (T);
return T.Index;
end To_Index;
----------------
-- From_Index --
----------------
function From_Index (Id : Language_Id; T : Type_Index) return Type_Ref is
begin
Check_Type (Id, T);
return (Id, T);
end From_Index;
---------------
-- Last_Type --
---------------
function Last_Type (Id : Language_Id) return Type_Index is
begin
return Id.Types.all'Last;
end Last_Type;
--------------
-- Category --
--------------
function Category (T : Type_Ref) return Type_Category is
begin
Check_Type (T);
return T.Id.Types.all (T.Index).Category;
end Category;
-----------------
-- Check_Value --
-----------------
procedure Check_Value (Value : Value_Ref) is
begin
if Value.Value = null then
raise Precondition_Failure with "null value reference";
end if;
end Check_Value;
----------------------
-- Check_Value_Type --
----------------------
procedure Check_Value_Type
(Value : Value_Ref;
T : Type_Index;
Message : String := "unexpected value type") is
begin
if not Value.Value.Type_Matches (T) then
raise Precondition_Failure with Message;
end if;
end Check_Value_Type;
------------------
-- Check_Symbol --
------------------
procedure Check_Symbol (Symbol : Symbol_Type) is
begin
if Symbol = null then
raise Precondition_Failure with "null symbol";
end if;
end Check_Symbol;
---------
-- "=" --
---------
function "=" (Left, Right : Value_Ref) return Boolean is
begin
-- Easy case: Left and Right are not only structurally equivalent, but
-- have shallow equality.
if Left.Value = Right.Value then
return True;
-- We cannot dereference both values without preliminary checks because
-- it is legal to get null values. Also make sure we have values of the
-- same type (the comparison would raise a Constraint_Error otherwise).
elsif Left.Value = null
or else Right.Value = null
or else Left.Value.all'Tag /= Right.Value.all'Tag
then
return False;
else
return Left.Value.all = Right.Value.all;
end if;
end "=";
--------------
-- Language --
--------------
function Language (Value : Value_Ref) return Language_Id is
begin
Check_Value (Value);
return Value.Value.Id;
end Language;
-------------
-- Type_Of --
-------------
function Type_Of (Value : Value_Ref) return Type_Ref is
begin
Check_Value (Value);
return From_Index (Value.Value.Id, Value.Value.Type_Of);
end Type_Of;
------------------
-- Type_Matches --
------------------
function Type_Matches (Value : Value_Ref; T : Type_Ref) return Boolean is
begin
Check_Value (Value);
Check_Type (T);
if Value.Value.Id /= T.Id then
raise Precondition_Failure with "inconsistent language";
end if;
return Value.Value.Type_Matches (T.Index);
end Type_Matches;
-----------
-- Image --
-----------
function Image (Value : Value_Ref) return String is
begin
if Value.Value = null then
return "<No_Value_Ref>";
end if;
return Value.Value.Image;
end Image;
------------------
-- Create_Value --
------------------
function Create_Value
(Id : Language_Id; Value : Internal_Value_Access) return Value_Ref is
begin
return Result : Value_Ref do
Value.Id := Id;
Value.Ref_Count := 1;
Result.Value := Value;
end return;
end Create_Value;
---------------
-- From_Unit --
---------------
function From_Unit (Id : Language_Id; Value : Lk_Unit) return Value_Ref is
Result : Internal_Acc_Analysis_Unit;
begin
if Value /= No_Lk_Unit then
Check_Same_Language (Id, Value.Language);
end if;
Result := new Internal_Rec_Analysis_Unit;
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Unit;
-------------
-- As_Unit --
-------------
function As_Unit (Value : Value_Ref) return Lk_Unit is
Id : Language_Id;
V : Internal_Acc_Analysis_Unit;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Analysis_Unit);
V := Internal_Acc_Analysis_Unit (Value.Value);
return V.Value;
end As_Unit;
------------------
-- From_Big_Int --
------------------
function From_Big_Int
(Id : Language_Id; Value : Big_Integer) return Value_Ref
is
Result : constant Internal_Acc_Big_Int := new Internal_Rec_Big_Int;
begin
Result.Value.Set (Value);
return Create_Value (Id, Internal_Value_Access (Result));
end From_Big_Int;
----------------
-- As_Big_Int --
----------------
function As_Big_Int (Value : Value_Ref) return Big_Integer is
Id : Language_Id;
V : Internal_Acc_Big_Int;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Big_Int);
V := Internal_Acc_Big_Int (Value.Value);
return Result : Big_Integer do
Result.Set (V.Value);
end return;
end As_Big_Int;
---------------
-- From_Bool --
---------------
function From_Bool (Id : Language_Id; Value : Boolean) return Value_Ref is
Result : constant Internal_Acc_Bool := new Internal_Rec_Bool;
begin
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Bool;
-------------
-- As_Bool --
-------------
function As_Bool (Value : Value_Ref) return Boolean is
Id : Language_Id;
V : Internal_Acc_Bool;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Bool);
V := Internal_Acc_Bool (Value.Value);
return V.Value;
end As_Bool;
---------------
-- From_Char --
---------------
function From_Char
(Id : Language_Id; Value : Character_Type) return Value_Ref
is
Result : constant Internal_Acc_Character := new Internal_Rec_Character;
begin
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Char;
-------------
-- As_Char --
-------------
function As_Char (Value : Value_Ref) return Character_Type is
Id : Language_Id;
V : Internal_Acc_Character;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Char);
V := Internal_Acc_Character (Value.Value);
return V.Value;
end As_Char;
--------------
-- From_Int --
--------------
function From_Int (Id : Language_Id; Value : Integer) return Value_Ref is
Result : constant Internal_Acc_Int := new Internal_Rec_Int;
begin
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Int;
------------
-- As_Int --
------------
function As_Int (Value : Value_Ref) return Integer is
Id : Language_Id;
V : Internal_Acc_Int;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Int);
V := Internal_Acc_Int (Value.Value);
return V.Value;
end As_Int;
--------------------------------
-- From_Source_Location_Range --
--------------------------------
function From_Source_Location_Range
(Id : Language_Id; Value : Source_Location_Range) return Value_Ref
is
Result : constant Internal_Acc_Source_Location_Range :=
new Internal_Rec_Source_Location_Range;
begin
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Source_Location_Range;
------------------------------
-- As_Source_Location_Range --
------------------------------
function As_Source_Location_Range
(Value : Value_Ref) return Source_Location_Range
is
Id : Language_Id;
V : Internal_Acc_Source_Location_Range;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Source_Location_Range);
V := Internal_Acc_Source_Location_Range (Value.Value);
return V.Value;
end As_Source_Location_Range;
-----------------
-- From_String --
-----------------
function From_String
(Id : Language_Id; Value : Text_Type) return Value_Ref
is
Result : constant Internal_Acc_String := new Internal_Rec_String;
begin
Result.Value := To_Unbounded_Text (Value);
return Create_Value (Id, Internal_Value_Access (Result));
end From_String;
---------------
-- As_String --
---------------
function As_String (Value : Value_Ref) return Text_Type is
Id : Language_Id;
V : Internal_Acc_String;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.String);
V := Internal_Acc_String (Value.Value);
return To_Text (V.Value);
end As_String;
----------------
-- From_Token --
----------------
function From_Token (Id : Language_Id; Value : Lk_Token) return Value_Ref
is
Result : Internal_Acc_Token;
begin
if Value /= No_Lk_Token then
Check_Same_Language (Id, Value.Language);
end if;
Result := new Internal_Rec_Token;
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Token;
--------------
-- As_Token --
--------------
function As_Token (Value : Value_Ref) return Lk_Token is
Id : Language_Id;
V : Internal_Acc_Token;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Token);
V := Internal_Acc_Token (Value.Value);
return V.Value;
end As_Token;
-----------------
-- From_Symbol --
-----------------
function From_Symbol
(Id : Language_Id; Value : Text_Type) return Value_Ref
is
Result : constant Internal_Acc_Symbol := new Internal_Rec_Symbol;
begin
Result.Value := To_Unbounded_Text (Value);
return Create_Value (Id, Internal_Value_Access (Result));
end From_Symbol;
---------------
-- As_Symbol --
---------------
function As_Symbol (Value : Value_Ref) return Text_Type is
Id : Language_Id;
V : Internal_Acc_Symbol;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.Builtin_Types.Symbol);
V := Internal_Acc_Symbol (Value.Value);
return To_Text (V.Value);
end As_Symbol;
---------------
-- From_Node --
---------------
function From_Node (Id : Language_Id; Value : Lk_Node) return Value_Ref is
Result : Internal_Acc_Node;
begin
if Value /= No_Lk_Node then
Check_Same_Language (Id, Value.Language);
end if;
Result := new Internal_Rec_Node;
Result.Value := Value;
return Create_Value (Id, Internal_Value_Access (Result));
end From_Node;
-------------
-- As_Node --
-------------
function As_Node (Value : Value_Ref) return Lk_Node is
Id : Language_Id;
V : Internal_Acc_Node;
begin
Check_Value (Value);
Id := Value.Value.Id;
Check_Value_Type (Value, Id.First_Node);
V := Internal_Acc_Node (Value.Value);
return V.Value;
end As_Node;
-------------
-- Type_Of --
-------------
function Type_Of (Node : Lk_Node) return Type_Ref is
begin
if Node = No_Lk_Node then
raise Precondition_Failure with "null node";
end if;
declare
Id : constant Language_Id := Language (Node);
E : constant Internal.Analysis.Internal_Entity :=
Unwrap_Node (Node);
Result : constant Type_Index := Id.Node_Kind (E.Node);
begin
return From_Index (Id, Result);
end;
end Type_Of;
------------------
-- Type_Matches --
------------------
function Type_Matches (Node : Lk_Node; T : Type_Ref) return Boolean is
begin
return From_Node (Language (T), Node).Type_Matches (T);
end Type_Matches;
------------
-- Adjust --
------------
overriding procedure Adjust (Self : in out Value_Ref) is
begin
if Self.Value /= null then
Self.Value.Ref_Count := Self.Value.Ref_Count + 1;
end if;
end Adjust;
--------------
-- Finalize --
--------------
overriding procedure Finalize (Self : in out Value_Ref) is
procedure Free is new Ada.Unchecked_Deallocation
(Internal_Value'Class, Internal_Value_Access);
begin
if Self.Value /= null then
if Self.Value.Ref_Count = 1 then
Self.Value.Destroy;
Free (Self.Value);
else
Self.Value.Ref_Count := Self.Value.Ref_Count - 1;
Self.Value := null;
end if;
end if;
end Finalize;
------------------
-- Is_Enum_Type --
------------------
function Is_Enum_Type (T : Type_Ref) return Boolean is
begin
Check_Type (T);
return T.Index in T.Id.Enum_Types.all'Range;
end Is_Enum_Type;
---------------------
-- Check_Enum_Type --
---------------------
procedure Check_Enum_Type (Enum : Type_Ref) is
begin
if not Is_Enum_Type (Enum) then
raise Precondition_Failure with "invalid enum type";
end if;
end Check_Enum_Type;
----------------------
-- Check_Enum_Value --
----------------------
procedure Check_Enum_Value (Value : Enum_Value_Ref) is
begin
if Value.Enum.Id = null then
raise Precondition_Failure with "null enum value reference";
end if;
end Check_Enum_Value;
----------------------
-- Check_Enum_Value --
----------------------
procedure Check_Enum_Value (Enum : Type_Ref; Index : Enum_Value_Index) is
begin
Check_Enum_Type (Enum);
if Index > Enum.Id.Enum_Types.all (Enum.Index).Last_Value then
raise Precondition_Failure with "invalid enum value index";
end if;
end Check_Enum_Value;
--------------------
-- Enum_Type_Name --
--------------------
function Enum_Type_Name (Enum : Type_Ref) return Name_Type is
begin
Check_Enum_Type (Enum);
return Create_Name (Enum.Id.Enum_Types.all (Enum.Index).Name.all);
end Enum_Type_Name;
--------------------
-- All_Enum_Types --
--------------------
function All_Enum_Types (Id : Language_Id) return Type_Ref_Array is
Enum_Types : Enum_Type_Descriptor_Array renames Id.Enum_Types.all;
begin
return Type_Range (Id, Enum_Types'First, Enum_Types'Last);
end All_Enum_Types;
--------------
-- Enum_For --
--------------
function Enum_For (Value : Enum_Value_Ref) return Type_Ref is
begin
return Value.Enum;
end Enum_For;
------------------------
-- Enum_Default_Value --
------------------------
function Enum_Default_Value (Enum : Type_Ref) return Enum_Value_Ref is
Index : Any_Enum_Value_Index;
begin
Check_Enum_Type (Enum);
Index := Enum.Id.Enum_Types.all (Enum.Index).Default_Value;
return (if Index = No_Enum_Value_Index
then No_Enum_Value_Ref
else From_Index (Enum, Index));
end Enum_Default_Value;
---------------------
-- Enum_Value_Name --
---------------------
function Enum_Value_Name (Value : Enum_Value_Ref) return Name_Type is
begin
Check_Enum_Value (Value);
declare
Enum : Type_Ref renames Value.Enum;
Desc : Enum_Type_Descriptor renames
Enum.Id.Enum_Types.all (Enum.Index).all;
begin
return Create_Name (Desc.Value_Names (Value.Index).all);
end;
end Enum_Value_Name;
----------------
-- Debug_Name --
----------------
function Debug_Name (Value : Enum_Value_Ref) return String is
begin
if Value = No_Enum_Value_Ref then
return "<No_Enum_Value_Ref>";
else
return Debug_Name (Enum_For (Value))
& "." & Image (Format_Name (Enum_Value_Name (Value), Lower));
end if;
end Debug_Name;
---------------------
-- All_Enum_Values --
---------------------
function All_Enum_Values (Enum : Type_Ref) return Enum_Value_Ref_Array is
begin
return Result : Enum_Value_Ref_Array
(1 .. Positive (Enum_Last_Value (Enum)))
do
for I in Result'Range loop
Result (I) := From_Index (Enum, Enum_Value_Index (I));
end loop;
end return;
end All_Enum_Values;
--------------
-- To_Index --
--------------
function To_Index (Value : Enum_Value_Ref) return Enum_Value_Index is
begin
Check_Enum_Value (Value);
return Value.Index;
end To_Index;
----------------
-- From_Index --
----------------
function From_Index
(Enum : Type_Ref; Value : Enum_Value_Index) return Enum_Value_Ref is
begin
Check_Enum_Value (Enum, Value);
return (Enum, Value);
end From_Index;
---------------------
-- Enum_Last_Value --
---------------------
function Enum_Last_Value (Enum : Type_Ref) return Enum_Value_Index is
begin
Check_Enum_Type (Enum);
return Enum.Id.Enum_Types.all (Enum.Index).Last_Value;
end Enum_Last_Value;
-----------------
-- Create_Enum --
-----------------
function Create_Enum (Value : Enum_Value_Ref) return Value_Ref is
Id : Language_Id;
begin
Check_Enum_Value (Value);
Id := Value.Enum.Id;
return Create_Value
(Id, +Id.Create_Enum (Value.Enum.Index, Value.Index));
end Create_Enum;
-------------
-- As_Enum --
-------------
function As_Enum (Value : Value_Ref) return Enum_Value_Ref is
Id : Language_Id;
T : Type_Ref;
V : Base_Internal_Enum_Value_Access;
begin
Check_Value (Value);
Id := Value.Value.Id;
T := From_Index (Id, Value.Value.Type_Of);
if not Is_Enum_Type (T) then
raise Precondition_Failure with "non-enum value";
end if;
V := Base_Internal_Enum_Value_Access (Value.Value);
return From_Index (T, V.Value_Index);
end As_Enum;
-------------------
-- Is_Array_Type --
-------------------
function Is_Array_Type (T : Type_Ref) return Boolean is
begin
Check_Type (T);
return T.Index in T.Id.Array_Types.all'Range;
end Is_Array_Type;
----------------------
-- Check_Array_Type --
----------------------
procedure Check_Array_Type (T : Type_Ref) is
begin
if not Is_Array_Type (T) then
raise Precondition_Failure with "invalid array type";
end if;
end Check_Array_Type;
------------------------
-- Array_Element_Type --
------------------------
function Array_Element_Type (T : Type_Ref) return Type_Ref is
begin
Check_Array_Type (T);
return From_Index (T.Id, T.Id.Array_Types.all (T.Index).Element_Type);
end Array_Element_Type;
---------------------
-- All_Array_Types --
---------------------
function All_Array_Types (Id : Language_Id) return Type_Ref_Array is
Array_Types : Array_Type_Descriptor_Array renames Id.Array_Types.all;
begin
return Type_Range (Id, Array_Types'First, Array_Types'Last);
end All_Array_Types;
------------------
-- Create_Array --
------------------
function Create_Array
(T : Type_Ref; Values : Value_Ref_Array) return Value_Ref
is
ET : constant Type_Index :=
To_Index (Array_Element_Type (T));
Internal_Values : Internal_Value_Array (Values'Range);
begin
Check_Array_Type (T);
for I in Values'Range loop
declare
V : constant Value_Ref := Values (I);
begin
Check_Value (V);
Check_Same_Language (T.Id, V.Language);
Check_Value_Type (V, ET);
Internal_Values (I) := +V.Value;
end;
end loop;
return Create_Value
(T.Id, +T.Id.Create_Array (To_Index (T), Internal_Values));
end Create_Array;
--------------
-- As_Array --
--------------
function As_Array (Value : Value_Ref) return Value_Ref_Array is
begin
return Result : Value_Ref_Array (1 .. Array_Length (Value)) do
for I in Result'Range loop
Result (I) := Array_Item (Value, I);
end loop;
end return;
end As_Array;
------------------
-- Array_Length --
------------------
function Array_Length (Value : Value_Ref) return Natural is
T : Type_Ref;
V : Base_Internal_Array_Value_Access;
begin
Check_Value (Value);
T := Value.Type_Of;
if not Is_Array_Type (T) then
raise Precondition_Failure with "non-array value";
end if;
V := Base_Internal_Array_Value_Access (Value.Value);
return V.Array_Length;
end Array_Length;
----------------
-- Array_Item --
----------------
function Array_Item (Value : Value_Ref; Index : Positive) return Value_Ref
is
V : Base_Internal_Array_Value_Access;
begin
if Index > Array_Length (Value) then
raise Precondition_Failure with "out-of-bounds array index";
end if;
V := Base_Internal_Array_Value_Access (Value.Value);
return Create_Value (V.Id, +V.Array_Item (Index));
end Array_Item;
----------------------
-- Is_Iterator_Type --
----------------------
function Is_Iterator_Type (T : Type_Ref) return Boolean is
begin
Check_Type (T);
return T.Index in T.Id.Iterator_Types.all'Range;
end Is_Iterator_Type;
-------------------------
-- Check_Iterator_Type --
-------------------------
procedure Check_Iterator_Type (T : Type_Ref) is
begin
if not Is_Iterator_Type (T) then
raise Precondition_Failure with "invalid iterator type";
end if;
end Check_Iterator_Type;
---------------------------
-- Iterator_Element_Type --
---------------------------
function Iterator_Element_Type (T : Type_Ref) return Type_Ref is
begin
Check_Iterator_Type (T);
return From_Index (T.Id, T.Id.Iterator_Types.all (T.Index).Element_Type);
end Iterator_Element_Type;
------------------------
-- All_Iterator_Types --
------------------------
function All_Iterator_Types (Id : Language_Id) return Type_Ref_Array is
Iterator_Types : Iterator_Type_Descriptor_Array renames
Id.Iterator_Types.all;
begin
return Type_Range (Id, Iterator_Types'First, Iterator_Types'Last);
end All_Iterator_Types;
-------------------
-- Iterator_Next --
-------------------
function Iterator_Next (Value : Value_Ref) return Value_Ref is
T : Type_Ref;
V : Base_Internal_Iterator_Value_Access;
R : Internal_Value_Access;
begin
Check_Value (Value);
T := Value.Type_Of;
if not Is_Iterator_Type (T) then
raise Precondition_Failure with "non-iterator value";
end if;
V := Base_Internal_Iterator_Value_Access (Value.Value);
R := +V.Next;
if R = null then
return No_Value_Ref;
else
return Create_Value (V.Id, R);
end if;
end Iterator_Next;
-------------------------
-- Is_Base_Struct_Type --
-------------------------
function Is_Base_Struct_Type (T : Type_Ref) return Boolean is
begin
return Is_Struct_Type (T) or else Is_Node_Type (T);
end Is_Base_Struct_Type;
----------------------------
-- Check_Base_Struct_Type --
----------------------------
procedure Check_Base_Struct_Type (T : Type_Ref) is
begin
if not Is_Base_Struct_Type (T) then
raise Precondition_Failure with "invalid base struct type";
end if;
end Check_Base_Struct_Type;
---------------------------
-- Base_Struct_Type_Name --
---------------------------
function Base_Struct_Type_Name (T : Type_Ref) return Name_Type is
begin
Check_Base_Struct_Type (T);
return Create_Name (T.Id.Struct_Types.all (T.Index).Name.all);
end Base_Struct_Type_Name;
---------------------------
-- All_Base_Struct_Types --
---------------------------
function All_Base_Struct_Types (Id : Language_Id) return Type_Ref_Array is
Struct_Types : Struct_Type_Descriptor_Array renames Id.Struct_Types.all;
begin
return Type_Range (Id, Struct_Types'First, Struct_Types'Last);
end All_Base_Struct_Types;
--------------------
-- Is_Struct_Type --
--------------------
function Is_Struct_Type (T : Type_Ref) return Boolean is
begin
Check_Type (T);
return T.Index in T.Id.Struct_Types.all'First .. T.Id.First_Node - 1;
end Is_Struct_Type;
-----------------------
-- Check_Struct_Type --
-----------------------
procedure Check_Struct_Type (T : Type_Ref) is
begin
if not Is_Struct_Type (T) then
raise Precondition_Failure with "invalid struct type";
end if;
end Check_Struct_Type;
----------------------
-- Struct_Type_Name --
----------------------
function Struct_Type_Name (Struct : Type_Ref) return Name_Type is
begin
Check_Struct_Type (Struct);
return Create_Name (Struct.Id.Struct_Types.all (Struct.Index).Name.all);
end Struct_Type_Name;
----------------------
-- All_Struct_Types --
----------------------
function All_Struct_Types (Id : Language_Id) return Type_Ref_Array is
begin
return Type_Range (Id, Id.Struct_Types.all'First, Id.First_Node - 1);
end All_Struct_Types;
-------------------
-- Create_Struct --
-------------------
function Create_Struct
(T : Type_Ref; Values : Value_Ref_Array) return Value_Ref
is
Members : constant Struct_Member_Ref_Array :=
Introspection.Members (T);
Internal_Values : Internal_Value_Array (Values'Range);
begin
Check_Struct_Type (T);
-- Check that Values contain valid values for T's language
for V of Values loop
if V = No_Value_Ref then
raise Precondition_Failure with "invalid null value";
elsif V.Value.Id /= T.Id then
raise Precondition_Failure with "inconsistent language";
end if;
end loop;
-- Check that Values match T's members
if Values'Length /= Members'Length then
raise Precondition_Failure with
Debug_Name (T) & " has" & Natural'Image (Members'Length)
& " members but got" & Natural'Image (Values'Length) & " value(s)";
end if;
for I in 0 .. Members'Length - 1 loop
declare
V : Value_Ref renames Values (Values'First + I);
T : constant Type_Ref := Member_Type (Members (Members'First + I));
begin
if not Type_Matches (V, T) then
raise Precondition_Failure with "member type mismatch";
end if;
end;
end loop;
-- Unpack values for members and actually build the struct
for I in Values'Range loop
Internal_Values (I) := +Values (I).Value;
end loop;
return Create_Value
(T.Id, +T.Id.Create_Struct (To_Index (T), Internal_Values));
end Create_Struct;
------------------
-- Is_Node_Type --
------------------
function Is_Node_Type (T : Type_Ref) return Boolean is
begin
Check_Type (T);
return T.Index in T.Id.First_Node .. T.Id.Struct_Types.all'Last;
end Is_Node_Type;
---------------------
-- Check_Node_Type --
---------------------
procedure Check_Node_Type (Node : Type_Ref) is
begin
if not Is_Node_Type (Node) then
raise Precondition_Failure with "invalid node type";
end if;
end Check_Node_Type;
--------------------
-- Root_Node_Type --
--------------------
function Root_Node_Type (Id : Language_Id) return Type_Ref is
begin
return From_Index (Id, Id.First_Node);
end Root_Node_Type;
--------------------
-- Node_Type_Name --
--------------------
function Node_Type_Name (Node : Type_Ref) return Name_Type is
begin
Check_Node_Type (Node);
return Create_Name (Node.Id.Struct_Types.all (Node.Index).Name.all);
end Node_Type_Name;
-------------------------
-- Node_Type_Repr_Name --
-------------------------
function Node_Type_Repr_Name (Node : Type_Ref) return Text_Type is
begin
Check_Node_Type (Node);
return Node.Id.Struct_Types.all (Node.Index).Repr_Name.all;
end Node_Type_Repr_Name;
-----------------
-- Is_Abstract --
-----------------
function Is_Abstract (Node : Type_Ref) return Boolean is
begin
Check_Node_Type (Node);
return Node.Id.Struct_Types.all (Node.Index).Is_Abstract;
end Is_Abstract;
-------------------
-- Is_Token_Node --
-------------------
function Is_Token_Node (Node : Type_Ref) return Boolean is
begin
Check_Node_Type (Node);
return Node.Id.Struct_Types.all (Node.Index).Is_Token_Node;
end Is_Token_Node;
------------------
-- Is_List_Node --
------------------
function Is_List_Node (Node : Type_Ref) return Boolean is
begin
Check_Node_Type (Node);
return Node.Id.Struct_Types.all (Node.Index).Is_List_Node;
end Is_List_Node;
---------------
-- Base_Type --
---------------
function Base_Type (Node : Type_Ref) return Type_Ref is
begin
Check_Node_Type (Node);
if Node = Root_Node_Type (Node.Id) then
raise Bad_Type_Error with "trying to get base type of root node";
end if;
return From_Index
(Node.Id, Node.Id.Struct_Types.all (Node.Index).Base_Type);
end Base_Type;
-------------------
-- Derived_Types --
-------------------
function Derived_Types (Node : Type_Ref) return Type_Ref_Array is
begin
Check_Node_Type (Node);
declare
Derivations : Type_Index_Array renames
Node.Id.Struct_Types.all (Node.Index).Derivations;
begin
return Result : Type_Ref_Array (Derivations'Range) do
for I in Result'Range loop
Result (I) := From_Index (Node.Id, Derivations (I));
end loop;
end return;
end;
end Derived_Types;
-----------------------
-- Last_Derived_Type --
-----------------------
function Last_Derived_Type (Node : Type_Ref) return Type_Index is
-- Look for the last derivations's derivation, recursively
Result : Any_Type_Index := Node.Index;
begin
Check_Node_Type (Node);
loop
declare
Desc : Struct_Type_Descriptor renames
Node.Id.Struct_Types.all (Result).all;
begin
exit when Desc.Derivations'Length = 0;
Result := Desc.Derivations (Desc.Derivations'Last);
end;
end loop;
return Result;
end Last_Derived_Type;
---------------------
-- Is_Derived_From --
---------------------
function Is_Derived_From (Node, Parent : Type_Ref) return Boolean is
begin
Check_Node_Type (Node);
Check_Node_Type (Parent);
if Node.Id /= Parent.Id then
raise Precondition_Failure with
"Node and Parent belong to different languages";
end if;
declare
Id : constant Language_Id := Node.Id;
Struct_Types : Struct_Type_Descriptor_Array renames
Id.Struct_Types.all;
Cursor : Any_Type_Index := Node.Index;
begin
while Cursor /= No_Type_Index loop
if Cursor = Parent.Index then
return True;
end if;
Cursor := Struct_Types (Cursor).Base_Type;
end loop;
return False;
end;
end Is_Derived_From;
--------------------
-- All_Node_Types --
--------------------
function All_Node_Types (Id : Language_Id) return Type_Ref_Array is
begin
return Type_Range (Id, Id.First_Node, Id.Struct_Types.all'Last);
end All_Node_Types;
-----------------------
-- Grammar_Rule_Type --
-----------------------
function Grammar_Rule_Type (Rule : Grammar_Rule_Ref) return Type_Ref is
begin
Check_Grammar_Rule (Rule);
return From_Index
(Rule.Id, Rule.Id.Grammar_Rules.all (Rule.Index).Return_Type);
end Grammar_Rule_Type;
-------------------------
-- Check_Struct_Member --
-------------------------
procedure Check_Struct_Member (Member : Struct_Member_Ref) is
begin
if Member.Id = null then
raise Precondition_Failure with "null struct member reference";
end if;
end Check_Struct_Member;
-------------------------
-- Check_Struct_Member --
-------------------------
procedure Check_Struct_Member
(Id : Language_Id; Member : Struct_Member_Index) is
begin
if Member not in Id.Struct_Members.all'Range then
raise Precondition_Failure with "invalid struct member index";
end if;
end Check_Struct_Member;
------------------------------
-- Check_Struct_Owns_Member --
------------------------------
procedure Check_Struct_Owns_Member
(Struct : Type_Ref; Member : Struct_Member_Ref)
is
Member_Found : Boolean := False;
begin
for M of Members (Struct) loop
if M = Member then
Member_Found := True;
end if;
end loop;
if not Member_Found then
raise Precondition_Failure with
Debug_Name (Struct) & " does not have the " & Debug_Name (Member)
& " member";
end if;
end Check_Struct_Owns_Member;
----------------------------------
-- Check_Struct_Member_Argument --
----------------------------------
procedure Check_Struct_Member_Argument
(Member : Struct_Member_Ref; Argument : Argument_Index) is
begin
Check_Struct_Member (Member);
declare
Desc : Struct_Member_Descriptor renames
Member.Id.Struct_Members.all (Member.Index).all;
begin
if Argument not in Desc.Arguments'Range then
raise Precondition_Failure with "invalid struct member argument";
end if;
end;
end Check_Struct_Member_Argument;
----------------
-- Debug_Name --
----------------
function Debug_Name (Member : Struct_Member_Ref) return String is
begin
if Member = No_Struct_Member_Ref then
return "<No_Struct_Member_Ref>";
else
return Debug_Name (Owner (Member)) & "."
& Image (Format_Name (Member_Name (Member), Lower));
end if;
end Debug_Name;
-----------
-- Owner --
-----------
function Owner (Member : Struct_Member_Ref) return Type_Ref is
begin
Check_Struct_Member (Member);
return From_Index
(Member.Id, Member.Id.Struct_Members.all (Member.Index).Owner);
end Owner;
-----------------
-- Is_Property --
-----------------
function Is_Property (Member : Struct_Member_Ref) return Boolean is
begin
Check_Struct_Member (Member);
return Member.Index >= Member.Id.First_Property;
end Is_Property;
-----------------
-- Is_Null_For --
-----------------
function Is_Null_For
(Member : Struct_Member_Ref; Node : Type_Ref) return Boolean
is
begin
Check_Struct_Member (Member);
Check_Node_Type (Node);
Check_Same_Language (Member.Id, Node.Id);
Check_Struct_Owns_Member (Node, Member);
declare
M : Struct_Member_Descriptor renames
Member.Id.Struct_Members.all (Member.Index).all;
begin
return
M.Null_For /= null
and then Node.Index in M.Null_For.all'Range
and then M.Null_For.all (Node.Index);
end;
end Is_Null_For;
------------------------
-- Syntax_Field_Index --
------------------------
function Syntax_Field_Index
(Member : Struct_Member_Ref; Node : Type_Ref) return Positive is
begin
Check_Node_Type (Node);
if Is_Abstract (Node) then
raise Precondition_Failure with "node is abstract";
end if;
Check_Struct_Member (Member);
Check_Same_Language (Member.Id, Node.Id);
Check_Struct_Owns_Member (Node, Member);
if not Is_Field (Member) then
raise Precondition_Failure with "member is not a syntax field";
elsif Is_Null_For (Member, Node) then
raise Precondition_Failure with "syntax field is null for this node";
end if;
declare
M : Struct_Member_Descriptor renames
Member.Id.Struct_Members.all (Member.Index).all;
-- Thanks to the checks above, we should never be in a case where
-- ``M.Indexes`` is null or ``Index`` is zero.
Index : Natural renames M.Indexes.all (Node.Index);
begin
return Index;
end;
end Syntax_Field_Index;
-----------------
-- All_Members --
-----------------
function All_Members (Id : Language_Id) return Struct_Member_Ref_Array is
begin
return Result : Struct_Member_Ref_Array
(1 .. Positive (Last_Struct_Member (Id)))
do
for I in Result'Range loop
Result (I) := From_Index (Id, Struct_Member_Index (I));
end loop;
end return;
end All_Members;
-------------
-- Members --
-------------
function Members (Struct : Type_Ref) return Struct_Member_Ref_Array is
Id : Language_Id;
Current_Struct : Any_Type_Index := Struct.Index;
-- Cursor to "climb up" the derivation hierarchy for ``Struct``: we want
-- ``Struct``'s own fields, but also the inherited ones.
Next : Natural;
-- Index in ``Result`` (see below) for the next member to add
begin
Check_Base_Struct_Type (Struct);
Id := Struct.Id;
return Result : Struct_Member_Ref_Array
(1 .. Id.Struct_Types.all (Struct.Index).Inherited_Members)
do
-- Go through the derivation chain and collect members in ``Result``.
-- Add them in reverse order so that in the end, inherited members
-- are first, and are in declaration order.
--
-- Also make sure that, for each member derivation tree, we add only
-- the root member. For instance if struct A defines member M1 and if
-- struct B derives from A and overrides member M1 with M2, then we
-- should include M1 only once in the result.
declare
Added_Trees : array (1 .. Id.Struct_Members.all'Last) of Boolean :=
(others => False);
-- Set of members added to the result so far. Used to avoid adding
-- a member because it both a struct and its base has it.
begin
Next := Result'Last;
while Current_Struct /= No_Type_Index loop
for M of reverse Id.Struct_Types.all (Current_Struct).Members
loop
if not Added_Trees (M) then
Added_Trees (M) := True;
Result (Next) := From_Index (Id, M);
Next := Next - 1;
end if;
end loop;
Current_Struct :=
Id.Struct_Types.all (Current_Struct).Base_Type;
end loop;
end;
end return;
end Members;
-----------------
-- Member_Name --
-----------------
function Member_Name (Member : Struct_Member_Ref) return Name_Type is
begin
Check_Struct_Member (Member);
return Create_Name
(Member.Id.Struct_Members.all (Member.Index).Name.all);
end Member_Name;
-----------------
-- Member_Type --
-----------------
function Member_Type (Member : Struct_Member_Ref) return Type_Ref is
begin
Check_Struct_Member (Member);
return From_Index
(Member.Id, Member.Id.Struct_Members.all (Member.Index).Member_Type);
end Member_Type;
--------------
-- To_Index --
--------------
function To_Index (Member : Struct_Member_Ref) return Struct_Member_Index is
begin
Check_Struct_Member (Member);
return Member.Index;
end To_Index;
----------------
-- From_Index --
----------------
function From_Index
(Id : Language_Id; Member : Struct_Member_Index) return Struct_Member_Ref
is
begin
Check_Struct_Member (Id, Member);
return (Id, Member);
end From_Index;
------------------------
-- Last_Struct_Member --
------------------------
function Last_Struct_Member (Id : Language_Id) return Struct_Member_Index is
begin
return Id.Struct_Members.all'Last;
end Last_Struct_Member;
--------------------------
-- Member_Argument_Type --
--------------------------
function Member_Argument_Type
(Member : Struct_Member_Ref; Argument : Argument_Index) return Type_Ref
is
Id : Language_Id;
begin
Check_Struct_Member (Member);
Check_Struct_Member_Argument (Member, Argument);
Id := Member.Id;
return From_Index
(Id,
Id.Struct_Members.all
(Member.Index).Arguments (Argument).Argument_Type);
end Member_Argument_Type;
-----------------------------------
-- Member_Argument_Default_Value --
-----------------------------------
function Member_Argument_Default_Value
(Member : Struct_Member_Ref; Argument : Argument_Index) return Value_Ref
is
Id : Language_Id;
begin
Check_Struct_Member (Member);
Check_Struct_Member_Argument (Member, Argument);
Id := Member.Id;
declare
V : Default_Value_Descriptor renames
Id.Struct_Members.all (Member.Index)
.Arguments (Argument)
.Default_Value;
begin
case V.Kind is
when None =>
return No_Value_Ref;
when Boolean_Value =>
return From_Bool (Id, V.Boolean_Value);
when Integer_Value =>
return From_Int (Id, V.Integer_Value);
when Character_Value =>
return From_Char (Id, V.Character_Value);
when Enum_Value =>
declare
T : constant Type_Ref := From_Index (Id, V.Enum_Type);
E : constant Enum_Value_Ref := From_Index (T, V.Enum_Value);
begin
return Create_Enum (E);
end;
when Null_Node_Value =>
return From_Node (Id, No_Lk_Node);
end case;
end;
end Member_Argument_Default_Value;
--------------------------
-- Member_Argument_Name --
--------------------------
function Member_Argument_Name
(Member : Struct_Member_Ref; Argument : Argument_Index) return Name_Type
is
begin
Check_Struct_Member (Member);
Check_Struct_Member_Argument (Member, Argument);
return Create_Name
(Member.Id.Struct_Members.all
(Member.Index).Arguments (Argument).Name.all);
end Member_Argument_Name;
--------------------------
-- Member_Last_Argument --
--------------------------
function Member_Last_Argument
(Member : Struct_Member_Ref) return Any_Argument_Index is
begin
Check_Struct_Member (Member);
return Member.Id.Struct_Members.all (Member.Index).Last_Argument;
end Member_Last_Argument;
-----------------
-- Eval_Member --
-----------------
function Eval_Member
(Value : Value_Ref;
Member : Struct_Member_Ref;
Arguments : Value_Ref_Array := (1 .. 0 => No_Value_Ref))
return Value_Ref
is
Id : Language_Id;
T : Type_Ref;
Args_Count : Any_Argument_Index;
begin
-- Check that we have a base struct value
Check_Value (Value);
Id := Value.Value.Id;
T := Type_Of (Value);
Check_Base_Struct_Type (T);
-- Check that we have a valid member for it
Check_Struct_Member (Member);
Check_Same_Language (Id, Member.Id);
Check_Struct_Owns_Member (T, Member);
-- Check that the arguments match Member
Args_Count := Member_Last_Argument (Member);
if Arguments'Length /= Args_Count then
raise Precondition_Failure with
Debug_Name (T) & " takes" & Args_Count'Image
& " arguments but got" & Natural'Image (Arguments'Length)
& " values";
end if;
for I in 1 .. Args_Count loop
declare
A : Value_Ref renames
Arguments (Arguments'First + Natural (I) - 1);
Arg_Type : constant Type_Ref := Member_Argument_Type (Member, I);
begin
Check_Value (A);
Check_Same_Language (Id, A.Value.Id);
Check_Value_Type
(A,
To_Index (Arg_Type),
"unexpected type for argument" & I'Image);
end;
end loop;
-- Finally evaluate the member
if Value.Value.all in Base_Internal_Struct_Value'Class then
pragma Assert (Arguments'Length = 0);
declare
V : constant Base_Internal_Struct_Value_Access :=
Base_Internal_Struct_Value_Access (Value.Value);
begin
return Create_Value (Id, +V.Eval_Member (Member.Index));
end;
else
-- Unpack the arguments and evaluate the member
declare
V : constant Internal_Acc_Node :=
Internal_Acc_Node (Value.Value);
Args : Internal_Value_Array (1 .. Natural (Args_Count));
begin
for I in Args'Range loop
Args (I) := +Arguments (Arguments'First + I - 1).Value;
end loop;
return Create_Value
(Id, +Id.Eval_Node_Member (V, Member.Index, Args));
end;
end if;
end Eval_Member;
----------------------
-- Eval_Node_Member --
----------------------
function Eval_Node_Member
(Value : Lk_Node;
Member : Struct_Member_Ref;
Arguments : Value_Ref_Array := (1 .. 0 => No_Value_Ref))
return Value_Ref
is
Node : Value_Ref;
begin
if Value = No_Lk_Node then
raise Precondition_Failure with "the null node has no member";
end if;
Node := From_Node (Value.Language, Value);
return Eval_Member (Node, Member, Arguments);
end Eval_Node_Member;
---------------------
-- Create_Name_Map --
---------------------
function Create_Name_Map
(Id : Language_Id;
Symbols : Symbol_Table;
Enum_Types : Casing_Convention;
Enum_Values : Casing_Convention;
Struct_Types : Casing_Convention;
Struct_Members : Casing_Convention) return Name_Map
is
function Format_Name
(Name : Name_Type;
Convention : Casing_Convention) return Symbol_Type
is (Find (Symbols, Format_Name (Name, Convention)));
begin
if Id = null then
raise Precondition_Failure with "null language id";
elsif Symbols = null then
raise Precondition_Failure with "null symbol table";
end if;
return Result : Name_Map do
Result.Id := Id;
-- Register enum types and their values
Result.Enum_Value_Maps :=
new Enum_Value_Map_Array (Id.Enum_Types.all'Range);
for Enum_Index in Id.Enum_Types.all'Range loop
declare
T : constant Type_Ref := From_Index (Id, Enum_Index);
Values : Enum_Value_Maps.Map renames
Result.Enum_Value_Maps.all (Enum_Index);
V : Enum_Value_Ref;
begin
Result.Type_Map.Insert
(Format_Name (Enum_Type_Name (T), Enum_Types), T);
for Value_Index in 1 .. Enum_Last_Value (T) loop
V := From_Index (T, Value_Index);
Values.Insert
(Format_Name (Enum_Value_Name (V), Enum_Values), V);
end loop;
end;
end loop;
-- Register struct types
for I in Id.Struct_Types.all'Range loop
declare
T : constant Type_Ref := From_Index (Id, I);
begin
Result.Type_Map.Insert
(Format_Name (Base_Struct_Type_Name (T), Struct_Types), T);
end;
end loop;
-- Precompute casing for struct members
Result.Struct_Member_Names :=
new Struct_Member_Name_Array (1 .. Last_Struct_Member (Id));
for I in Result.Struct_Member_Names.all'Range loop
Result.Struct_Member_Names.all (I) :=
Format_Name (Member_Name (From_Index (Id, I)), Struct_Members);
end loop;
end return;
end Create_Name_Map;
-----------------
-- Lookup_Type --
-----------------
function Lookup_Type (Self : Name_Map; Name : Symbol_Type) return Type_Ref
is
use Named_Type_Maps;
Pos : Cursor;
begin
Check_Name_Map (Self);
Check_Symbol (Name);
Pos := Self.Type_Map.Find (Name);
return (if Has_Element (Pos)
then Element (Pos)
else No_Type_Ref);
end Lookup_Type;
-----------------------
-- Lookup_Enum_Value --
-----------------------
function Lookup_Enum_Value
(Self : Name_Map;
Enum : Type_Ref;
Name : Symbol_Type) return Enum_Value_Ref is
begin
Check_Name_Map (Self);
Check_Enum_Type (Enum);
Check_Same_Language (Self.Id, Enum.Id);
Check_Symbol (Name);
declare
use Enum_Value_Maps;
Value_Map : Map renames Self.Enum_Value_Maps.all (Enum.Index);
Pos : constant Cursor := Value_Map.Find (Name);
begin
return (if Has_Element (Pos)
then Element (Pos)
else No_Enum_Value_Ref);
end;
end Lookup_Enum_Value;
--------------------------
-- Lookup_Struct_Member --
--------------------------
function Lookup_Struct_Member
(Self : Name_Map;
Struct : Type_Ref;
Name : Symbol_Type) return Struct_Member_Ref
is
All_Members : constant Struct_Member_Ref_Array := Members (Struct);
begin
Check_Name_Map (Self);
Check_Same_Language (Self.Id, Struct.Id);
Check_Symbol (Name);
for M of All_Members loop
if Self.Struct_Member_Names.all (To_Index (M)) = Name then
return M;
end if;
end loop;
return No_Struct_Member_Ref;
end Lookup_Struct_Member;
------------
-- Adjust --
------------
overriding procedure Adjust (Self : in out Name_Map) is
begin
if Self.Enum_Value_Maps = null then
return;
end if;
Self.Enum_Value_Maps :=
new Enum_Value_Map_Array'(Self.Enum_Value_Maps.all);
Self.Struct_Member_Names :=
new Struct_Member_Name_Array'(Self.Struct_Member_Names.all);
end Adjust;
--------------
-- Finalize --
--------------
overriding procedure Finalize (Self : in out Name_Map) is
begin
Free (Self.Enum_Value_Maps);
Free (Self.Struct_Member_Names);
end Finalize;
--------------------
-- Check_Name_Map --
--------------------
procedure Check_Name_Map (Self : Name_Map) is
begin
if Self.Id = null then
raise Precondition_Failure with "uninitialized name map";
end if;
end Check_Name_Map;
end Langkit_Support.Generic_API.Introspection;
|
zhmu/ananas | Ada | 372 | adb | -- { dg-do compile }
with discr1; use discr1;
package body discr2 is
procedure Copy (Dataset : in out C_Type) is
Last_Char : Positive := 300;
begin
while (Last_Char > 40) loop
Last_Char := Last_Char - 1;
end loop;
Assign (Dataset.Designator (1 .. Last_Char));
end;
procedure Dummy is
begin
null;
end Dummy;
end discr2;
|
jwarwick/aoc_2020 | Ada | 4,373 | adb | -- AoC 2020, Day 12
with Ada.Text_IO;
with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions;
package body Day is
package TIO renames Ada.Text_IO;
function char_to_action(c : in Character) return Action_Type is
begin
case c is
when 'N' => return north;
when 'S' => return south;
when 'E' => return east;
when 'W' => return west;
when 'L' => return left;
when 'R' => return right;
when 'F' => return forward;
when others => raise Instruction_Exception with "Unknown action: " & c;
end case;
end;
function parse_line(line : in String) return Instruction is
act : constant Action_Type := char_to_action(line(line'first));
val : constant Integer := Integer'Value(line(line'first+1..line'last));
begin
return Instruction'(action => act, value => val);
end parse_line;
function load_file(filename : in String) return Ferry is
file : TIO.File_Type;
vec : Instruction_Vectors.Vector := Empty_Vector;
begin
TIO.open(File => file, Mode => TIO.In_File, Name => filename);
while not TIO.end_of_file(file) loop
vec.append(parse_line(TIO.get_line(file)));
end loop;
TIO.close(file);
return Ferry'(instructions => vec, heading => east, x => 0, y => 0, way_x => -1, way_y => 10);
end load_file;
function action_to_heading(act : in Action_Type) return Heading_Type is
begin
case act is
when north => return north;
when south => return south;
when east => return east;
when west => return west;
when others => raise Instruction_Exception with "Cannot map action to heading: " & Action_Type'Image(act);
end case;
end action_to_heading;
procedure move(dir : in Heading_Type; dist : in Integer; f : in out Ferry) is
begin
case dir is
when north => f.x := f.x - dist;
when south => f.x := f.x + dist;
when east => f.y := f.y + dist;
when west => f.y := f.y - dist;
end case;
end move;
procedure turn(angle : in Integer; f : in out Ferry) is
curr_pos : constant Natural := Heading_Type'Pos(f.heading);
steps : constant Integer := angle / 90;
new_pos : constant Natural := (curr_pos + steps) mod 4;
new_heading : constant Heading_Type := Heading_Type'Val(new_pos);
begin
f.heading := new_heading;
end turn;
procedure simulate(f : in out Ferry) is
begin
for i of f.instructions loop
case i.action is
when north..west => move(action_to_heading(i.action), i.value, f);
when forward => move(f.heading, i.value, f);
when left => turn(-1 * i.value, f);
when right => turn(i.value, f);
end case;
end loop;
end simulate;
procedure move_waypoint(dir : in Heading_Type; dist : in Integer; f : in out Ferry) is
begin
case dir is
when north => f.way_x := f.way_x - dist;
when south => f.way_x := f.way_x + dist;
when east => f.way_y := f.way_y + dist;
when west => f.way_y := f.way_y - dist;
end case;
end move_waypoint;
procedure rotate_waypoint(angle : in Integer; f : in out Ferry) is
RadPerDegree : constant Float := Ada.Numerics.Pi / 180.0;
radians : constant Float := RadPerDegree * Float(angle);
x : constant Float := Float(f.way_x);
y : constant Float := Float(f.way_y);
new_x : constant Float := (x * cos(radians)) - (y * sin(radians));
new_y : constant Float := (x * sin(radians)) + (y * cos(radians));
begin
f.way_x := Integer(new_x);
f.way_y := Integer(new_y);
end rotate_waypoint;
procedure simulate_waypoint(f : in out Ferry) is
begin
for i of f.instructions loop
case i.action is
when north..west => move_waypoint(action_to_heading(i.action), i.value, f);
when forward =>
f.x := f.x + (i.value * f.way_x);
f.y := f.y + (i.value * f.way_y);
when left => rotate_waypoint(i.value, f);
when right => rotate_waypoint(-1 * i.value, f);
end case;
end loop;
end simulate_waypoint;
function distance(f : in Ferry) return Natural is
tmp : Ferry := f;
begin
simulate(tmp);
return abs(tmp.x) + abs(tmp.y);
end distance;
function waypoint_distance(f : in Ferry) return Natural is
tmp : Ferry := f;
begin
simulate_waypoint(tmp);
return abs(tmp.x) + abs(tmp.y);
end waypoint_distance;
end Day;
|
m-f-1998/university | Ada | 961 | ads |
-- Author: A. Ireland
--
-- Address: School Mathematical & Computer Sciences
-- Heriot-Watt University
-- Edinburgh, EH14 4AS
--
-- E-mail: [email protected]
--
-- Last modified: 13.9.2019
--
-- Filename: console.ads
--
-- Description: Models the console associated with the WTP system, i.e.
-- the reset mechanism that is required to close the
-- emergency drainage valve.
pragma SPARK_Mode (On);
package Console
with
Abstract_State => State
is
procedure Enable_Reset
with
Global => (Output => State),
Depends => (State => null);
procedure Disable_Reset
with
Global => (Output => State),
Depends => (State => null);
function Reset_Enabled return Boolean
with
Global => (Input => State),
Depends => (Reset_Enabled'Result => State);
end Console;
|
io7m/coreland-vector-ada | Ada | 654 | adb | package body vector.angle is
-- C imports
function vec_angle_f
(a, b : vector_f_t;
n : ic.int) return scalar_f_t;
pragma import (c, vec_angle_f, "vec_angleNf_aligned");
function vec_angle_d
(a, b : vector_d_t;
n : ic.int) return scalar_d_t;
pragma import (c, vec_angle_d, "vec_angleNd_aligned");
-- angle, in place
function f (a, b : in vector_f_t) return scalar_f_t is
begin
return vec_angle_f (a, b, ic.int (size));
end f;
pragma inline (f);
function d (a, b : in vector_d_t) return scalar_d_t is
begin
return vec_angle_d (a, b, ic.int (size));
end d;
pragma inline (d);
end vector.angle;
|
persan/AdaYaml | Ada | 1,987 | adb | -- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
with Text;
with Yaml.Tags;
package body Yaml.Transformator.Canonical is
procedure Put (Object : in out Instance; E : Event) is
use type Text.Reference;
function Is_Non_Specific (Tag : Text.Reference) return Boolean is
(Tag = Text.Empty or Tag = Tags.Exclamation_Mark);
begin
if Object.Current_Exists then
raise Constraint_Error with
"Must retrieve current event before inputting another one";
end if;
Object.Current := E;
Object.Current_Exists := True;
case Object.Current.Kind is
when Document_Start =>
Object.Current.Implicit_Start := False;
when Mapping_Start =>
if Is_Non_Specific (Object.Current.Collection_Properties.Tag) then
Object.Current.Collection_Properties.Tag := Tags.Mapping;
end if;
Object.Current.Collection_Style := Flow;
when Sequence_Start =>
if Is_Non_Specific (Object.Current.Collection_Properties.Tag) then
Object.Current.Collection_Properties.Tag := Tags.Sequence;
end if;
Object.Current.Collection_Style := Flow;
when Scalar =>
if Is_Non_Specific (Object.Current.Scalar_Properties.Tag) then
Object.Current.Scalar_Properties.Tag := Tags.String; -- TODO
end if;
Object.Current.Scalar_Style := Double_Quoted;
when others => null;
end case;
end Put;
function Has_Next (Object : Instance) return Boolean is
(Object.Current_Exists);
function Next (Object : in out Instance) return Event is
begin
if Object.Current_Exists then
Object.Current_Exists := False;
return Object.Current;
else
raise Constraint_Error with "No next event!";
end if;
end Next;
end Yaml.Transformator.Canonical;
|
stcarrez/ada-util | Ada | 1,307 | ads | -----------------------------------------------------------------------
-- util-properties-json-tests -- Test reading JSON file into properties
-- Copyright (C) 2013 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 Util.Properties.JSON.Tests is
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite);
type Test is new Util.Tests.Test with null record;
-- Test loading a JSON file into a properties object.
procedure Test_Parse_JSON (T : in out Test);
-- Test loading a JSON file into a properties object.
procedure Test_Read_JSON (T : in out Test);
end Util.Properties.JSON.Tests;
|
stcarrez/ada-util | Ada | 10,141 | ads | -----------------------------------------------------------------------
-- util-tests - Helper for writing unit tests
-- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2023 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.Strings.Unbounded;
with Ada.Calendar;
with GNAT.Source_Info;
with Util.Properties;
with Util.Assertions;
with Util.XUnit;
with Util.Strings.Vectors;
package Util.Tests is
use Ada.Strings.Unbounded;
subtype Message_String is Util.XUnit.Message_String;
subtype Test_Case is Util.XUnit.Test_Case;
subtype Test_Suite is Util.XUnit.Test_Suite;
subtype Access_Test_Suite is Util.XUnit.Access_Test_Suite;
function Format (S : in String) return Message_String renames Util.XUnit.Format;
type Test is new Util.XUnit.Test with null record;
procedure Execute (T : in out Test;
Command : in String;
Input : in String;
Output : in String;
Result : out Ada.Strings.Unbounded.Unbounded_String;
Working_Directory : in String;
Status : in Natural := 0;
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
procedure Execute (T : in out Test;
Command : in String;
Input : in String;
Output : in String;
Result : out Ada.Strings.Unbounded.Unbounded_String;
Status : in Natural := 0;
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
procedure Execute (T : in out Test;
Command : in String;
Result : out Ada.Strings.Unbounded.Unbounded_String;
Status : in Natural := 0;
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
procedure Execute (T : in out Test;
Command : in String;
Expect : in String;
Status : in Natural := 0;
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Get a path to access a test file.
function Get_Path (File : String) return String;
-- Get a path to create a test file.
function Get_Test_Path (File : String) return String;
-- Get the timeout for the test execution.
function Get_Test_Timeout (Name : in String) return Duration;
-- Get the testsuite harness prefix. This prefix is added to the test class name.
-- By default it is empty. It is allows to execute the test harness on different
-- environment (ex: MySQL or SQLlite) and be able to merge and collect the two result
-- sets together.
function Get_Harness_Prefix return String;
-- Get a test configuration parameter.
function Get_Parameter (Name : String;
Default : String := "") return String;
-- Get the test configuration properties.
function Get_Properties return Util.Properties.Manager;
-- Get a new unique string
function Get_Uuid return String;
-- Get the verbose flag that can be activated with the <tt>-v</tt> option.
function Verbose return Boolean;
-- Returns True if the test with the given name is enabled.
-- By default all the tests are enabled. When the -r test option is passed
-- all the tests are disabled except the test specified by the -r option.
function Is_Test_Enabled (Name : in String) return Boolean;
-- Check that two files are equal. This is intended to be used by
-- tests that create files that are then checked against patterns.
procedure Assert_Equal_Files (T : in Test_Case'Class;
Expect : in String;
Test : in String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that two files are equal. This is intended to be used by
-- tests that create files that are then checked against patterns.
procedure Assert_Equal_Files (T : in Test'Class;
Expect : in String;
Test : in String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that the value matches what we expect.
procedure Assert_Equals is new Assertions.Assert_Equals_T (Value_Type => Integer);
procedure Assert_Equals is new Assertions.Assert_Equals_T (Value_Type => Character);
procedure Assert_Equals is new Assertions.Assert_Equals_T (Value_Type => Long_Long_Integer);
-- Check that the value matches what we expect.
-- procedure Assert (T : in Test'Class;
-- Condition : in Boolean;
-- Message : in String := "Test failed";
-- Source : String := GNAT.Source_Info.File;
-- Line : Natural := GNAT.Source_Info.Line);
-- Check that the value matches what we expect.
procedure Assert_Equals (T : in Test'Class;
Expect, Value : in Ada.Calendar.Time;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that the value matches what we expect.
procedure Assert_Equals (T : in Test'Class;
Expect, Value : in String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that the value matches what we expect.
procedure Assert_Equals (T : in Test'Class;
Expect : in String;
Value : in Unbounded_String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that the value matches the regular expression
procedure Assert_Matches (T : in Test'Class;
Pattern : in String;
Value : in Unbounded_String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that the value matches the regular expression
procedure Assert_Matches (T : in Test'Class;
Pattern : in String;
Value : in String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Check that the file exists.
procedure Assert_Exists (T : in Test'Class;
File : in String;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Report a test failed.
procedure Fail (T : in Test'Class;
Message : in String := "Test failed";
Source : in String := GNAT.Source_Info.File;
Line : in Natural := GNAT.Source_Info.Line);
procedure Assert_Equal_Vectors (T : in Test'Class;
Expect : in Util.Strings.Vectors.Vector;
List : in Util.Strings.Vectors.Vector;
Message : in String := "Test failed";
Source : String := GNAT.Source_Info.File;
Line : Natural := GNAT.Source_Info.Line);
-- Default initialization procedure.
procedure Initialize_Test (Props : in Util.Properties.Manager);
-- The main testsuite program. This launches the tests, collects the
-- results, create performance logs and set the program exit status
-- according to the testsuite execution status.
--
-- The <b>Initialize</b> procedure is called before launching the unit tests. It is intended
-- to configure the tests according to some external environment (paths, database access).
--
-- The <b>Finish</b> procedure is called after the test suite has executed.
generic
with function Suite return Access_Test_Suite;
with procedure Initialize (Props : in Util.Properties.Manager) is Initialize_Test;
with procedure Finish (Status : in Util.XUnit.Status) is null;
procedure Harness (Name : in String);
end Util.Tests;
|
tum-ei-rcs/StratoX | Ada | 539 | ads |
with HAL_Interface; use HAL_Interface;
package I2C_Interface with SPARK_Mode
--,Abstract_State => State
is
type I2C_Type is new Port_Type with record
pin : Integer := 0;
end record;
overriding
procedure configure(Port : I2C_Type; Config : Configuration_Type);
overriding
procedure write (Port : I2C_Type; Address : Address_Type; Data : Data_Type)
; --with Global => (In_Out => State);
overriding
function read (Port : I2C_Type; Address : Address_Type) return Data_Type;
end I2C_Interface;
|
sungyeon/drake | Ada | 844 | ads | pragma License (Unrestricted);
-- implementation unit required by compiler
package System.Aux_Dec is
pragma Pure;
-- required for T'Type_Class attribute by compiler (s-auxdec.ads)
type Type_Class is (
Type_Class_Enumeration,
Type_Class_Integer,
Type_Class_Fixed_Point,
Type_Class_Floating_Point,
Type_Class_Array,
Type_Class_Record,
Type_Class_Access,
Type_Class_Task,
Type_Class_Address);
private
-- required for renaming 'Iamge attribute(?) by compiler (s-auxdec.ads)
type AST_Handler is access procedure (Param : Long_Integer);
-- required by compiler ??? (s-auxdec.ads)
-- No_AST_Handler : constant AST_Handler;
-- function Import_Value (Symbol : String) return Unsigned_32;
-- function Import_Address (Symbol : String) return Address;
end System.Aux_Dec;
|
charlie5/lace | Ada | 14,297 | adb | package body any_Math.any_Geometry.any_d2
is
---------
-- Sites
--
function Distance (From, To : Site) return Real
is
use Functions;
begin
return SqRt ( (To (1) - From (1)) ** 2
+ (To (2) - From (2)) ** 2);
end Distance;
function to_Polar (Self : in Site) return polar_Site
is
use any_Math.complex_Reals;
the_Complex : constant Complex := compose_from_Cartesian (Self (1),
Self (2));
begin
return (Angle => Argument (the_Complex),
Extent => Modulus (the_Complex));
end to_Polar;
function to_Site (Self : in polar_Site) return Site
is
use any_Math.complex_Reals;
the_Complex : constant Complex := compose_from_Polar (Modulus => Self.Extent,
Argument => Self.Angle);
begin
return [the_Complex.Re,
the_Complex.Im];
end to_Site;
function Angle (Self : in Site) return Radians
is
use any_Math.complex_Reals;
the_Complex : constant Complex := compose_from_Cartesian (Self (1),
Self (2));
begin
return Argument (the_Complex);
end Angle;
function Extent (Self : in Site) return Real
is
use any_Math.complex_Reals;
the_Complex : constant Complex := compose_from_Cartesian (Self (1),
Self (2));
begin
return Modulus (the_Complex);
end Extent;
---------
-- Lines
--
function to_Line (Anchor : in Site;
Angle : in Radians) return Line
is
use Functions;
begin
return (Kind => anchored_Gradient,
Anchor => Anchor,
Gradient => Tan (Angle)); -- TODO: What about infinite gradient ? ie 90 and 270 degrees ?
end to_Line;
function to_Line (Site_1,
Site_2 : in Site) return Line
is
begin
return (Kind => two_Points,
Sites => [Site_1,
Site_2]);
end to_Line;
function X_of (Self : in Line; Y : in Real) return Real
is
begin
return
(Y - Self.Anchor (2)) / Self.Gradient
+ Self.Anchor (1);
end X_of;
function Y_of (Self : in Line; X : in Real) return Real
is
begin
return
Self.Gradient * (X - Self.Anchor (1))
+ Self.Anchor (2);
end Y_of;
function Gradient (Self : in Line) return Real
is
Run : constant Real := Self.Sites (2)(1) - Self.Sites (1)(1);
begin
if Run = 0.0
then
return Real'Last;
else
return (Self.Sites (2) (2) - Self.Sites (1) (2))
/ Run;
end if;
end Gradient;
----------
-- Bounds
--
function to_bounding_Box (Self : Sites) return bounding_Box
is
Result : bounding_Box := null_Bounds;
begin
for Each in Self'Range
loop
Result.Lower (1) := Real'Min (Result.Lower (1), Self (Each)(1));
Result.Lower (2) := Real'Min (Result.Lower (2), Self (Each)(2));
Result.Upper (1) := Real'Max (Result.Upper (1), Self (Each)(1));
Result.Upper (2) := Real'Max (Result.Upper (2), Self (Each)(2));
end loop;
return Result;
end to_bounding_Box;
function Extent (Self : in bounding_Box; Dimension : in Index) return Real
is
begin
return Self.Upper (Dimension) - Self.Lower (Dimension);
end Extent;
function "or" (Left : in bounding_Box; Right : in Site) return bounding_Box
is
Result : bounding_Box;
begin
for i in Right'Range
loop
if Right (i) < Left.Lower (i)
then Result.Lower (i) := Right (i);
else Result.Lower (i) := Left.Lower (i);
end if;
if Right (i) > Left.Upper (i)
then Result.Upper (i) := Right (i);
else Result.Upper (i) := Left.Upper (i);
end if;
end loop;
return Result;
end "or";
function "or" (Left : in bounding_Box; Right : in bounding_Box) return bounding_Box
is
Result : bounding_Box := Left or Right.Lower;
begin
Result := Result or Right.Upper;
return Result;
end "or";
function "+" (Left : in bounding_Box; Right : in Vector_2) return bounding_Box
is
begin
return (Left.Lower + Right,
Left.Upper + Right);
end "+";
function Image (Self : bounding_Box) return String
is
begin
return "(Lower => " & Image (Self.Lower)
& ", Upper => " & Image (Self.Upper) & ")";
end Image;
------------
-- Triangles
--
procedure check (Self : in Triangle)
is
begin
if Self.Vertices (1) = Self.Vertices (2)
or Self.Vertices (1) = Self.Vertices (3)
or Self.Vertices (2) = Self.Vertices (3)
then
raise Degenerate;
end if;
declare
L1 : constant Line := to_Line (Self.Vertices (1), Self.Vertices (2));
L2 : constant Line := to_Line (Self.Vertices (2), Self.Vertices (3));
L3 : constant Line := to_Line (Self.Vertices (3), Self.Vertices (1));
M1 : constant Real := Gradient (L1);
M2 : constant Real := Gradient (L2);
M3 : constant Real := Gradient (L3);
begin
if M1 = M2
or M1 = M3
or M2 = M3
then
raise Colinear with
" G1: " & Image (M1)
& " G2: " & Image (M2)
& " G3: " & Image (M3);
end if;
end;
end check;
pragma Unreferenced (check);
-- function Area (Self : in Triangle) return Real
-- --
-- -- This is an implementation of Heron's formula.
-- -- It is numerically unstable with very small angles.
-- --
-- is
-- use Functions;
--
-- A : constant Real := Distance (Self.Vertices (1), Self.Vertices (2));
-- B : constant Real := Distance (Self.Vertices (2), Self.Vertices (3));
-- C : constant Real := Distance (Self.Vertices (3), Self.Vertices (1));
--
-- S : constant Real := (A + B + C) / 2.0; -- Semi-perimeter.
--
-- begin
-- return Real (SqRt (S * (S - A) * (S - B) * (S - C))); -- Herons formula.
-- end Area;
function Area (Self : in Triangle) return Real
--
-- This is a numerically stable implementation of Heron's formula.
-- See: https://en.wikipedia.org/wiki/Heron%27s_formula#Numerical_stability.
--
is
use Functions;
a : Real := Distance (Self.Vertices (1), Self.Vertices (2));
b : Real := Distance (Self.Vertices (2), Self.Vertices (3));
c : Real := Distance (Self.Vertices (3), Self.Vertices (1));
D : Real;
begin
-- Sort the lengths such that a >= b >= c.
--
if c > b then swap (b, c); end if;
if a < b then swap (a, b); end if;
if b < c then swap (b, c); end if;
D := (a + (b + c))
* (c - (a - b))
* (c + (a - b))
* (a + (b - c));
if D <= 0.0
then
return 0.0;
end if;
return 0.25 * SqRt (D);
end Area;
function Perimeter (Self : Triangle) return Real
is
begin
return
Distance (Self.Vertices (1), Self.Vertices (2))
+ Distance (Self.Vertices (2), Self.Vertices (3))
+ Distance (Self.Vertices (3), Self.Vertices (1));
end Perimeter;
function prior_Vertex (Self : in Triangle; to_Vertex : in Positive) return Site
is
begin
if to_Vertex = 1
then return Self.Vertices (3);
else return Self.Vertices (to_Vertex - 1);
end if;
end prior_Vertex;
function next_Vertex (Self : in Triangle; to_Vertex : in Positive) return Site
is
begin
if to_Vertex = 3
then return Self.Vertices (1);
else return Self.Vertices (to_Vertex + 1);
end if;
end next_Vertex;
function Angle (Self : in Triangle; at_Vertex : in Positive) return Radians
is
use Functions;
a : constant Real := Distance (next_Vertex (Self, to_vertex => at_Vertex),
prior_Vertex (Self, to_vertex => at_Vertex));
b : constant Real := Distance (Self.Vertices (at_Vertex), next_Vertex (Self, to_vertex => at_Vertex));
c : constant Real := Distance (Self.Vertices (at_Vertex), prior_Vertex (Self, to_vertex => at_Vertex));
cos_A : constant Real := (b**2 + c**2 - a**2) / (2.0 * b * c);
begin
if cos_A < -1.0 then return to_Radians (180.0);
elsif cos_A > 1.0 then return 0.0;
else return arcCos (cos_A);
end if;
end Angle;
----------
-- Circles
--
function Area (Self : Circle) return Real
is
begin
return Pi * Self.Radius**2;
end Area;
function Perimeter (Self : Circle) return Real
is
begin
return 2.0 * Pi * Self.Radius;
end Perimeter;
-----------
-- Polygons
--
function Centroid (Self : in Polygon) return Site
is
Result : Site := Origin_2d;
begin
for i in 1 .. Self.Vertex_Count
loop
Result := Result + Self.Vertices (i);
end loop;
Result := Result / Real (Self.Vertex_Count);
return Result;
end Centroid;
procedure center (Self : in out Polygon)
is
Center : constant Site := Centroid (Self);
begin
for i in 1 .. Self.Vertex_Count
loop
Self.Vertices (i) := Self.Vertices (i) - Center;
end loop;
end center;
function prior_Vertex (Self : in Polygon; to_Vertex : in Positive) return Site
is
begin
if To_Vertex = 1
then return Self.Vertices (Self.Vertex_Count);
else return Self.Vertices (to_Vertex - 1);
end if;
end prior_Vertex;
function next_Vertex (Self : in Polygon; to_Vertex : in Positive) return Site
is
begin
if to_Vertex = Self.Vertex_Count
then return Self.Vertices (1);
else return Self.Vertices (to_Vertex + 1);
end if;
end next_Vertex;
function is_Triangle (Self : in Polygon) return Boolean
is
begin
return Self.Vertex_Count = 3;
end is_Triangle;
function is_Clockwise (Self : in Polygon) return Boolean
is
i : constant Site := Self.Vertices (1);
j : constant Site := Self.Vertices (1);
k : constant Site := Self.Vertices (1);
z : Real := (j (1) - i (1))
* (k (2) - j (2));
begin
z := z - (j (2) - i (2))
* (k (1) - j (1));
return z < 0.0;
end is_Clockwise;
function is_Convex (Self : in Polygon) return Boolean
is
negative_Found,
positive_Found : Boolean := False;
begin
if is_Triangle (Self)
then
return True; -- All triangles are convex.
end if;
for i in 1 .. Self.Vertex_Count
loop
declare
k0 : constant Site := Self.Vertices (i);
function get_k1 return Site
is
begin
if i = Self.Vertex_Count
then return Self.Vertices (1);
else return Self.Vertices (i + 1);
end if;
end get_k1;
k1 : constant Site := get_k1;
function get_k2 return Site
is
begin
if i = Self.Vertex_Count - 1 then return Self.Vertices (1);
elsif i = Self.Vertex_Count then return Self.Vertices (2);
else return Self.Vertices (i + 2);
end if;
end get_k2;
k2 : constant Site := get_k2;
function get_Crossproduct return Real
is
dx1 : constant Real := k1 (1) - k0 (1);
dy1 : constant Real := k1 (2) - k0 (2);
dx2 : constant Real := k2 (1) - k1 (1);
dy2 : constant Real := k2 (2) - k1 (2);
begin
return dx1 * dy2 - dy1 * dx2;
end get_Crossproduct;
Crossproduct : constant Real := get_Crossproduct;
begin
if Crossproduct > 0.0
then
if negative_Found
then
return False;
end if;
positive_Found := True;
elsif Crossproduct < 0.0
then
if positive_Found
then
return False;
end if;
negative_Found := True;
end if;
end;
end loop;
return True;
end is_Convex;
function Area (Self : Polygon) return Real
is
Result : Real := 0.0;
begin
for i in 2 .. Self.Vertex_Count - 1
loop
Result := Result + Area (Triangle' (Vertices => [Self.Vertices (1),
Self.Vertices (i),
Self.Vertices (i + 1)]));
end loop;
return Result;
end Area;
function Perimeter (Self : Polygon) return Real
is
Result : Real := Distance (Self.Vertices (1),
Self.Vertices (Self.Vertex_Count));
begin
for i in 1 .. Self.Vertex_Count - 1
loop
Result := Result + Distance (Self.Vertices (i),
Self.Vertices (i + 1));
end loop;
return Result;
end Perimeter;
function Angle (Self : in Polygon; at_Vertex : in Positive) return Radians
is
Tri : constant Triangle := (vertices => [Self.Vertices (at_Vertex),
next_Vertex (Self, at_Vertex),
prior_Vertex (Self, at_Vertex)]);
begin
return Angle (Tri, 1);
end Angle;
function Image (Self : in Polygon) return String
is
pragma Unreferenced (Self);
begin
return "Polygon image (TODO)";
end Image;
end any_Math.any_Geometry.any_d2;
|
reznikmm/matreshka | Ada | 3,627 | ads | ------------------------------------------------------------------------------
-- --
-- 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.Generic_Hash;
function AMF.Utp.Validation_Actions.Hash is
new AMF.Elements.Generic_Hash (Utp_Validation_Action, Utp_Validation_Action_Access);
|
charlie5/cBound | Ada | 1,410 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_get_fb_configs_cookie_t is
-- Item
--
type Item is record
sequence : aliased Interfaces.C.unsigned;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_get_fb_configs_cookie_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_get_fb_configs_cookie_t.Item,
Element_Array => xcb.xcb_glx_get_fb_configs_cookie_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_get_fb_configs_cookie_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_get_fb_configs_cookie_t.Pointer,
Element_Array => xcb.xcb_glx_get_fb_configs_cookie_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_get_fb_configs_cookie_t;
|
charlie5/lace | Ada | 776 | ads | package lace.Text.utility
--
-- Provides utility subprograms.
--
is
function contains (Self : in Text.item; Pattern : in String) return Boolean;
function replace (Self : in Text.item; Pattern : in String;
By : in String) return Text.item;
--
-- Replaces all occurences of 'Pattern' with 'By'.
-- If the replacement exceeds the capacity of 'Self', the result will be expanded.
procedure replace (Self : in out Text.item; Pattern : in String;
By : in String);
--
-- Replaces all occurences of 'Pattern' with 'By'.
-- 'Text.Error' will be raised if the replacement exceeds the capacity of 'Self'.
end lace.Text.utility;
|
ellamosi/Ada_BMP_Library | Ada | 2,485 | 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. --
-- --
------------------------------------------------------------------------------
package Compare_Files is
function Binnary_Equal (A_Path, B_Path : String) return Boolean;
end Compare_Files;
|
AdaCore/libadalang | Ada | 61 | adb | with App;
procedure Main is
begin
App.App.Run;
end Main;
|
AdaCore/libadalang | Ada | 146 | adb | -- This is the first leading comment.
-- And this is the second one.
procedure Two_Leading_Comments is
begin
null;
end Two_Leading_Comments;
|
reznikmm/matreshka | Ada | 6,068 | 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.
------------------------------------------------------------------------------
-- A read link object end qualifier action is an action that retrieves a
-- qualifier end value from a link object.
------------------------------------------------------------------------------
with AMF.UML.Actions;
limited with AMF.UML.Input_Pins;
limited with AMF.UML.Output_Pins;
limited with AMF.UML.Properties;
package AMF.UML.Read_Link_Object_End_Qualifier_Actions is
pragma Preelaborate;
type UML_Read_Link_Object_End_Qualifier_Action is limited interface
and AMF.UML.Actions.UML_Action;
type UML_Read_Link_Object_End_Qualifier_Action_Access is
access all UML_Read_Link_Object_End_Qualifier_Action'Class;
for UML_Read_Link_Object_End_Qualifier_Action_Access'Storage_Size use 0;
not overriding function Get_Object
(Self : not null access constant UML_Read_Link_Object_End_Qualifier_Action)
return AMF.UML.Input_Pins.UML_Input_Pin_Access is abstract;
-- Getter of ReadLinkObjectEndQualifierAction::object.
--
-- Gives the input pin from which the link object is obtained.
not overriding procedure Set_Object
(Self : not null access UML_Read_Link_Object_End_Qualifier_Action;
To : AMF.UML.Input_Pins.UML_Input_Pin_Access) is abstract;
-- Setter of ReadLinkObjectEndQualifierAction::object.
--
-- Gives the input pin from which the link object is obtained.
not overriding function Get_Qualifier
(Self : not null access constant UML_Read_Link_Object_End_Qualifier_Action)
return AMF.UML.Properties.UML_Property_Access is abstract;
-- Getter of ReadLinkObjectEndQualifierAction::qualifier.
--
-- The attribute representing the qualifier to be read.
not overriding procedure Set_Qualifier
(Self : not null access UML_Read_Link_Object_End_Qualifier_Action;
To : AMF.UML.Properties.UML_Property_Access) is abstract;
-- Setter of ReadLinkObjectEndQualifierAction::qualifier.
--
-- The attribute representing the qualifier to be read.
not overriding function Get_Result
(Self : not null access constant UML_Read_Link_Object_End_Qualifier_Action)
return AMF.UML.Output_Pins.UML_Output_Pin_Access is abstract;
-- Getter of ReadLinkObjectEndQualifierAction::result.
--
-- Pin where the result value is placed.
not overriding procedure Set_Result
(Self : not null access UML_Read_Link_Object_End_Qualifier_Action;
To : AMF.UML.Output_Pins.UML_Output_Pin_Access) is abstract;
-- Setter of ReadLinkObjectEndQualifierAction::result.
--
-- Pin where the result value is placed.
end AMF.UML.Read_Link_Object_End_Qualifier_Actions;
|
micahwelf/FLTK-Ada | Ada | 3,428 | ads |
package FLTK.Widgets.Charts is
type Chart is new Widget with private;
type Chart_Reference (Data : not null access Chart'Class) is limited null record
with Implicit_Dereference => Data;
package Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String)
return Chart;
end Forge;
procedure Add
(This : in out Chart;
Data_Value : in Long_Float;
Data_Label : in String := "";
Data_Color : in Color := No_Color);
procedure Insert
(This : in out Chart;
Position : in Natural;
Data_Value : in Long_Float;
Data_Label : in String := "";
Data_Color : in Color := No_Color);
procedure Replace
(This : in out Chart;
Position : in Natural;
Data_Value : in Long_Float;
Data_Label : in String := "";
Data_Color : in Color := No_Color);
procedure Clear
(This : in out Chart);
function Will_Autosize
(This : in Chart)
return Boolean;
procedure Set_Autosize
(This : in out Chart;
To : in Boolean);
procedure Get_Bounds
(This : in Chart;
Lower, Upper : out Long_Float);
procedure Set_Bounds
(This : in out Chart;
Lower, Upper : in Long_Float);
function Get_Maximum_Size
(This : in Chart)
return Natural;
procedure Set_Maximum_Size
(This : in out Chart;
To : in Natural);
function Get_Size
(This : in Chart)
return Natural;
function Get_Text_Color
(This : in Chart)
return Color;
procedure Set_Text_Color
(This : in out Chart;
To : in Color);
function Get_Text_Font
(This : in Chart)
return Font_Kind;
procedure Set_Text_Font
(This : in out Chart;
To : in Font_Kind);
function Get_Text_Size
(This : in Chart)
return Font_Size;
procedure Set_Text_Size
(This : in out Chart;
To : in Font_Size);
procedure Resize
(This : in out Chart;
W, H : in Integer);
procedure Draw
(This : in out Chart);
function Handle
(This : in out Chart;
Event : in Event_Kind)
return Event_Outcome;
private
type Chart is new Widget with null record;
overriding procedure Finalize
(This : in out Chart);
pragma Inline (Add);
pragma Inline (Insert);
pragma Inline (Replace);
pragma Inline (Clear);
pragma Inline (Will_Autosize);
pragma Inline (Set_Autosize);
pragma Inline (Get_Bounds);
pragma Inline (Set_Bounds);
pragma Inline (Get_Maximum_Size);
pragma Inline (Set_Maximum_Size);
pragma Inline (Get_Size);
pragma Inline (Get_Text_Color);
pragma Inline (Set_Text_Color);
pragma Inline (Get_Text_Font);
pragma Inline (Set_Text_Font);
pragma Inline (Get_Text_Size);
pragma Inline (Set_Text_Size);
pragma Inline (Resize);
pragma Inline (Draw);
pragma Inline (Handle);
end FLTK.Widgets.Charts;
|
stcarrez/mat | Ada | 2,175 | ads | -----------------------------------------------------------------------
-- mat-callbacks - Callbacks for Gtk
-- Copyright (C) 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 Gtkada.Builder;
with Gtk.Widget;
with MAT.Targets.Gtkmat;
package MAT.Callbacks is
-- Initialize and register the callbacks.
procedure Initialize (Target : in MAT.Targets.Gtkmat.Target_Type_Access;
Builder : in Gtkada.Builder.Gtkada_Builder);
-- Callback executed when the "quit" action is executed from the menu.
procedure On_Menu_Quit (Object : access Gtkada.Builder.Gtkada_Builder_Record'Class);
-- Callback executed when the "about" action is executed from the menu.
procedure On_Menu_About (Object : access Gtkada.Builder.Gtkada_Builder_Record'Class);
-- Callback executed when the "close-about" action is executed from the about box.
procedure On_Close_About (Object : access Gtkada.Builder.Gtkada_Builder_Record'Class);
-- Callback executed when the "cmd-sizes" action is executed from the "Sizes" action.
procedure On_Btn_Sizes (Object : access Gtkada.Builder.Gtkada_Builder_Record'Class);
-- Callback executed when the "cmd-threads" action is executed from the "Threads" action.
procedure On_Btn_Threads (Object : access Gtkada.Builder.Gtkada_Builder_Record'Class);
-- Close the main window application and terminate.
function On_Delete_Main (Object : access Gtk.Widget.Gtk_Widget_Record'Class) return Boolean;
end MAT.Callbacks;
|
optikos/ada-lsp | Ada | 18,198 | adb | -- Copyright (c) 2017 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Ada.Characters.Latin_1;
with League.JSON.Arrays;
with League.JSON.Documents;
with League.JSON.Objects;
with League.JSON.Streams;
with League.JSON.Values;
with League.Strings;
with LSP.Servers.Handlers;
package body LSP.Servers is
New_Line : constant String :=
(Ada.Characters.Latin_1.CR, Ada.Characters.Latin_1.LF);
function "+" (Text : Wide_Wide_String)
return League.Strings.Universal_String renames
League.Strings.To_Universal_String;
procedure Process_Message_Loop
(Self : in out Server'Class;
Request_Id : LSP.Types.LSP_Number;
Result : out LSP.Types.LSP_Any;
Error : out LSP.Messages.Optional_ResponseError);
procedure Process_Message_From_Stream
(Self : in out Server'Class;
Stream : access Ada.Streams.Root_Stream_Type'Class;
Request_Id : out LSP.Types.LSP_Number_Or_String;
Result : out LSP.Types.LSP_Any;
Error : out LSP.Messages.Optional_ResponseError);
procedure Read_Number_Or_String
(Stream : in out League.JSON.Streams.JSON_Stream'Class;
Key : League.Strings.Universal_String;
Item : out LSP.Types.LSP_Number_Or_String)
renames LSP.Types.Read_Number_Or_String;
function To_Element_Vector
(Stream : in out League.JSON.Streams.JSON_Stream)
return League.Stream_Element_Vectors.Stream_Element_Vector;
procedure Write_JSON_RPC
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Vector : League.Stream_Element_Vectors.Stream_Element_Vector);
----------------
-- Initialize --
----------------
not overriding procedure Initialize
(Self : in out Server;
Stream : access Ada.Streams.Root_Stream_Type'Class;
Request : not null LSP.Message_Handlers.Request_Handler_Access;
Notification : not null LSP.Message_Handlers.
Notification_Handler_Access)
is
type Request_Info is record
Name : League.Strings.Universal_String;
Action : LSP.Request_Dispatchers.Parameter_Handler_Access;
end record;
Request_List : constant array (Positive range <>) of Request_Info :=
((+"initialize", Handlers.Do_Initialize'Access),
(+"shutdown", Handlers.Do_Shutdown'Access),
(+"textDocument/willSaveWaitUntil", Handlers.Do_Not_Found'Access),
(+"textDocument/completion", Handlers.Do_Completion'Access),
(+"completionItem/resolve", Handlers.Do_Not_Found'Access),
(+"textDocument/hover", Handlers.Do_Hover'Access),
(+"textDocument/signatureHelp", Handlers.Do_Signature_Help'Access),
(+"textDocument/definition", Handlers.Do_Definition'Access),
(+"textDocument/references", Handlers.Do_References'Access),
(+"textDocument/documentHighlight", Handlers.Do_Highlight'Access),
(+"textDocument/documentSymbol", Handlers.Do_Document_Symbol'Access),
(+"workspace/symbol", Handlers.Do_Workspace_Symbol'Access),
(+"textDocument/codeAction", Handlers.Do_Code_Action'Access),
(+"textDocument/codeLens", Handlers.Do_Not_Found'Access),
(+"codeLens/resolve", Handlers.Do_Not_Found'Access),
(+"textDocument/documentLink", Handlers.Do_Not_Found'Access),
(+"documentLink/resolve", Handlers.Do_Not_Found'Access),
(+"textDocument/formatting", Handlers.Do_Not_Found'Access),
(+"textDocument/rangeFormatting", Handlers.Do_Not_Found'Access),
(+"textDocument/onTypeFormatting", Handlers.Do_Not_Found'Access),
(+"textDocument/rename", Handlers.Do_Not_Found'Access),
(+"workspace/executeCommand", Handlers.Do_Execute_Command'Access),
(+"", Handlers.Do_Not_Found'Access));
type Notification_Info is record
Name : League.Strings.Universal_String;
Action : LSP.Notification_Dispatchers.Parameter_Handler_Access;
end record;
type Notification_Info_Array is
array (Positive range <>) of Notification_Info;
Notification_List : constant Notification_Info_Array :=
((+"exit", Handlers.Do_Exit'Access),
(+"textDocument/didChange", Handlers.DidChangeTextDocument'Access),
(+"textDocument/didClose", Handlers.DidCloseTextDocument'Access),
(+"textDocument/didOpen", Handlers.DidOpenTextDocument'Access),
(+"textDocument/didSave", Handlers.DidSaveTextDocument'Access),
(+"workspace/didChangeConfiguration",
Handlers.DidChangeConfiguration'Access),
(+"", Handlers.Ignore_Notification'Access));
begin
Self.Stream := Stream;
Self.Req_Handler := Request;
Self.Notif_Handler := Notification;
Self.Initilized := False; -- Block request until 'initialize' request
for Request of Request_List loop
Self.Requests.Register (Request.Name, Request.Action);
end loop;
for Notification of Notification_List loop
Self.Notifications.Register (Notification.Name, Notification.Action);
end loop;
end Initialize;
---------------------------------
-- Process_Message_From_Stream --
---------------------------------
procedure Process_Message_From_Stream
(Self : in out Server'Class;
Stream : access Ada.Streams.Root_Stream_Type'Class;
Request_Id : out LSP.Types.LSP_Number_Or_String;
Result : out LSP.Types.LSP_Any;
Error : out LSP.Messages.Optional_ResponseError)
is
use type League.Strings.Universal_String;
procedure Send_Not_Initialized
(Request_Id : LSP.Types.LSP_Number_Or_String);
procedure Send_Response
(Response : in out LSP.Messages.ResponseMessage'Class;
Request_Id : LSP.Types.LSP_Number_Or_String);
procedure Send_Response
(Response : in out LSP.Messages.ResponseMessage'Class;
Request_Id : LSP.Types.LSP_Number_Or_String)
is
Out_Stream : aliased League.JSON.Streams.JSON_Stream;
Output : League.Stream_Element_Vectors.Stream_Element_Vector;
begin
Response.jsonrpc := +"2.0";
Response.id := Request_Id;
LSP.Messages.ResponseMessage'Class'Write
(Out_Stream'Access, Response);
Output := To_Element_Vector (Out_Stream);
Write_JSON_RPC (Self.Stream, Output);
end Send_Response;
--------------------------
-- Send_Not_Initialized --
--------------------------
procedure Send_Not_Initialized
(Request_Id : LSP.Types.LSP_Number_Or_String)
is
Response : LSP.Messages.ResponseMessage;
begin
Response.error :=
(Is_Set => True,
Value => (code => LSP.Messages.MethodNotFound,
message => +"No such method",
others => <>));
Send_Response (Response, Request_Id);
end Send_Not_Initialized;
JS : League.JSON.Streams.JSON_Stream'Class renames
League.JSON.Streams.JSON_Stream'Class (Stream.all);
Not_Set : constant LSP.Types.LSP_Number_Or_String :=
(Is_Number => False, String => League.Strings.Empty_Universal_String);
Version : LSP.Types.LSP_String;
Method : LSP.Types.Optional_String;
begin
JS.Start_Object;
LSP.Types.Read_String (JS, +"jsonrpc", Version);
LSP.Types.Read_Optional_String (JS, +"method", Method);
Read_Number_Or_String (JS, +"id", Request_Id);
if not Method.Is_Set then
JS.Key (+"result");
Result := JS.Read;
JS.Key (+"error");
LSP.Messages.Optional_ResponseError'Read (Stream, Error);
return;
elsif LSP.Types.Assigned (Request_Id) then
if not Self.Initilized then
if Method.Value /= +"initialize" then
Send_Not_Initialized (Request_Id);
Request_Id := Not_Set;
return;
else
Self.Initilized := True;
end if;
end if;
else
if Self.Initilized then
JS.Key (+"params");
Self.Notifications.Dispatch
(Method => Method.Value,
Stream => Stream,
Handler => Self.Notif_Handler);
end if;
Request_Id := Not_Set;
return;
end if;
JS.Key (+"params");
declare
Out_Stream : aliased League.JSON.Streams.JSON_Stream;
Output : League.Stream_Element_Vectors.Stream_Element_Vector;
Response : LSP.Messages.ResponseMessage'Class :=
Self.Requests.Dispatch
(Method => Method.Value,
Stream => Stream,
Handler => Self.Req_Handler);
begin
Response.jsonrpc := +"2.0";
Response.id := Request_Id;
LSP.Messages.ResponseMessage'Class'Write
(Out_Stream'Access, Response);
Output := To_Element_Vector (Out_Stream);
Write_JSON_RPC (Self.Stream, Output);
Request_Id := Not_Set;
end;
end Process_Message_From_Stream;
--------------------------
-- Process_Message_Loop --
--------------------------
procedure Process_Message_Loop
(Self : in out Server'Class;
Request_Id : LSP.Types.LSP_Number;
Result : out LSP.Types.LSP_Any;
Error : out LSP.Messages.Optional_ResponseError)
is
use type Ada.Streams.Stream_Element_Count;
procedure Parse_Header
(Length : out Ada.Streams.Stream_Element_Count;
Vector : in out League.Stream_Element_Vectors.Stream_Element_Vector);
procedure Parse_JSON
(Vector : League.Stream_Element_Vectors.Stream_Element_Vector;
Stop : in out Boolean);
procedure Parse_Line
(Line : String;
Length : in out Ada.Streams.Stream_Element_Count);
------------------
-- Parse_Header --
------------------
procedure Parse_Header
(Length : out Ada.Streams.Stream_Element_Count;
Vector : in out League.Stream_Element_Vectors.Stream_Element_Vector)
is
Buffer : Ada.Streams.Stream_Element_Array (1 .. 512);
Last : Ada.Streams.Stream_Element_Count := Vector.Length;
Line : String (1 .. 80) := (others => ' ');
Char : Character;
Index : Natural := 0;
Empty : Boolean := False; -- We've just seen CR, LF
begin
if Last > 0 then
Buffer (1 .. Last) := Vector.To_Stream_Element_Array;
Vector.Clear;
end if;
Length := 0;
loop
for J in 1 .. Last loop
Char := Character'Val (Buffer (J));
if Char not in Ada.Characters.Latin_1.CR
| Ada.Characters.Latin_1.LF
then
Empty := False;
end if;
if Index = Line'Last then
-- Too long line drop it keeping last character
Line (1) := Line (Line'Last);
Index := 2;
else
Index := Index + 1;
end if;
Line (Index) := Char;
if Index > 1 and then Line (Index - 1 .. Index) = New_Line then
if Empty then
Vector.Append (Buffer (J + 1 .. Last));
return;
end if;
Empty := True;
Parse_Line (Line (1 .. Index - 2), Length);
end if;
end loop;
Self.Stream.Read (Buffer, Last);
end loop;
end Parse_Header;
----------------
-- Parse_JSON --
----------------
procedure Parse_JSON
(Vector : League.Stream_Element_Vectors.Stream_Element_Vector;
Stop : in out Boolean)
is
In_Stream : aliased League.JSON.Streams.JSON_Stream;
Document : League.JSON.Documents.JSON_Document;
JSON_Object : League.JSON.Objects.JSON_Object;
JSON_Array : League.JSON.Arrays.JSON_Array;
Message_Id : LSP.Types.LSP_Number_Or_String;
begin
Document := League.JSON.Documents.From_JSON (Vector);
JSON_Object := Document.To_JSON_Object;
JSON_Array.Append (JSON_Object.To_JSON_Value);
In_Stream.Set_JSON_Document (JSON_Array.To_JSON_Document);
Self.Process_Message_From_Stream
(In_Stream'Access, Message_Id, Result, Error);
if Message_Id.Is_Number and then Message_Id.Number = Request_Id then
Stop := True;
end if;
end Parse_JSON;
----------------
-- Parse_Line --
----------------
procedure Parse_Line
(Line : String;
Length : in out Ada.Streams.Stream_Element_Count)
is
Content_Length : constant String := "Content-Length:";
begin
if Line'Length > Content_Length'Length and then
Line (Content_Length'Range) = Content_Length
then
Length := Ada.Streams.Stream_Element_Count'Value
(Line (Content_Length'Length + 2 - Line'First .. Line'Last));
end if;
end Parse_Line;
Stop : Boolean := False;
Vector : League.Stream_Element_Vectors.Stream_Element_Vector :=
Self.Vector;
Length : Ada.Streams.Stream_Element_Count := 0;
Buffer : Ada.Streams.Stream_Element_Array (1 .. 512);
Last : Ada.Streams.Stream_Element_Count;
begin
while not (Self.Stop or Stop) loop
Parse_Header (Length, Vector);
Last := Vector.Length;
Buffer (1 .. Last) := Vector.To_Stream_Element_Array;
Vector.Clear;
loop
if Last <= Length then
Vector.Append (Buffer (1 .. Last));
Length := Length - Last;
Last := 0;
else
Vector.Append (Buffer (1 .. Length));
Last := Last - Length;
Buffer (1 .. Last) := Buffer (Length + 1 .. Length + Last);
Length := 0;
end if;
if Length = 0 then
Self.Vector.Clear;
Self.Vector.Append (Buffer (1 .. Last));
Parse_JSON (Vector, Stop);
Vector := Self.Vector;
exit;
else
Self.Stream.Read (Buffer, Last);
end if;
end loop;
end loop;
end Process_Message_Loop;
---------
-- Run --
---------
not overriding procedure Run (Self : in out Server) is
Result : LSP.Types.LSP_Any;
Error : LSP.Messages.Optional_ResponseError;
begin
Self.Process_Message_Loop (0, Result, Error);
end Run;
-----------------------
-- Send_Notification --
-----------------------
not overriding procedure Send_Notification
(Self : in out Server;
Value : in out LSP.Messages.NotificationMessage'Class)
is
JSON_Stream : aliased League.JSON.Streams.JSON_Stream;
Element_Vector : League.Stream_Element_Vectors.Stream_Element_Vector;
begin
Value.jsonrpc := +"2.0";
LSP.Messages.NotificationMessage'Write (JSON_Stream'Access, Value);
Element_Vector := To_Element_Vector (JSON_Stream);
Write_JSON_RPC (Self.Stream, Element_Vector);
end Send_Notification;
----------
-- Stop --
----------
not overriding procedure Stop (Self : in out Server) is
begin
Self.Stop := True;
end Stop;
-----------------------
-- To_Element_Vector --
-----------------------
function To_Element_Vector
(Stream : in out League.JSON.Streams.JSON_Stream)
return League.Stream_Element_Vectors.Stream_Element_Vector
is
Document : constant League.JSON.Documents.JSON_Document :=
Stream.Get_JSON_Document;
JSON_Array : constant League.JSON.Arrays.JSON_Array :=
Document.To_JSON_Array;
JSON_Object : constant League.JSON.Objects.JSON_Object :=
JSON_Array.First_Element.To_Object;
begin
return JSON_Object.To_JSON_Document.To_JSON;
end To_Element_Vector;
--------------------------
-- Workspace_Apply_Edit --
--------------------------
not overriding procedure Workspace_Apply_Edit
(Self : in out Server;
Params : LSP.Messages.ApplyWorkspaceEditParams;
Applied : out Boolean;
Error : out LSP.Messages.Optional_ResponseError)
is
Request : constant LSP.Messages.ApplyWorkspaceEdit_Request :=
(jsonrpc => +"2.0",
id => (Is_Number => True, Number => Self.Last_Request),
method => +"workspace/applyEdit",
params => Params);
JSON_Stream : aliased League.JSON.Streams.JSON_Stream;
Element_Vector : League.Stream_Element_Vectors.Stream_Element_Vector;
Result : LSP.Types.LSP_Any;
begin
Self.Last_Request := Self.Last_Request + 1;
LSP.Messages.ApplyWorkspaceEdit_Request'Write
(JSON_Stream'Access, Request);
Element_Vector := To_Element_Vector (JSON_Stream);
Write_JSON_RPC (Self.Stream, Element_Vector);
Self.Process_Message_Loop
(Request_Id => Request.id.Number,
Result => Result,
Error => Error);
if Error.Is_Set then
Applied := False;
else
Applied := Result.To_Object.Value (+"applied").To_Boolean;
end if;
end Workspace_Apply_Edit;
--------------------
-- Write_JSON_RPC --
--------------------
procedure Write_JSON_RPC
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Vector : League.Stream_Element_Vectors.Stream_Element_Vector)
is
Image : constant String := Ada.Streams.Stream_Element_Count'Image
(Vector.Length);
Header : constant String := "Content-Length:" & Image
& New_Line & New_Line;
begin
String'Write (Stream, Header);
Stream.Write (Vector.To_Stream_Element_Array);
end Write_JSON_RPC;
end LSP.Servers;
|
faelys/natools | Ada | 21,540 | ads | -- Generated at 2014-06-02 19:12:04 +0000 by Natools.Static_Hash_Maps
-- from ../src/natools-s_expressions-printers-pretty-config-commands.sx
private package Natools.S_Expressions.Printers.Pretty.Config.Commands is
pragma Preelaborate;
type Main_Command is
(Set_Char_Encoding,
Set_Fallback,
Set_Hex_Casing,
Set_Indentation,
Set_Newline,
Set_Newline_Encoding,
Set_Quoted,
Set_Quoted_String,
Set_Space_At,
Set_Tab_Stop,
Set_Token,
Set_Width);
type Newline_Command is
(Set_Newline_Command_Encoding,
Set_Newline_Separator);
type Quoted_String_Command is
(Set_Quoted_Option,
Set_Quoted_Escape);
type Separator_Command is
(All_Separators,
No_Separators,
Invert_Separators,
Open_Open,
Open_Atom,
Open_Close,
Atom_Open,
Atom_Atom,
Atom_Close,
Close_Open,
Close_Atom,
Close_Close);
function Main (Key : String) return Main_Command;
function Newline (Key : String) return Newline_Command;
function Quoted_String (Key : String) return Quoted_String_Command;
function Separator (Key : String) return Separator_Command;
function To_Atom_Encoding (Key : String) return Atom_Encoding;
function To_Character_Encoding (Key : String) return Character_Encoding;
function To_Hex_Casing (Key : String) return Encodings.Hex_Casing;
function To_Newline_Encoding (Key : String) return Newline_Encoding;
function To_Quoted_Escape (Key : String) return Quoted_Escape_Type;
function To_Quoted_Option (Key : String) return Quoted_Option;
function To_Token_Option (Key : String) return Token_Option;
private
Map_1_Key_0 : aliased constant String := "ascii";
Map_1_Key_1 : aliased constant String := "ASCII";
Map_1_Key_2 : aliased constant String := "latin-1";
Map_1_Key_3 : aliased constant String := "latin";
Map_1_Key_4 : aliased constant String := "iso-8859-1";
Map_1_Key_5 : aliased constant String := "ISO-8859-1";
Map_1_Key_6 : aliased constant String := "utf-8";
Map_1_Key_7 : aliased constant String := "UTF-8";
Map_1_Key_8 : aliased constant String := "utf8";
Map_1_Key_9 : aliased constant String := "UTF8";
Map_1_Key_10 : aliased constant String := "base64";
Map_1_Key_11 : aliased constant String := "base-64";
Map_1_Key_12 : aliased constant String := "lower-hex";
Map_1_Key_13 : aliased constant String := "lower-hexa";
Map_1_Key_14 : aliased constant String := "hex";
Map_1_Key_15 : aliased constant String := "hexa";
Map_1_Key_16 : aliased constant String := "hexadecimal";
Map_1_Key_17 : aliased constant String := "upper-hex";
Map_1_Key_18 : aliased constant String := "upper-hexa";
Map_1_Key_19 : aliased constant String := "verbatim";
Map_1_Key_20 : aliased constant String := "lower";
Map_1_Key_21 : aliased constant String := "lower-case";
Map_1_Key_22 : aliased constant String := "upper";
Map_1_Key_23 : aliased constant String := "upper-case";
Map_1_Key_24 : aliased constant String := "indent";
Map_1_Key_25 : aliased constant String := "indentation";
Map_1_Key_26 : aliased constant String := "no-indent";
Map_1_Key_27 : aliased constant String := "no-indentation";
Map_1_Key_28 : aliased constant String := "newline";
Map_1_Key_29 : aliased constant String := "cr";
Map_1_Key_30 : aliased constant String := "CR";
Map_1_Key_31 : aliased constant String := "lf";
Map_1_Key_32 : aliased constant String := "LF";
Map_1_Key_33 : aliased constant String := "CRLF";
Map_1_Key_34 : aliased constant String := "CR-LF";
Map_1_Key_35 : aliased constant String := "crlf";
Map_1_Key_36 : aliased constant String := "cr-lf";
Map_1_Key_37 : aliased constant String := "lf-cr";
Map_1_Key_38 : aliased constant String := "lfcr";
Map_1_Key_39 : aliased constant String := "LF-CR";
Map_1_Key_40 : aliased constant String := "LFCR";
Map_1_Key_41 : aliased constant String := "no-quoted";
Map_1_Key_42 : aliased constant String := "no-quoted-string";
Map_1_Key_43 : aliased constant String := "quoted-when-shorter";
Map_1_Key_44 : aliased constant String := "quoted-string-when-shorter";
Map_1_Key_45 : aliased constant String := "single-line-quoted";
Map_1_Key_46 : aliased constant String := "single-line-quoted-string";
Map_1_Key_47 : aliased constant String := "escape";
Map_1_Key_48 : aliased constant String := "quoted";
Map_1_Key_49 : aliased constant String := "space";
Map_1_Key_50 : aliased constant String := "tab-stop";
Map_1_Key_51 : aliased constant String := "extended-token";
Map_1_Key_52 : aliased constant String := "no-token";
Map_1_Key_53 : aliased constant String := "standard-token";
Map_1_Key_54 : aliased constant String := "token";
Map_1_Key_55 : aliased constant String := "width";
Map_1_Key_56 : aliased constant String := "no-width";
Map_1_Keys : constant array (0 .. 56) of access constant String
:= (Map_1_Key_0'Access,
Map_1_Key_1'Access,
Map_1_Key_2'Access,
Map_1_Key_3'Access,
Map_1_Key_4'Access,
Map_1_Key_5'Access,
Map_1_Key_6'Access,
Map_1_Key_7'Access,
Map_1_Key_8'Access,
Map_1_Key_9'Access,
Map_1_Key_10'Access,
Map_1_Key_11'Access,
Map_1_Key_12'Access,
Map_1_Key_13'Access,
Map_1_Key_14'Access,
Map_1_Key_15'Access,
Map_1_Key_16'Access,
Map_1_Key_17'Access,
Map_1_Key_18'Access,
Map_1_Key_19'Access,
Map_1_Key_20'Access,
Map_1_Key_21'Access,
Map_1_Key_22'Access,
Map_1_Key_23'Access,
Map_1_Key_24'Access,
Map_1_Key_25'Access,
Map_1_Key_26'Access,
Map_1_Key_27'Access,
Map_1_Key_28'Access,
Map_1_Key_29'Access,
Map_1_Key_30'Access,
Map_1_Key_31'Access,
Map_1_Key_32'Access,
Map_1_Key_33'Access,
Map_1_Key_34'Access,
Map_1_Key_35'Access,
Map_1_Key_36'Access,
Map_1_Key_37'Access,
Map_1_Key_38'Access,
Map_1_Key_39'Access,
Map_1_Key_40'Access,
Map_1_Key_41'Access,
Map_1_Key_42'Access,
Map_1_Key_43'Access,
Map_1_Key_44'Access,
Map_1_Key_45'Access,
Map_1_Key_46'Access,
Map_1_Key_47'Access,
Map_1_Key_48'Access,
Map_1_Key_49'Access,
Map_1_Key_50'Access,
Map_1_Key_51'Access,
Map_1_Key_52'Access,
Map_1_Key_53'Access,
Map_1_Key_54'Access,
Map_1_Key_55'Access,
Map_1_Key_56'Access);
Map_1_Elements : constant array (0 .. 56) of Main_Command
:= (Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Char_Encoding,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Fallback,
Set_Hex_Casing,
Set_Hex_Casing,
Set_Hex_Casing,
Set_Hex_Casing,
Set_Indentation,
Set_Indentation,
Set_Indentation,
Set_Indentation,
Set_Newline,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Newline_Encoding,
Set_Quoted,
Set_Quoted,
Set_Quoted,
Set_Quoted,
Set_Quoted,
Set_Quoted,
Set_Quoted_String,
Set_Quoted_String,
Set_Space_At,
Set_Tab_Stop,
Set_Token,
Set_Token,
Set_Token,
Set_Token,
Set_Width,
Set_Width);
Map_2_Key_0 : aliased constant String := "cr";
Map_2_Key_1 : aliased constant String := "CR";
Map_2_Key_2 : aliased constant String := "lf";
Map_2_Key_3 : aliased constant String := "LF";
Map_2_Key_4 : aliased constant String := "CRLF";
Map_2_Key_5 : aliased constant String := "CR-LF";
Map_2_Key_6 : aliased constant String := "crlf";
Map_2_Key_7 : aliased constant String := "cr-lf";
Map_2_Key_8 : aliased constant String := "lf-cr";
Map_2_Key_9 : aliased constant String := "lfcr";
Map_2_Key_10 : aliased constant String := "LF-CR";
Map_2_Key_11 : aliased constant String := "LFCR";
Map_2_Key_12 : aliased constant String := "all";
Map_2_Key_13 : aliased constant String := "none";
Map_2_Key_14 : aliased constant String := "not";
Map_2_Key_15 : aliased constant String := "open-open";
Map_2_Key_16 : aliased constant String := "open-atom";
Map_2_Key_17 : aliased constant String := "open-close";
Map_2_Key_18 : aliased constant String := "atom-open";
Map_2_Key_19 : aliased constant String := "atom-atom";
Map_2_Key_20 : aliased constant String := "atom-close";
Map_2_Key_21 : aliased constant String := "close-open";
Map_2_Key_22 : aliased constant String := "close-atom";
Map_2_Key_23 : aliased constant String := "close-close";
Map_2_Keys : constant array (0 .. 23) of access constant String
:= (Map_2_Key_0'Access,
Map_2_Key_1'Access,
Map_2_Key_2'Access,
Map_2_Key_3'Access,
Map_2_Key_4'Access,
Map_2_Key_5'Access,
Map_2_Key_6'Access,
Map_2_Key_7'Access,
Map_2_Key_8'Access,
Map_2_Key_9'Access,
Map_2_Key_10'Access,
Map_2_Key_11'Access,
Map_2_Key_12'Access,
Map_2_Key_13'Access,
Map_2_Key_14'Access,
Map_2_Key_15'Access,
Map_2_Key_16'Access,
Map_2_Key_17'Access,
Map_2_Key_18'Access,
Map_2_Key_19'Access,
Map_2_Key_20'Access,
Map_2_Key_21'Access,
Map_2_Key_22'Access,
Map_2_Key_23'Access);
Map_2_Elements : constant array (0 .. 23) of Newline_Command
:= (Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Command_Encoding,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator,
Set_Newline_Separator);
Map_3_Key_0 : aliased constant String := "never";
Map_3_Key_1 : aliased constant String := "single-line";
Map_3_Key_2 : aliased constant String := "when-shorter";
Map_3_Key_3 : aliased constant String := "octal";
Map_3_Key_4 : aliased constant String := "hex";
Map_3_Key_5 : aliased constant String := "hexa";
Map_3_Key_6 : aliased constant String := "hexadecimal";
Map_3_Key_7 : aliased constant String := "lower-hex";
Map_3_Key_8 : aliased constant String := "lower-hexa";
Map_3_Key_9 : aliased constant String := "upper-hex";
Map_3_Key_10 : aliased constant String := "upper-hexa";
Map_3_Keys : constant array (0 .. 10) of access constant String
:= (Map_3_Key_0'Access,
Map_3_Key_1'Access,
Map_3_Key_2'Access,
Map_3_Key_3'Access,
Map_3_Key_4'Access,
Map_3_Key_5'Access,
Map_3_Key_6'Access,
Map_3_Key_7'Access,
Map_3_Key_8'Access,
Map_3_Key_9'Access,
Map_3_Key_10'Access);
Map_3_Elements : constant array (0 .. 10) of Quoted_String_Command
:= (Set_Quoted_Option,
Set_Quoted_Option,
Set_Quoted_Option,
Set_Quoted_Escape,
Set_Quoted_Escape,
Set_Quoted_Escape,
Set_Quoted_Escape,
Set_Quoted_Escape,
Set_Quoted_Escape,
Set_Quoted_Escape,
Set_Quoted_Escape);
Map_4_Key_0 : aliased constant String := "all";
Map_4_Key_1 : aliased constant String := "none";
Map_4_Key_2 : aliased constant String := "not";
Map_4_Key_3 : aliased constant String := "open-open";
Map_4_Key_4 : aliased constant String := "open-atom";
Map_4_Key_5 : aliased constant String := "open-close";
Map_4_Key_6 : aliased constant String := "atom-open";
Map_4_Key_7 : aliased constant String := "atom-atom";
Map_4_Key_8 : aliased constant String := "atom-close";
Map_4_Key_9 : aliased constant String := "close-open";
Map_4_Key_10 : aliased constant String := "close-atom";
Map_4_Key_11 : aliased constant String := "close-close";
Map_4_Keys : constant array (0 .. 11) of access constant String
:= (Map_4_Key_0'Access,
Map_4_Key_1'Access,
Map_4_Key_2'Access,
Map_4_Key_3'Access,
Map_4_Key_4'Access,
Map_4_Key_5'Access,
Map_4_Key_6'Access,
Map_4_Key_7'Access,
Map_4_Key_8'Access,
Map_4_Key_9'Access,
Map_4_Key_10'Access,
Map_4_Key_11'Access);
Map_4_Elements : constant array (0 .. 11) of Separator_Command
:= (All_Separators,
No_Separators,
Invert_Separators,
Open_Open,
Open_Atom,
Open_Close,
Atom_Open,
Atom_Atom,
Atom_Close,
Close_Open,
Close_Atom,
Close_Close);
Map_5_Key_0 : aliased constant String := "base64";
Map_5_Key_1 : aliased constant String := "base-64";
Map_5_Key_2 : aliased constant String := "lower-hex";
Map_5_Key_3 : aliased constant String := "lower-hexa";
Map_5_Key_4 : aliased constant String := "hex";
Map_5_Key_5 : aliased constant String := "hexa";
Map_5_Key_6 : aliased constant String := "hexadecimal";
Map_5_Key_7 : aliased constant String := "upper-hex";
Map_5_Key_8 : aliased constant String := "upper-hexa";
Map_5_Key_9 : aliased constant String := "verbatim";
Map_5_Keys : constant array (0 .. 9) of access constant String
:= (Map_5_Key_0'Access,
Map_5_Key_1'Access,
Map_5_Key_2'Access,
Map_5_Key_3'Access,
Map_5_Key_4'Access,
Map_5_Key_5'Access,
Map_5_Key_6'Access,
Map_5_Key_7'Access,
Map_5_Key_8'Access,
Map_5_Key_9'Access);
Map_5_Elements : constant array (0 .. 9) of Atom_Encoding
:= (Base64,
Base64,
Hexadecimal,
Hexadecimal,
Hexadecimal,
Hexadecimal,
Hexadecimal,
Hexadecimal,
Hexadecimal,
Verbatim);
Map_6_Key_0 : aliased constant String := "ascii";
Map_6_Key_1 : aliased constant String := "ASCII";
Map_6_Key_2 : aliased constant String := "latin-1";
Map_6_Key_3 : aliased constant String := "latin";
Map_6_Key_4 : aliased constant String := "iso-8859-1";
Map_6_Key_5 : aliased constant String := "ISO-8859-1";
Map_6_Key_6 : aliased constant String := "utf-8";
Map_6_Key_7 : aliased constant String := "UTF-8";
Map_6_Key_8 : aliased constant String := "utf8";
Map_6_Key_9 : aliased constant String := "UTF8";
Map_6_Keys : constant array (0 .. 9) of access constant String
:= (Map_6_Key_0'Access,
Map_6_Key_1'Access,
Map_6_Key_2'Access,
Map_6_Key_3'Access,
Map_6_Key_4'Access,
Map_6_Key_5'Access,
Map_6_Key_6'Access,
Map_6_Key_7'Access,
Map_6_Key_8'Access,
Map_6_Key_9'Access);
Map_6_Elements : constant array (0 .. 9) of Character_Encoding
:= (ASCII,
ASCII,
Latin,
Latin,
Latin,
Latin,
UTF_8,
UTF_8,
UTF_8,
UTF_8);
Map_7_Key_0 : aliased constant String := "lower";
Map_7_Key_1 : aliased constant String := "lower-case";
Map_7_Key_2 : aliased constant String := "upper";
Map_7_Key_3 : aliased constant String := "upper-case";
Map_7_Keys : constant array (0 .. 3) of access constant String
:= (Map_7_Key_0'Access,
Map_7_Key_1'Access,
Map_7_Key_2'Access,
Map_7_Key_3'Access);
Map_7_Elements : constant array (0 .. 3) of Encodings.Hex_Casing
:= (Encodings.Lower,
Encodings.Lower,
Encodings.Upper,
Encodings.Upper);
Map_8_Key_0 : aliased constant String := "CR";
Map_8_Key_1 : aliased constant String := "cr";
Map_8_Key_2 : aliased constant String := "LF";
Map_8_Key_3 : aliased constant String := "lf";
Map_8_Key_4 : aliased constant String := "CRLF";
Map_8_Key_5 : aliased constant String := "CR-LF";
Map_8_Key_6 : aliased constant String := "crlf";
Map_8_Key_7 : aliased constant String := "cr-lf";
Map_8_Key_8 : aliased constant String := "LFCR";
Map_8_Key_9 : aliased constant String := "LF-CR";
Map_8_Key_10 : aliased constant String := "lfcr";
Map_8_Key_11 : aliased constant String := "lf-cr";
Map_8_Keys : constant array (0 .. 11) of access constant String
:= (Map_8_Key_0'Access,
Map_8_Key_1'Access,
Map_8_Key_2'Access,
Map_8_Key_3'Access,
Map_8_Key_4'Access,
Map_8_Key_5'Access,
Map_8_Key_6'Access,
Map_8_Key_7'Access,
Map_8_Key_8'Access,
Map_8_Key_9'Access,
Map_8_Key_10'Access,
Map_8_Key_11'Access);
Map_8_Elements : constant array (0 .. 11) of Newline_Encoding
:= (CR,
CR,
LF,
LF,
CR_LF,
CR_LF,
CR_LF,
CR_LF,
LF_CR,
LF_CR,
LF_CR,
LF_CR);
Map_9_Key_0 : aliased constant String := "octal";
Map_9_Key_1 : aliased constant String := "hex";
Map_9_Key_2 : aliased constant String := "hexa";
Map_9_Key_3 : aliased constant String := "hexadecimal";
Map_9_Key_4 : aliased constant String := "lower-hex";
Map_9_Key_5 : aliased constant String := "lower-hexa";
Map_9_Key_6 : aliased constant String := "upper-hex";
Map_9_Key_7 : aliased constant String := "upper-hexa";
Map_9_Keys : constant array (0 .. 7) of access constant String
:= (Map_9_Key_0'Access,
Map_9_Key_1'Access,
Map_9_Key_2'Access,
Map_9_Key_3'Access,
Map_9_Key_4'Access,
Map_9_Key_5'Access,
Map_9_Key_6'Access,
Map_9_Key_7'Access);
Map_9_Elements : constant array (0 .. 7) of Quoted_Escape_Type
:= (Octal_Escape,
Hex_Escape,
Hex_Escape,
Hex_Escape,
Hex_Escape,
Hex_Escape,
Hex_Escape,
Hex_Escape);
Map_10_Key_0 : aliased constant String := "when-shorter";
Map_10_Key_1 : aliased constant String := "quoted-when-shorter";
Map_10_Key_2 : aliased constant String := "quoted-string-when-shorter";
Map_10_Key_3 : aliased constant String := "single-line";
Map_10_Key_4 : aliased constant String := "single-line-quoted";
Map_10_Key_5 : aliased constant String := "single-line-quoted-string";
Map_10_Key_6 : aliased constant String := "never";
Map_10_Key_7 : aliased constant String := "no-quoted";
Map_10_Key_8 : aliased constant String := "no-quoted-string";
Map_10_Keys : constant array (0 .. 8) of access constant String
:= (Map_10_Key_0'Access,
Map_10_Key_1'Access,
Map_10_Key_2'Access,
Map_10_Key_3'Access,
Map_10_Key_4'Access,
Map_10_Key_5'Access,
Map_10_Key_6'Access,
Map_10_Key_7'Access,
Map_10_Key_8'Access);
Map_10_Elements : constant array (0 .. 8) of Quoted_Option
:= (When_Shorter,
When_Shorter,
When_Shorter,
Single_Line,
Single_Line,
Single_Line,
No_Quoted,
No_Quoted,
No_Quoted);
Map_11_Key_0 : aliased constant String := "extended-token";
Map_11_Key_1 : aliased constant String := "extended";
Map_11_Key_2 : aliased constant String := "standard-token";
Map_11_Key_3 : aliased constant String := "token";
Map_11_Key_4 : aliased constant String := "standard";
Map_11_Key_5 : aliased constant String := "no-token";
Map_11_Key_6 : aliased constant String := "no";
Map_11_Key_7 : aliased constant String := "none";
Map_11_Key_8 : aliased constant String := "never";
Map_11_Keys : constant array (0 .. 8) of access constant String
:= (Map_11_Key_0'Access,
Map_11_Key_1'Access,
Map_11_Key_2'Access,
Map_11_Key_3'Access,
Map_11_Key_4'Access,
Map_11_Key_5'Access,
Map_11_Key_6'Access,
Map_11_Key_7'Access,
Map_11_Key_8'Access);
Map_11_Elements : constant array (0 .. 8) of Token_Option
:= (Extended_Token,
Extended_Token,
Standard_Token,
Standard_Token,
Standard_Token,
No_Token,
No_Token,
No_Token,
No_Token);
end Natools.S_Expressions.Printers.Pretty.Config.Commands;
|
sungyeon/drake | Ada | 3,666 | adb | with System.Address_To_Named_Access_Conversions;
with System.Formatting.Address;
with System.Long_Long_Integer_Types;
with System.Termination;
package body System.Unbounded_Stack_Allocators.Debug is
pragma Suppress (All_Checks);
use type Storage_Elements.Storage_Offset;
subtype Word_Unsigned is Long_Long_Integer_Types.Word_Unsigned;
package BA_Conv is
new Address_To_Named_Access_Conversions (Block, Block_Access);
procedure Dump (Allocator : aliased in out Allocator_Type) is
subtype Buffer_Type is String (1 .. 256);
procedure Put (
Buffer : in out Buffer_Type;
Last : in out Natural;
S : String);
procedure Put (
Buffer : in out Buffer_Type;
Last : in out Natural;
S : String)
is
First : constant Natural := Last + 1;
begin
Last := Last + S'Length;
Buffer (First .. Last) := S;
end Put;
begin
Termination.Error_Put_Line ("Secondary Stack:");
declare
Buffer : Buffer_Type;
Last : Natural;
-- formatting
Error : Boolean;
-- index
I : Address := Allocator;
Block_Number : Natural := 0;
begin
while I /= Null_Address loop
Last := 0;
-- put block number
Put (Buffer, Last, "#");
Formatting.Image (
Word_Unsigned (Block_Number),
Buffer (Last + 1 .. Buffer'Last),
Last,
Width => 2,
Error => Error);
-- start
Put (Buffer, Last, " 0x");
Formatting.Address.Image (
I,
Buffer (
Last + 1 ..
Last + Formatting.Address.Address_String'Length),
Set => Formatting.Lower_Case);
Last := Last + Formatting.Address.Address_String'Length;
-- used
Put (Buffer, Last, " 0x");
Formatting.Address.Image (
BA_Conv.To_Pointer (I).Used,
Buffer (
Last + 1 ..
Last + Formatting.Address.Address_String'Length),
Set => Formatting.Lower_Case);
Last := Last + Formatting.Address.Address_String'Length;
-- limit
Put (Buffer, Last, " 0x");
Formatting.Address.Image (
BA_Conv.To_Pointer (I).Limit,
Buffer (
Last + 1 ..
Last + Formatting.Address.Address_String'Length),
Set => Formatting.Lower_Case);
Last := Last + Formatting.Address.Address_String'Length;
-- percentage
Put (Buffer, Last, " (");
declare
Space : constant Storage_Elements.Storage_Count :=
Size (I);
Used : constant Storage_Elements.Storage_Count :=
Used_Size (I);
Percentage : constant Storage_Elements.Storage_Count :=
(Used * 100 + Space - 1) / Space;
begin
Formatting.Image (
Word_Unsigned (Percentage),
Buffer (Last + 1 .. Buffer'Last),
Last,
Width => 3,
Fill => ' ',
Error => Error);
end;
Put (Buffer, Last, "%)");
Termination.Error_Put_Line (Buffer (1 .. Last));
-- next
I := BA_Conv.To_Pointer (I).Previous;
Block_Number := Block_Number + 1;
end loop;
end;
end Dump;
end System.Unbounded_Stack_Allocators.Debug;
|
Rodeo-McCabe/orka | Ada | 6,707 | adb | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2018 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 GL.Barriers;
with GL.Compute;
with GL.Debug;
with GL.Types.Compute;
with Orka.Rendering.Programs.Modules;
package body Orka.Culling is
use GL.Debug;
package Messages is new GL.Debug.Messages (Third_Party, Other);
function Create_Culler
(Location : Resources.Locations.Location_Ptr) return Culler
is
use Rendering.Programs;
begin
return Result : Culler
:= (Program_Frustum => Create_Program (Modules.Create_Module
(Location, CS => "cull-frustum.comp")),
Program_Compact => Create_Program (Modules.Create_Module
(Location, CS => "compact-commands.comp")),
PS_Factory => Algorithms.Prefix_Sums.Create_Factory (Location),
others => <>)
do
Result.Uniform_CF_Instances := Result.Program_Frustum.Uniform ("instances");
Result.Uniform_VP := Result.Program_Frustum.Uniform ("viewProj");
Result.Uniform_CC_Instances := Result.Program_Compact.Uniform ("instances");
end return;
end Create_Culler;
function Create_Instance
(Culler : Culler_Ptr; Transforms, Commands : Natural) return Cull_Instance
is
use Rendering.Buffers;
use all type Types.Element_Type;
Work_Group_Size : constant GL.Types.Compute.Dimension_Size_Array
:= Culler.Program_Frustum.Compute_Work_Group_Size;
Local_Size : constant Natural := Natural (Work_Group_Size (GL.X));
Padding : constant Boolean := Transforms rem Local_Size /= 0;
Work_Groups : constant Natural
:= Transforms / Local_Size + (if Padding then 1 else 0);
pragma Assert (Work_Groups <= 65_535);
begin
return Result : constant Cull_Instance
:= (Culler => Culler,
Work_Groups => Work_Groups,
Prefix_Sum => Algorithms.Prefix_Sums.Prefix_Sum
(Culler.PS_Factory.Create_Prefix_Sum (Transforms)),
Buffer_Visibles => Create_Buffer
(Flags => (others => False),
Kind => UInt_Type,
Length => Transforms),
Buffer_Indices => Create_Buffer
(Flags => (others => False),
Kind => UInt_Type,
Length => Transforms),
Compacted_Transforms => Create_Buffer
(Flags => (others => False),
Kind => Single_Matrix_Type,
Length => Transforms),
Compacted_Commands => Create_Buffer
(Flags => (others => False),
Kind => Elements_Command_Type,
Length => Commands))
do
Messages.Log (Notification, "Created culler for" &
Transforms'Image & " transforms and" &
Commands'Image & " commands");
Messages.Log (Notification, " cull frustum:" &
Work_Groups'Image & " groups x" & Local_Size'Image & " transforms");
end return;
end Create_Instance;
procedure Bind (Object : in out Culler; View_Projection : Transforms.Matrix4) is
begin
Object.Uniform_VP.Set_Matrix (View_Projection);
end Bind;
-----------------------------------------------------------------------------
procedure Memory_Barrier with Inline is
begin
GL.Barriers.Memory_Barrier
((By_Region => False, Shader_Storage | Buffer_Update => True, others => False));
end Memory_Barrier;
use GL.Types;
use all type Rendering.Buffers.Indexed_Buffer_Target;
procedure Cull_Frustum
(Object : in out Cull_Instance;
Transforms : Rendering.Buffers.Bindable_Buffer'Class;
Bounds : Rendering.Buffers.Buffer) is
begin
Transforms.Bind (Shader_Storage, 0);
Bounds.Bind (Shader_Storage, 1);
Object.Buffer_Visibles.Bind (Shader_Storage, 2);
Object.Culler.Program_Frustum.Use_Program;
Memory_Barrier;
GL.Compute.Dispatch_Compute (X => UInt (Object.Work_Groups));
end Cull_Frustum;
procedure Compact
(Object : in out Cull_Instance;
Transforms : Rendering.Buffers.Bindable_Buffer'Class;
Commands : Rendering.Buffers.Buffer) is
begin
Object.Buffer_Indices.Bind (Shader_Storage, 0);
Object.Buffer_Visibles.Bind (Shader_Storage, 1);
Transforms.Bind (Shader_Storage, 2);
Object.Compacted_Transforms.Bind (Shader_Storage, 3);
-- Buffer Commands acts as a template (with instanceCount = 0 for
-- every draw call), copy it to Compacted_Commands so that the
-- compute shader does not modify it
Commands.Copy_Data (Object.Compacted_Commands);
Object.Compacted_Commands.Bind (Shader_Storage, 4);
Object.Culler.Program_Compact.Use_Program;
Memory_Barrier;
GL.Compute.Dispatch_Compute (X => UInt (Object.Work_Groups));
end Compact;
procedure Cull
(Object : in out Cull_Instance;
Transforms : Rendering.Buffers.Bindable_Buffer'Class;
Bounds, Commands : Rendering.Buffers.Buffer;
Compacted_Transforms, Compacted_Commands : out Rendering.Buffers.Buffer;
Instances : Natural) is
begin
Object.Culler.Uniform_CF_Instances.Set_UInt (UInt (Instances));
Object.Culler.Uniform_CC_Instances.Set_UInt (UInt (Instances));
-- Perform frustum culling and fill Buffer_Visibles with a 1 or 0
-- for each part depending on whether the part intersects the frustum
Object.Cull_Frustum (Transforms, Bounds);
-- Store the prefix sum of Buffer_Visibles in Buffer_Indices
Memory_Barrier;
Object.Buffer_Visibles.Copy_Data (Object.Buffer_Indices);
Object.Prefix_Sum.Compute_Prefix_Sum (Object.Buffer_Indices);
-- Create a compacted array of transforms: if a part is visible
-- according to Buffer_Visibles, then its transform will be copied
-- to the position denoted by the part's offset number in Buffer_Indices
Object.Compact (Transforms, Commands);
Compacted_Transforms := Object.Compacted_Transforms;
Compacted_Commands := Object.Compacted_Commands;
end Cull;
end Orka.Culling;
|
zhmu/ananas | Ada | 57,669 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . F O R M A L _ H A S H E D _ S E T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2022, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- 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/>. --
------------------------------------------------------------------------------
-- This spec is derived from package Ada.Containers.Bounded_Hashed_Sets in the
-- Ada 2012 RM. The modifications are meant to facilitate formal proofs by
-- making it easier to express properties, and by making the specification of
-- this unit compatible with SPARK 2014. Note that the API of this unit may be
-- subject to incompatible changes as SPARK 2014 evolves.
-- The modifications are:
-- A parameter for the container is added to every function reading the
-- content of a container: Element, Next, Query_Element, Has_Element, Key,
-- Iterate, Equivalent_Elements. This change is motivated by the need to
-- have cursors which are valid on different containers (typically a
-- container C and its previous version C'Old) for expressing properties,
-- which is not possible if cursors encapsulate an access to the underlying
-- container.
with Ada.Containers.Functional_Maps;
with Ada.Containers.Functional_Sets;
with Ada.Containers.Functional_Vectors;
private with Ada.Containers.Hash_Tables;
generic
type Element_Type is private;
with function Hash (Element : Element_Type) return Hash_Type;
with function Equivalent_Elements
(Left : Element_Type;
Right : Element_Type) return Boolean is "=";
package Ada.Containers.Formal_Hashed_Sets with
SPARK_Mode
is
-- Contracts in this unit are meant for analysis only, not for run-time
-- checking.
pragma Assertion_Policy (Pre => Ignore);
pragma Assertion_Policy (Post => Ignore);
pragma Assertion_Policy (Contract_Cases => Ignore);
pragma Annotate (CodePeer, Skip_Analysis);
type Set (Capacity : Count_Type; Modulus : Hash_Type) is private with
Iterable => (First => First,
Next => Next,
Has_Element => Has_Element,
Element => Element),
Default_Initial_Condition => Is_Empty (Set);
pragma Preelaborable_Initialization (Set);
type Cursor is record
Node : Count_Type;
end record;
No_Element : constant Cursor := (Node => 0);
function Length (Container : Set) return Count_Type with
Global => null,
Post => Length'Result <= Container.Capacity;
pragma Unevaluated_Use_Of_Old (Allow);
package Formal_Model with Ghost is
subtype Positive_Count_Type is Count_Type range 1 .. Count_Type'Last;
package M is new Ada.Containers.Functional_Sets
(Element_Type => Element_Type,
Equivalent_Elements => Equivalent_Elements);
function "="
(Left : M.Set;
Right : M.Set) return Boolean renames M."=";
function "<="
(Left : M.Set;
Right : M.Set) return Boolean renames M."<=";
package E is new Ada.Containers.Functional_Vectors
(Element_Type => Element_Type,
Index_Type => Positive_Count_Type);
function "="
(Left : E.Sequence;
Right : E.Sequence) return Boolean renames E."=";
function "<"
(Left : E.Sequence;
Right : E.Sequence) return Boolean renames E."<";
function "<="
(Left : E.Sequence;
Right : E.Sequence) return Boolean renames E."<=";
function Find
(Container : E.Sequence;
Item : Element_Type) return Count_Type
-- Search for Item in Container
with
Global => null,
Post =>
(if Find'Result > 0 then
Find'Result <= E.Length (Container)
and Equivalent_Elements
(Item, E.Get (Container, Find'Result)));
function E_Elements_Included
(Left : E.Sequence;
Right : E.Sequence) return Boolean
-- The elements of Left are contained in Right
with
Global => null,
Post =>
E_Elements_Included'Result =
(for all I in 1 .. E.Length (Left) =>
Find (Right, E.Get (Left, I)) > 0
and then E.Get (Right, Find (Right, E.Get (Left, I))) =
E.Get (Left, I));
pragma Annotate (GNATprove, Inline_For_Proof, E_Elements_Included);
function E_Elements_Included
(Left : E.Sequence;
Model : M.Set;
Right : E.Sequence) return Boolean
-- The elements of Container contained in Model are in Right
with
Global => null,
Post =>
E_Elements_Included'Result =
(for all I in 1 .. E.Length (Left) =>
(if M.Contains (Model, E.Get (Left, I)) then
Find (Right, E.Get (Left, I)) > 0
and then E.Get (Right, Find (Right, E.Get (Left, I))) =
E.Get (Left, I)));
pragma Annotate (GNATprove, Inline_For_Proof, E_Elements_Included);
function E_Elements_Included
(Container : E.Sequence;
Model : M.Set;
Left : E.Sequence;
Right : E.Sequence) return Boolean
-- The elements of Container contained in Model are in Left and others
-- are in Right.
with
Global => null,
Post =>
E_Elements_Included'Result =
(for all I in 1 .. E.Length (Container) =>
(if M.Contains (Model, E.Get (Container, I)) then
Find (Left, E.Get (Container, I)) > 0
and then E.Get (Left, Find (Left, E.Get (Container, I))) =
E.Get (Container, I)
else
Find (Right, E.Get (Container, I)) > 0
and then E.Get
(Right, Find (Right, E.Get (Container, I))) =
E.Get (Container, I)));
pragma Annotate (GNATprove, Inline_For_Proof, E_Elements_Included);
package P is new Ada.Containers.Functional_Maps
(Key_Type => Cursor,
Element_Type => Positive_Count_Type,
Equivalent_Keys => "=",
Enable_Handling_Of_Equivalence => False);
function "="
(Left : P.Map;
Right : P.Map) return Boolean renames P."=";
function "<="
(Left : P.Map;
Right : P.Map) return Boolean renames P."<=";
function Mapping_Preserved
(E_Left : E.Sequence;
E_Right : E.Sequence;
P_Left : P.Map;
P_Right : P.Map) return Boolean
with
Ghost,
Global => null,
Post =>
(if Mapping_Preserved'Result then
-- Right contains all the cursors of Left
P.Keys_Included (P_Left, P_Right)
-- Right contains all the elements of Left
and E_Elements_Included (E_Left, E_Right)
-- Mappings from cursors to elements induced by E_Left, P_Left
-- and E_Right, P_Right are the same.
and (for all C of P_Left =>
E.Get (E_Left, P.Get (P_Left, C)) =
E.Get (E_Right, P.Get (P_Right, C))));
function Mapping_Preserved_Except
(E_Left : E.Sequence;
E_Right : E.Sequence;
P_Left : P.Map;
P_Right : P.Map;
Position : Cursor) return Boolean
with
Ghost,
Global => null,
Post =>
(if Mapping_Preserved_Except'Result then
-- Right contains all the cursors of Left
P.Keys_Included (P_Left, P_Right)
-- Mappings from cursors to elements induced by E_Left, P_Left
-- and E_Right, P_Right are the same except for Position.
and (for all C of P_Left =>
(if C /= Position then
E.Get (E_Left, P.Get (P_Left, C)) =
E.Get (E_Right, P.Get (P_Right, C)))));
function Model (Container : Set) return M.Set with
-- The high-level model of a set is a set of elements. Neither cursors
-- nor order of elements are represented in this model. Elements are
-- modeled up to equivalence.
Ghost,
Global => null,
Post => M.Length (Model'Result) = Length (Container);
function Elements (Container : Set) return E.Sequence with
-- The Elements sequence represents the underlying list structure of
-- sets that is used for iteration. It stores the actual values of
-- elements in the set. It does not model cursors.
Ghost,
Global => null,
Post =>
E.Length (Elements'Result) = Length (Container)
-- It only contains keys contained in Model
and (for all Item of Elements'Result =>
M.Contains (Model (Container), Item))
-- It contains all the elements contained in Model
and (for all Item of Model (Container) =>
(Find (Elements'Result, Item) > 0
and then Equivalent_Elements
(E.Get (Elements'Result,
Find (Elements'Result, Item)),
Item)))
-- It has no duplicate
and (for all I in 1 .. Length (Container) =>
Find (Elements'Result, E.Get (Elements'Result, I)) = I)
and (for all I in 1 .. Length (Container) =>
(for all J in 1 .. Length (Container) =>
(if Equivalent_Elements
(E.Get (Elements'Result, I),
E.Get (Elements'Result, J))
then I = J)));
pragma Annotate (GNATprove, Iterable_For_Proof, "Model", Elements);
function Positions (Container : Set) return P.Map with
-- The Positions map is used to model cursors. It only contains valid
-- cursors and maps them to their position in the container.
Ghost,
Global => null,
Post =>
not P.Has_Key (Positions'Result, No_Element)
-- Positions of cursors are smaller than the container's length
and then
(for all I of Positions'Result =>
P.Get (Positions'Result, I) in 1 .. Length (Container)
-- No two cursors have the same position. Note that we do not
-- state that there is a cursor in the map for each position, as
-- it is rarely needed.
and then
(for all J of Positions'Result =>
(if P.Get (Positions'Result, I) = P.Get (Positions'Result, J)
then I = J)));
procedure Lift_Abstraction_Level (Container : Set) with
-- Lift_Abstraction_Level is a ghost procedure that does nothing but
-- assume that we can access the same elements by iterating over
-- positions or cursors.
-- This information is not generally useful except when switching from
-- a low-level, cursor-aware view of a container, to a high-level,
-- position-based view.
Ghost,
Global => null,
Post =>
(for all Item of Elements (Container) =>
(for some I of Positions (Container) =>
E.Get (Elements (Container), P.Get (Positions (Container), I)) =
Item));
function Contains
(C : M.Set;
K : Element_Type) return Boolean renames M.Contains;
-- To improve readability of contracts, we rename the function used to
-- search for an element in the model to Contains.
end Formal_Model;
use Formal_Model;
Empty_Set : constant Set;
function "=" (Left, Right : Set) return Boolean with
Global => null,
Post =>
"="'Result =
(Length (Left) = Length (Right)
and E_Elements_Included (Elements (Left), Elements (Right)))
and
"="'Result =
(E_Elements_Included (Elements (Left), Elements (Right))
and E_Elements_Included (Elements (Right), Elements (Left)));
-- For each element in Left, set equality attempts to find the equal
-- element in Right; if a search fails, then set equality immediately
-- returns False. The search works by calling Hash to find the bucket in
-- the Right set that corresponds to the Left element. If the bucket is
-- non-empty, the search calls the generic formal element equality operator
-- to compare the element (in Left) to the element of each node in the
-- bucket (in Right); the search terminates when a matching node in the
-- bucket is found, or the nodes in the bucket are exhausted. (Note that
-- element equality is called here, not Equivalent_Elements. Set equality
-- is the only operation in which element equality is used. Compare set
-- equality to Equivalent_Sets, which does call Equivalent_Elements.)
function Equivalent_Sets (Left, Right : Set) return Boolean with
Global => null,
Post => Equivalent_Sets'Result = (Model (Left) = Model (Right));
-- Similar to set equality, with the difference that the element in Left is
-- compared to the elements in Right using the generic formal
-- Equivalent_Elements operation instead of element equality.
function To_Set (New_Item : Element_Type) return Set with
Global => null,
Post =>
M.Is_Singleton (Model (To_Set'Result), New_Item)
and Length (To_Set'Result) = 1
and E.Get (Elements (To_Set'Result), 1) = New_Item;
-- Constructs a singleton set comprising New_Element. To_Set calls Hash to
-- determine the bucket for New_Item.
function Capacity (Container : Set) return Count_Type with
Global => null,
Post => Capacity'Result = Container.Capacity;
-- Returns the current capacity of the set. Capacity is the maximum length
-- before which rehashing in guaranteed not to occur.
procedure Reserve_Capacity
(Container : in out Set;
Capacity : Count_Type)
with
Global => null,
Pre => Capacity <= Container.Capacity,
Post =>
Model (Container) = Model (Container)'Old
and Length (Container)'Old = Length (Container)
-- Actual elements are preserved
and E_Elements_Included
(Elements (Container), Elements (Container)'Old)
and E_Elements_Included
(Elements (Container)'Old, Elements (Container));
-- If the value of the Capacity actual parameter is less or equal to
-- Container.Capacity, then the operation has no effect. Otherwise it
-- raises Capacity_Error (as no expansion of capacity is possible for a
-- bounded form).
function Is_Empty (Container : Set) return Boolean with
Global => null,
Post => Is_Empty'Result = (Length (Container) = 0);
-- Equivalent to Length (Container) = 0
procedure Clear (Container : in out Set) with
Global => null,
Post => Length (Container) = 0 and M.Is_Empty (Model (Container));
-- Removes all of the items from the set. This will deallocate all memory
-- associated with this set.
procedure Assign (Target : in out Set; Source : Set) with
Global => null,
Pre => Target.Capacity >= Length (Source),
Post =>
Model (Target) = Model (Source)
and Length (Target) = Length (Source)
-- Actual elements are preserved
and E_Elements_Included (Elements (Target), Elements (Source))
and E_Elements_Included (Elements (Source), Elements (Target));
-- If Target denotes the same object as Source, then the operation has no
-- effect. If the Target capacity is less than the Source length, then
-- Assign raises Capacity_Error. Otherwise, Assign clears Target and then
-- copies the (active) elements from Source to Target.
function Copy
(Source : Set;
Capacity : Count_Type := 0) return Set
with
Global => null,
Pre => Capacity = 0 or else Capacity >= Source.Capacity,
Post =>
Model (Copy'Result) = Model (Source)
and Elements (Copy'Result) = Elements (Source)
and Positions (Copy'Result) = Positions (Source)
and (if Capacity = 0 then
Copy'Result.Capacity = Source.Capacity
else
Copy'Result.Capacity = Capacity);
-- Constructs a new set object whose elements correspond to Source. If the
-- Capacity parameter is 0, then the capacity of the result is the same as
-- the length of Source. If the Capacity parameter is equal or greater than
-- the length of Source, then the capacity of the result is the specified
-- value. Otherwise, Copy raises Capacity_Error. If the Modulus parameter
-- is 0, then the modulus of the result is the value returned by a call to
-- Default_Modulus with the capacity parameter determined as above;
-- otherwise the modulus of the result is the specified value.
function Element
(Container : Set;
Position : Cursor) return Element_Type
with
Global => null,
Pre => Has_Element (Container, Position),
Post =>
Element'Result =
E.Get (Elements (Container), P.Get (Positions (Container), Position));
pragma Annotate (GNATprove, Inline_For_Proof, Element);
procedure Replace_Element
(Container : in out Set;
Position : Cursor;
New_Item : Element_Type)
with
Global => null,
Pre => Has_Element (Container, Position),
Post =>
Length (Container) = Length (Container)'Old
-- Position now maps to New_Item
and Element (Container, Position) = New_Item
-- New_Item is contained in Container
and Contains (Model (Container), New_Item)
-- Other elements are preserved
and M.Included_Except
(Model (Container)'Old,
Model (Container),
Element (Container, Position)'Old)
and M.Included_Except
(Model (Container),
Model (Container)'Old,
New_Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved_Except
(E_Left => Elements (Container)'Old,
E_Right => Elements (Container),
P_Left => Positions (Container)'Old,
P_Right => Positions (Container),
Position => Position)
and Positions (Container) = Positions (Container)'Old;
function Constant_Reference
(Container : aliased Set;
Position : Cursor) return not null access constant Element_Type
with
Global => null,
Pre => Has_Element (Container, Position),
Post =>
Constant_Reference'Result.all =
E.Get (Elements (Container), P.Get (Positions (Container), Position));
procedure Move (Target : in out Set; Source : in out Set) with
Global => null,
Pre => Target.Capacity >= Length (Source),
Post =>
Length (Source) = 0
and Model (Target) = Model (Source)'Old
and Length (Target) = Length (Source)'Old
-- Actual elements are preserved
and E_Elements_Included (Elements (Target), Elements (Source)'Old)
and E_Elements_Included (Elements (Source)'Old, Elements (Target));
-- Clears Target (if it's not empty), and then moves (not copies) the
-- buckets array and nodes from Source to Target.
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean)
with
Global => null,
Pre =>
Length (Container) < Container.Capacity
or Contains (Container, New_Item),
Post =>
Contains (Container, New_Item)
and Has_Element (Container, Position)
and Equivalent_Elements (Element (Container, Position), New_Item),
Contract_Cases =>
-- If New_Item is already in Container, it is not modified and Inserted
-- is set to False.
(Contains (Container, New_Item) =>
not Inserted
and Model (Container) = Model (Container)'Old
and Elements (Container) = Elements (Container)'Old
and Positions (Container) = Positions (Container)'Old,
-- Otherwise, New_Item is inserted in Container and Inserted is set to
-- True.
others =>
Inserted
and Length (Container) = Length (Container)'Old + 1
-- Position now maps to New_Item
and Element (Container, Position) = New_Item
-- Other elements are preserved
and Model (Container)'Old <= Model (Container)
and M.Included_Except
(Model (Container),
Model (Container)'Old,
New_Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container)'Old,
E_Right => Elements (Container),
P_Left => Positions (Container)'Old,
P_Right => Positions (Container))
and P.Keys_Included_Except
(Positions (Container),
Positions (Container)'Old,
Position));
-- Conditionally inserts New_Item into the set. If New_Item is already in
-- the set, then Inserted returns False and Position designates the node
-- containing the existing element (which is not modified). If New_Item is
-- not already in the set, then Inserted returns True and Position
-- designates the newly-inserted node containing New_Item. The search for
-- an existing element works as follows. Hash is called to determine
-- New_Item's bucket; if the bucket is non-empty, then Equivalent_Elements
-- is called to compare New_Item to the element of each node in that
-- bucket. If the bucket is empty, or there were no equivalent elements in
-- the bucket, the search "fails" and the New_Item is inserted in the set
-- (and Inserted returns True); otherwise, the search "succeeds" (and
-- Inserted returns False).
procedure Insert (Container : in out Set; New_Item : Element_Type) with
Global => null,
Pre => Length (Container) < Container.Capacity
and then (not Contains (Container, New_Item)),
Post =>
Length (Container) = Length (Container)'Old + 1
and Contains (Container, New_Item)
and Element (Container, Find (Container, New_Item)) = New_Item
-- Other elements are preserved
and Model (Container)'Old <= Model (Container)
and M.Included_Except
(Model (Container),
Model (Container)'Old,
New_Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container)'Old,
E_Right => Elements (Container),
P_Left => Positions (Container)'Old,
P_Right => Positions (Container))
and P.Keys_Included_Except
(Positions (Container),
Positions (Container)'Old,
Find (Container, New_Item));
-- Attempts to insert New_Item into the set, performing the usual insertion
-- search (which involves calling both Hash and Equivalent_Elements); if
-- the search succeeds (New_Item is equivalent to an element already in the
-- set, and so was not inserted), then this operation raises
-- Constraint_Error. (This version of Insert is similar to Replace, but
-- having the opposite exception behavior. It is intended for use when you
-- want to assert that the item is not already in the set.)
procedure Include (Container : in out Set; New_Item : Element_Type) with
Global => null,
Pre =>
Length (Container) < Container.Capacity
or Contains (Container, New_Item),
Post =>
Contains (Container, New_Item)
and Element (Container, Find (Container, New_Item)) = New_Item,
Contract_Cases =>
-- If an element equivalent to New_Item is already in Container, it is
-- replaced by New_Item.
(Contains (Container, New_Item) =>
-- Elements are preserved modulo equivalence
Model (Container) = Model (Container)'Old
-- Cursors are preserved
and Positions (Container) = Positions (Container)'Old
-- The actual value of other elements is preserved
and E.Equal_Except
(Elements (Container)'Old,
Elements (Container),
P.Get (Positions (Container), Find (Container, New_Item))),
-- Otherwise, New_Item is inserted in Container
others =>
Length (Container) = Length (Container)'Old + 1
-- Other elements are preserved
and Model (Container)'Old <= Model (Container)
and M.Included_Except
(Model (Container),
Model (Container)'Old,
New_Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container)'Old,
E_Right => Elements (Container),
P_Left => Positions (Container)'Old,
P_Right => Positions (Container))
and P.Keys_Included_Except
(Positions (Container),
Positions (Container)'Old,
Find (Container, New_Item)));
-- Attempts to insert New_Item into the set. If an element equivalent to
-- New_Item is already in the set (the insertion search succeeded, and
-- hence New_Item was not inserted), then the value of New_Item is assigned
-- to the existing element. (This insertion operation only raises an
-- exception if cursor tampering occurs. It is intended for use when you
-- want to insert the item in the set, and you don't care whether an
-- equivalent element is already present.)
procedure Replace (Container : in out Set; New_Item : Element_Type) with
Global => null,
Pre => Contains (Container, New_Item),
Post =>
-- Elements are preserved modulo equivalence
Model (Container) = Model (Container)'Old
and Contains (Container, New_Item)
-- Cursors are preserved
and Positions (Container) = Positions (Container)'Old
-- The element equivalent to New_Item in Container is replaced by
-- New_Item.
and Element (Container, Find (Container, New_Item)) = New_Item
and E.Equal_Except
(Elements (Container)'Old,
Elements (Container),
P.Get (Positions (Container), Find (Container, New_Item)));
-- Searches for New_Item in the set; if the search fails (because an
-- equivalent element was not in the set), then it raises
-- Constraint_Error. Otherwise, the existing element is assigned the value
-- New_Item. (This is similar to Insert, but with the opposite exception
-- behavior. It is intended for use when you want to assert that the item
-- is already in the set.)
procedure Exclude (Container : in out Set; Item : Element_Type) with
Global => null,
Post => not Contains (Container, Item),
Contract_Cases =>
-- If Item is not in Container, nothing is changed
(not Contains (Container, Item) =>
Model (Container) = Model (Container)'Old
and Elements (Container) = Elements (Container)'Old
and Positions (Container) = Positions (Container)'Old,
-- Otherwise, Item is removed from Container
others =>
Length (Container) = Length (Container)'Old - 1
-- Other elements are preserved
and Model (Container) <= Model (Container)'Old
and M.Included_Except
(Model (Container)'Old,
Model (Container),
Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container),
E_Right => Elements (Container)'Old,
P_Left => Positions (Container),
P_Right => Positions (Container)'Old)
and P.Keys_Included_Except
(Positions (Container)'Old,
Positions (Container),
Find (Container, Item)'Old));
-- Searches for Item in the set, and if found, removes its node from the
-- set and then deallocates it. The search works as follows. The operation
-- calls Hash to determine the item's bucket; if the bucket is not empty,
-- it calls Equivalent_Elements to compare Item to the element of each node
-- in the bucket. (This is the deletion analog of Include. It is intended
-- for use when you want to remove the item from the set, but don't care
-- whether the item is already in the set.)
procedure Delete (Container : in out Set; Item : Element_Type) with
Global => null,
Pre => Contains (Container, Item),
Post =>
Length (Container) = Length (Container)'Old - 1
-- Item is no longer in Container
and not Contains (Container, Item)
-- Other elements are preserved
and Model (Container) <= Model (Container)'Old
and M.Included_Except
(Model (Container)'Old,
Model (Container),
Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container),
E_Right => Elements (Container)'Old,
P_Left => Positions (Container),
P_Right => Positions (Container)'Old)
and P.Keys_Included_Except
(Positions (Container)'Old,
Positions (Container),
Find (Container, Item)'Old);
-- Searches for Item in the set (which involves calling both Hash and
-- Equivalent_Elements). If the search fails, then the operation raises
-- Constraint_Error. Otherwise it removes the node from the set and then
-- deallocates it. (This is the deletion analog of non-conditional
-- Insert. It is intended for use when you want to assert that the item is
-- already in the set.)
procedure Delete (Container : in out Set; Position : in out Cursor) with
Global => null,
Depends => (Container =>+ Position, Position => null),
Pre => Has_Element (Container, Position),
Post =>
Position = No_Element
and Length (Container) = Length (Container)'Old - 1
-- The element at position Position is no longer in Container
and not Contains (Container, Element (Container, Position)'Old)
and not P.Has_Key (Positions (Container), Position'Old)
-- Other elements are preserved
and Model (Container) <= Model (Container)'Old
and M.Included_Except
(Model (Container)'Old,
Model (Container),
Element (Container, Position)'Old)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container),
E_Right => Elements (Container)'Old,
P_Left => Positions (Container),
P_Right => Positions (Container)'Old)
and P.Keys_Included_Except
(Positions (Container)'Old,
Positions (Container),
Position'Old);
-- Removes the node designated by Position from the set, and then
-- deallocates the node. The operation calls Hash to determine the bucket,
-- and then compares Position to each node in the bucket until there's a
-- match (it does not call Equivalent_Elements).
procedure Union (Target : in out Set; Source : Set) with
Global => null,
Pre =>
Length (Source) - Length (Target and Source) <=
Target.Capacity - Length (Target),
Post =>
Length (Target) = Length (Target)'Old
- M.Num_Overlaps (Model (Target)'Old, Model (Source))
+ Length (Source)
-- Elements already in Target are still in Target
and Model (Target)'Old <= Model (Target)
-- Elements of Source are included in Target
and Model (Source) <= Model (Target)
-- Elements of Target come from either Source or Target
and M.Included_In_Union
(Model (Target), Model (Source), Model (Target)'Old)
-- Actual value of elements come from either Left or Right
and E_Elements_Included
(Elements (Target),
Model (Target)'Old,
Elements (Target)'Old,
Elements (Source))
and E_Elements_Included
(Elements (Target)'Old, Model (Target)'Old, Elements (Target))
and E_Elements_Included
(Elements (Source),
Model (Target)'Old,
Elements (Source),
Elements (Target))
-- Mapping from cursors of Target to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Target)'Old,
E_Right => Elements (Target),
P_Left => Positions (Target)'Old,
P_Right => Positions (Target));
-- Iterates over the Source set, and conditionally inserts each element
-- into Target.
function Union (Left, Right : Set) return Set with
Global => null,
Pre => Length (Left) <= Count_Type'Last - Length (Right),
Post =>
Length (Union'Result) = Length (Left)
- M.Num_Overlaps (Model (Left), Model (Right))
+ Length (Right)
-- Elements of Left and Right are in the result of Union
and Model (Left) <= Model (Union'Result)
and Model (Right) <= Model (Union'Result)
-- Elements of the result of union come from either Left or Right
and
M.Included_In_Union
(Model (Union'Result), Model (Left), Model (Right))
-- Actual value of elements come from either Left or Right
and E_Elements_Included
(Elements (Union'Result),
Model (Left),
Elements (Left),
Elements (Right))
and E_Elements_Included
(Elements (Left), Model (Left), Elements (Union'Result))
and E_Elements_Included
(Elements (Right),
Model (Left),
Elements (Right),
Elements (Union'Result));
-- The operation first copies the Left set to the result, and then iterates
-- over the Right set to conditionally insert each element into the result.
function "or" (Left, Right : Set) return Set renames Union;
procedure Intersection (Target : in out Set; Source : Set) with
Global => null,
Post =>
Length (Target) =
M.Num_Overlaps (Model (Target)'Old, Model (Source))
-- Elements of Target were already in Target
and Model (Target) <= Model (Target)'Old
-- Elements of Target are in Source
and Model (Target) <= Model (Source)
-- Elements both in Source and Target are in the intersection
and M.Includes_Intersection
(Model (Target), Model (Source), Model (Target)'Old)
-- Actual value of elements of Target is preserved
and E_Elements_Included (Elements (Target), Elements (Target)'Old)
and E_Elements_Included
(Elements (Target)'Old, Model (Source), Elements (Target))
-- Mapping from cursors of Target to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Target),
E_Right => Elements (Target)'Old,
P_Left => Positions (Target),
P_Right => Positions (Target)'Old);
-- Iterates over the Target set (calling First and Next), calling Find to
-- determine whether the element is in Source. If an equivalent element is
-- not found in Source, the element is deleted from Target.
function Intersection (Left, Right : Set) return Set with
Global => null,
Post =>
Length (Intersection'Result) =
M.Num_Overlaps (Model (Left), Model (Right))
-- Elements in the result of Intersection are in Left and Right
and Model (Intersection'Result) <= Model (Left)
and Model (Intersection'Result) <= Model (Right)
-- Elements both in Left and Right are in the result of Intersection
and M.Includes_Intersection
(Model (Intersection'Result), Model (Left), Model (Right))
-- Actual value of elements come from Left
and E_Elements_Included
(Elements (Intersection'Result), Elements (Left))
and E_Elements_Included
(Elements (Left), Model (Right),
Elements (Intersection'Result));
-- Iterates over the Left set, calling Find to determine whether the
-- element is in Right. If an equivalent element is found, it is inserted
-- into the result set.
function "and" (Left, Right : Set) return Set renames Intersection;
procedure Difference (Target : in out Set; Source : Set) with
Global => null,
Post =>
Length (Target) = Length (Target)'Old -
M.Num_Overlaps (Model (Target)'Old, Model (Source))
-- Elements of Target were already in Target
and Model (Target) <= Model (Target)'Old
-- Elements of Target are not in Source
and M.No_Overlap (Model (Target), Model (Source))
-- Elements in Target but not in Source are in the difference
and M.Included_In_Union
(Model (Target)'Old, Model (Target), Model (Source))
-- Actual value of elements of Target is preserved
and E_Elements_Included (Elements (Target), Elements (Target)'Old)
and E_Elements_Included
(Elements (Target)'Old, Model (Target), Elements (Target))
-- Mapping from cursors of Target to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Target),
E_Right => Elements (Target)'Old,
P_Left => Positions (Target),
P_Right => Positions (Target)'Old);
-- Iterates over the Source (calling First and Next), calling Find to
-- determine whether the element is in Target. If an equivalent element is
-- found, it is deleted from Target.
function Difference (Left, Right : Set) return Set with
Global => null,
Post =>
Length (Difference'Result) = Length (Left) -
M.Num_Overlaps (Model (Left), Model (Right))
-- Elements of the result of Difference are in Left
and Model (Difference'Result) <= Model (Left)
-- Elements of the result of Difference are in Right
and M.No_Overlap (Model (Difference'Result), Model (Right))
-- Elements in Left but not in Right are in the difference
and M.Included_In_Union
(Model (Left), Model (Difference'Result), Model (Right))
-- Actual value of elements come from Left
and E_Elements_Included
(Elements (Difference'Result), Elements (Left))
and E_Elements_Included
(Elements (Left),
Model (Difference'Result),
Elements (Difference'Result));
-- Iterates over the Left set, calling Find to determine whether the
-- element is in the Right set. If an equivalent element is not found, the
-- element is inserted into the result set.
function "-" (Left, Right : Set) return Set renames Difference;
procedure Symmetric_Difference (Target : in out Set; Source : Set) with
Global => null,
Pre =>
Length (Source) - Length (Target and Source) <=
Target.Capacity - Length (Target) + Length (Target and Source),
Post =>
Length (Target) = Length (Target)'Old -
2 * M.Num_Overlaps (Model (Target)'Old, Model (Source)) +
Length (Source)
-- Elements of the difference were not both in Source and in Target
and M.Not_In_Both (Model (Target), Model (Target)'Old, Model (Source))
-- Elements in Target but not in Source are in the difference
and M.Included_In_Union
(Model (Target)'Old, Model (Target), Model (Source))
-- Elements in Source but not in Target are in the difference
and M.Included_In_Union
(Model (Source), Model (Target), Model (Target)'Old)
-- Actual value of elements come from either Left or Right
and E_Elements_Included
(Elements (Target),
Model (Target)'Old,
Elements (Target)'Old,
Elements (Source))
and E_Elements_Included
(Elements (Target)'Old, Model (Target), Elements (Target))
and E_Elements_Included
(Elements (Source), Model (Target), Elements (Target));
-- The operation iterates over the Source set, searching for the element
-- in Target (calling Hash and Equivalent_Elements). If an equivalent
-- element is found, it is removed from Target; otherwise it is inserted
-- into Target.
function Symmetric_Difference (Left, Right : Set) return Set with
Global => null,
Pre => Length (Left) <= Count_Type'Last - Length (Right),
Post =>
Length (Symmetric_Difference'Result) = Length (Left) -
2 * M.Num_Overlaps (Model (Left), Model (Right)) +
Length (Right)
-- Elements of the difference were not both in Left and Right
and M.Not_In_Both
(Model (Symmetric_Difference'Result),
Model (Left),
Model (Right))
-- Elements in Left but not in Right are in the difference
and M.Included_In_Union
(Model (Left),
Model (Symmetric_Difference'Result),
Model (Right))
-- Elements in Right but not in Left are in the difference
and M.Included_In_Union
(Model (Right),
Model (Symmetric_Difference'Result),
Model (Left))
-- Actual value of elements come from either Left or Right
and E_Elements_Included
(Elements (Symmetric_Difference'Result),
Model (Left),
Elements (Left),
Elements (Right))
and E_Elements_Included
(Elements (Left),
Model (Symmetric_Difference'Result),
Elements (Symmetric_Difference'Result))
and E_Elements_Included
(Elements (Right),
Model (Symmetric_Difference'Result),
Elements (Symmetric_Difference'Result));
-- The operation first iterates over the Left set. It calls Find to
-- determine whether the element is in the Right set. If no equivalent
-- element is found, the element from Left is inserted into the result. The
-- operation then iterates over the Right set, to determine whether the
-- element is in the Left set. If no equivalent element is found, the Right
-- element is inserted into the result.
function "xor" (Left, Right : Set) return Set
renames Symmetric_Difference;
function Overlap (Left, Right : Set) return Boolean with
Global => null,
Post =>
Overlap'Result = not (M.No_Overlap (Model (Left), Model (Right)));
-- Iterates over the Left set (calling First and Next), calling Find to
-- determine whether the element is in the Right set. If an equivalent
-- element is found, the operation immediately returns True. The operation
-- returns False if the iteration over Left terminates without finding any
-- equivalent element in Right.
function Is_Subset (Subset : Set; Of_Set : Set) return Boolean with
Global => null,
Post => Is_Subset'Result = (Model (Subset) <= Model (Of_Set));
-- Iterates over Subset (calling First and Next), calling Find to determine
-- whether the element is in Of_Set. If no equivalent element is found in
-- Of_Set, the operation immediately returns False. The operation returns
-- True if the iteration over Subset terminates without finding an element
-- not in Of_Set (that is, every element in Subset is equivalent to an
-- element in Of_Set).
function First (Container : Set) return Cursor with
Global => null,
Contract_Cases =>
(Length (Container) = 0 =>
First'Result = No_Element,
others =>
Has_Element (Container, First'Result)
and P.Get (Positions (Container), First'Result) = 1);
-- Returns a cursor that designates the first non-empty bucket, by
-- searching from the beginning of the buckets array.
function Next (Container : Set; Position : Cursor) return Cursor with
Global => null,
Pre =>
Has_Element (Container, Position) or else Position = No_Element,
Contract_Cases =>
(Position = No_Element
or else P.Get (Positions (Container), Position) = Length (Container)
=>
Next'Result = No_Element,
others =>
Has_Element (Container, Next'Result)
and then P.Get (Positions (Container), Next'Result) =
P.Get (Positions (Container), Position) + 1);
-- Returns a cursor that designates the node that follows the current one
-- designated by Position. If Position designates the last node in its
-- bucket, the operation calls Hash to compute the index of this bucket,
-- and searches the buckets array for the first non-empty bucket, starting
-- from that index; otherwise, it simply follows the link to the next node
-- in the same bucket.
procedure Next (Container : Set; Position : in out Cursor) with
Global => null,
Pre =>
Has_Element (Container, Position) or else Position = No_Element,
Contract_Cases =>
(Position = No_Element
or else P.Get (Positions (Container), Position) = Length (Container)
=>
Position = No_Element,
others =>
Has_Element (Container, Position)
and then P.Get (Positions (Container), Position) =
P.Get (Positions (Container), Position'Old) + 1);
-- Equivalent to Position := Next (Position)
function Find
(Container : Set;
Item : Element_Type) return Cursor
with
Global => null,
Contract_Cases =>
-- If Item is not contained in Container, Find returns No_Element
(not Contains (Model (Container), Item) =>
Find'Result = No_Element,
-- Otherwise, Find returns a valid cursor in Container
others =>
P.Has_Key (Positions (Container), Find'Result)
and P.Get (Positions (Container), Find'Result) =
Find (Elements (Container), Item)
-- The element designated by the result of Find is Item
and Equivalent_Elements
(Element (Container, Find'Result), Item));
-- Searches for Item in the set. Find calls Hash to determine the item's
-- bucket; if the bucket is not empty, it calls Equivalent_Elements to
-- compare Item to each element in the bucket. If the search succeeds, Find
-- returns a cursor designating the node containing the equivalent element;
-- otherwise, it returns No_Element.
function Contains (Container : Set; Item : Element_Type) return Boolean with
Global => null,
Post => Contains'Result = Contains (Model (Container), Item);
pragma Annotate (GNATprove, Inline_For_Proof, Contains);
function Has_Element (Container : Set; Position : Cursor) return Boolean
with
Global => null,
Post =>
Has_Element'Result = P.Has_Key (Positions (Container), Position);
pragma Annotate (GNATprove, Inline_For_Proof, Has_Element);
function Default_Modulus (Capacity : Count_Type) return Hash_Type with
Global => null;
generic
type Key_Type (<>) is private;
with function Key (Element : Element_Type) return Key_Type;
with function Hash (Key : Key_Type) return Hash_Type;
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
package Generic_Keys with SPARK_Mode is
package Formal_Model with Ghost is
function M_Included_Except
(Left : M.Set;
Right : M.Set;
Key : Key_Type) return Boolean
with
Global => null,
Post =>
M_Included_Except'Result =
(for all E of Left =>
Contains (Right, E)
or Equivalent_Keys (Generic_Keys.Key (E), Key));
end Formal_Model;
use Formal_Model;
function Key (Container : Set; Position : Cursor) return Key_Type with
Global => null,
Post => Key'Result = Key (Element (Container, Position));
pragma Annotate (GNATprove, Inline_For_Proof, Key);
function Element (Container : Set; Key : Key_Type) return Element_Type
with
Global => null,
Pre => Contains (Container, Key),
Post =>
Element'Result = Element (Container, Find (Container, Key));
pragma Annotate (GNATprove, Inline_For_Proof, Element);
procedure Replace
(Container : in out Set;
Key : Key_Type;
New_Item : Element_Type)
with
Global => null,
Pre => Contains (Container, Key),
Post =>
Length (Container) = Length (Container)'Old
-- Key now maps to New_Item
and Element (Container, Key) = New_Item
-- New_Item is contained in Container
and Contains (Model (Container), New_Item)
-- Other elements are preserved
and M_Included_Except
(Model (Container)'Old,
Model (Container),
Key)
and M.Included_Except
(Model (Container),
Model (Container)'Old,
New_Item)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved_Except
(E_Left => Elements (Container)'Old,
E_Right => Elements (Container),
P_Left => Positions (Container)'Old,
P_Right => Positions (Container),
Position => Find (Container, Key))
and Positions (Container) = Positions (Container)'Old;
procedure Exclude (Container : in out Set; Key : Key_Type) with
Global => null,
Post => not Contains (Container, Key),
Contract_Cases =>
-- If Key is not in Container, nothing is changed
(not Contains (Container, Key) =>
Model (Container) = Model (Container)'Old
and Elements (Container) = Elements (Container)'Old
and Positions (Container) = Positions (Container)'Old,
-- Otherwise, Key is removed from Container
others =>
Length (Container) = Length (Container)'Old - 1
-- Other elements are preserved
and Model (Container) <= Model (Container)'Old
and M_Included_Except
(Model (Container)'Old,
Model (Container),
Key)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container),
E_Right => Elements (Container)'Old,
P_Left => Positions (Container),
P_Right => Positions (Container)'Old)
and P.Keys_Included_Except
(Positions (Container)'Old,
Positions (Container),
Find (Container, Key)'Old));
procedure Delete (Container : in out Set; Key : Key_Type) with
Global => null,
Pre => Contains (Container, Key),
Post =>
Length (Container) = Length (Container)'Old - 1
-- Key is no longer in Container
and not Contains (Container, Key)
-- Other elements are preserved
and Model (Container) <= Model (Container)'Old
and M_Included_Except
(Model (Container)'Old,
Model (Container),
Key)
-- Mapping from cursors to elements is preserved
and Mapping_Preserved
(E_Left => Elements (Container),
E_Right => Elements (Container)'Old,
P_Left => Positions (Container),
P_Right => Positions (Container)'Old)
and P.Keys_Included_Except
(Positions (Container)'Old,
Positions (Container),
Find (Container, Key)'Old);
function Find (Container : Set; Key : Key_Type) return Cursor with
Global => null,
Contract_Cases =>
-- If Key is not contained in Container, Find returns No_Element
((for all E of Model (Container) =>
not Equivalent_Keys (Key, Generic_Keys.Key (E))) =>
Find'Result = No_Element,
-- Otherwise, Find returns a valid cursor in Container
others =>
P.Has_Key (Positions (Container), Find'Result)
-- The key designated by the result of Find is Key
and Equivalent_Keys
(Generic_Keys.Key (Container, Find'Result), Key));
function Contains (Container : Set; Key : Key_Type) return Boolean with
Global => null,
Post =>
Contains'Result =
(for some E of Model (Container) =>
Equivalent_Keys (Key, Generic_Keys.Key (E)));
end Generic_Keys;
private
pragma SPARK_Mode (Off);
pragma Inline (Next);
type Node_Type is
record
Element : aliased Element_Type;
Next : Count_Type;
Has_Element : Boolean := False;
end record;
package HT_Types is new
Ada.Containers.Hash_Tables.Generic_Bounded_Hash_Table_Types (Node_Type);
type Set (Capacity : Count_Type; Modulus : Hash_Type) is record
Content : HT_Types.Hash_Table_Type (Capacity, Modulus);
end record;
use HT_Types;
Empty_Set : constant Set := (Capacity => 0, Modulus => 0, others => <>);
end Ada.Containers.Formal_Hashed_Sets;
|
jscparker/math_packages | Ada | 1,162 | adb |
with text_io;
procedure rank_distr is
type Real is digits 15;
L : constant Integer := 61; -- length of vector in bits
k : constant Integer := L; -- no of vectors in matrix whose rank is to be calculated.
Sum, Product : Real;
Prob : array(1..k) of Real := (others => 0.0);
begin
for x in k-7 .. k loop
product := 1.0;
for i in 0 .. x-1 loop
product := product*(1.0 - 2.0**(i-L))*(1.0 - 2.0**(i-k)) / (1.0 - 2.0**(i-x));
end loop;
prob(x) := 2.0**(x*(L + k - x) - L*k) * product;
end loop;
for x in k-7 .. k loop
Sum := 0.0;
for j in x .. k loop
Sum := Sum + Prob(j);
end loop;
end loop;
Sum := 0.0;
for j in k-7 .. k-4 loop
Sum := Sum + Prob(j);
end loop;
text_io.new_line;
text_io.put (Integer'Image(k-4)); text_io.put (Real'Image(Sum));
text_io.new_line;
for x in k-3 .. k loop
text_io.new_line;
text_io.put (Integer'Image(x)); text_io.put (Real'Image (Prob(x)));
--text_io.put (Real'Image(-Log (Prob (x))));
end loop;
text_io.new_line(2);
Sum := 0.0;
for j in k-7 .. k loop
Sum := Sum + Prob(j);
end loop;
text_io.put ("Total probability"); text_io.put (Real'Image(Sum));
end;
|
charlie5/lace | Ada | 1,054 | adb | package body openGL.Conversions
is
function to_Vector_4 (From : in rgba_Color) return Vector_4
is
begin
return [Real (to_Primary (From.Primary.Red)),
Real (to_Primary (From.Primary.Green)),
Real (to_Primary (From.Primary.Blue)),
Real (to_Primary (From.Alpha))];
end to_Vector_4;
function to_Vector_4 (From : in lucid_Color) return Vector_4
is
begin
return [Real (From.Primary.Red),
Real (From.Primary.Green),
Real (From.Primary.Blue),
Real (From.Opacity)];
end to_Vector_4;
function to_Vector_3 (From : in rgb_Color) return Vector_3
is
begin
return [Real (to_Primary (From.Red)),
Real (to_Primary (From.Green)),
Real (to_Primary (From.Blue))];
end to_Vector_3;
function to_Vector_3 (From : in Color) return Vector_3
is
begin
return [Real (From.Red),
Real (From.Green),
Real (From.Blue)];
end to_Vector_3;
end openGL.Conversions;
|
onox/orka | Ada | 2,286 | adb | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2021 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.
package body Orka.SIMD.AVX2.Longs.Shift is
type All_Bits_Count is new Integer range 0 .. 128;
function Shift_All_Bits_Left_Zeros
(Elements : m256l; Bits : All_Bits_Count) return m256l
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_pslldqi256";
-- Shift each bit to the left by the given amount of bits, shifting in zeros
function Shift_All_Bits_Right_Zeros
(Elements : m256l; Bits : All_Bits_Count) return m256l
with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_psrldqi256";
-- Shift each bit to the right by the given amount of bits, shifting in zeros
----------------------------------------------------------------------------
function Shift_Elements_Left_Zeros (Elements : m256l) return m256l is
-- Shifts are done per 128-bit lane, so save Y and store it afterwards in Z
Last_Element_First_Lane : constant Integer_64 := Elements (Y);
begin
return Result : m256l :=
Shift_All_Bits_Left_Zeros (Elements, Integer_64'Size)
do
Result (Z) := Last_Element_First_Lane;
end return;
end Shift_Elements_Left_Zeros;
function Shift_Elements_Right_Zeros (Elements : m256l) return m256l is
-- Shifts are done per 128-bit lane, so save Z and store it afterwards in Y
First_Element_Last_Lane : constant Integer_64 := Elements (Z);
begin
return Result : m256l :=
Shift_All_Bits_Right_Zeros (Elements, Integer_64'Size)
do
Result (Y) := First_Element_Last_Lane;
end return;
end Shift_Elements_Right_Zeros;
end Orka.SIMD.AVX2.Longs.Shift;
|
reznikmm/matreshka | Ada | 3,576 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2018, 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 WUI.Widgets.Spin_Boxes.Generic_Integers;
with WUI.Integer_Slots.Emitters;
package WUI.Widgets.Spin_Boxes.Integers is
new WUI.Widgets.Spin_Boxes.Generic_Integers
(Integer, WUI.Integer_Slots, WUI.Integer_Slots.Emitters);
|
charlie5/cBound | Ada | 1,274 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C.Pointers;
package TensorFlow_C.TF_Output
is
-- Item
--
type Item is record
oper : access TensorFlow_C.TF_Operation;
index : aliased Interfaces.C.int;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C.size_t range <>) of aliased TensorFlow_C.TF_Output.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => TensorFlow_C.TF_Output.Item,
Element_Array => TensorFlow_C.TF_Output.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C.size_t range <>) of aliased TensorFlow_C.TF_Output.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => TensorFlow_C.TF_Output.Pointer,
Element_Array => TensorFlow_C.TF_Output.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end TensorFlow_C.TF_Output;
|
zenharris/ada-bbs | Ada | 2,740 | adb |
-- (The MIT License)
--Copyright (c) 2012 Erik Price
-- 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, 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 AUTHORS OR 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.
package body Irc.Commands is
procedure Install_Commands (Conn : in out Connection) is
begin
-- general commands
Conn.On_Message ("001", Join_On_Ident'Access);
Conn.On_Message ("433", Nick_In_Use'Access);
Conn.On_Message ("PING", Ping_Server'Access);
Conn.On_Regexp (".*", Log_Line'Access);
end Install_Commands;
----------------------------
-- Begin general commands --
----------------------------
procedure Join_On_Ident (Conn : in out Connection;
Msg : IrcMessage) is
Channels : Bot.Unbounded_Vector.Vector
:= Conn.Get_Default_Channels;
begin
for I in Channels.First_Index .. Channels.Last_Index loop
Conn.Join (SU.To_String (Channels.Element (I)));
end loop;
end Join_On_Ident;
procedure Nick_In_Use (Conn : in out Connection;
Msg : IrcMessage) is
use SU;
Attr : Bot.Nick_Attributes := Conn.Get_Attributes;
New_Nick : SU.Unbounded_String := Attr.Nick & "_";
begin
Attr.Nick := New_Nick;
Conn.Command (Cmd => "NICK", Args => SU.To_String (New_Nick));
Conn.Set_Attributes (Attr);
end Nick_In_Use;
procedure Ping_Server (Conn : in out Connection;
Msg : Message.Message) is
begin
Conn.Command (Cmd => "PONG", Args => SU.To_String (Msg.Args));
end Ping_Server;
procedure Log_Line (Conn : in out Connection;
Msg : IrcMessage) is
begin
Msg.Print;
end Log_Line;
end Irc.Commands;
|
wellflat/hello-collection | Ada | 89 | adb | with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put("hello, world");
end Hello;
|
ekoeppen/STM32_Generic_Ada_Drivers | Ada | 583 | adb | with STM32GD.Board; use STM32GD.Board;
with STM32GD.Power; use STM32GD.Power;
procedure Main is
Now : RTC.Date_Time_Type;
Wait_Time : RTC.Second_Delta_Type := 5;
Voltage : Millivolts;
begin
Init;
Text_IO.Put_Line ("Power suppy test starting");
loop
RTC.Read (Now);
LED.Set;
Voltage := Supply_Voltage;
Text_IO.Put ("Supply voltage: "); Text_IO.Put_Integer (Voltage);
Text_IO.New_Line;
LED.Clear;
RTC.Add_Seconds (Now, Wait_Time);
RTC.Set_Alarm (Now);
RTC.Wait_For_Alarm;
end loop;
end Main;
|
reznikmm/matreshka | Ada | 3,709 | 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_Language_Attributes is
pragma Preelaborate;
type ODF_Table_Language_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Table_Language_Attribute_Access is
access all ODF_Table_Language_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Table_Language_Attributes;
|
jhumphry/auto_counters | Ada | 17,864 | adb | -- Auto_Counters_Suite.Refcounted_Flyweights_Tests
-- Unit tests for Auto_Counters Refcounted Flyweights packages
-- Copyright (c) 2016, James Humphry - see LICENSE file for details
with Ada.Containers, Ada.Finalization;
with AUnit.Assertions;
with Basic_Refcounted_Flyweights;
with Protected_Refcounted_Flyweights;
package body Auto_Counters_Suite.Refcounted_Flyweights_Tests is
subtype Hash_Type is Ada.Containers.Hash_Type;
use type Ada.Containers.Hash_Type;
use AUnit.Assertions;
Resources_Released : Natural := 0;
type TestObj is new Ada.Finalization.Controlled with
record
Hash : Hash_Type;
Value : Integer;
end record;
type TestObj_Access is access TestObj;
pragma Warnings (Off, "not dispatching");
function Hash (E : TestObj) return Ada.Containers.Hash_Type is (E.Hash);
pragma Warnings (On, "not dispatching");
overriding procedure Finalize (Object : in out TestObj) is
begin
Resources_Released := Resources_Released + 1;
Object.Hash := 0;
Object.Value := -1;
end Finalize;
package TestObj_Basic_Flyweights is
new Basic_Refcounted_Flyweights(Element => TestObj,
Element_Access => TestObj_Access,
Hash => Hash,
Capacity => 4);
package TestObj_Protected_Flyweights is
new Protected_Refcounted_Flyweights(Element => TestObj,
Element_Access => TestObj_Access,
Hash => Hash,
Capacity => 4);
--------------------
-- Register_Tests --
--------------------
procedure Register_Tests (T: in out Refcounted_Flyweights_Test) is
use AUnit.Test_Cases.Registration;
begin
Register_Routine (T, Check_Basic_Usage'Access,
"Check Basic_Refcounted_Flyweights");
Register_Routine (T, Check_Basic_Refs_Usage'Access,
"Check Basic_Refcounted_Flyweights Element_Refs");
Register_Routine (T, Check_Protected_Usage'Access,
"Check Protected_Refcounted_Flyweights");
Register_Routine (T, Check_Protected_Refs_Usage'Access,
"Check Protected_Refcounted_Flyweights Element_Refs");
end Register_Tests;
----------
-- Name --
----------
function Name (T : Refcounted_Flyweights_Test) return Test_String is
pragma Unreferenced (T);
begin
return Format ("Tests of Refcounted Flyweights packages");
end Name;
------------
-- Set_Up --
------------
procedure Set_Up (T : in out Refcounted_Flyweights_Test) is
begin
null;
end Set_Up;
-----------------------
-- Check_Basic_Usage --
-----------------------
procedure Check_Basic_Usage (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced(T);
use TestObj_Basic_Flyweights;
use type TestObj_Basic_Flyweights.Element_Ptr;
F : aliased Flyweight;
E : TestObj_Access;
P : array (Integer range 0..3) of Element_Ptr;
begin
-- Tests where elements are spread between buckets.
Resources_Released := 0;
for I in 0..3 loop
E := new TestObj'(Ada.Finalization.Controlled with
Hash => Hash_Type(I),
Value => I);
P(I) := Insert_Ptr(F, E);
end loop;
Assert(Resources_Released = 0,
"Resources being released on insertion into an empty Flyweight.");
for I in 0..3 loop
Assert(P(I).Get.Hash = Hash_Type(I) and P(I).Get.Value = I,
"Flyweight not storing values correctly.");
Assert(P(I).P.Hash = Hash_Type(I) and P(I).P.Value = I,
"Flyweight not storing values correctly.");
end loop;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 0);
Q : Element_Ptr := Insert_Ptr(F, E);
pragma Unreferenced(Q);
begin
Assert(Resources_Released = 1,
"Resources not being released on inserting duplicate " &
"resource into Flyweight.");
end;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 1);
R : Element_Ptr;
pragma Unreferenced (R);
begin
R := Insert_Ptr(F, E);
Assert(Resources_Released = 0,
"Resources being released on inserting resource into " &
"Flyweight despite it not being a duplicate.");
end;
Assert(Resources_Released = 1,
"Resources not being released when last pointer is destroyed.");
Resources_Released := 0;
declare
E : TestObj_Access := P(1).Get;
Q : constant Element_Ptr := Insert_Ptr(F, E);
begin
Assert(E = P(1).Get,
"Inserting an access value that is already in the Flyweight " &
"changes the access value unnecessarily.");
Assert(Q = P(1),
"Inserting an access value that is already in the Flyweight " &
"does not return the same Element_Ptr as already exists.");
Assert(Resources_Released = 0,
"Inserting an access value that is already in the Flyweight " &
"deallocates the object.");
end;
-- Tests where all values hit same hash bucket
for I in 0..3 loop
E := new TestObj'(Ada.Finalization.Controlled with
Hash => 0,
Value => I);
P(I) := Insert_Ptr(F, E);
end loop;
for I in 0..3 loop
Assert(P(I).P.Hash = 0 and P(I).P.Value = I,
"Flyweight not storing values correctly.");
end loop;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 0);
Q : Element_Ptr := Insert_Ptr(F, E);
pragma Unreferenced(Q);
begin
Assert(Resources_Released = 1,
"Resources not being released on inserting duplicate " &
"resource into Flyweight.");
end;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 4);
R : Element_Ptr;
pragma Unreferenced (R);
begin
R := Insert_Ptr(F, E);
Assert(Resources_Released = 0,
"Resources being released on inserting resource into " &
"Flyweight despite it not being a duplicate.");
end;
Assert(Resources_Released = 1,
"Resources not being released when last pointer is destroyed.");
Resources_Released := 0;
declare
E : TestObj_Access := P(1).Get;
Q : constant Element_Ptr := Insert_Ptr(F, E);
begin
Assert(E = P(1).Get,
"Inserting an access value that is already in the Flyweight " &
"changes the access value unnecessarily.");
Assert(Q = P(1),
"Inserting an access value that is already in the Flyweight " &
"does not return the same Element_Ptr as already exists.");
Assert(Resources_Released = 0,
"Inserting an access value that is already in the Flyweight " &
"deallocates the object.");
end;
end Check_Basic_Usage;
----------------------------
-- Check_Basic_Refs_Usage --
----------------------------
procedure Check_Basic_Refs_Usage (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced(T);
use TestObj_Basic_Flyweights;
F : aliased Flyweight;
begin
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 0);
P1 : constant Element_Ptr := Insert_Ptr(F, E);
R1 : constant Element_Ref := Make_Ref(P1);
begin
Assert(P1.Get = R1.Get,
"Element_Ref created from Element_Ptr does not point to the" &
"same value");
Assert(P1.Get.all = R1,
"Element_Ref created from Element_Ptr does not dereference to " &
"the same value");
end;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 1,
Value => 1);
R2 : constant Element_Ref := Insert_Ref(F, E);
P2 : constant Element_Ptr := Make_Ptr(R2);
begin
Assert(P2.Get = R2.Get,
"Element_Ptr created from Element_Ref does not point to the" &
"same value");
Assert(P2.Get.all = R2,
"Element_Ptr created from Element_Ref does not dereference to " &
"the same value");
end;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 4);
R : Element_Ref := Insert_Ref(F, E);
pragma Unreferenced (R);
begin
Assert(Resources_Released = 0,
"Resources being released on inserting resource into " &
"Flyweight despite it not being a duplicate.");
end;
Assert(Resources_Released = 1,
"Resources not being released when last Element_Ref is destroyed.");
end Check_Basic_Refs_Usage;
---------------------------
-- Check_Protected_Usage --
---------------------------
procedure Check_Protected_Usage (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced(T);
use TestObj_Protected_Flyweights;
use type TestObj_Protected_Flyweights.Element_Ptr;
F : aliased Flyweight;
E : TestObj_Access;
P : array (Integer range 0..3) of Element_Ptr;
begin
-- Tests where elements are spread between buckets.
Resources_Released := 0;
for I in 0..3 loop
E := new TestObj'(Ada.Finalization.Controlled with
Hash => Hash_Type(I),
Value => I);
P(I) := Insert_Ptr(F, E);
end loop;
Assert(Resources_Released = 0,
"Resources being released on insertion into an empty Flyweight.");
for I in 0..3 loop
Assert(P(I).Get.Hash = Hash_Type(I) and P(I).Get.Value = I,
"Flyweight not storing values correctly.");
Assert(P(I).P.Hash = Hash_Type(I) and P(I).P.Value = I,
"Flyweight not storing values correctly.");
end loop;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 0);
Q : Element_Ptr := Insert_Ptr(F, E);
pragma Unreferenced(Q);
begin
Assert(Resources_Released = 1,
"Resources not being released on inserting duplicate " &
"resource into Flyweight.");
end;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 1);
R : Element_Ptr;
pragma Unreferenced (R);
begin
R := Insert_Ptr(F, E);
Assert(Resources_Released = 0,
"Resources being released on inserting resource into " &
"Flyweight despite it not being a duplicate.");
end;
Assert(Resources_Released = 1,
"Resources not being released when last pointer is destroyed.");
Resources_Released := 0;
declare
E : TestObj_Access := P(1).Get;
Q : constant Element_Ptr := Insert_Ptr(F, E);
begin
Assert(E = P(1).Get,
"Inserting an access value that is already in the Flyweight " &
"changes the access value unnecessarily.");
Assert(Q = P(1),
"Inserting an access value that is already in the Flyweight " &
"does not return the same Element_Ptr as already exists.");
Assert(Resources_Released = 0,
"Inserting an access value that is already in the Flyweight " &
"deallocates the object.");
end;
-- Tests where all values hit same hash bucket
for I in 0..3 loop
E := new TestObj'(Ada.Finalization.Controlled with
Hash => 0,
Value => I);
P(I) := Insert_Ptr(F, E);
end loop;
for I in 0..3 loop
Assert(P(I).P.Hash = 0 and P(I).P.Value = I,
"Flyweight not storing values correctly.");
end loop;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 0);
Q : Element_Ptr := Insert_Ptr(F, E);
pragma Unreferenced(Q);
begin
Assert(Resources_Released = 1,
"Resources not being released on inserting duplicate " &
"resource into Flyweight.");
end;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 4);
R : Element_Ptr;
pragma Unreferenced (R);
begin
R := Insert_Ptr(F, E);
Assert(Resources_Released = 0,
"Resources being released on inserting resource into " &
"Flyweight despite it not being a duplicate.");
end;
Assert(Resources_Released = 1,
"Resources not being released when last pointer is destroyed.");
Resources_Released := 0;
declare
E : TestObj_Access := P(1).Get;
Q : constant Element_Ptr := Insert_Ptr(F, E);
begin
Assert(E = P(1).Get,
"Inserting an access value that is already in the Flyweight " &
"changes the access value unnecessarily.");
Assert(Q = P(1),
"Inserting an access value that is already in the Flyweight " &
"does not return the same Element_Ptr as already exists.");
Assert(Resources_Released = 0,
"Inserting an access value that is already in the Flyweight " &
"deallocates the object.");
end;
end Check_Protected_Usage;
--------------------------------
-- Check_Protected_Refs_Usage --
--------------------------------
procedure Check_Protected_Refs_Usage (T : in out Test_Cases.Test_Case'Class) is
pragma Unreferenced(T);
use TestObj_Protected_Flyweights;
F : aliased Flyweight;
begin
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 0);
P1 : constant Element_Ptr := Insert_Ptr(F, E);
R1 : constant Element_Ref := Make_Ref(P1);
begin
Assert(P1.Get = R1.Get,
"Element_Ref created from Element_Ptr does not point to the" &
"same value");
Assert(P1.Get.all = R1,
"Element_Ref created from Element_Ptr does not dereference to " &
"the same value");
end;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 1,
Value => 1);
R2 : constant Element_Ref := Insert_Ref(F, E);
P2 : constant Element_Ptr := Make_Ptr(R2);
begin
Assert(P2.Get = R2.Get,
"Element_Ptr created from Element_Ref does not point to the" &
"same value");
Assert(P2.Get.all = R2,
"Element_Ptr created from Element_Ref does not dereference to " &
"the same value");
end;
Resources_Released := 0;
declare
E : TestObj_Access := new TestObj'(Ada.Finalization.Controlled
with Hash => 0,
Value => 4);
R : Element_Ref := Insert_Ref(F, E);
pragma Unreferenced (R);
begin
Assert(Resources_Released = 0,
"Resources being released on inserting resource into " &
"Flyweight despite it not being a duplicate.");
end;
Assert(Resources_Released = 1,
"Resources not being released when last Element_Ref is destroyed.");
end Check_Protected_Refs_Usage;
end Auto_Counters_Suite.Refcounted_Flyweights_Tests;
|
AaronC98/PlaneSystem | Ada | 7,729 | adb | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2000-2015, 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 --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- 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/>. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
------------------------------------------------------------------------------
with SOAP.Types;
package body SOAP.Message is
----------------
-- Name_Space --
----------------
function Name_Space (M : Object'Class) return SOAP.Name_Space.Object is
begin
return M.Name_Space;
end Name_Space;
----------------
-- Parameters --
----------------
function Parameters (M : Object'Class) return SOAP.Parameters.List is
begin
return M.P;
end Parameters;
--------------------
-- Set_Name_Space --
--------------------
procedure Set_Name_Space
(M : in out Object'Class;
NS : SOAP.Name_Space.Object) is
begin
M.Name_Space := NS;
end Set_Name_Space;
--------------------
-- Set_Parameters --
--------------------
procedure Set_Parameters
(M : in out Object'Class;
P_Set : SOAP.Parameters.List) is
begin
M.P := P_Set;
end Set_Parameters;
----------------------
-- Set_Wrapper_Name --
----------------------
procedure Set_Wrapper_Name
(M : in out Object'Class;
Name : String) is
begin
M.Wrapper_Name := To_Unbounded_String (Name);
end Set_Wrapper_Name;
------------------
-- Wrapper_Name --
------------------
function Wrapper_Name (M : Object'Class) return String is
begin
return To_String (M.Wrapper_Name);
end Wrapper_Name;
---------------
-- XML_Image --
---------------
function XML_Image
(M : Object;
Schema : WSDL.Schema.Definition := WSDL.Schema.Empty)
return Unbounded_String
is
use type WSDL.Schema.Binding_Style;
procedure Add_Namespace (NS : SOAP.Name_Space.Object);
procedure Add_Namespaces (O : Types.Object'Class);
-- Add name space reference into Message_Header
New_Line : constant String := ASCII.CR & ASCII.LF;
NS : constant SOAP.Name_Space.Object := Name_Space (M);
NS_Name : constant String :=
SOAP.Name_Space.Name (NS);
Encoding : constant Types.Encoding_Style :=
WSDL.Schema.Get_Encoding_Style
(Schema, To_String (M.Wrapper_Name));
Style : constant WSDL.Schema.Binding_Style :=
WSDL.Schema.Get_Binding_Style (Schema);
Message_Header : Unbounded_String;
Message_Body : Unbounded_String;
Message_NS : Unbounded_String;
--------------------
-- Add_Namespaces --
--------------------
procedure Add_Namespace (NS : SOAP.Name_Space.Object) is
use SOAP.Name_Space;
begin
if NS /= No_Name_Space
and then NS /= SOAP.Name_Space.AWS
and then Index
(Message_NS, ':' & SOAP.Name_Space.Name (NS) & '=') = 0
then
if Message_NS /= Null_Unbounded_String then
Append (Message_NS, New_Line);
end if;
Append (Message_NS, " " & Image (NS));
end if;
end Add_Namespace;
--------------------
-- Add_Namespaces --
--------------------
procedure Add_Namespaces (O : Types.Object'Class) is
use SOAP.Types;
NS : constant SOAP.Name_Space.Object := Types.Name_Space (O);
begin
Add_Namespace (NS);
-- If this is a composite object, check components
if O in Types.Composite'Class then
declare
OS : constant Object_Set := V (Composite'Class (O));
begin
for K in OS'Range loop
Add_Namespaces (-OS (K));
end loop;
end;
end if;
end Add_Namespaces;
begin
-- Procedure
-- We are called with the Body node opened
if Style = WSDL.Schema.RPC then
Append (Message_Header, '>' & New_Line);
Append (Message_Header, '<');
if NS_Name /= "" then
Append (Message_Header, NS_Name & ':');
end if;
Append (Message_Header, Wrapper_Name (M));
else
-- Namespaces are to be put into the Body node
Append (Message_Header, New_Line);
end if;
if SOAP.Name_Space.Value (NS) /= "" then
Append (Message_NS, " xmlns");
if NS_Name /= "" then
Append (Message_NS, ":" & NS_Name);
end if;
Append
(Message_NS,
"=""" & SOAP.Name_Space.Value (NS) & """");
end if;
-- Procedure's parameters
declare
P : constant SOAP.Parameters.List := Parameters (M);
begin
for K in 1 .. SOAP.Parameters.Argument_Count (P) loop
Add_Namespaces (SOAP.Parameters.Argument (P, K));
Types.XML_Image
(SOAP.Parameters.Argument (P, K), Message_Body,
Encoding, Schema);
Append (Message_Body, New_Line);
end loop;
-- User's Namespaces
for K in 1 .. M.Index loop
Add_Namespace (M.Users_NS (K));
end loop;
end;
Append (Message_NS, ">" & New_Line);
-- Close payload objects
if Style = WSDL.Schema.RPC then
Append (Message_Body, "</");
if NS_Name /= "" then
Append (Message_Body, NS_Name & ':');
end if;
Append (Message_Body, Wrapper_Name (M));
Append (Message_Body, ">" & New_Line);
end if;
return Message_Header & Message_NS & Message_Body;
end XML_Image;
end SOAP.Message;
|
optikos/oasis | Ada | 2,091 | ads | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Declarations;
with Program.Elements.Defining_Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Aspect_Specifications;
package Program.Elements.Exception_Declarations is
pragma Pure (Program.Elements.Exception_Declarations);
type Exception_Declaration is
limited interface and Program.Elements.Declarations.Declaration;
type Exception_Declaration_Access is access all Exception_Declaration'Class
with Storage_Size => 0;
not overriding function Names
(Self : Exception_Declaration)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access is abstract;
not overriding function Aspects
(Self : Exception_Declaration)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access is abstract;
type Exception_Declaration_Text is limited interface;
type Exception_Declaration_Text_Access is
access all Exception_Declaration_Text'Class with Storage_Size => 0;
not overriding function To_Exception_Declaration_Text
(Self : aliased in out Exception_Declaration)
return Exception_Declaration_Text_Access is abstract;
not overriding function Colon_Token
(Self : Exception_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Exception_Token
(Self : Exception_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function With_Token
(Self : Exception_Declaration_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Semicolon_Token
(Self : Exception_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.Exception_Declarations;
|
DrenfongWong/tkm-rpc | Ada | 1,634 | adb | with Tkmrpc.Servers.Ike;
with Tkmrpc.Results;
with Tkmrpc.Request.Ike.Esa_Create_First.Convert;
with Tkmrpc.Response.Ike.Esa_Create_First.Convert;
package body Tkmrpc.Operation_Handlers.Ike.Esa_Create_First is
-------------------------------------------------------------------------
procedure Handle (Req : Request.Data_Type; Res : out Response.Data_Type) is
Specific_Req : Request.Ike.Esa_Create_First.Request_Type;
Specific_Res : Response.Ike.Esa_Create_First.Response_Type;
begin
Specific_Res := Response.Ike.Esa_Create_First.Null_Response;
Specific_Req :=
Request.Ike.Esa_Create_First.Convert.From_Request (S => Req);
if Specific_Req.Data.Esa_Id'Valid and
Specific_Req.Data.Isa_Id'Valid and
Specific_Req.Data.Sp_Id'Valid and
Specific_Req.Data.Ea_Id'Valid and
Specific_Req.Data.Esp_Spi_Loc'Valid and
Specific_Req.Data.Esp_Spi_Rem'Valid
then
Servers.Ike.Esa_Create_First
(Result => Specific_Res.Header.Result,
Esa_Id => Specific_Req.Data.Esa_Id,
Isa_Id => Specific_Req.Data.Isa_Id,
Sp_Id => Specific_Req.Data.Sp_Id,
Ea_Id => Specific_Req.Data.Ea_Id,
Esp_Spi_Loc => Specific_Req.Data.Esp_Spi_Loc,
Esp_Spi_Rem => Specific_Req.Data.Esp_Spi_Rem);
Res :=
Response.Ike.Esa_Create_First.Convert.To_Response
(S => Specific_Res);
else
Res.Header.Result := Results.Invalid_Parameter;
end if;
end Handle;
end Tkmrpc.Operation_Handlers.Ike.Esa_Create_First;
|
zhmu/ananas | Ada | 2,596 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ L L I --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This package does not require a body, since it is an instantiation. We
-- provide a dummy file containing a No_Body pragma so that previous versions
-- of the body (which did exist) will not interfere.
pragma No_Body;
|
reznikmm/gela | Ada | 1,031 | ads | ------------------------------------------------------------------------------
-- G E L A G R A M M A R S --
-- Library for dealing with tests for for Gela project, --
-- a portable Ada compiler --
-- http://gela.ada-ru.org/ --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license in gela.ads file --
------------------------------------------------------------------------------
with League.Strings;
package Gela.Test_Tools is
function Read_File
(File_Name : League.Strings.Universal_String)
return League.Strings.Universal_String;
function Read_File
(File_Name : String) return League.Strings.Universal_String;
procedure Write_File
(File : League.Strings.Universal_String;
Text : League.Strings.Universal_String);
end Gela.Test_Tools;
|
tum-ei-rcs/StratoX | Ada | 13,394 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T A G S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- 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. --
-- --
-- --
-- --
-- --
-- --
-- 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 is the HI-E version of this file. It provides full object oriented
-- semantics (including dynamic dispatching and support for abstract
-- interface types), assuming that tagged types are declared at the library
-- level. Some functionality has been removed in order to simplify this
-- run-time unit. Compared to the full version of this package, the following
-- subprograms have been removed:
-- Internal_Tag, Register_Tag, Descendant_Tag, Is_Descendant_At_Same_Level:
-- These subprograms are used for cross-referencing the external and
-- internal representation of tags. The implementation of these routines
-- was considered neither simple nor esential for this restricted run-time,
-- and hence these functions were removed.
-- Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind, Get_Tagged_Kind,
-- SSD, Set_Entry_Index, Set_Prim_Op_Kind, OSD: They are used with types
-- that implement limited interfaces and are only invoked when there are
-- selective waits and ATC's where the trigger is a call to an interface
-- operation. These functions have been removed because selective waits
-- and ATC's are not supported by the restricted run-time.
-- Displace, IW_Membership, Offset_To_Top, Set_Dynamic_Offset_To_Top,
-- Base_Address, Register_Interface_Offset: They are used with extended
-- support for interface types that is not part of the zfp runtime
-- (membership test applied to interfaces, tagged types with variable
-- size components covering interfaces, explicit dereference through
-- access to interfaces, and unchecked deallocation through access to
-- interfaces).
-- The operations in this package provide the guarantee that all
-- dispatching calls on primitive operations of tagged types and
-- interfaces take constant time (in terms of source lines executed),
-- that is to say, the cost of these calls is independent of the number
-- of primitives of the type or interface, and independent of the number
-- of ancestors or interface progenitors that a tagged type may have.
with System;
with System.Storage_Elements;
package Ada.Tags is
pragma Preelaborate;
-- In accordance with Ada 2005 AI-362
type Tag is private;
pragma Preelaborable_Initialization (Tag);
No_Tag : constant Tag;
function Expanded_Name (T : Tag) return String;
function External_Tag (T : Tag) return String;
function Parent_Tag (T : Tag) return Tag;
pragma Ada_05 (Parent_Tag);
Tag_Error : exception;
private
-- Structure of the GNAT Primary Dispatch Table
-- +--------------------+
-- | Predef_Prims ---------------------------> +------------+
-- +--------------------+ | table of |
-- |Typeinfo_Ptr/TSD_Ptr --> Type Specific Data | predefined |
-- Tag --> +--------------------+ +-------------------+ | primitives |
-- | table of | | inheritance depth | +------------+
-- : primitive ops : +-------------------+
-- | pointers | | access level |
-- +--------------------+ +-------------------+
-- | alignment |
-- +-------------------+
-- | expanded name |
-- +-------------------+
-- | external tag |
-- +-------------------+
-- | hash table link |
-- +-------------------+
-- | transportable |
-- +-------------------+
-- | needs finalization|
-- +-------------------+
-- | table of |
-- : ancestor :
-- | tags |
-- +-------------------+
-- The runtime information kept for each tagged type is separated into
-- three objects: the Dispatch Table of predefined primitives, the dispatch
-- table of user-defined primitives and the Type_Specific_Data record.
package SSE renames System.Storage_Elements;
subtype Cstring is String (Positive);
type Cstring_Ptr is access all Cstring;
pragma No_Strict_Aliasing (Cstring_Ptr);
type Tag_Table is array (Natural range <>) of Tag;
type Prim_Ptr is access procedure;
type Address_Array is array (Positive range <>) of Prim_Ptr;
subtype Dispatch_Table is Address_Array (1 .. 1);
-- Used by GDB to identify the _tags and traverse the run-time structure
-- associated with tagged types. For compatibility with older versions of
-- gdb, its name must not be changed.
type Tag is access all Dispatch_Table;
pragma No_Strict_Aliasing (Tag);
type Interface_Tag is access all Dispatch_Table;
No_Tag : constant Tag := null;
-- The expander ensures that Tag objects reference the Prims_Ptr component
-- of the wrapper.
type Tag_Ptr is access all Tag;
pragma No_Strict_Aliasing (Tag_Ptr);
type Offset_To_Top_Ptr is access all SSE.Storage_Offset;
pragma No_Strict_Aliasing (Offset_To_Top_Ptr);
type Type_Specific_Data (Idepth : Natural) is record
-- Inheritance Depth Level: Used to implement the membership test
-- associated with single inheritance of tagged types in constant-time.
-- It also indicates the size of the Tags_Table component.
Access_Level : Natural;
-- Accessibility level required to give support to Ada 2005 nested type
-- extensions. This feature allows safe nested type extensions by
-- shifting the accessibility checks to certain operations, rather than
-- being enforced at the type declaration. In particular, by performing
-- run-time accessibility checks on class-wide allocators, class-wide
-- function return, and class-wide stream I/O, the danger of objects
-- outliving their type declaration can be eliminated (Ada 2005: AI-344)
Alignment : Natural;
Expanded_Name : Cstring_Ptr;
External_Tag : Cstring_Ptr;
HT_Link : Tag_Ptr;
-- Components used to support to the Ada.Tags subprograms in ARM 3.9
-- Note: Expanded_Name is referenced by GDB to determine the actual name
-- of the tagged type. Its requirements are: 1) it must have this exact
-- name, and 2) its contents must point to a C-style Nul terminated
-- string containing its expanded name. GDB has no requirement on a
-- given position inside the record.
Transportable : Boolean;
-- Used to check RM E.4(18), set for types that satisfy the requirements
-- for being used in remote calls as actuals for classwide formals or as
-- return values for classwide functions.
Needs_Finalization : Boolean;
-- Used to dynamically check whether an object is controlled or not
Tags_Table : Tag_Table (0 .. Idepth);
-- Table of ancestor tags. Its size actually depends on the inheritance
-- depth level of the tagged type.
end record;
type Type_Specific_Data_Ptr is access all Type_Specific_Data;
pragma No_Strict_Aliasing (Type_Specific_Data_Ptr);
type Dispatch_Table_Wrapper (Num_Prims : Natural) is record
Predef_Prims : System.Address;
-- Pointer to the dispatch table of predefined Ada primitives
-- According to the C++ ABI the components Offset_To_Top and TSD are
-- stored just "before" the dispatch table (that is, the Prims_Ptr
-- table), and they are referenced with negative offsets referring to
-- the base of the dispatch table. The _Tag (or the VTable_Ptr in C++
-- terminology) must point to the base of the virtual table, just after
-- these components, to point to the Prims_Ptr table.
Offset_To_Top : SSE.Storage_Offset;
TSD : System.Address;
Prims_Ptr : Address_Array (1 .. Num_Prims);
-- The size of the Prims_Ptr array actually depends on the tagged type
-- to which it applies. For each tagged type, the expander computes the
-- actual array size, allocates the Dispatch_Table record accordingly.
end record;
-- The following type declaration is used by the compiler when the program
-- is compiled with restriction No_Dispatching_Calls
type No_Dispatch_Table_Wrapper is record
NDT_TSD : System.Address;
NDT_Prims_Ptr : Natural;
end record;
DT_Predef_Prims_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(1 * (Standard'Address_Size /
System.Storage_Unit));
-- Size of the Predef_Prims field of the Dispatch_Table
DT_Offset_To_Top_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(1 * (Standard'Address_Size /
System.Storage_Unit));
-- Size of the Offset_To_Top field of the Dispatch Table
DT_Typeinfo_Ptr_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(1 * (Standard'Address_Size /
System.Storage_Unit));
-- Size of the Typeinfo_Ptr field of the Dispatch Table
use type System.Storage_Elements.Storage_Offset;
DT_Offset_To_Top_Offset : constant SSE.Storage_Count :=
DT_Typeinfo_Ptr_Size
+ DT_Offset_To_Top_Size;
DT_Predef_Prims_Offset : constant SSE.Storage_Count :=
DT_Typeinfo_Ptr_Size
+ DT_Offset_To_Top_Size
+ DT_Predef_Prims_Size;
-- Offset from Prims_Ptr to Predef_Prims component
Max_Predef_Prims : constant Positive := 9;
-- Number of reserved slots for predefined ada primitives: Size, Read,
-- Write, Input, Output, "=", assignment, deep adjust, and deep finalize.
-- The compiler checks that this value is correct.
subtype Predef_Prims_Table is Address_Array (1 .. Max_Predef_Prims);
type Predef_Prims_Table_Ptr is access Predef_Prims_Table;
pragma No_Strict_Aliasing (Predef_Prims_Table_Ptr);
type Addr_Ptr is access System.Address;
pragma No_Strict_Aliasing (Addr_Ptr);
end Ada.Tags;
|
reznikmm/matreshka | Ada | 3,984 | 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.
------------------------------------------------------------------------------
-- See Annex A.
------------------------------------------------------------------------------
with AMF.UMLDI.UML_Structure_Diagrams;
package AMF.UMLDI.UML_Package_Diagrams is
pragma Preelaborate;
type UMLDI_UML_Package_Diagram is limited interface
and AMF.UMLDI.UML_Structure_Diagrams.UMLDI_UML_Structure_Diagram;
type UMLDI_UML_Package_Diagram_Access is
access all UMLDI_UML_Package_Diagram'Class;
for UMLDI_UML_Package_Diagram_Access'Storage_Size use 0;
end AMF.UMLDI.UML_Package_Diagrams;
|
ekoeppen/STM32_Generic_Ada_Drivers | Ada | 3,527 | ads | pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32L0x3.svd
pragma Restrictions (No_Elaboration_Code);
with System;
package STM32_SVD.WWDG is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_T_Field is STM32_SVD.UInt7;
subtype CR_WDGA_Field is STM32_SVD.Bit;
-- Control register
type CR_Register is record
-- 7-bit counter (MSB to LSB)
T : CR_T_Field := 16#7F#;
-- Activation bit
WDGA : CR_WDGA_Field := 16#0#;
-- unspecified
Reserved_8_31 : STM32_SVD.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
T at 0 range 0 .. 6;
WDGA at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CFR_W_Field is STM32_SVD.UInt7;
-- CFR_WDGTB array element
subtype CFR_WDGTB_Element is STM32_SVD.Bit;
-- CFR_WDGTB array
type CFR_WDGTB_Field_Array is array (0 .. 1) of CFR_WDGTB_Element
with Component_Size => 1, Size => 2;
-- Type definition for CFR_WDGTB
type CFR_WDGTB_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- WDGTB as a value
Val : STM32_SVD.UInt2;
when True =>
-- WDGTB as an array
Arr : CFR_WDGTB_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for CFR_WDGTB_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
subtype CFR_EWI_Field is STM32_SVD.Bit;
-- Configuration register
type CFR_Register is record
-- 7-bit window value
W : CFR_W_Field := 16#7F#;
-- WDGTB0
WDGTB : CFR_WDGTB_Field := (As_Array => False, Val => 16#0#);
-- Early wakeup interrupt
EWI : CFR_EWI_Field := 16#0#;
-- unspecified
Reserved_10_31 : STM32_SVD.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CFR_Register use record
W at 0 range 0 .. 6;
WDGTB at 0 range 7 .. 8;
EWI at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype SR_EWIF_Field is STM32_SVD.Bit;
-- Status register
type SR_Register is record
-- Early wakeup interrupt flag
EWIF : SR_EWIF_Field := 16#0#;
-- unspecified
Reserved_1_31 : STM32_SVD.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
EWIF at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- System window watchdog
type WWDG_Peripheral is record
-- Control register
CR : aliased CR_Register;
-- Configuration register
CFR : aliased CFR_Register;
-- Status register
SR : aliased SR_Register;
end record
with Volatile;
for WWDG_Peripheral use record
CR at 16#0# range 0 .. 31;
CFR at 16#4# range 0 .. 31;
SR at 16#8# range 0 .. 31;
end record;
-- System window watchdog
WWDG_Periph : aliased WWDG_Peripheral
with Import, Address => WWDG_Base;
end STM32_SVD.WWDG;
|
glencornell/ada-object-framework | Ada | 838 | ads | with Aof.Core.Objects;
with Widgets;
with Labels;
package My_Objects is
Top : aliased Widgets.Widget;
Form : aliased Widgets.Widget;
Label : aliased Labels.Label;
Row_Column_Layout : aliased Widgets.Widget;
Ok : aliased Widgets.Widget;
Cancel : aliased Widgets.Widget;
Top_Ptr : Aof.Core.Objects.Access_Object := Top'Access;
Form_Ptr : Aof.Core.Objects.Access_Object := Form'Access;
Label_Ptr : Aof.Core.Objects.Access_Object := Label'Access;
Row_Column_Layout_Ptr : Aof.Core.Objects.Access_Object := Row_Column_Layout'Access;
Ok_Ptr : Aof.Core.Objects.Access_Object := Ok'Access;
Cancel_Ptr : Aof.Core.Objects.Access_Object := Cancel'Access;
end My_Objects;
|
reznikmm/matreshka | Ada | 5,229 | 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.Generic_Collections;
package AMF.UML.Create_Link_Actions.Collections is
pragma Preelaborate;
package UML_Create_Link_Action_Collections is
new AMF.Generic_Collections
(UML_Create_Link_Action,
UML_Create_Link_Action_Access);
type Set_Of_UML_Create_Link_Action is
new UML_Create_Link_Action_Collections.Set with null record;
Empty_Set_Of_UML_Create_Link_Action : constant Set_Of_UML_Create_Link_Action;
type Ordered_Set_Of_UML_Create_Link_Action is
new UML_Create_Link_Action_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Create_Link_Action : constant Ordered_Set_Of_UML_Create_Link_Action;
type Bag_Of_UML_Create_Link_Action is
new UML_Create_Link_Action_Collections.Bag with null record;
Empty_Bag_Of_UML_Create_Link_Action : constant Bag_Of_UML_Create_Link_Action;
type Sequence_Of_UML_Create_Link_Action is
new UML_Create_Link_Action_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Create_Link_Action : constant Sequence_Of_UML_Create_Link_Action;
private
Empty_Set_Of_UML_Create_Link_Action : constant Set_Of_UML_Create_Link_Action
:= (UML_Create_Link_Action_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Create_Link_Action : constant Ordered_Set_Of_UML_Create_Link_Action
:= (UML_Create_Link_Action_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Create_Link_Action : constant Bag_Of_UML_Create_Link_Action
:= (UML_Create_Link_Action_Collections.Bag with null record);
Empty_Sequence_Of_UML_Create_Link_Action : constant Sequence_Of_UML_Create_Link_Action
:= (UML_Create_Link_Action_Collections.Sequence with null record);
end AMF.UML.Create_Link_Actions.Collections;
|
ScottWLoyd/ada_dynamic_libs | Ada | 517 | ads | -- @TODO: do we need to create a seperate spec file which imports these as stated here:
-- https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gnat_ugn_unw/Creating-a-Spec-for-Ada-DLLs.html#Creating-a-Spec-for-Ada-DLLs
package my_lib is
procedure Do_Stuff;
-- procedure Initialize_API;
-- procedure Finalize_API;
-- This should be unncessary for Ada-Ada dynamic loading
-- Eff it, do it anyways
private
pragma Export(C, Do_Stuff);
-- pragma Export(C, Initialize_API);
-- pragma Export(C, Finalize_API);
end my_lib; |
reznikmm/matreshka | Ada | 48,663 | 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$
------------------------------------------------------------------------------
with AMF.Internals.UML_Classes;
with AMF.String_Collections;
with AMF.UML.Actions.Collections;
with AMF.UML.Behavioral_Features;
with AMF.UML.Behaviored_Classifiers;
with AMF.UML.Behaviors.Collections;
with AMF.UML.Classes.Collections;
with AMF.UML.Classifier_Template_Parameters;
with AMF.UML.Classifiers.Collections;
with AMF.UML.Collaboration_Uses.Collections;
with AMF.UML.Connectable_Elements.Collections;
with AMF.UML.Connectors.Collections;
with AMF.UML.Constraints.Collections;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Element_Imports.Collections;
with AMF.UML.Extensions.Collections;
with AMF.UML.Features.Collections;
with AMF.UML.Gates.Collections;
with AMF.UML.General_Orderings.Collections;
with AMF.UML.Generalization_Sets.Collections;
with AMF.UML.Generalizations.Collections;
with AMF.UML.Interaction_Fragments.Collections;
with AMF.UML.Interaction_Operands;
with AMF.UML.Interactions;
with AMF.UML.Interface_Realizations.Collections;
with AMF.UML.Lifelines.Collections;
with AMF.UML.Messages.Collections;
with AMF.UML.Named_Elements.Collections;
with AMF.UML.Namespaces;
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.Parameter_Sets.Collections;
with AMF.UML.Parameterable_Elements.Collections;
with AMF.UML.Parameters.Collections;
with AMF.UML.Ports.Collections;
with AMF.UML.Properties.Collections;
with AMF.UML.Receptions.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;
package AMF.Internals.UML_Interactions is
type UML_Interaction_Proxy is
limited new AMF.Internals.UML_Classes.UML_Class_Proxy
and AMF.UML.Interactions.UML_Interaction with null record;
overriding function Get_Action
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Actions.Collections.Set_Of_UML_Action;
-- Getter of Interaction::action.
--
-- Actions owned by the Interaction.
overriding function Get_Formal_Gate
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Gates.Collections.Set_Of_UML_Gate;
-- Getter of Interaction::formalGate.
--
-- Specifies the gates that form the message interface between this
-- Interaction and any InteractionUses which reference it.
overriding function Get_Fragment
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Interaction_Fragments.Collections.Ordered_Set_Of_UML_Interaction_Fragment;
-- Getter of Interaction::fragment.
--
-- The ordered set of fragments in the Interaction.
overriding function Get_Lifeline
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline;
-- Getter of Interaction::lifeline.
--
-- Specifies the participants in this Interaction.
overriding function Get_Message
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Messages.Collections.Set_Of_UML_Message;
-- Getter of Interaction::message.
--
-- The Messages contained in this Interaction.
overriding function Get_Context
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access;
-- Getter of Behavior::context.
--
-- The classifier that is the context for the execution of the behavior.
-- If the behavior is owned by a BehavioredClassifier, that classifier is
-- the context. Otherwise, the context is the first BehavioredClassifier
-- reached by following the chain of owner relationships. For example,
-- following this algorithm, the context of an entry action in a state
-- machine is the classifier that owns the state machine. The features of
-- the context classifier as well as the elements visible to the context
-- classifier are visible to the behavior.
overriding function Get_Is_Reentrant
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Getter of Behavior::isReentrant.
--
-- Tells whether the behavior can be invoked while it is still executing
-- from a previous invocation.
overriding procedure Set_Is_Reentrant
(Self : not null access UML_Interaction_Proxy;
To : Boolean);
-- Setter of Behavior::isReentrant.
--
-- Tells whether the behavior can be invoked while it is still executing
-- from a previous invocation.
overriding function Get_Owned_Parameter
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Parameters.Collections.Ordered_Set_Of_UML_Parameter;
-- Getter of Behavior::ownedParameter.
--
-- References a list of parameters to the behavior which describes the
-- order and type of arguments that can be given when the behavior is
-- invoked and of the values which will be returned when the behavior
-- completes its execution.
overriding function Get_Owned_Parameter_Set
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Parameter_Sets.Collections.Set_Of_UML_Parameter_Set;
-- Getter of Behavior::ownedParameterSet.
--
-- The ParameterSets owned by this Behavior.
overriding function Get_Postcondition
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Behavior::postcondition.
--
-- An optional set of Constraints specifying what is fulfilled after the
-- execution of the behavior is completed, if its precondition was
-- fulfilled before its invocation.
overriding function Get_Precondition
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Behavior::precondition.
--
-- An optional set of Constraints specifying what must be fulfilled when
-- the behavior is invoked.
overriding function Get_Redefined_Behavior
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Behaviors.Collections.Set_Of_UML_Behavior;
-- Getter of Behavior::redefinedBehavior.
--
-- References a behavior that this behavior redefines. A subtype of
-- Behavior may redefine any other subtype of Behavior. If the behavior
-- implements a behavioral feature, it replaces the redefined behavior. If
-- the behavior is a classifier behavior, it extends the redefined
-- behavior.
overriding function Get_Specification
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Behavioral_Features.UML_Behavioral_Feature_Access;
-- Getter of Behavior::specification.
--
-- Designates a behavioral feature that the behavior implements. The
-- behavioral feature must be owned by the classifier that owns the
-- behavior or be inherited by it. The parameters of the behavioral
-- feature and the implementing behavior must match. A behavior does not
-- need to have a specification, in which case it either is the classifer
-- behavior of a BehavioredClassifier or it can only be invoked by another
-- behavior of the classifier.
overriding procedure Set_Specification
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Behavioral_Features.UML_Behavioral_Feature_Access);
-- Setter of Behavior::specification.
--
-- Designates a behavioral feature that the behavior implements. The
-- behavioral feature must be owned by the classifier that owns the
-- behavior or be inherited by it. The parameters of the behavioral
-- feature and the implementing behavior must match. A behavior does not
-- need to have a specification, in which case it either is the classifer
-- behavior of a BehavioredClassifier or it can only be invoked by another
-- behavior of the classifier.
overriding function Get_Extension
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Extensions.Collections.Set_Of_UML_Extension;
-- Getter of Class::extension.
--
-- References the Extensions that specify additional properties of the
-- metaclass. The property is derived from the extensions whose memberEnds
-- are typed by the Class.
overriding function Get_Is_Abstract
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Getter of Class::isAbstract.
--
-- True when a class is abstract.
-- If true, the Classifier does not provide a complete declaration and can
-- typically not be instantiated. An abstract classifier is intended to be
-- used by other classifiers e.g. as the target of general
-- metarelationships or generalization relationships.
overriding function Get_Is_Active
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Getter of Class::isActive.
--
-- Determines whether an object specified by this class is active or not.
-- If true, then the owning class is referred to as an active class. If
-- false, then such a class is referred to as a passive class.
overriding procedure Set_Is_Active
(Self : not null access UML_Interaction_Proxy;
To : Boolean);
-- Setter of Class::isActive.
--
-- Determines whether an object specified by this class is active or not.
-- If true, then the owning class is referred to as an active class. If
-- false, then such a class is referred to as a passive class.
overriding function Get_Nested_Classifier
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classifiers.Collections.Ordered_Set_Of_UML_Classifier;
-- Getter of Class::nestedClassifier.
--
-- References all the Classifiers that are defined (nested) within the
-- Class.
overriding function Get_Owned_Attribute
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Properties.Collections.Ordered_Set_Of_UML_Property;
-- Getter of Class::ownedAttribute.
--
-- The attributes (i.e. the properties) owned by the class.
overriding function Get_Owned_Operation
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Operations.Collections.Ordered_Set_Of_UML_Operation;
-- Getter of Class::ownedOperation.
--
-- The operations owned by the class.
overriding function Get_Owned_Reception
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Receptions.Collections.Set_Of_UML_Reception;
-- Getter of Class::ownedReception.
--
-- Receptions that objects of this class are willing to accept.
overriding function Get_Super_Class
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classes.Collections.Set_Of_UML_Class;
-- Getter of Class::superClass.
--
-- This gives the superclasses of a class.
overriding function Get_Classifier_Behavior
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Behaviors.UML_Behavior_Access;
-- Getter of BehavioredClassifier::classifierBehavior.
--
-- A behavior specification that specifies the behavior of the classifier
-- itself.
overriding procedure Set_Classifier_Behavior
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Behaviors.UML_Behavior_Access);
-- Setter of BehavioredClassifier::classifierBehavior.
--
-- A behavior specification that specifies the behavior of the classifier
-- itself.
overriding function Get_Interface_Realization
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Interface_Realizations.Collections.Set_Of_UML_Interface_Realization;
-- Getter of BehavioredClassifier::interfaceRealization.
--
-- The set of InterfaceRealizations owned by the BehavioredClassifier.
-- Interface realizations reference the Interfaces of which the
-- BehavioredClassifier is an implementation.
overriding function Get_Owned_Behavior
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Behaviors.Collections.Set_Of_UML_Behavior;
-- Getter of BehavioredClassifier::ownedBehavior.
--
-- References behavior specifications owned by a classifier.
overriding function Get_Attribute
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Properties.Collections.Set_Of_UML_Property;
-- Getter of Classifier::attribute.
--
-- Refers to all of the Properties that are direct (i.e. not inherited or
-- imported) attributes of the classifier.
overriding function Get_Collaboration_Use
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Collaboration_Uses.Collections.Set_Of_UML_Collaboration_Use;
-- Getter of Classifier::collaborationUse.
--
-- References the collaboration uses owned by the classifier.
overriding function Get_Feature
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Features.Collections.Set_Of_UML_Feature;
-- Getter of Classifier::feature.
--
-- Specifies each feature defined in the classifier.
-- Note that there may be members of the Classifier that are of the type
-- Feature but are not included in this association, e.g. inherited
-- features.
overriding function Get_General
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of Classifier::general.
--
-- Specifies the general Classifiers for this Classifier.
-- References the general classifier in the Generalization relationship.
overriding function Get_Generalization
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Generalizations.Collections.Set_Of_UML_Generalization;
-- Getter of Classifier::generalization.
--
-- Specifies the Generalization relationships for this Classifier. These
-- Generalizations navigaten to more general classifiers in the
-- generalization hierarchy.
overriding function Get_Inherited_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Classifier::inheritedMember.
--
-- Specifies all elements inherited by this classifier from the general
-- classifiers.
overriding function Get_Is_Final_Specialization
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Getter of Classifier::isFinalSpecialization.
--
-- If true, the Classifier cannot be specialized by generalization. Note
-- that this property is preserved through package merge operations; that
-- is, the capability to specialize a Classifier (i.e.,
-- isFinalSpecialization =false) must be preserved in the resulting
-- Classifier of a package merge operation where a Classifier with
-- isFinalSpecialization =false is merged with a matching Classifier with
-- isFinalSpecialization =true: the resulting Classifier will have
-- isFinalSpecialization =false.
overriding procedure Set_Is_Final_Specialization
(Self : not null access UML_Interaction_Proxy;
To : Boolean);
-- Setter of Classifier::isFinalSpecialization.
--
-- If true, the Classifier cannot be specialized by generalization. Note
-- that this property is preserved through package merge operations; that
-- is, the capability to specialize a Classifier (i.e.,
-- isFinalSpecialization =false) must be preserved in the resulting
-- Classifier of a package merge operation where a Classifier with
-- isFinalSpecialization =false is merged with a matching Classifier with
-- isFinalSpecialization =true: the resulting Classifier will have
-- isFinalSpecialization =false.
overriding function Get_Owned_Template_Signature
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access;
-- Getter of Classifier::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding procedure Set_Owned_Template_Signature
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Redefinable_Template_Signatures.UML_Redefinable_Template_Signature_Access);
-- Setter of Classifier::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding function Get_Owned_Use_Case
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
-- Getter of Classifier::ownedUseCase.
--
-- References the use cases owned by this classifier.
overriding function Get_Powertype_Extent
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Generalization_Sets.Collections.Set_Of_UML_Generalization_Set;
-- Getter of Classifier::powertypeExtent.
--
-- Designates the GeneralizationSet of which the associated Classifier is
-- a power type.
overriding function Get_Redefined_Classifier
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of Classifier::redefinedClassifier.
--
-- References the Classifiers that are redefined by this Classifier.
overriding function Get_Representation
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access;
-- Getter of Classifier::representation.
--
-- References a collaboration use which indicates the collaboration that
-- represents this classifier.
overriding procedure Set_Representation
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Collaboration_Uses.UML_Collaboration_Use_Access);
-- Setter of Classifier::representation.
--
-- References a collaboration use which indicates the collaboration that
-- represents this classifier.
overriding function Get_Substitution
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Substitutions.Collections.Set_Of_UML_Substitution;
-- Getter of Classifier::substitution.
--
-- References the substitutions that are owned by this Classifier.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access;
-- Getter of Classifier::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Classifier_Template_Parameters.UML_Classifier_Template_Parameter_Access);
-- Setter of Classifier::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function Get_Use_Case
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Use_Cases.Collections.Set_Of_UML_Use_Case;
-- Getter of Classifier::useCase.
--
-- The set of use cases for which this Classifier is the subject.
overriding function Get_Element_Import
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import;
-- Getter of Namespace::elementImport.
--
-- References the ElementImports owned by the Namespace.
overriding function Get_Imported_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Getter of Namespace::importedMember.
--
-- References the PackageableElements that are members of this Namespace
-- as a result of either PackageImports or ElementImports.
overriding function Get_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Namespace::member.
--
-- A collection of NamedElements identifiable within the Namespace, either
-- by being owned or by being introduced by importing or inheritance.
overriding function Get_Owned_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Getter of Namespace::ownedMember.
--
-- A collection of NamedElements owned by the Namespace.
overriding function Get_Owned_Rule
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Namespace::ownedRule.
--
-- Specifies a set of Constraints owned by this Namespace.
overriding function Get_Package_Import
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import;
-- Getter of Namespace::packageImport.
--
-- References the PackageImports owned by the Namespace.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Interaction_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Get_Package
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Packages.UML_Package_Access;
-- Getter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
overriding procedure Set_Package
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Packages.UML_Package_Access);
-- Setter of Type::package.
--
-- Specifies the owning package of this classifier, if any.
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::owningTemplateParameter.
--
-- The formal template parameter that owns this element.
overriding function Get_Template_Parameter
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access;
-- Getter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding procedure Set_Template_Parameter
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access);
-- Setter of ParameterableElement::templateParameter.
--
-- The template parameter that exposes this element as a formal parameter.
overriding function Get_Owned_Template_Signature
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Template_Signatures.UML_Template_Signature_Access;
-- Getter of TemplateableElement::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding procedure Set_Owned_Template_Signature
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Template_Signatures.UML_Template_Signature_Access);
-- Setter of TemplateableElement::ownedTemplateSignature.
--
-- The optional template signature specifying the formal template
-- parameters.
overriding function Get_Template_Binding
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Template_Bindings.Collections.Set_Of_UML_Template_Binding;
-- Getter of TemplateableElement::templateBinding.
--
-- The optional bindings from this element to templates.
overriding function Get_Is_Leaf
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Getter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding procedure Set_Is_Leaf
(Self : not null access UML_Interaction_Proxy;
To : Boolean);
-- Setter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding function Get_Redefined_Element
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
-- Getter of RedefinableElement::redefinedElement.
--
-- The redefinable element that is being redefined by this element.
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of RedefinableElement::redefinitionContext.
--
-- References the contexts that this element may be redefined from.
overriding function Get_Owned_Port
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Ports.Collections.Set_Of_UML_Port;
-- Getter of EncapsulatedClassifier::ownedPort.
--
-- References a set of ports that an encapsulated classifier owns.
overriding function Get_Owned_Connector
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Connectors.Collections.Set_Of_UML_Connector;
-- Getter of StructuredClassifier::ownedConnector.
--
-- References the connectors owned by the classifier.
overriding function Get_Part
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Properties.Collections.Set_Of_UML_Property;
-- Getter of StructuredClassifier::part.
--
-- References the properties specifying instances that the classifier owns
-- by composition. This association is derived, selecting those owned
-- properties where isComposite is true.
overriding function Get_Role
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Connectable_Elements.Collections.Set_Of_UML_Connectable_Element;
-- Getter of StructuredClassifier::role.
--
-- References the roles that instances may play in this classifier.
overriding function Get_Covered
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline;
-- Getter of InteractionFragment::covered.
--
-- References the Lifelines that the InteractionFragment involves.
overriding function Get_Enclosing_Interaction
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Interactions.UML_Interaction_Access;
-- Getter of InteractionFragment::enclosingInteraction.
--
-- The Interaction enclosing this InteractionFragment.
overriding procedure Set_Enclosing_Interaction
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Interactions.UML_Interaction_Access);
-- Setter of InteractionFragment::enclosingInteraction.
--
-- The Interaction enclosing this InteractionFragment.
overriding function Get_Enclosing_Operand
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access;
-- Getter of InteractionFragment::enclosingOperand.
--
-- The operand enclosing this InteractionFragment (they may nest
-- recursively)
overriding procedure Set_Enclosing_Operand
(Self : not null access UML_Interaction_Proxy;
To : AMF.UML.Interaction_Operands.UML_Interaction_Operand_Access);
-- Setter of InteractionFragment::enclosingOperand.
--
-- The operand enclosing this InteractionFragment (they may nest
-- recursively)
overriding function Get_General_Ordering
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.General_Orderings.Collections.Set_Of_UML_General_Ordering;
-- Getter of InteractionFragment::generalOrdering.
--
-- The general ordering relationships contained in this fragment.
overriding function Context
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Behaviored_Classifiers.UML_Behaviored_Classifier_Access;
-- Operation Behavior::context.
--
-- Missing derivation for Behavior::/context : BehavioredClassifier
overriding function Extension
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Extensions.Collections.Set_Of_UML_Extension;
-- Operation Class::extension.
--
-- Missing derivation for Class::/extension : Extension
overriding function Inherit
(Self : not null access constant UML_Interaction_Proxy;
Inhs : AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Class::inherit.
--
-- The inherit operation is overridden to exclude redefined properties.
overriding function Super_Class
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classes.Collections.Set_Of_UML_Class;
-- Operation Class::superClass.
--
-- Missing derivation for Class::/superClass : Class
overriding function All_Features
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Features.Collections.Set_Of_UML_Feature;
-- Operation Classifier::allFeatures.
--
-- The query allFeatures() gives all of the features in the namespace of
-- the classifier. In general, through mechanisms such as inheritance,
-- this will be a larger set than feature.
overriding function Conforms_To
(Self : not null access constant UML_Interaction_Proxy;
Other : AMF.UML.Classifiers.UML_Classifier_Access)
return Boolean;
-- Operation Classifier::conformsTo.
--
-- The query conformsTo() gives true for a classifier that defines a type
-- that conforms to another. This is used, for example, in the
-- specification of signature conformance for operations.
overriding function General
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Operation Classifier::general.
--
-- The general classifiers are the classifiers referenced by the
-- generalization relationships.
overriding function Has_Visibility_Of
(Self : not null access constant UML_Interaction_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access)
return Boolean;
-- Operation Classifier::hasVisibilityOf.
--
-- The query hasVisibilityOf() determines whether a named element is
-- visible in the classifier. By default all are visible. It is only
-- called when the argument is something owned by a parent.
overriding function Inheritable_Members
(Self : not null access constant UML_Interaction_Proxy;
C : AMF.UML.Classifiers.UML_Classifier_Access)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inheritableMembers.
--
-- The query inheritableMembers() gives all of the members of a classifier
-- that may be inherited in one of its descendants, subject to whatever
-- visibility restrictions apply.
overriding function Inherited_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Classifier::inheritedMember.
--
-- The inheritedMember association is derived by inheriting the
-- inheritable members of the parents.
-- The inheritedMember association is derived by inheriting the
-- inheritable members of the parents.
overriding function Is_Template
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Operation Classifier::isTemplate.
--
-- The query isTemplate() returns whether this templateable element is
-- actually a template.
overriding function May_Specialize_Type
(Self : not null access constant UML_Interaction_Proxy;
C : AMF.UML.Classifiers.UML_Classifier_Access)
return Boolean;
-- Operation Classifier::maySpecializeType.
--
-- The query maySpecializeType() determines whether this classifier may
-- have a generalization relationship to classifiers of the specified
-- type. By default a classifier may specialize classifiers of the same or
-- a more general type. It is intended to be redefined by classifiers that
-- have different specialization constraints.
overriding function Exclude_Collisions
(Self : not null access constant UML_Interaction_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::excludeCollisions.
--
-- The query excludeCollisions() excludes from a set of
-- PackageableElements any that would not be distinguishable from each
-- other in this namespace.
overriding function Get_Names_Of_Member
(Self : not null access constant UML_Interaction_Proxy;
Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
return AMF.String_Collections.Set_Of_String;
-- Operation Namespace::getNamesOfMember.
--
-- The query getNamesOfMember() takes importing into account. It gives
-- back the set of names that an element would have in an importing
-- namespace, either because it is owned, or if not owned then imported
-- individually, or if not individually then from a package.
-- The query getNamesOfMember() gives a set of all of the names that a
-- member would have in a Namespace. In general a member can have multiple
-- names in a Namespace if it is imported more than once with different
-- aliases. The query takes account of importing. It gives back the set of
-- names that an element would have in an importing namespace, either
-- because it is owned, or if not owned then imported individually, or if
-- not individually then from a package.
overriding function Import_Members
(Self : not null access constant UML_Interaction_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::importMembers.
--
-- The query importMembers() defines which of a set of PackageableElements
-- are actually imported into the namespace. This excludes hidden ones,
-- i.e., those which have names that conflict with names of owned members,
-- and also excludes elements which would have the same name when imported.
overriding function Imported_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element;
-- Operation Namespace::importedMember.
--
-- The importedMember property is derived from the ElementImports and the
-- PackageImports. References the PackageableElements that are members of
-- this Namespace as a result of either PackageImports or ElementImports.
overriding function Members_Are_Distinguishable
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Operation Namespace::membersAreDistinguishable.
--
-- The Boolean query membersAreDistinguishable() determines whether all of
-- the namespace's members are distinguishable within it.
overriding function Owned_Member
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element;
-- Operation Namespace::ownedMember.
--
-- Missing derivation for Namespace::/ownedMember : NamedElement
overriding function All_Owning_Packages
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Interaction_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding function Conforms_To
(Self : not null access constant UML_Interaction_Proxy;
Other : AMF.UML.Types.UML_Type_Access)
return Boolean;
-- Operation Type::conformsTo.
--
-- The query conformsTo() gives true for a type that conforms to another.
-- By default, two types do not conform to each other. This query is
-- intended to be redefined for specific conformance situations.
overriding function Is_Compatible_With
(Self : not null access constant UML_Interaction_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean;
-- Operation ParameterableElement::isCompatibleWith.
--
-- The query isCompatibleWith() determines if this parameterable element
-- is compatible with the specified parameterable element. By default
-- parameterable element P is compatible with parameterable element Q if
-- the kind of P is the same or a subtype as the kind of Q. Subclasses
-- should override this operation to specify different compatibility
-- constraints.
overriding function Is_Template_Parameter
(Self : not null access constant UML_Interaction_Proxy)
return Boolean;
-- Operation ParameterableElement::isTemplateParameter.
--
-- The query isTemplateParameter() determines if this parameterable
-- element is exposed as a formal template parameter.
overriding function Parameterable_Elements
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Parameterable_Elements.Collections.Set_Of_UML_Parameterable_Element;
-- Operation TemplateableElement::parameterableElements.
--
-- The query parameterableElements() returns the set of elements that may
-- be used as the parametered elements for a template parameter of this
-- templateable element. By default, this set includes all the owned
-- elements. Subclasses may override this operation if they choose to
-- restrict the set of parameterable elements.
overriding function Is_Consistent_With
(Self : not null access constant UML_Interaction_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isConsistentWith.
--
-- The query isConsistentWith() specifies, for any two RedefinableElements
-- in a context in which redefinition is possible, whether redefinition
-- would be logically consistent. By default, this is false; this
-- operation must be overridden for subclasses of RedefinableElement to
-- define the consistency conditions.
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Interaction_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isRedefinitionContextValid.
--
-- The query isRedefinitionContextValid() specifies whether the
-- redefinition contexts of this RedefinableElement are properly related
-- to the redefinition contexts of the specified RedefinableElement to
-- allow this element to redefine the other. By default at least one of
-- the redefinition contexts of this element must be a specialization of
-- at least one of the redefinition contexts of the specified element.
overriding function Owned_Port
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Ports.Collections.Set_Of_UML_Port;
-- Operation EncapsulatedClassifier::ownedPort.
--
-- Missing derivation for EncapsulatedClassifier::/ownedPort : Port
overriding function Part
(Self : not null access constant UML_Interaction_Proxy)
return AMF.UML.Properties.Collections.Set_Of_UML_Property;
-- Operation StructuredClassifier::part.
--
-- Missing derivation for StructuredClassifier::/part : Property
overriding procedure Enter_Element
(Self : not null access constant UML_Interaction_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Interaction_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Interaction_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Interactions;
|
MinimSecure/unum-sdk | Ada | 912 | adb | -- Copyright 2007-2016 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/>.
with Pck; use Pck;
procedure Fixed is
type Fixed_Point_Type is delta 0.001 range 0.0 .. 1000.0;
My_Var : Fixed_Point_Type := 14.0;
begin
Do_Nothing (My_Var'Address); -- STOP
end Fixed;
|
zhmu/ananas | Ada | 174 | ads | package Ghost1 is
type Ghost_Typ is record
Data : Integer;
end record
with Ghost;
procedure Spec_And_Body (Obj : Ghost_Typ)
with Ghost;
end Ghost1;
|
zhmu/ananas | Ada | 235 | ads | with Ada.Finalization; use Ada.Finalization;
package Lto6_Pkg is
type F_String is new Controlled with record
Data : access String;
end record;
Null_String : constant F_String := (Controlled with Data => null);
end Lto6_Pkg;
|
MatrixMike/AdaDemo1 | Ada | 119 | ads | package Greetings is
procedure Hello;
procedure Middle;
procedure Goodbye;
end Greetings;
|
stcarrez/ada-util | Ada | 1,536 | ads | -----------------------------------------------------------------------
-- util-beans-methods -- Bean methods
-- Copyright (C) 2010, 2011, 2018 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.Strings;
package Util.Beans.Methods is
pragma Preelaborate;
type Method_Binding is tagged limited record
Name : Util.Strings.Name_Access;
end record;
type Method_Binding_Access is access constant Method_Binding'Class;
type Method_Binding_Array is array (Natural range <>) of Method_Binding_Access;
type Method_Binding_Array_Access is access constant Method_Binding_Array;
type Method_Bean is limited interface;
type Method_Bean_Access is access all Method_Bean'Class;
function Get_Method_Bindings (From : in Method_Bean)
return Method_Binding_Array_Access is abstract;
end Util.Beans.Methods;
|
SSOCsoft/Log_Reporter | Ada | 2,801 | ads | With
Gnoga.Gui.Element.Form,
Ada.Streams,
NSO.Types,
INI;
Package NSO.Helpers is
Generic
Type Options is (<>);
Procedure Add_Discrete(
Form : in out Gnoga.Gui.Element.Form.Form_Type'Class;
Parent : in out Gnoga.Gui.Element.Form.Selection_Type'Class
);
Procedure Add_Vector(
Form : in out Gnoga.Gui.Element.Form.Form_Type'Class;
Parent : in out Gnoga.Gui.Element.Form.Selection_Type'Class;
Input : in NSO.Types.String_Vector.Vector;
Prefix : in String:= ""
);
Procedure Add_Map(
Form : in out Gnoga.Gui.Element.Form.Form_Type'Class;
Parent : in out Gnoga.Gui.Element.Form.Selection_Type'Class;
Input : in NSO.Types.String_Map.Map;
Prefix : in String:= ""
);
-- Adds the sections given by INPUT as groups; grouped by the section-name.
Procedure Add_Sections(
Form : in out Gnoga.Gui.Element.Form.Form_Type'Class;
Parent : in out Gnoga.Gui.Element.Form.Selection_Type'Class;
Fields : in NSO.Types.String_Vector.Vector;
File : in INI.Instance;
Prefix : in String:= ""
);
Procedure Add_Section_Groups(
Form : in out Gnoga.Gui.Element.Form.Form_Type'Class;
Parent : in out Gnoga.Gui.Element.Element_Type'Class; --Gnoga.Gui.Element.Form.Selection_Type'Class;
Fields : in NSO.Types.String_Vector.Vector;
File : in INI.Instance;
Name : in String:= ""
);
Function Trim( Input : String ) return String;
Function Unescape_JSON_String( Input : String ) Return String;
Subtype UPPER_CASE is Character range 'A'..'Z';
Subtype LOWER_CASE is Character range 'a'..'z';
Subtype NUMERIC is Character range '0'..'9';
Subtype ALPHANUMERIC is Character
with Static_Predicate => ALPHANUMERIC in UPPER_CASE|LOWER_CASE|NUMERIC;
-- Given "Item" & "Data" produces "<Item>Data</Item>".
Function HTML_Tag(Name, Text : String) return String
with Pre => Name'Length in Positive and
(for all C of Name => C in ALPHANUMERIC);
Function HTML_Tag(Name, Text, Attribute, Value : String) return String
with Pre => Name'Length in Positive and
(for all C of Name => C in ALPHANUMERIC) and
Attribute'Length in Positive and
(for all C of Attribute => C in ALPHANUMERIC) and
Value'Length in Positive and
(for all C of Value => C /= '"');
Type Nullable_Character is access all Character;
Subtype Character_Reference is not null Nullable_Character;
Function Next( Stream : not null access NSO.Types.Root_Stream_Class )
return Character_Reference with Inline;
End NSO.Helpers;
|
zhmu/ananas | Ada | 13,813 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . C G I --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-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. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Strings.Fixed;
with Ada.Characters.Handling;
with Ada.Strings.Maps;
with GNAT.OS_Lib;
with GNAT.Table;
package body GNAT.CGI is
use Ada;
Valid_Environment : Boolean := True;
-- This boolean will be set to False if the initialization was not
-- completed correctly. It must be set to true there because the
-- Initialize routine (called during elaboration) will use some of the
-- services exported by this unit.
Current_Method : Method_Type;
-- This is the current method used to pass CGI parameters
Header_Sent : Boolean := False;
-- Will be set to True when the header will be sent
-- Key/Value table declaration
type String_Access is access String;
type Key_Value is record
Key : String_Access;
Value : String_Access;
end record;
package Key_Value_Table is new Table (Key_Value, Positive, 1, 1, 50);
-----------------------
-- Local subprograms --
-----------------------
procedure Check_Environment;
pragma Inline (Check_Environment);
-- This procedure will raise Data_Error if Valid_Environment is False
procedure Initialize;
-- Initialize CGI package by reading the runtime environment. This
-- procedure is called during elaboration. All exceptions raised during
-- this procedure are deferred.
--------------------
-- Argument_Count --
--------------------
function Argument_Count return Natural is
begin
Check_Environment;
return Key_Value_Table.Last;
end Argument_Count;
-----------------------
-- Check_Environment --
-----------------------
procedure Check_Environment is
begin
if not Valid_Environment then
raise Data_Error;
end if;
end Check_Environment;
------------
-- Decode --
------------
function Decode (S : String) return String is
Result : String (S'Range);
K : Positive := S'First;
J : Positive := Result'First;
begin
while K <= S'Last loop
if K + 2 <= S'Last
and then S (K) = '%'
and then Characters.Handling.Is_Hexadecimal_Digit (S (K + 1))
and then Characters.Handling.Is_Hexadecimal_Digit (S (K + 2))
then
-- Here we have '%HH' which is an encoded character where 'HH' is
-- the character number in hexadecimal.
Result (J) := Character'Val
(Natural'Value ("16#" & S (K + 1 .. K + 2) & '#'));
K := K + 3;
-- Plus sign is decoded as a space
elsif S (K) = '+' then
Result (J) := ' ';
K := K + 1;
else
Result (J) := S (K);
K := K + 1;
end if;
J := J + 1;
end loop;
return Result (Result'First .. J - 1);
end Decode;
-------------------------
-- For_Every_Parameter --
-------------------------
procedure For_Every_Parameter is
Quit : Boolean;
begin
Check_Environment;
for K in 1 .. Key_Value_Table.Last loop
Quit := False;
Action (Key_Value_Table.Table (K).Key.all,
Key_Value_Table.Table (K).Value.all,
K,
Quit);
exit when Quit;
end loop;
end For_Every_Parameter;
----------------
-- Initialize --
----------------
procedure Initialize is
Request_Method : constant String :=
Characters.Handling.To_Upper
(Metavariable (CGI.Request_Method));
procedure Initialize_GET;
-- Read CGI parameters for a GET method. In this case the parameters
-- are passed into QUERY_STRING environment variable.
procedure Initialize_POST;
-- Read CGI parameters for a POST method. In this case the parameters
-- are passed with the standard input. The total number of characters
-- for the data is passed in CONTENT_LENGTH environment variable.
procedure Set_Parameter_Table (Data : String);
-- Parse the parameter data and set the parameter table
--------------------
-- Initialize_GET --
--------------------
procedure Initialize_GET is
Data : constant String := Metavariable (Query_String);
begin
Current_Method := Get;
if Data /= "" then
Set_Parameter_Table (Data);
end if;
end Initialize_GET;
---------------------
-- Initialize_POST --
---------------------
procedure Initialize_POST is
Content_Length : constant Natural :=
Natural'Value (Metavariable (CGI.Content_Length));
Data : String (1 .. Content_Length);
begin
Current_Method := Post;
if Content_Length /= 0 then
Text_IO.Get (Data);
Set_Parameter_Table (Data);
end if;
end Initialize_POST;
-------------------------
-- Set_Parameter_Table --
-------------------------
procedure Set_Parameter_Table (Data : String) is
procedure Add_Parameter (K : Positive; P : String);
-- Add a single parameter into the table at index K. The parameter
-- format is "key=value".
Count : constant Positive :=
1 + Strings.Fixed.Count (Data, Strings.Maps.To_Set ("&"));
-- Count is the number of parameters in the string. Parameters are
-- separated by ampersand character.
Index : Positive := Data'First;
Amp : Natural;
-------------------
-- Add_Parameter --
-------------------
procedure Add_Parameter (K : Positive; P : String) is
Equal : constant Natural := Strings.Fixed.Index (P, "=");
begin
if Equal = 0 then
raise Data_Error;
else
Key_Value_Table.Table (K) :=
Key_Value'(new String'(Decode (P (P'First .. Equal - 1))),
new String'(Decode (P (Equal + 1 .. P'Last))));
end if;
end Add_Parameter;
-- Start of processing for Set_Parameter_Table
begin
Key_Value_Table.Set_Last (Count);
for K in 1 .. Count - 1 loop
Amp := Strings.Fixed.Index (Data (Index .. Data'Last), "&");
Add_Parameter (K, Data (Index .. Amp - 1));
Index := Amp + 1;
end loop;
-- add last parameter
Add_Parameter (Count, Data (Index .. Data'Last));
end Set_Parameter_Table;
-- Start of processing for Initialize
begin
if Request_Method = "GET" then
Initialize_GET;
elsif Request_Method = "POST" then
Initialize_POST;
else
Valid_Environment := False;
end if;
exception
when others =>
-- If we have an exception during initialization of this unit we
-- just declare it invalid.
Valid_Environment := False;
end Initialize;
---------
-- Key --
---------
function Key (Position : Positive) return String is
begin
Check_Environment;
if Position <= Key_Value_Table.Last then
return Key_Value_Table.Table (Position).Key.all;
else
raise Parameter_Not_Found;
end if;
end Key;
----------------
-- Key_Exists --
----------------
function Key_Exists (Key : String) return Boolean is
begin
Check_Environment;
for K in 1 .. Key_Value_Table.Last loop
if Key_Value_Table.Table (K).Key.all = Key then
return True;
end if;
end loop;
return False;
end Key_Exists;
------------------
-- Metavariable --
------------------
function Metavariable
(Name : Metavariable_Name;
Required : Boolean := False) return String
is
function Get_Environment (Variable_Name : String) return String;
-- Returns the environment variable content
---------------------
-- Get_Environment --
---------------------
function Get_Environment (Variable_Name : String) return String is
Value : OS_Lib.String_Access := OS_Lib.Getenv (Variable_Name);
Result : constant String := Value.all;
begin
OS_Lib.Free (Value);
return Result;
end Get_Environment;
Result : constant String :=
Get_Environment (Metavariable_Name'Image (Name));
-- Start of processing for Metavariable
begin
Check_Environment;
if Result = "" and then Required then
raise Parameter_Not_Found;
else
return Result;
end if;
end Metavariable;
-------------------------
-- Metavariable_Exists --
-------------------------
function Metavariable_Exists (Name : Metavariable_Name) return Boolean is
begin
Check_Environment;
if Metavariable (Name) = "" then
return False;
else
return True;
end if;
end Metavariable_Exists;
------------
-- Method --
------------
function Method return Method_Type is
begin
Check_Environment;
return Current_Method;
end Method;
--------
-- Ok --
--------
function Ok return Boolean is
begin
return Valid_Environment;
end Ok;
----------------
-- Put_Header --
----------------
procedure Put_Header
(Header : String := Default_Header;
Force : Boolean := False)
is
begin
if Header_Sent = False or else Force then
Check_Environment;
Text_IO.Put_Line (Header);
Text_IO.New_Line;
Header_Sent := True;
end if;
end Put_Header;
---------
-- URL --
---------
function URL return String is
function Exists_And_Not_80 (Server_Port : String) return String;
-- Returns ':' & Server_Port if Server_Port is not "80" and the empty
-- string otherwise (80 is the default sever port).
-----------------------
-- Exists_And_Not_80 --
-----------------------
function Exists_And_Not_80 (Server_Port : String) return String is
begin
if Server_Port = "80" then
return "";
else
return ':' & Server_Port;
end if;
end Exists_And_Not_80;
-- Start of processing for URL
begin
Check_Environment;
return "http://"
& Metavariable (Server_Name)
& Exists_And_Not_80 (Metavariable (Server_Port))
& Metavariable (Script_Name);
end URL;
-----------
-- Value --
-----------
function Value
(Key : String;
Required : Boolean := False)
return String
is
begin
Check_Environment;
for K in 1 .. Key_Value_Table.Last loop
if Key_Value_Table.Table (K).Key.all = Key then
return Key_Value_Table.Table (K).Value.all;
end if;
end loop;
if Required then
raise Parameter_Not_Found;
else
return "";
end if;
end Value;
-----------
-- Value --
-----------
function Value (Position : Positive) return String is
begin
Check_Environment;
if Position <= Key_Value_Table.Last then
return Key_Value_Table.Table (Position).Value.all;
else
raise Parameter_Not_Found;
end if;
end Value;
begin
Initialize;
end GNAT.CGI;
|
stcarrez/ada-asf | Ada | 1,291 | ads | -----------------------------------------------------------------------
-- security-filters -- Security filter
-- Copyright (C) 2011, 2012, 2015, 2018 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 Servlet.Security.Filters;
-- The <b>Security.Filters</b> package defines a servlet filter that can be activated
-- on requests to authenticate users and verify they have the permission to view
-- a page.
package ASF.Security.Filters is
SID_COOKIE : constant String := "SID";
AID_COOKIE : constant String := "AID";
subtype Auth_Filter is Servlet.Security.Filters.Auth_Filter;
end ASF.Security.Filters;
|
AdaCore/Ada_Drivers_Library | Ada | 5,406 | ads | -- This spec has been automatically generated from cm7.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
-- 24Bit System Tick Timer for use in RTOS
package Cortex_M_SVD.SysTick is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Enable SysTick Timer
type CSR_ENABLE_Field is
(
-- counter disabled
Disable,
-- counter enabled
Enable)
with Size => 1;
for CSR_ENABLE_Field use
(Disable => 0,
Enable => 1);
-- Generate Tick Interrupt
type CSR_TICKINT_Field is
(-- Counting down to zero asserts the SysTick exception request
Disable,
-- Counting down to zero does not assert the SysTick exception request
Enable)
with Size => 1;
for CSR_TICKINT_Field use
(Disable => 0,
Enable => 1);
-- Source to count from
type CSR_CLKSOURCE_Field is
(
-- External Clock
External_Clk,
-- CPU Clock
Cpu_Clk)
with Size => 1;
for CSR_CLKSOURCE_Field use
(External_Clk => 0,
Cpu_Clk => 1);
-- SysTick Control and Status Register
type SYST_CSR_Register is record
-- Enable SysTick Timer
ENABLE : CSR_ENABLE_Field := Cortex_M_SVD.SysTick.Disable;
-- Generate Tick Interrupt
TICKINT : CSR_TICKINT_Field := Cortex_M_SVD.SysTick.Disable;
-- Source to count from
CLKSOURCE : CSR_CLKSOURCE_Field := Cortex_M_SVD.SysTick.Cpu_Clk;
-- unspecified
Reserved_3_15 : HAL.UInt13 := 16#0#;
-- SysTick counted to zero
COUNTFLAG : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SYST_CSR_Register use record
ENABLE at 0 range 0 .. 0;
TICKINT at 0 range 1 .. 1;
CLKSOURCE at 0 range 2 .. 2;
Reserved_3_15 at 0 range 3 .. 15;
COUNTFLAG at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
subtype SYST_RVR_RELOAD_Field is HAL.UInt24;
-- SysTick Reload Value Register
type SYST_RVR_Register is record
-- Value to auto reload SysTick after reaching zero
RELOAD : SYST_RVR_RELOAD_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SYST_RVR_Register use record
RELOAD at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype SYST_CVR_CURRENT_Field is HAL.UInt24;
-- SysTick Current Value Register
type SYST_CVR_Register is record
-- Current value
CURRENT : SYST_CVR_CURRENT_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SYST_CVR_Register use record
CURRENT at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype SYST_CALIB_TENMS_Field is HAL.UInt24;
-- Clock Skew
type CALIB_SKEW_Field is
(
-- 10ms calibration value is exact
Exact,
-- 10ms calibration value is inexact, because of the clock frequency
Inexact)
with Size => 1;
for CALIB_SKEW_Field use
(Exact => 0,
Inexact => 1);
-- No Ref
type CALIB_NOREF_Field is
(
-- Ref Clk available
Ref_Clk_Available,
-- Ref Clk not available
Ref_Clk_Unavailable)
with Size => 1;
for CALIB_NOREF_Field use
(Ref_Clk_Available => 0,
Ref_Clk_Unavailable => 1);
-- SysTick Calibration Value Register
type SYST_CALIB_Register is record
-- Read-only. Reload value to use for 10ms timing
TENMS : SYST_CALIB_TENMS_Field;
-- unspecified
Reserved_24_29 : HAL.UInt6;
-- Read-only. Clock Skew
SKEW : CALIB_SKEW_Field;
-- Read-only. No Ref
NOREF : CALIB_NOREF_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SYST_CALIB_Register use record
TENMS at 0 range 0 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
SKEW at 0 range 30 .. 30;
NOREF at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- 24Bit System Tick Timer for use in RTOS
type SysTick_Peripheral is record
-- SysTick Control and Status Register
CSR : aliased SYST_CSR_Register;
-- SysTick Reload Value Register
RVR : aliased SYST_RVR_Register;
-- SysTick Current Value Register
CVR : aliased SYST_CVR_Register;
-- SysTick Calibration Value Register
CALIB : aliased SYST_CALIB_Register;
end record
with Volatile;
for SysTick_Peripheral use record
CSR at 16#0# range 0 .. 31;
RVR at 16#4# range 0 .. 31;
CVR at 16#8# range 0 .. 31;
CALIB at 16#C# range 0 .. 31;
end record;
-- 24Bit System Tick Timer for use in RTOS
SysTick_Periph : aliased SysTick_Peripheral
with Import, Address => SysTick_Base;
end Cortex_M_SVD.SysTick;
|
ytomino/openssl-ada | Ada | 1,568 | adb | with Ada.Unchecked_Conversion;
with System;
package body Crypto.SHA1 is
use type C.signed_int;
function Initial return Context is
begin
return Result : Context do
if C.openssl.sha.SHA1_Init (Result.SHA'Access) = 0 then
raise Use_Error;
end if;
end return;
end Initial;
procedure Update (
Context : in out SHA1.Context;
Data : in Ada.Streams.Stream_Element_Array)
is
pragma Suppress (Index_Check);
begin
if C.openssl.sha.SHA1_Update (
Context.SHA'Access,
C.void_const_ptr (Data (Data'First)'Address),
Data'Length) = 0
then
raise Use_Error;
end if;
end Update;
procedure Update (Context : in out SHA1.Context; Data : in String) is
pragma Suppress (Index_Check);
begin
if C.openssl.sha.SHA1_Update (
Context.SHA'Access,
C.void_const_ptr (Data (Data'First)'Address),
Data'Length) = 0
then
raise Use_Error;
end if;
end Update;
procedure Final (Context : in out SHA1.Context; Digest : out Fingerprint) is
function To_Pointer is
new Ada.Unchecked_Conversion (System.Address, C.unsigned_char_ptr);
begin
if C.openssl.sha.SHA1_Final (
To_Pointer (Digest (Digest'First)'Address),
Context.SHA'Access) = 0
then
raise Use_Error;
end if;
end Final;
function Value (S : Message_Digest) return Fingerprint is
begin
return Result : Fingerprint do
Value (S, Result);
end return;
end Value;
function Image (Digest : in Fingerprint) return Message_Digest is
begin
return Result : Message_Digest do
Image (Digest, Result);
end return;
end Image;
end Crypto.SHA1;
|
faelys/natools | Ada | 1,664 | ads | ------------------------------------------------------------------------------
-- Copyright (c) 2013, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.Chunked_Strings.Tests.Coverage contains extra test cases chosen --
-- to complete coverage with black-box tests. --
------------------------------------------------------------------------------
with Natools.Tests;
generic procedure Natools.Chunked_Strings.Tests.Coverage
(Report : in out Natools.Tests.Reporter'Class);
pragma Preelaborate (Coverage);
|
charlie5/cBound | Ada | 1,677 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_change_window_attributes_request_t is
-- Item
--
type Item is record
major_opcode : aliased Interfaces.Unsigned_8;
pad0 : aliased Interfaces.Unsigned_8;
length : aliased Interfaces.Unsigned_16;
window : aliased xcb.xcb_window_t;
value_mask : aliased Interfaces.Unsigned_32;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_change_window_attributes_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_change_window_attributes_request_t.Item,
Element_Array => xcb.xcb_change_window_attributes_request_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_change_window_attributes_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_change_window_attributes_request_t.Pointer,
Element_Array =>
xcb.xcb_change_window_attributes_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_change_window_attributes_request_t;
|
google-code/ada-security | Ada | 2,241 | adb | -----------------------------------------------------------------------
-- security-controllers-roles -- Simple role base security
-- Copyright (C) 2011, 2012 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 Security.Controllers.Roles is
-- ------------------------------
-- Returns true if the user associated with the security context <b>Context</b> has
-- one of the role defined in the <b>Handler</b>.
-- ------------------------------
overriding
function Has_Permission (Handler : in Role_Controller;
Context : in Security.Contexts.Security_Context'Class;
Permission : in Security.Permissions.Permission'Class)
return Boolean is
pragma Unreferenced (Permission);
use type Security.Principal_Access;
P : constant Security.Principal_Access := Context.Get_User_Principal;
Roles : Security.Policies.Roles.Role_Map;
begin
if P /= null then
-- If the principal has some roles, get them.
if P.all in Policies.Roles.Role_Principal_Context'Class then
Roles := Policies.Roles.Role_Principal_Context'Class (P.all).Get_Roles;
else
return False;
end if;
for I in Handler.Roles'Range loop
if Roles (Handler.Roles (I)) then
return True;
end if;
end loop;
end if;
return False;
end Has_Permission;
end Security.Controllers.Roles;
|
BrickBot/Bound-T-H8-300 | Ada | 2,430 | adb | -- Arithmetic.Algebra.Opt (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:44 $
--
-- $Log: arithmetic-algebra-opt.adb,v $
-- Revision 1.2 2015/10/24 20:05:44 niklas
-- Moved to free licence.
--
-- Revision 1.1 2011-08-31 04:17:12 niklas
-- Added for BT-CH-0222: Option registry. Option -dump. External help files.
--
with Options;
with Options.Groups;
package body Arithmetic.Algebra.Opt is
begin
Options.Register (
Option => Combine_Terms_Opt'access,
Name => Options.Imp_Item ("combine_terms"),
Groups => (Options.Groups.Imp, Options.Groups.Const_Prop));
end Arithmetic.Algebra.Opt;
|
Kidev/Ada_Drivers_Library | Ada | 3,089 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, 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.SPI; use HAL.SPI;
package MicroBit.SPI is
type Speed is (S125kbps, S250kbps, S500kbps, S1Mbps, S2Mbps, S4Mbps, S8Mbps);
type SPI_Mode is (Mode_0, Mode_1, Mode_2, Mode_3);
function Initialized return Boolean;
-- Return True if the SPI controller is initialized and ready to use
procedure Initialize (S : Speed := S1Mbps;
Mode : SPI_Mode := Mode_0)
with Post => Initialized;
-- Initialize the SPI controller at given speed, using the micro:bit SPI
-- pins:
-- - P15 -> MOSI
-- - P14 -> MISO
-- - p13 -> Clock
function Controller return not null Any_SPI_Port;
-- Return the HAL.SPI controller implementation
end MicroBit.SPI;
|
AdaCore/Ada_Drivers_Library | Ada | 1,929 | ads | -- This package was generated by the Ada_Drivers_Library project wizard script
package ADL_Config is
Architecture : constant String := "ARM"; -- From board definition
Board : constant String := "NUCLEO_F446ZE"; -- From command line
CPU_Core : constant String := "ARM Cortex-M4F"; -- From mcu definition
Device_Family : constant String := "STM32F4"; -- From board definition
Device_Name : constant String := "STM32F407VGTx"; -- From board definition
Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition
Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition
Has_ZFP_Runtime : constant String := "False"; -- From board definition
High_Speed_External_Clock : constant := 8000000; -- From board definition
Max_Mount_Name_Length : constant := 128; -- From default value
Max_Mount_Points : constant := 2; -- From default value
Max_Path_Length : constant := 1024; -- From default value
Number_Of_Interrupts : constant := 0; -- From default value
Runtime_Name : constant String := "light-tasking-stm32f4"; -- From default value
Runtime_Name_Suffix : constant String := "stm32f4"; -- From board definition
Runtime_Profile : constant String := "light-tasking"; -- From command line
Use_Startup_Gen : constant Boolean := False; -- From command line
Vendor : constant String := "STMicro"; -- From board definition
end ADL_Config;
|
reznikmm/matreshka | Ada | 4,003 | 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.Table_Direction_Attributes;
package Matreshka.ODF_Table.Direction_Attributes is
type Table_Direction_Attribute_Node is
new Matreshka.ODF_Table.Abstract_Table_Attribute_Node
and ODF.DOM.Table_Direction_Attributes.ODF_Table_Direction_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Table_Direction_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Table_Direction_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Table.Direction_Attributes;
|
charlie5/cBound | Ada | 1,014 | ads | -- This file is generated by SWIG. Please do *not* modify by hand.
--
with fann_c.fann_train_data;
with interfaces.c;
limited with fann_c.fann;
with interfaces.C;
package fann_c.fann_callback_type is
-- Item
--
type Item is access
function (arg_6_1 : access fann_c.fann.Item;
arg_6_2 : in fann_c.fann_train_data.Pointer;
arg_6_3 : in interfaces.c.unsigned;
arg_6_4 : in interfaces.c.unsigned;
arg_6_5 : in interfaces.c.c_float;
arg_6_6 : in interfaces.c.unsigned) return interfaces.c.int;
pragma convention (C, Item);
-- Items
--
type Items is array (interfaces.C.Size_t range <>) of aliased fann_c.fann_callback_type.Item;
-- Pointer
--
type Pointer is access all fann_c.fann_callback_type.Item;
-- Pointers
--
type Pointers is array (interfaces.C.Size_t range <>) of aliased fann_c.fann_callback_type.Pointer;
-- Pointer_Pointer
--
type Pointer_Pointer is access all fann_c.fann_callback_type.Pointer;
end fann_c.fann_callback_type;
|
reznikmm/matreshka | Ada | 305,771 | 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$
------------------------------------------------------------------------------
package body ODF.DOM.Iterators.Containment is
-----------------------------
-- Visit_Number_Am_Pm --
-----------------------------
overriding procedure Visit_Number_Am_Pm
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Am_Pm;
-----------------------------
-- Visit_Anim_Animate --
-----------------------------
overriding procedure Visit_Anim_Animate
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Animate;
-----------------------------
-- Visit_Anim_AnimateColor --
-----------------------------
overriding procedure Visit_Anim_AnimateColor
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_AnimateColor;
-----------------------------
-- Visit_Anim_AnimateMotion --
-----------------------------
overriding procedure Visit_Anim_AnimateMotion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_AnimateMotion;
-----------------------------
-- Visit_Anim_AnimateTransform --
-----------------------------
overriding procedure Visit_Anim_AnimateTransform
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_AnimateTransform;
-----------------------------
-- Visit_Anim_Audio --
-----------------------------
overriding procedure Visit_Anim_Audio
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Audio;
-----------------------------
-- Visit_Anim_Command --
-----------------------------
overriding procedure Visit_Anim_Command
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Command;
-----------------------------
-- Visit_Anim_Iterate --
-----------------------------
overriding procedure Visit_Anim_Iterate
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Iterate;
-----------------------------
-- Visit_Anim_Par --
-----------------------------
overriding procedure Visit_Anim_Par
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Par;
-----------------------------
-- Visit_Anim_Param --
-----------------------------
overriding procedure Visit_Anim_Param
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Param;
-----------------------------
-- Visit_Anim_Seq --
-----------------------------
overriding procedure Visit_Anim_Seq
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Seq;
-----------------------------
-- Visit_Anim_Set --
-----------------------------
overriding procedure Visit_Anim_Set
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_Set;
-----------------------------
-- Visit_Anim_TransitionFilter --
-----------------------------
overriding procedure Visit_Anim_TransitionFilter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Anim_TransitionFilter;
-----------------------------
-- Visit_Office_Annotation --
-----------------------------
overriding procedure Visit_Office_Annotation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Annotation;
-----------------------------
-- Visit_Office_Annotation_End --
-----------------------------
overriding procedure Visit_Office_Annotation_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Annotation_End;
-----------------------------
-- Visit_Db_Application_Connection_Settings --
-----------------------------
overriding procedure Visit_Db_Application_Connection_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Application_Connection_Settings;
-----------------------------
-- Visit_Db_Auto_Increment --
-----------------------------
overriding procedure Visit_Db_Auto_Increment
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Auto_Increment;
-----------------------------
-- Visit_Chart_Axis --
-----------------------------
overriding procedure Visit_Chart_Axis
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Axis;
-----------------------------
-- Visit_Number_Boolean --
-----------------------------
overriding procedure Visit_Number_Boolean
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Boolean;
-----------------------------
-- Visit_Number_Boolean_Style --
-----------------------------
overriding procedure Visit_Number_Boolean_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Boolean_Style;
-----------------------------
-- Visit_Form_Button --
-----------------------------
overriding procedure Visit_Form_Button
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Button;
-----------------------------
-- Visit_Chart_Categories --
-----------------------------
overriding procedure Visit_Chart_Categories
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Categories;
-----------------------------
-- Visit_Db_Character_Set --
-----------------------------
overriding procedure Visit_Db_Character_Set
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Character_Set;
-----------------------------
-- Visit_Chart_Chart --
-----------------------------
overriding procedure Visit_Chart_Chart
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Chart;
-----------------------------
-- Visit_Form_Checkbox --
-----------------------------
overriding procedure Visit_Form_Checkbox
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Checkbox;
-----------------------------
-- Visit_Db_Column --
-----------------------------
overriding procedure Visit_Db_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Column;
-----------------------------
-- Visit_Form_Column --
-----------------------------
overriding procedure Visit_Form_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Column;
-----------------------------
-- Visit_Db_Column_Definition --
-----------------------------
overriding procedure Visit_Db_Column_Definition
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Column_Definition;
-----------------------------
-- Visit_Db_Column_Definitions --
-----------------------------
overriding procedure Visit_Db_Column_Definitions
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Column_Definitions;
-----------------------------
-- Visit_Db_Columns --
-----------------------------
overriding procedure Visit_Db_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Columns;
-----------------------------
-- Visit_Form_Combobox --
-----------------------------
overriding procedure Visit_Form_Combobox
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Combobox;
-----------------------------
-- Visit_Db_Component --
-----------------------------
overriding procedure Visit_Db_Component
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Component;
-----------------------------
-- Visit_Db_Component_Collection --
-----------------------------
overriding procedure Visit_Db_Component_Collection
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Component_Collection;
-----------------------------
-- Visit_Chart_Data_Label --
-----------------------------
overriding procedure Visit_Chart_Data_Label
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Data_Label;
-----------------------------
-- Visit_Chart_Data_Point --
-----------------------------
overriding procedure Visit_Chart_Data_Point
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Data_Point;
-----------------------------
-- Visit_Chart_Domain --
-----------------------------
overriding procedure Visit_Chart_Domain
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Domain;
-----------------------------
-- Visit_Chart_Equation --
-----------------------------
overriding procedure Visit_Chart_Equation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Equation;
-----------------------------
-- Visit_Chart_Error_Indicator --
-----------------------------
overriding procedure Visit_Chart_Error_Indicator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Error_Indicator;
-----------------------------
-- Visit_Chart_Floor --
-----------------------------
overriding procedure Visit_Chart_Floor
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Floor;
-----------------------------
-- Visit_Chart_Footer --
-----------------------------
overriding procedure Visit_Chart_Footer
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Footer;
-----------------------------
-- Visit_Chart_Grid --
-----------------------------
overriding procedure Visit_Chart_Grid
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Grid;
-----------------------------
-- Visit_Chart_Label_Separator --
-----------------------------
overriding procedure Visit_Chart_Label_Separator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Label_Separator;
-----------------------------
-- Visit_Chart_Legend --
-----------------------------
overriding procedure Visit_Chart_Legend
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Legend;
-----------------------------
-- Visit_Chart_Mean_Value --
-----------------------------
overriding procedure Visit_Chart_Mean_Value
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Mean_Value;
-----------------------------
-- Visit_Chart_Plot_Area --
-----------------------------
overriding procedure Visit_Chart_Plot_Area
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Plot_Area;
-----------------------------
-- Visit_Chart_Regression_Curve --
-----------------------------
overriding procedure Visit_Chart_Regression_Curve
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Regression_Curve;
-----------------------------
-- Visit_Chart_Series --
-----------------------------
overriding procedure Visit_Chart_Series
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Series;
-----------------------------
-- Visit_Chart_Stock_Gain_Marker --
-----------------------------
overriding procedure Visit_Chart_Stock_Gain_Marker
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Stock_Gain_Marker;
-----------------------------
-- Visit_Chart_Stock_Loss_Marker --
-----------------------------
overriding procedure Visit_Chart_Stock_Loss_Marker
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Stock_Loss_Marker;
-----------------------------
-- Visit_Chart_Stock_Range_Line --
-----------------------------
overriding procedure Visit_Chart_Stock_Range_Line
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Stock_Range_Line;
-----------------------------
-- Visit_Chart_Subtitle --
-----------------------------
overriding procedure Visit_Chart_Subtitle
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Subtitle;
-----------------------------
-- Visit_Chart_Symbol_Image --
-----------------------------
overriding procedure Visit_Chart_Symbol_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Symbol_Image;
-----------------------------
-- Visit_Chart_Title --
-----------------------------
overriding procedure Visit_Chart_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Title;
-----------------------------
-- Visit_Chart_Wall --
-----------------------------
overriding procedure Visit_Chart_Wall
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Chart_Wall;
-----------------------------
-- Visit_Draw_A --
-----------------------------
overriding procedure Visit_Draw_A
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_A;
-----------------------------
-- Visit_Presentation_Animation_Group --
-----------------------------
overriding procedure Visit_Presentation_Animation_Group
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Animation_Group;
-----------------------------
-- Visit_Presentation_Animations --
-----------------------------
overriding procedure Visit_Presentation_Animations
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Animations;
-----------------------------
-- Visit_Draw_Applet --
-----------------------------
overriding procedure Visit_Draw_Applet
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Applet;
-----------------------------
-- Visit_Draw_Area_Circle --
-----------------------------
overriding procedure Visit_Draw_Area_Circle
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Area_Circle;
-----------------------------
-- Visit_Draw_Area_Polygon --
-----------------------------
overriding procedure Visit_Draw_Area_Polygon
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Area_Polygon;
-----------------------------
-- Visit_Draw_Area_Rectangle --
-----------------------------
overriding procedure Visit_Draw_Area_Rectangle
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Area_Rectangle;
-----------------------------
-- Visit_Draw_Caption --
-----------------------------
overriding procedure Visit_Draw_Caption
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Caption;
-----------------------------
-- Visit_Draw_Circle --
-----------------------------
overriding procedure Visit_Draw_Circle
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Circle;
-----------------------------
-- Visit_Text_A --
-----------------------------
overriding procedure Visit_Text_A
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_A;
-----------------------------
-- Visit_Text_Alphabetical_Index --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index;
-----------------------------
-- Visit_Text_Alphabetical_Index_Auto_Mark_File --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index_Auto_Mark_File
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index_Auto_Mark_File;
-----------------------------
-- Visit_Text_Alphabetical_Index_Entry_Template --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index_Entry_Template;
-----------------------------
-- Visit_Text_Alphabetical_Index_Mark --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index_Mark
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index_Mark;
-----------------------------
-- Visit_Text_Alphabetical_Index_Mark_End --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index_Mark_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index_Mark_End;
-----------------------------
-- Visit_Text_Alphabetical_Index_Mark_Start --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index_Mark_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index_Mark_Start;
-----------------------------
-- Visit_Text_Alphabetical_Index_Source --
-----------------------------
overriding procedure Visit_Text_Alphabetical_Index_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Alphabetical_Index_Source;
-----------------------------
-- Visit_Text_Author_Initials --
-----------------------------
overriding procedure Visit_Text_Author_Initials
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Author_Initials;
-----------------------------
-- Visit_Text_Author_Name --
-----------------------------
overriding procedure Visit_Text_Author_Name
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Author_Name;
-----------------------------
-- Visit_Meta_Auto_Reload --
-----------------------------
overriding procedure Visit_Meta_Auto_Reload
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Auto_Reload;
-----------------------------
-- Visit_Office_Automatic_Styles --
-----------------------------
overriding procedure Visit_Office_Automatic_Styles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Automatic_Styles;
-----------------------------
-- Visit_Style_Background_Image --
-----------------------------
overriding procedure Visit_Style_Background_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Background_Image;
-----------------------------
-- Visit_Style_Chart_Properties --
-----------------------------
overriding procedure Visit_Style_Chart_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Chart_Properties;
-----------------------------
-- Visit_Style_Column --
-----------------------------
overriding procedure Visit_Style_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Column;
-----------------------------
-- Visit_Style_Column_Sep --
-----------------------------
overriding procedure Visit_Style_Column_Sep
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Column_Sep;
-----------------------------
-- Visit_Style_Columns --
-----------------------------
overriding procedure Visit_Style_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Columns;
-----------------------------
-- Visit_Table_Background --
-----------------------------
overriding procedure Visit_Table_Background
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Background;
-----------------------------
-- Visit_Text_Bibliography_Configuration --
-----------------------------
overriding procedure Visit_Text_Bibliography_Configuration
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bibliography_Configuration;
-----------------------------
-- Visit_Office_Binary_Data --
-----------------------------
overriding procedure Visit_Office_Binary_Data
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Binary_Data;
-----------------------------
-- Visit_Table_Body --
-----------------------------
overriding procedure Visit_Table_Body
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Body;
-----------------------------
-- Visit_Table_Calculation_Settings --
-----------------------------
overriding procedure Visit_Table_Calculation_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Calculation_Settings;
-----------------------------
-- Visit_Table_Cell_Address --
-----------------------------
overriding procedure Visit_Table_Cell_Address
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Cell_Address;
-----------------------------
-- Visit_Table_Cell_Content_Change --
-----------------------------
overriding procedure Visit_Table_Cell_Content_Change
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Cell_Content_Change;
-----------------------------
-- Visit_Table_Cell_Content_Deletion --
-----------------------------
overriding procedure Visit_Table_Cell_Content_Deletion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Cell_Content_Deletion;
-----------------------------
-- Visit_Table_Cell_Range_Source --
-----------------------------
overriding procedure Visit_Table_Cell_Range_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Cell_Range_Source;
-----------------------------
-- Visit_Table_Change_Deletion --
-----------------------------
overriding procedure Visit_Table_Change_Deletion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Change_Deletion;
-----------------------------
-- Visit_Table_Change_Track_Table_Cell --
-----------------------------
overriding procedure Visit_Table_Change_Track_Table_Cell
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Change_Track_Table_Cell;
-----------------------------
-- Visit_Text_Bibliography --
-----------------------------
overriding procedure Visit_Text_Bibliography
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bibliography;
-----------------------------
-- Visit_Text_Bibliography_Entry_Template --
-----------------------------
overriding procedure Visit_Text_Bibliography_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bibliography_Entry_Template;
-----------------------------
-- Visit_Text_Bibliography_Mark --
-----------------------------
overriding procedure Visit_Text_Bibliography_Mark
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bibliography_Mark;
-----------------------------
-- Visit_Text_Bibliography_Source --
-----------------------------
overriding procedure Visit_Text_Bibliography_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bibliography_Source;
-----------------------------
-- Visit_Text_Bookmark --
-----------------------------
overriding procedure Visit_Text_Bookmark
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bookmark;
-----------------------------
-- Visit_Text_Bookmark_End --
-----------------------------
overriding procedure Visit_Text_Bookmark_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bookmark_End;
-----------------------------
-- Visit_Text_Bookmark_Ref --
-----------------------------
overriding procedure Visit_Text_Bookmark_Ref
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bookmark_Ref;
-----------------------------
-- Visit_Text_Bookmark_Start --
-----------------------------
overriding procedure Visit_Text_Bookmark_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Bookmark_Start;
-----------------------------
-- Visit_Text_Change --
-----------------------------
overriding procedure Visit_Text_Change
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Change;
-----------------------------
-- Visit_Text_Change_End --
-----------------------------
overriding procedure Visit_Text_Change_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Change_End;
-----------------------------
-- Visit_Office_Change_Info --
-----------------------------
overriding procedure Visit_Office_Change_Info
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Change_Info;
-----------------------------
-- Visit_Text_Change_Start --
-----------------------------
overriding procedure Visit_Text_Change_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Change_Start;
-----------------------------
-- Visit_Text_Changed_Region --
-----------------------------
overriding procedure Visit_Text_Changed_Region
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Changed_Region;
-----------------------------
-- Visit_Text_Chapter --
-----------------------------
overriding procedure Visit_Text_Chapter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Chapter;
-----------------------------
-- Visit_Text_Character_Count --
-----------------------------
overriding procedure Visit_Text_Character_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Character_Count;
-----------------------------
-- Visit_Text_Conditional_Text --
-----------------------------
overriding procedure Visit_Text_Conditional_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Conditional_Text;
-----------------------------
-- Visit_Config_Config_Item --
-----------------------------
overriding procedure Visit_Config_Config_Item
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Config_Config_Item;
-----------------------------
-- Visit_Config_Config_Item_Map_Entry --
-----------------------------
overriding procedure Visit_Config_Config_Item_Map_Entry
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Config_Config_Item_Map_Entry;
-----------------------------
-- Visit_Config_Config_Item_Map_Indexed --
-----------------------------
overriding procedure Visit_Config_Config_Item_Map_Indexed
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Config_Config_Item_Map_Indexed;
-----------------------------
-- Visit_Config_Config_Item_Map_Named --
-----------------------------
overriding procedure Visit_Config_Config_Item_Map_Named
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Config_Config_Item_Map_Named;
-----------------------------
-- Visit_Config_Config_Item_Set --
-----------------------------
overriding procedure Visit_Config_Config_Item_Set
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Config_Config_Item_Set;
-----------------------------
-- Visit_Db_Connection_Data --
-----------------------------
overriding procedure Visit_Db_Connection_Data
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Connection_Data;
-----------------------------
-- Visit_Db_Connection_Resource --
-----------------------------
overriding procedure Visit_Db_Connection_Resource
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Connection_Resource;
-----------------------------
-- Visit_Db_Data_Source --
-----------------------------
overriding procedure Visit_Db_Data_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Data_Source;
-----------------------------
-- Visit_Db_Data_Source_Setting --
-----------------------------
overriding procedure Visit_Db_Data_Source_Setting
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Data_Source_Setting;
-----------------------------
-- Visit_Db_Data_Source_Setting_Value --
-----------------------------
overriding procedure Visit_Db_Data_Source_Setting_Value
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Data_Source_Setting_Value;
-----------------------------
-- Visit_Db_Data_Source_Settings --
-----------------------------
overriding procedure Visit_Db_Data_Source_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Data_Source_Settings;
-----------------------------
-- Visit_Db_Database_Description --
-----------------------------
overriding procedure Visit_Db_Database_Description
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Database_Description;
-----------------------------
-- Visit_Db_Delimiter --
-----------------------------
overriding procedure Visit_Db_Delimiter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Delimiter;
-----------------------------
-- Visit_Db_Driver_Settings --
-----------------------------
overriding procedure Visit_Db_Driver_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Driver_Settings;
-----------------------------
-- Visit_Db_File_Based_Database --
-----------------------------
overriding procedure Visit_Db_File_Based_Database
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_File_Based_Database;
-----------------------------
-- Visit_Draw_Fill_Image --
-----------------------------
overriding procedure Visit_Draw_Fill_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Fill_Image;
-----------------------------
-- Visit_Db_Filter_Statement --
-----------------------------
overriding procedure Visit_Db_Filter_Statement
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Filter_Statement;
-----------------------------
-- Visit_Db_Forms --
-----------------------------
overriding procedure Visit_Db_Forms
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Forms;
-----------------------------
-- Visit_Db_Index --
-----------------------------
overriding procedure Visit_Db_Index
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Index;
-----------------------------
-- Visit_Db_Index_Column --
-----------------------------
overriding procedure Visit_Db_Index_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Index_Column;
-----------------------------
-- Visit_Db_Index_Columns --
-----------------------------
overriding procedure Visit_Db_Index_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Index_Columns;
-----------------------------
-- Visit_Db_Indices --
-----------------------------
overriding procedure Visit_Db_Indices
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Indices;
-----------------------------
-- Visit_Db_Key --
-----------------------------
overriding procedure Visit_Db_Key
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Key;
-----------------------------
-- Visit_Db_Key_Column --
-----------------------------
overriding procedure Visit_Db_Key_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Key_Column;
-----------------------------
-- Visit_Db_Key_Columns --
-----------------------------
overriding procedure Visit_Db_Key_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Key_Columns;
-----------------------------
-- Visit_Db_Keys --
-----------------------------
overriding procedure Visit_Db_Keys
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Keys;
-----------------------------
-- Visit_Db_Login --
-----------------------------
overriding procedure Visit_Db_Login
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Login;
-----------------------------
-- Visit_Db_Order_Statement --
-----------------------------
overriding procedure Visit_Db_Order_Statement
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Order_Statement;
-----------------------------
-- Visit_Db_Queries --
-----------------------------
overriding procedure Visit_Db_Queries
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Queries;
-----------------------------
-- Visit_Db_Query --
-----------------------------
overriding procedure Visit_Db_Query
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Query;
-----------------------------
-- Visit_Db_Query_Collection --
-----------------------------
overriding procedure Visit_Db_Query_Collection
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Query_Collection;
-----------------------------
-- Visit_Db_Reports --
-----------------------------
overriding procedure Visit_Db_Reports
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Reports;
-----------------------------
-- Visit_Db_Schema_Definition --
-----------------------------
overriding procedure Visit_Db_Schema_Definition
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Schema_Definition;
-----------------------------
-- Visit_Db_Server_Database --
-----------------------------
overriding procedure Visit_Db_Server_Database
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Server_Database;
-----------------------------
-- Visit_Db_Table_Definition --
-----------------------------
overriding procedure Visit_Db_Table_Definition
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Definition;
-----------------------------
-- Visit_Db_Table_Definitions --
-----------------------------
overriding procedure Visit_Db_Table_Definitions
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Definitions;
-----------------------------
-- Visit_Db_Table_Exclude_Filter --
-----------------------------
overriding procedure Visit_Db_Table_Exclude_Filter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Exclude_Filter;
-----------------------------
-- Visit_Db_Table_Filter --
-----------------------------
overriding procedure Visit_Db_Table_Filter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Filter;
-----------------------------
-- Visit_Db_Table_Filter_Pattern --
-----------------------------
overriding procedure Visit_Db_Table_Filter_Pattern
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Filter_Pattern;
-----------------------------
-- Visit_Db_Table_Include_Filter --
-----------------------------
overriding procedure Visit_Db_Table_Include_Filter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Include_Filter;
-----------------------------
-- Visit_Db_Table_Representation --
-----------------------------
overriding procedure Visit_Db_Table_Representation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Representation;
-----------------------------
-- Visit_Db_Table_Representations --
-----------------------------
overriding procedure Visit_Db_Table_Representations
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Representations;
-----------------------------
-- Visit_Db_Table_Setting --
-----------------------------
overriding procedure Visit_Db_Table_Setting
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Setting;
-----------------------------
-- Visit_Db_Table_Settings --
-----------------------------
overriding procedure Visit_Db_Table_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Settings;
-----------------------------
-- Visit_Db_Table_Type --
-----------------------------
overriding procedure Visit_Db_Table_Type
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Type;
-----------------------------
-- Visit_Db_Table_Type_Filter --
-----------------------------
overriding procedure Visit_Db_Table_Type_Filter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Table_Type_Filter;
-----------------------------
-- Visit_Db_Update_Table --
-----------------------------
overriding procedure Visit_Db_Update_Table
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Db_Update_Table;
-----------------------------
-- Visit_Draw_Connector --
-----------------------------
overriding procedure Visit_Draw_Connector
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Connector;
-----------------------------
-- Visit_Draw_Contour_Path --
-----------------------------
overriding procedure Visit_Draw_Contour_Path
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Contour_Path;
-----------------------------
-- Visit_Draw_Contour_Polygon --
-----------------------------
overriding procedure Visit_Draw_Contour_Polygon
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Contour_Polygon;
-----------------------------
-- Visit_Draw_Control --
-----------------------------
overriding procedure Visit_Draw_Control
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Control;
-----------------------------
-- Visit_Form_Connection_Resource --
-----------------------------
overriding procedure Visit_Form_Connection_Resource
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Connection_Resource;
-----------------------------
-- Visit_Table_Consolidation --
-----------------------------
overriding procedure Visit_Table_Consolidation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Consolidation;
-----------------------------
-- Visit_Table_Content_Validation --
-----------------------------
overriding procedure Visit_Table_Content_Validation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Content_Validation;
-----------------------------
-- Visit_Table_Content_Validations --
-----------------------------
overriding procedure Visit_Table_Content_Validations
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Content_Validations;
-----------------------------
-- Visit_Table_Covered_Table_Cell --
-----------------------------
overriding procedure Visit_Table_Covered_Table_Cell
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Covered_Table_Cell;
-----------------------------
-- Visit_Meta_Creation_Date --
-----------------------------
overriding procedure Visit_Meta_Creation_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Creation_Date;
-----------------------------
-- Visit_Text_Creation_Date --
-----------------------------
overriding procedure Visit_Text_Creation_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Creation_Date;
-----------------------------
-- Visit_Text_Creation_Time --
-----------------------------
overriding procedure Visit_Text_Creation_Time
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Creation_Time;
-----------------------------
-- Visit_Dc_Creator --
-----------------------------
overriding procedure Visit_Dc_Creator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dc_Creator;
-----------------------------
-- Visit_Dr3d_Cube --
-----------------------------
overriding procedure Visit_Dr3d_Cube
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dr3d_Cube;
-----------------------------
-- Visit_Number_Currency_Style --
-----------------------------
overriding procedure Visit_Number_Currency_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Currency_Style;
-----------------------------
-- Visit_Number_Currency_Symbol --
-----------------------------
overriding procedure Visit_Number_Currency_Symbol
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Currency_Symbol;
-----------------------------
-- Visit_Draw_Custom_Shape --
-----------------------------
overriding procedure Visit_Draw_Custom_Shape
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Custom_Shape;
-----------------------------
-- Visit_Form_Date --
-----------------------------
overriding procedure Visit_Form_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Date;
-----------------------------
-- Visit_Meta_Date_String --
-----------------------------
overriding procedure Visit_Meta_Date_String
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Date_String;
-----------------------------
-- Visit_Number_Date_Style --
-----------------------------
overriding procedure Visit_Number_Date_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Date_Style;
-----------------------------
-- Visit_Number_Day --
-----------------------------
overriding procedure Visit_Number_Day
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Day;
-----------------------------
-- Visit_Number_Day_Of_Week --
-----------------------------
overriding procedure Visit_Number_Day_Of_Week
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Day_Of_Week;
-----------------------------
-- Visit_Number_Embedded_Text --
-----------------------------
overriding procedure Visit_Number_Embedded_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Embedded_Text;
-----------------------------
-- Visit_Office_Database --
-----------------------------
overriding procedure Visit_Office_Database
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Database;
-----------------------------
-- Visit_Office_Dde_Source --
-----------------------------
overriding procedure Visit_Office_Dde_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Dde_Source;
-----------------------------
-- Visit_Presentation_Date_Time --
-----------------------------
overriding procedure Visit_Presentation_Date_Time
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Date_Time;
-----------------------------
-- Visit_Presentation_Date_Time_Decl --
-----------------------------
overriding procedure Visit_Presentation_Date_Time_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Date_Time_Decl;
-----------------------------
-- Visit_Style_Default_Page_Layout --
-----------------------------
overriding procedure Visit_Style_Default_Page_Layout
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Default_Page_Layout;
-----------------------------
-- Visit_Style_Default_Style --
-----------------------------
overriding procedure Visit_Style_Default_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Default_Style;
-----------------------------
-- Visit_Style_Drawing_Page_Properties --
-----------------------------
overriding procedure Visit_Style_Drawing_Page_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Drawing_Page_Properties;
-----------------------------
-- Visit_Style_Drop_Cap --
-----------------------------
overriding procedure Visit_Style_Drop_Cap
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Drop_Cap;
-----------------------------
-- Visit_Svg_Definition_Src --
-----------------------------
overriding procedure Visit_Svg_Definition_Src
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Definition_Src;
-----------------------------
-- Visit_Table_Dde_Link --
-----------------------------
overriding procedure Visit_Table_Dde_Link
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Dde_Link;
-----------------------------
-- Visit_Presentation_Dim --
-----------------------------
overriding procedure Visit_Presentation_Dim
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Dim;
-----------------------------
-- Visit_Draw_Enhanced_Geometry --
-----------------------------
overriding procedure Visit_Draw_Enhanced_Geometry
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Enhanced_Geometry;
-----------------------------
-- Visit_Dr3d_Extrude --
-----------------------------
overriding procedure Visit_Dr3d_Extrude
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dr3d_Extrude;
-----------------------------
-- Visit_Dr3d_Light --
-----------------------------
overriding procedure Visit_Dr3d_Light
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dr3d_Light;
-----------------------------
-- Visit_Dr3d_Rotate --
-----------------------------
overriding procedure Visit_Dr3d_Rotate
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dr3d_Rotate;
-----------------------------
-- Visit_Dr3d_Scene --
-----------------------------
overriding procedure Visit_Dr3d_Scene
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dr3d_Scene;
-----------------------------
-- Visit_Dr3d_Sphere --
-----------------------------
overriding procedure Visit_Dr3d_Sphere
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dr3d_Sphere;
-----------------------------
-- Visit_Svg_Desc --
-----------------------------
overriding procedure Visit_Svg_Desc
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Desc;
-----------------------------
-- Visit_Draw_Ellipse --
-----------------------------
overriding procedure Visit_Draw_Ellipse
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Ellipse;
-----------------------------
-- Visit_Draw_Equation --
-----------------------------
overriding procedure Visit_Draw_Equation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Equation;
-----------------------------
-- Visit_Number_Era --
-----------------------------
overriding procedure Visit_Number_Era
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Era;
-----------------------------
-- Visit_Table_Even_Columns --
-----------------------------
overriding procedure Visit_Table_Even_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Even_Columns;
-----------------------------
-- Visit_Table_Even_Rows --
-----------------------------
overriding procedure Visit_Table_Even_Rows
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Even_Rows;
-----------------------------
-- Visit_Script_Event_Listener --
-----------------------------
overriding procedure Visit_Script_Event_Listener
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Script_Event_Listener;
-----------------------------
-- Visit_Form_File --
-----------------------------
overriding procedure Visit_Form_File
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_File;
-----------------------------
-- Visit_Form_Fixed_Text --
-----------------------------
overriding procedure Visit_Form_Fixed_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Fixed_Text;
-----------------------------
-- Visit_Presentation_Event_Listener --
-----------------------------
overriding procedure Visit_Presentation_Event_Listener
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Event_Listener;
-----------------------------
-- Visit_Draw_Floating_Frame --
-----------------------------
overriding procedure Visit_Draw_Floating_Frame
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Floating_Frame;
-----------------------------
-- Visit_Form_Form --
-----------------------------
overriding procedure Visit_Form_Form
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Form;
-----------------------------
-- Visit_Form_Formatted_Text --
-----------------------------
overriding procedure Visit_Form_Formatted_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Formatted_Text;
-----------------------------
-- Visit_Number_Fraction --
-----------------------------
overriding procedure Visit_Number_Fraction
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Fraction;
-----------------------------
-- Visit_Draw_Frame --
-----------------------------
overriding procedure Visit_Draw_Frame
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Frame;
-----------------------------
-- Visit_Form_Frame --
-----------------------------
overriding procedure Visit_Form_Frame
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Frame;
-----------------------------
-- Visit_Form_Generic_Control --
-----------------------------
overriding procedure Visit_Form_Generic_Control
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Generic_Control;
-----------------------------
-- Visit_Office_Event_Listeners --
-----------------------------
overriding procedure Visit_Office_Event_Listeners
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Event_Listeners;
-----------------------------
-- Visit_Style_Font_Face --
-----------------------------
overriding procedure Visit_Style_Font_Face
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Font_Face;
-----------------------------
-- Visit_Svg_Font_Face_Format --
-----------------------------
overriding procedure Visit_Svg_Font_Face_Format
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Font_Face_Format;
-----------------------------
-- Visit_Svg_Font_Face_Name --
-----------------------------
overriding procedure Visit_Svg_Font_Face_Name
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Font_Face_Name;
-----------------------------
-- Visit_Svg_Font_Face_Src --
-----------------------------
overriding procedure Visit_Svg_Font_Face_Src
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Font_Face_Src;
-----------------------------
-- Visit_Svg_Font_Face_Uri --
-----------------------------
overriding procedure Visit_Svg_Font_Face_Uri
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Font_Face_Uri;
-----------------------------
-- Visit_Table_First_Column --
-----------------------------
overriding procedure Visit_Table_First_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_First_Column;
-----------------------------
-- Visit_Table_First_Row --
-----------------------------
overriding procedure Visit_Table_First_Row
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_First_Row;
-----------------------------
-- Visit_Office_Forms --
-----------------------------
overriding procedure Visit_Office_Forms
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Forms;
-----------------------------
-- Visit_Presentation_Footer --
-----------------------------
overriding procedure Visit_Presentation_Footer
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Footer;
-----------------------------
-- Visit_Style_Footer --
-----------------------------
overriding procedure Visit_Style_Footer
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Footer;
-----------------------------
-- Visit_Presentation_Footer_Decl --
-----------------------------
overriding procedure Visit_Presentation_Footer_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Footer_Decl;
-----------------------------
-- Visit_Style_Footer_Left --
-----------------------------
overriding procedure Visit_Style_Footer_Left
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Footer_Left;
-----------------------------
-- Visit_Style_Footer_Style --
-----------------------------
overriding procedure Visit_Style_Footer_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Footer_Style;
-----------------------------
-- Visit_Style_Footnote_Sep --
-----------------------------
overriding procedure Visit_Style_Footnote_Sep
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Footnote_Sep;
-----------------------------
-- Visit_Draw_G --
-----------------------------
overriding procedure Visit_Draw_G
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_G;
-----------------------------
-- Visit_Draw_Glue_Point --
-----------------------------
overriding procedure Visit_Draw_Glue_Point
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Glue_Point;
-----------------------------
-- Visit_Draw_Gradient --
-----------------------------
overriding procedure Visit_Draw_Gradient
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Gradient;
-----------------------------
-- Visit_Style_Graphic_Properties --
-----------------------------
overriding procedure Visit_Style_Graphic_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Graphic_Properties;
-----------------------------
-- Visit_Form_Grid --
-----------------------------
overriding procedure Visit_Form_Grid
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Grid;
-----------------------------
-- Visit_Draw_Handle --
-----------------------------
overriding procedure Visit_Draw_Handle
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Handle;
-----------------------------
-- Visit_Draw_Hatch --
-----------------------------
overriding procedure Visit_Draw_Hatch
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Hatch;
-----------------------------
-- Visit_Form_Hidden --
-----------------------------
overriding procedure Visit_Form_Hidden
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Hidden;
-----------------------------
-- Visit_Number_Hours --
-----------------------------
overriding procedure Visit_Number_Hours
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Hours;
-----------------------------
-- Visit_Form_Image --
-----------------------------
overriding procedure Visit_Form_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Image;
-----------------------------
-- Visit_Form_Image_Frame --
-----------------------------
overriding procedure Visit_Form_Image_Frame
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Image_Frame;
-----------------------------
-- Visit_Presentation_Header --
-----------------------------
overriding procedure Visit_Presentation_Header
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Header;
-----------------------------
-- Visit_Style_Header --
-----------------------------
overriding procedure Visit_Style_Header
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Header;
-----------------------------
-- Visit_Presentation_Header_Decl --
-----------------------------
overriding procedure Visit_Presentation_Header_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Header_Decl;
-----------------------------
-- Visit_Style_Header_Footer_Properties --
-----------------------------
overriding procedure Visit_Style_Header_Footer_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Header_Footer_Properties;
-----------------------------
-- Visit_Style_Header_Left --
-----------------------------
overriding procedure Visit_Style_Header_Left
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Header_Left;
-----------------------------
-- Visit_Style_Header_Style --
-----------------------------
overriding procedure Visit_Style_Header_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Header_Style;
-----------------------------
-- Visit_Presentation_Hide_Shape --
-----------------------------
overriding procedure Visit_Presentation_Hide_Shape
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Hide_Shape;
-----------------------------
-- Visit_Presentation_Hide_Text --
-----------------------------
overriding procedure Visit_Presentation_Hide_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Hide_Text;
-----------------------------
-- Visit_Draw_Image --
-----------------------------
overriding procedure Visit_Draw_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Image;
-----------------------------
-- Visit_Draw_Image_Map --
-----------------------------
overriding procedure Visit_Draw_Image_Map
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Image_Map;
-----------------------------
-- Visit_Form_Item --
-----------------------------
overriding procedure Visit_Form_Item
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Item;
-----------------------------
-- Visit_Draw_Layer --
-----------------------------
overriding procedure Visit_Draw_Layer
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Layer;
-----------------------------
-- Visit_Draw_Layer_Set --
-----------------------------
overriding procedure Visit_Draw_Layer_Set
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Layer_Set;
-----------------------------
-- Visit_Draw_Line --
-----------------------------
overriding procedure Visit_Draw_Line
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Line;
-----------------------------
-- Visit_Style_List_Level_Label_Alignment --
-----------------------------
overriding procedure Visit_Style_List_Level_Label_Alignment
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_List_Level_Label_Alignment;
-----------------------------
-- Visit_Style_List_Level_Properties --
-----------------------------
overriding procedure Visit_Style_List_Level_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_List_Level_Properties;
-----------------------------
-- Visit_Draw_Marker --
-----------------------------
overriding procedure Visit_Draw_Marker
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Marker;
-----------------------------
-- Visit_Svg_LinearGradient --
-----------------------------
overriding procedure Visit_Svg_LinearGradient
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_LinearGradient;
-----------------------------
-- Visit_Form_List_Property --
-----------------------------
overriding procedure Visit_Form_List_Property
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_List_Property;
-----------------------------
-- Visit_Form_List_Value --
-----------------------------
overriding procedure Visit_Form_List_Value
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_List_Value;
-----------------------------
-- Visit_Form_Listbox --
-----------------------------
overriding procedure Visit_Form_Listbox
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Listbox;
-----------------------------
-- Visit_Style_Map --
-----------------------------
overriding procedure Visit_Style_Map
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Map;
-----------------------------
-- Visit_Style_Master_Page --
-----------------------------
overriding procedure Visit_Style_Master_Page
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Master_Page;
-----------------------------
-- Visit_Math_Math --
-----------------------------
overriding procedure Visit_Math_Math
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Math_Math;
-----------------------------
-- Visit_Draw_Measure --
-----------------------------
overriding procedure Visit_Draw_Measure
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Measure;
-----------------------------
-- Visit_Number_Minutes --
-----------------------------
overriding procedure Visit_Number_Minutes
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Minutes;
-----------------------------
-- Visit_Number_Month --
-----------------------------
overriding procedure Visit_Number_Month
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Month;
-----------------------------
-- Visit_Presentation_Notes --
-----------------------------
overriding procedure Visit_Presentation_Notes
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Notes;
-----------------------------
-- Visit_Form_Number --
-----------------------------
overriding procedure Visit_Form_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Number;
-----------------------------
-- Visit_Number_Number --
-----------------------------
overriding procedure Visit_Number_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Number;
-----------------------------
-- Visit_Number_Number_Style --
-----------------------------
overriding procedure Visit_Number_Number_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Number_Style;
-----------------------------
-- Visit_Draw_Object --
-----------------------------
overriding procedure Visit_Draw_Object
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Object;
-----------------------------
-- Visit_Draw_Object_Ole --
-----------------------------
overriding procedure Visit_Draw_Object_Ole
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Object_Ole;
-----------------------------
-- Visit_Draw_Opacity --
-----------------------------
overriding procedure Visit_Draw_Opacity
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Opacity;
-----------------------------
-- Visit_Form_Option --
-----------------------------
overriding procedure Visit_Form_Option
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Option;
-----------------------------
-- Visit_Draw_Page --
-----------------------------
overriding procedure Visit_Draw_Page
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Page;
-----------------------------
-- Visit_Style_Page_Layout --
-----------------------------
overriding procedure Visit_Style_Page_Layout
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Page_Layout;
-----------------------------
-- Visit_Style_Page_Layout_Properties --
-----------------------------
overriding procedure Visit_Style_Page_Layout_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Page_Layout_Properties;
-----------------------------
-- Visit_Draw_Page_Thumbnail --
-----------------------------
overriding procedure Visit_Draw_Page_Thumbnail
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Page_Thumbnail;
-----------------------------
-- Visit_Style_Paragraph_Properties --
-----------------------------
overriding procedure Visit_Style_Paragraph_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Paragraph_Properties;
-----------------------------
-- Visit_Draw_Param --
-----------------------------
overriding procedure Visit_Draw_Param
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Param;
-----------------------------
-- Visit_Form_Password --
-----------------------------
overriding procedure Visit_Form_Password
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Password;
-----------------------------
-- Visit_Draw_Path --
-----------------------------
overriding procedure Visit_Draw_Path
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Path;
-----------------------------
-- Visit_Number_Percentage_Style --
-----------------------------
overriding procedure Visit_Number_Percentage_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Percentage_Style;
-----------------------------
-- Visit_Presentation_Placeholder --
-----------------------------
overriding procedure Visit_Presentation_Placeholder
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Placeholder;
-----------------------------
-- Visit_Draw_Plugin --
-----------------------------
overriding procedure Visit_Draw_Plugin
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Plugin;
-----------------------------
-- Visit_Draw_Polygon --
-----------------------------
overriding procedure Visit_Draw_Polygon
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Polygon;
-----------------------------
-- Visit_Draw_Polyline --
-----------------------------
overriding procedure Visit_Draw_Polyline
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Polyline;
-----------------------------
-- Visit_Style_Presentation_Page_Layout --
-----------------------------
overriding procedure Visit_Style_Presentation_Page_Layout
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Presentation_Page_Layout;
-----------------------------
-- Visit_Form_Properties --
-----------------------------
overriding procedure Visit_Form_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Properties;
-----------------------------
-- Visit_Form_Property --
-----------------------------
overriding procedure Visit_Form_Property
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Property;
-----------------------------
-- Visit_Number_Quarter --
-----------------------------
overriding procedure Visit_Number_Quarter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Quarter;
-----------------------------
-- Visit_Svg_RadialGradient --
-----------------------------
overriding procedure Visit_Svg_RadialGradient
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_RadialGradient;
-----------------------------
-- Visit_Form_Radio --
-----------------------------
overriding procedure Visit_Form_Radio
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Radio;
-----------------------------
-- Visit_Draw_Rect --
-----------------------------
overriding procedure Visit_Draw_Rect
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Rect;
-----------------------------
-- Visit_Style_Region_Center --
-----------------------------
overriding procedure Visit_Style_Region_Center
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Region_Center;
-----------------------------
-- Visit_Style_Region_Left --
-----------------------------
overriding procedure Visit_Style_Region_Left
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Region_Left;
-----------------------------
-- Visit_Style_Region_Right --
-----------------------------
overriding procedure Visit_Style_Region_Right
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Region_Right;
-----------------------------
-- Visit_Draw_Regular_Polygon --
-----------------------------
overriding procedure Visit_Draw_Regular_Polygon
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Regular_Polygon;
-----------------------------
-- Visit_Style_Ruby_Properties --
-----------------------------
overriding procedure Visit_Style_Ruby_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Ruby_Properties;
-----------------------------
-- Visit_Draw_Stroke_Dash --
-----------------------------
overriding procedure Visit_Draw_Stroke_Dash
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Stroke_Dash;
-----------------------------
-- Visit_Number_Scientific_Number --
-----------------------------
overriding procedure Visit_Number_Scientific_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Scientific_Number;
-----------------------------
-- Visit_Number_Seconds --
-----------------------------
overriding procedure Visit_Number_Seconds
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Seconds;
-----------------------------
-- Visit_Style_Section_Properties --
-----------------------------
overriding procedure Visit_Style_Section_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Section_Properties;
-----------------------------
-- Visit_Svg_Stop --
-----------------------------
overriding procedure Visit_Svg_Stop
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Stop;
-----------------------------
-- Visit_Number_Text --
-----------------------------
overriding procedure Visit_Number_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Text;
-----------------------------
-- Visit_Style_Style --
-----------------------------
overriding procedure Visit_Style_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Style;
-----------------------------
-- Visit_Style_Tab_Stop --
-----------------------------
overriding procedure Visit_Style_Tab_Stop
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Tab_Stop;
-----------------------------
-- Visit_Style_Tab_Stops --
-----------------------------
overriding procedure Visit_Style_Tab_Stops
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Tab_Stops;
-----------------------------
-- Visit_Style_Table_Cell_Properties --
-----------------------------
overriding procedure Visit_Style_Table_Cell_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Table_Cell_Properties;
-----------------------------
-- Visit_Style_Table_Column_Properties --
-----------------------------
overriding procedure Visit_Style_Table_Column_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Table_Column_Properties;
-----------------------------
-- Visit_Style_Table_Properties --
-----------------------------
overriding procedure Visit_Style_Table_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Table_Properties;
-----------------------------
-- Visit_Style_Table_Row_Properties --
-----------------------------
overriding procedure Visit_Style_Table_Row_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Table_Row_Properties;
-----------------------------
-- Visit_Form_Text --
-----------------------------
overriding procedure Visit_Form_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Text;
-----------------------------
-- Visit_Draw_Text_Box --
-----------------------------
overriding procedure Visit_Draw_Text_Box
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Draw_Text_Box;
-----------------------------
-- Visit_Number_Text_Content --
-----------------------------
overriding procedure Visit_Number_Text_Content
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Text_Content;
-----------------------------
-- Visit_Style_Text_Properties --
-----------------------------
overriding procedure Visit_Style_Text_Properties
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Text_Properties;
-----------------------------
-- Visit_Number_Text_Style --
-----------------------------
overriding procedure Visit_Number_Text_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Text_Style;
-----------------------------
-- Visit_Form_Textarea --
-----------------------------
overriding procedure Visit_Form_Textarea
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Textarea;
-----------------------------
-- Visit_Form_Time --
-----------------------------
overriding procedure Visit_Form_Time
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Time;
-----------------------------
-- Visit_Number_Time_Style --
-----------------------------
overriding procedure Visit_Number_Time_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Time_Style;
-----------------------------
-- Visit_Form_Value_Range --
-----------------------------
overriding procedure Visit_Form_Value_Range
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Form_Value_Range;
-----------------------------
-- Visit_Number_Week_Of_Year --
-----------------------------
overriding procedure Visit_Number_Week_Of_Year
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Week_Of_Year;
-----------------------------
-- Visit_Number_Year --
-----------------------------
overriding procedure Visit_Number_Year
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Number_Year;
-----------------------------
-- Visit_Table_Cut_Offs --
-----------------------------
overriding procedure Visit_Table_Cut_Offs
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Cut_Offs;
-----------------------------
-- Visit_Table_Data_Pilot_Display_Info --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Display_Info
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Display_Info;
-----------------------------
-- Visit_Table_Data_Pilot_Field --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Field
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Field;
-----------------------------
-- Visit_Table_Data_Pilot_Field_Reference --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Field_Reference
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Field_Reference;
-----------------------------
-- Visit_Table_Data_Pilot_Group --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Group
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Group;
-----------------------------
-- Visit_Table_Data_Pilot_Group_Member --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Group_Member
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Group_Member;
-----------------------------
-- Visit_Table_Data_Pilot_Groups --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Groups
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Groups;
-----------------------------
-- Visit_Table_Data_Pilot_Layout_Info --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Layout_Info
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Layout_Info;
-----------------------------
-- Visit_Table_Data_Pilot_Level --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Level
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Level;
-----------------------------
-- Visit_Table_Data_Pilot_Member --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Member
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Member;
-----------------------------
-- Visit_Table_Data_Pilot_Members --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Members
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Members;
-----------------------------
-- Visit_Table_Data_Pilot_Sort_Info --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Sort_Info
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Sort_Info;
-----------------------------
-- Visit_Table_Data_Pilot_Subtotal --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Subtotal
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Subtotal;
-----------------------------
-- Visit_Table_Data_Pilot_Subtotals --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Subtotals
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Subtotals;
-----------------------------
-- Visit_Table_Data_Pilot_Table --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Table
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Table;
-----------------------------
-- Visit_Table_Data_Pilot_Tables --
-----------------------------
overriding procedure Visit_Table_Data_Pilot_Tables
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Data_Pilot_Tables;
-----------------------------
-- Visit_Table_Database_Range --
-----------------------------
overriding procedure Visit_Table_Database_Range
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Database_Range;
-----------------------------
-- Visit_Table_Database_Ranges --
-----------------------------
overriding procedure Visit_Table_Database_Ranges
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Database_Ranges;
-----------------------------
-- Visit_Table_Database_Source_Query --
-----------------------------
overriding procedure Visit_Table_Database_Source_Query
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Database_Source_Query;
-----------------------------
-- Visit_Table_Database_Source_Sql --
-----------------------------
overriding procedure Visit_Table_Database_Source_Sql
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Database_Source_Sql;
-----------------------------
-- Visit_Table_Database_Source_Table --
-----------------------------
overriding procedure Visit_Table_Database_Source_Table
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Database_Source_Table;
-----------------------------
-- Visit_Table_Dde_Links --
-----------------------------
overriding procedure Visit_Table_Dde_Links
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Dde_Links;
-----------------------------
-- Visit_Table_Deletion --
-----------------------------
overriding procedure Visit_Table_Deletion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Deletion;
-----------------------------
-- Visit_Table_Deletions --
-----------------------------
overriding procedure Visit_Table_Deletions
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Deletions;
-----------------------------
-- Visit_Table_Dependencies --
-----------------------------
overriding procedure Visit_Table_Dependencies
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Dependencies;
-----------------------------
-- Visit_Table_Dependency --
-----------------------------
overriding procedure Visit_Table_Dependency
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Dependency;
-----------------------------
-- Visit_Table_Desc --
-----------------------------
overriding procedure Visit_Table_Desc
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Desc;
-----------------------------
-- Visit_Table_Last_Column --
-----------------------------
overriding procedure Visit_Table_Last_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Last_Column;
-----------------------------
-- Visit_Table_Last_Row --
-----------------------------
overriding procedure Visit_Table_Last_Row
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Last_Row;
-----------------------------
-- Visit_Table_Odd_Columns --
-----------------------------
overriding procedure Visit_Table_Odd_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Odd_Columns;
-----------------------------
-- Visit_Table_Odd_Rows --
-----------------------------
overriding procedure Visit_Table_Odd_Rows
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Odd_Rows;
-----------------------------
-- Visit_Table_Table_Template --
-----------------------------
overriding procedure Visit_Table_Table_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Template;
-----------------------------
-- Visit_Text_Creator --
-----------------------------
overriding procedure Visit_Text_Creator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Creator;
-----------------------------
-- Visit_Text_Database_Display --
-----------------------------
overriding procedure Visit_Text_Database_Display
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Database_Display;
-----------------------------
-- Visit_Text_Database_Name --
-----------------------------
overriding procedure Visit_Text_Database_Name
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Database_Name;
-----------------------------
-- Visit_Text_Database_Next --
-----------------------------
overriding procedure Visit_Text_Database_Next
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Database_Next;
-----------------------------
-- Visit_Text_Database_Row_Number --
-----------------------------
overriding procedure Visit_Text_Database_Row_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Database_Row_Number;
-----------------------------
-- Visit_Text_Database_Row_Select --
-----------------------------
overriding procedure Visit_Text_Database_Row_Select
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Database_Row_Select;
-----------------------------
-- Visit_Dc_Date --
-----------------------------
overriding procedure Visit_Dc_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dc_Date;
-----------------------------
-- Visit_Text_Date --
-----------------------------
overriding procedure Visit_Text_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Date;
-----------------------------
-- Visit_Text_Dde_Connection --
-----------------------------
overriding procedure Visit_Text_Dde_Connection
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Dde_Connection;
-----------------------------
-- Visit_Text_Dde_Connection_Decl --
-----------------------------
overriding procedure Visit_Text_Dde_Connection_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Dde_Connection_Decl;
-----------------------------
-- Visit_Text_Dde_Connection_Decls --
-----------------------------
overriding procedure Visit_Text_Dde_Connection_Decls
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Dde_Connection_Decls;
-----------------------------
-- Visit_Text_Deletion --
-----------------------------
overriding procedure Visit_Text_Deletion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Deletion;
-----------------------------
-- Visit_Dc_Description --
-----------------------------
overriding procedure Visit_Dc_Description
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dc_Description;
-----------------------------
-- Visit_Table_Detective --
-----------------------------
overriding procedure Visit_Table_Detective
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Detective;
-----------------------------
-- Visit_Text_Description --
-----------------------------
overriding procedure Visit_Text_Description
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Description;
-----------------------------
-- Visit_Meta_Document_Statistic --
-----------------------------
overriding procedure Visit_Meta_Document_Statistic
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Document_Statistic;
-----------------------------
-- Visit_Meta_Editing_Cycles --
-----------------------------
overriding procedure Visit_Meta_Editing_Cycles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Editing_Cycles;
-----------------------------
-- Visit_Meta_Editing_Duration --
-----------------------------
overriding procedure Visit_Meta_Editing_Duration
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Editing_Duration;
-----------------------------
-- Visit_Dc_Language --
-----------------------------
overriding procedure Visit_Dc_Language
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dc_Language;
-----------------------------
-- Visit_Dc_Subject --
-----------------------------
overriding procedure Visit_Dc_Subject
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dc_Subject;
-----------------------------
-- Visit_Dc_Title --
-----------------------------
overriding procedure Visit_Dc_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Dc_Title;
-----------------------------
-- Visit_Meta_Generator --
-----------------------------
overriding procedure Visit_Meta_Generator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Generator;
-----------------------------
-- Visit_Meta_Hyperlink_Behaviour --
-----------------------------
overriding procedure Visit_Meta_Hyperlink_Behaviour
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Hyperlink_Behaviour;
-----------------------------
-- Visit_Meta_Initial_Creator --
-----------------------------
overriding procedure Visit_Meta_Initial_Creator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Initial_Creator;
-----------------------------
-- Visit_Meta_Keyword --
-----------------------------
overriding procedure Visit_Meta_Keyword
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Keyword;
-----------------------------
-- Visit_Meta_Print_Date --
-----------------------------
overriding procedure Visit_Meta_Print_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Print_Date;
-----------------------------
-- Visit_Meta_Printed_By --
-----------------------------
overriding procedure Visit_Meta_Printed_By
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Printed_By;
-----------------------------
-- Visit_Meta_Template --
-----------------------------
overriding procedure Visit_Meta_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_Template;
-----------------------------
-- Visit_Meta_User_Defined --
-----------------------------
overriding procedure Visit_Meta_User_Defined
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Meta_User_Defined;
-----------------------------
-- Visit_Office_Body --
-----------------------------
overriding procedure Visit_Office_Body
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Body;
-----------------------------
-- Visit_Office_Chart --
-----------------------------
overriding procedure Visit_Office_Chart
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Chart;
-----------------------------
-- Visit_Office_Document --
-----------------------------
overriding procedure Visit_Office_Document
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Document;
-----------------------------
-- Visit_Office_Document_Content --
-----------------------------
overriding procedure Visit_Office_Document_Content
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Document_Content;
-----------------------------
-- Visit_Office_Document_Meta --
-----------------------------
overriding procedure Visit_Office_Document_Meta
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Document_Meta;
-----------------------------
-- Visit_Office_Document_Settings --
-----------------------------
overriding procedure Visit_Office_Document_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Document_Settings;
-----------------------------
-- Visit_Office_Document_Styles --
-----------------------------
overriding procedure Visit_Office_Document_Styles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Document_Styles;
-----------------------------
-- Visit_Office_Drawing --
-----------------------------
overriding procedure Visit_Office_Drawing
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Drawing;
-----------------------------
-- Visit_Style_Handout_Master --
-----------------------------
overriding procedure Visit_Style_Handout_Master
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Style_Handout_Master;
-----------------------------
-- Visit_Table_Error_Macro --
-----------------------------
overriding procedure Visit_Table_Error_Macro
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Error_Macro;
-----------------------------
-- Visit_Table_Error_Message --
-----------------------------
overriding procedure Visit_Table_Error_Message
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Error_Message;
-----------------------------
-- Visit_Table_Filter --
-----------------------------
overriding procedure Visit_Table_Filter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Filter;
-----------------------------
-- Visit_Table_Filter_And --
-----------------------------
overriding procedure Visit_Table_Filter_And
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Filter_And;
-----------------------------
-- Visit_Table_Filter_Condition --
-----------------------------
overriding procedure Visit_Table_Filter_Condition
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Filter_Condition;
-----------------------------
-- Visit_Table_Filter_Or --
-----------------------------
overriding procedure Visit_Table_Filter_Or
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Filter_Or;
-----------------------------
-- Visit_Table_Filter_Set_Item --
-----------------------------
overriding procedure Visit_Table_Filter_Set_Item
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Filter_Set_Item;
-----------------------------
-- Visit_Table_Help_Message --
-----------------------------
overriding procedure Visit_Table_Help_Message
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Help_Message;
-----------------------------
-- Visit_Table_Highlighted_Range --
-----------------------------
overriding procedure Visit_Table_Highlighted_Range
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Highlighted_Range;
-----------------------------
-- Visit_Text_Editing_Cycles --
-----------------------------
overriding procedure Visit_Text_Editing_Cycles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Editing_Cycles;
-----------------------------
-- Visit_Text_Editing_Duration --
-----------------------------
overriding procedure Visit_Text_Editing_Duration
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Editing_Duration;
-----------------------------
-- Visit_Text_Execute_Macro --
-----------------------------
overriding procedure Visit_Text_Execute_Macro
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Execute_Macro;
-----------------------------
-- Visit_Text_Expression --
-----------------------------
overriding procedure Visit_Text_Expression
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Expression;
-----------------------------
-- Visit_Text_File_Name --
-----------------------------
overriding procedure Visit_Text_File_Name
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_File_Name;
-----------------------------
-- Visit_Office_Font_Face_Decls --
-----------------------------
overriding procedure Visit_Office_Font_Face_Decls
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Font_Face_Decls;
-----------------------------
-- Visit_Text_Format_Change --
-----------------------------
overriding procedure Visit_Text_Format_Change
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Format_Change;
-----------------------------
-- Visit_Text_H --
-----------------------------
overriding procedure Visit_Text_H
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_H;
-----------------------------
-- Visit_Text_Hidden_Paragraph --
-----------------------------
overriding procedure Visit_Text_Hidden_Paragraph
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Hidden_Paragraph;
-----------------------------
-- Visit_Text_Hidden_Text --
-----------------------------
overriding procedure Visit_Text_Hidden_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Hidden_Text;
-----------------------------
-- Visit_Text_Illustration_Index --
-----------------------------
overriding procedure Visit_Text_Illustration_Index
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Illustration_Index;
-----------------------------
-- Visit_Text_Illustration_Index_Entry_Template --
-----------------------------
overriding procedure Visit_Text_Illustration_Index_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Illustration_Index_Entry_Template;
-----------------------------
-- Visit_Text_Illustration_Index_Source --
-----------------------------
overriding procedure Visit_Text_Illustration_Index_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Illustration_Index_Source;
-----------------------------
-- Visit_Office_Image --
-----------------------------
overriding procedure Visit_Office_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Image;
-----------------------------
-- Visit_Table_Insertion --
-----------------------------
overriding procedure Visit_Table_Insertion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Insertion;
-----------------------------
-- Visit_Table_Insertion_Cut_Off --
-----------------------------
overriding procedure Visit_Table_Insertion_Cut_Off
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Insertion_Cut_Off;
-----------------------------
-- Visit_Table_Iteration --
-----------------------------
overriding procedure Visit_Table_Iteration
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Iteration;
-----------------------------
-- Visit_Table_Label_Range --
-----------------------------
overriding procedure Visit_Table_Label_Range
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Label_Range;
-----------------------------
-- Visit_Table_Label_Ranges --
-----------------------------
overriding procedure Visit_Table_Label_Ranges
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Label_Ranges;
-----------------------------
-- Visit_Text_Image_Count --
-----------------------------
overriding procedure Visit_Text_Image_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Image_Count;
-----------------------------
-- Visit_Text_Index_Body --
-----------------------------
overriding procedure Visit_Text_Index_Body
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Body;
-----------------------------
-- Visit_Text_Index_Entry_Bibliography --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Bibliography
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Bibliography;
-----------------------------
-- Visit_Text_Index_Entry_Chapter --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Chapter
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Chapter;
-----------------------------
-- Visit_Text_Index_Entry_Link_End --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Link_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Link_End;
-----------------------------
-- Visit_Text_Index_Entry_Link_Start --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Link_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Link_Start;
-----------------------------
-- Visit_Text_Index_Entry_Page_Number --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Page_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Page_Number;
-----------------------------
-- Visit_Text_Index_Entry_Span --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Span
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Span;
-----------------------------
-- Visit_Text_Index_Entry_Tab_Stop --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Tab_Stop
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Tab_Stop;
-----------------------------
-- Visit_Text_Index_Entry_Text --
-----------------------------
overriding procedure Visit_Text_Index_Entry_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Entry_Text;
-----------------------------
-- Visit_Text_Index_Source_Style --
-----------------------------
overriding procedure Visit_Text_Index_Source_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Source_Style;
-----------------------------
-- Visit_Text_Index_Source_Styles --
-----------------------------
overriding procedure Visit_Text_Index_Source_Styles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Source_Styles;
-----------------------------
-- Visit_Text_Index_Title --
-----------------------------
overriding procedure Visit_Text_Index_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Title;
-----------------------------
-- Visit_Text_Index_Title_Template --
-----------------------------
overriding procedure Visit_Text_Index_Title_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Index_Title_Template;
-----------------------------
-- Visit_Text_Initial_Creator --
-----------------------------
overriding procedure Visit_Text_Initial_Creator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Initial_Creator;
-----------------------------
-- Visit_Text_Insertion --
-----------------------------
overriding procedure Visit_Text_Insertion
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Insertion;
-----------------------------
-- Visit_Text_Keywords --
-----------------------------
overriding procedure Visit_Text_Keywords
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Keywords;
-----------------------------
-- Visit_Text_Line_Break --
-----------------------------
overriding procedure Visit_Text_Line_Break
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Line_Break;
-----------------------------
-- Visit_Text_Linenumbering_Configuration --
-----------------------------
overriding procedure Visit_Text_Linenumbering_Configuration
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Linenumbering_Configuration;
-----------------------------
-- Visit_Text_Linenumbering_Separator --
-----------------------------
overriding procedure Visit_Text_Linenumbering_Separator
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Linenumbering_Separator;
-----------------------------
-- Visit_Text_List --
-----------------------------
overriding procedure Visit_Text_List
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List;
-----------------------------
-- Visit_Text_List_Header --
-----------------------------
overriding procedure Visit_Text_List_Header
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List_Header;
-----------------------------
-- Visit_Text_List_Item --
-----------------------------
overriding procedure Visit_Text_List_Item
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List_Item;
-----------------------------
-- Visit_Text_List_Level_Style_Bullet --
-----------------------------
overriding procedure Visit_Text_List_Level_Style_Bullet
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List_Level_Style_Bullet;
-----------------------------
-- Visit_Text_List_Level_Style_Image --
-----------------------------
overriding procedure Visit_Text_List_Level_Style_Image
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List_Level_Style_Image;
-----------------------------
-- Visit_Text_List_Level_Style_Number --
-----------------------------
overriding procedure Visit_Text_List_Level_Style_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List_Level_Style_Number;
-----------------------------
-- Visit_Text_List_Style --
-----------------------------
overriding procedure Visit_Text_List_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_List_Style;
-----------------------------
-- Visit_Office_Master_Styles --
-----------------------------
overriding procedure Visit_Office_Master_Styles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Master_Styles;
-----------------------------
-- Visit_Text_Measure --
-----------------------------
overriding procedure Visit_Text_Measure
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Measure;
-----------------------------
-- Visit_Office_Meta --
-----------------------------
overriding procedure Visit_Office_Meta
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Meta;
-----------------------------
-- Visit_Presentation_Play --
-----------------------------
overriding procedure Visit_Presentation_Play
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Play;
-----------------------------
-- Visit_Presentation_Settings --
-----------------------------
overriding procedure Visit_Presentation_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Settings;
-----------------------------
-- Visit_Presentation_Show --
-----------------------------
overriding procedure Visit_Presentation_Show
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Show;
-----------------------------
-- Visit_Presentation_Show_Shape --
-----------------------------
overriding procedure Visit_Presentation_Show_Shape
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Show_Shape;
-----------------------------
-- Visit_Presentation_Show_Text --
-----------------------------
overriding procedure Visit_Presentation_Show_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Show_Text;
-----------------------------
-- Visit_Presentation_Sound --
-----------------------------
overriding procedure Visit_Presentation_Sound
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Presentation_Sound;
-----------------------------
-- Visit_Svg_Title --
-----------------------------
overriding procedure Visit_Svg_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Svg_Title;
-----------------------------
-- Visit_Table_Movement --
-----------------------------
overriding procedure Visit_Table_Movement
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Movement;
-----------------------------
-- Visit_Table_Movement_Cut_Off --
-----------------------------
overriding procedure Visit_Table_Movement_Cut_Off
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Movement_Cut_Off;
-----------------------------
-- Visit_Table_Named_Expression --
-----------------------------
overriding procedure Visit_Table_Named_Expression
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Named_Expression;
-----------------------------
-- Visit_Table_Named_Expressions --
-----------------------------
overriding procedure Visit_Table_Named_Expressions
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Named_Expressions;
-----------------------------
-- Visit_Table_Named_Range --
-----------------------------
overriding procedure Visit_Table_Named_Range
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Named_Range;
-----------------------------
-- Visit_Table_Null_Date --
-----------------------------
overriding procedure Visit_Table_Null_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Null_Date;
-----------------------------
-- Visit_Table_Operation --
-----------------------------
overriding procedure Visit_Table_Operation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Operation;
-----------------------------
-- Visit_Table_Previous --
-----------------------------
overriding procedure Visit_Table_Previous
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Previous;
-----------------------------
-- Visit_Table_Scenario --
-----------------------------
overriding procedure Visit_Table_Scenario
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Scenario;
-----------------------------
-- Visit_Table_Shapes --
-----------------------------
overriding procedure Visit_Table_Shapes
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Shapes;
-----------------------------
-- Visit_Table_Sort --
-----------------------------
overriding procedure Visit_Table_Sort
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Sort;
-----------------------------
-- Visit_Table_Sort_By --
-----------------------------
overriding procedure Visit_Table_Sort_By
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Sort_By;
-----------------------------
-- Visit_Table_Sort_Groups --
-----------------------------
overriding procedure Visit_Table_Sort_Groups
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Sort_Groups;
-----------------------------
-- Visit_Table_Source_Cell_Range --
-----------------------------
overriding procedure Visit_Table_Source_Cell_Range
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Source_Cell_Range;
-----------------------------
-- Visit_Table_Source_Range_Address --
-----------------------------
overriding procedure Visit_Table_Source_Range_Address
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Source_Range_Address;
-----------------------------
-- Visit_Table_Source_Service --
-----------------------------
overriding procedure Visit_Table_Source_Service
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Source_Service;
-----------------------------
-- Visit_Table_Subtotal_Field --
-----------------------------
overriding procedure Visit_Table_Subtotal_Field
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Subtotal_Field;
-----------------------------
-- Visit_Table_Subtotal_Rule --
-----------------------------
overriding procedure Visit_Table_Subtotal_Rule
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Subtotal_Rule;
-----------------------------
-- Visit_Table_Subtotal_Rules --
-----------------------------
overriding procedure Visit_Table_Subtotal_Rules
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Subtotal_Rules;
-----------------------------
-- Visit_Table_Table --
-----------------------------
overriding procedure Visit_Table_Table
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table;
-----------------------------
-- Visit_Table_Table_Cell --
-----------------------------
overriding procedure Visit_Table_Table_Cell
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Cell;
-----------------------------
-- Visit_Table_Table_Column --
-----------------------------
overriding procedure Visit_Table_Table_Column
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Column;
-----------------------------
-- Visit_Table_Table_Column_Group --
-----------------------------
overriding procedure Visit_Table_Table_Column_Group
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Column_Group;
-----------------------------
-- Visit_Table_Table_Columns --
-----------------------------
overriding procedure Visit_Table_Table_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Columns;
-----------------------------
-- Visit_Table_Table_Header_Columns --
-----------------------------
overriding procedure Visit_Table_Table_Header_Columns
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Header_Columns;
-----------------------------
-- Visit_Table_Table_Header_Rows --
-----------------------------
overriding procedure Visit_Table_Table_Header_Rows
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Header_Rows;
-----------------------------
-- Visit_Table_Table_Row --
-----------------------------
overriding procedure Visit_Table_Table_Row
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Row;
-----------------------------
-- Visit_Table_Table_Row_Group --
-----------------------------
overriding procedure Visit_Table_Table_Row_Group
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Row_Group;
-----------------------------
-- Visit_Table_Table_Rows --
-----------------------------
overriding procedure Visit_Table_Table_Rows
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Rows;
-----------------------------
-- Visit_Table_Table_Source --
-----------------------------
overriding procedure Visit_Table_Table_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Table_Source;
-----------------------------
-- Visit_Table_Target_Range_Address --
-----------------------------
overriding procedure Visit_Table_Target_Range_Address
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Target_Range_Address;
-----------------------------
-- Visit_Table_Title --
-----------------------------
overriding procedure Visit_Table_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Title;
-----------------------------
-- Visit_Table_Tracked_Changes --
-----------------------------
overriding procedure Visit_Table_Tracked_Changes
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Table_Tracked_Changes;
-----------------------------
-- Visit_Text_Meta --
-----------------------------
overriding procedure Visit_Text_Meta
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Meta;
-----------------------------
-- Visit_Text_Meta_Field --
-----------------------------
overriding procedure Visit_Text_Meta_Field
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Meta_Field;
-----------------------------
-- Visit_Xforms_Model --
-----------------------------
overriding procedure Visit_Xforms_Model
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Xforms_Model;
-----------------------------
-- Visit_Text_Modification_Date --
-----------------------------
overriding procedure Visit_Text_Modification_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Modification_Date;
-----------------------------
-- Visit_Text_Modification_Time --
-----------------------------
overriding procedure Visit_Text_Modification_Time
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Modification_Time;
-----------------------------
-- Visit_Text_Note --
-----------------------------
overriding procedure Visit_Text_Note
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Note;
-----------------------------
-- Visit_Text_Note_Body --
-----------------------------
overriding procedure Visit_Text_Note_Body
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Note_Body;
-----------------------------
-- Visit_Text_Note_Citation --
-----------------------------
overriding procedure Visit_Text_Note_Citation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Note_Citation;
-----------------------------
-- Visit_Text_Note_Continuation_Notice_Backward --
-----------------------------
overriding procedure Visit_Text_Note_Continuation_Notice_Backward
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Note_Continuation_Notice_Backward;
-----------------------------
-- Visit_Text_Note_Continuation_Notice_Forward --
-----------------------------
overriding procedure Visit_Text_Note_Continuation_Notice_Forward
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Note_Continuation_Notice_Forward;
-----------------------------
-- Visit_Text_Note_Ref --
-----------------------------
overriding procedure Visit_Text_Note_Ref
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Note_Ref;
-----------------------------
-- Visit_Text_Notes_Configuration --
-----------------------------
overriding procedure Visit_Text_Notes_Configuration
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Notes_Configuration;
-----------------------------
-- Visit_Text_Number --
-----------------------------
overriding procedure Visit_Text_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Number;
-----------------------------
-- Visit_Text_Numbered_Paragraph --
-----------------------------
overriding procedure Visit_Text_Numbered_Paragraph
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Numbered_Paragraph;
-----------------------------
-- Visit_Text_Object_Count --
-----------------------------
overriding procedure Visit_Text_Object_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Object_Count;
-----------------------------
-- Visit_Text_Object_Index --
-----------------------------
overriding procedure Visit_Text_Object_Index
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Object_Index;
-----------------------------
-- Visit_Text_Object_Index_Entry_Template --
-----------------------------
overriding procedure Visit_Text_Object_Index_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Object_Index_Entry_Template;
-----------------------------
-- Visit_Text_Object_Index_Source --
-----------------------------
overriding procedure Visit_Text_Object_Index_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Object_Index_Source;
-----------------------------
-- Visit_Text_Outline_Level_Style --
-----------------------------
overriding procedure Visit_Text_Outline_Level_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Outline_Level_Style;
-----------------------------
-- Visit_Text_Outline_Style --
-----------------------------
overriding procedure Visit_Text_Outline_Style
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Outline_Style;
-----------------------------
-- Visit_Text_P --
-----------------------------
overriding procedure Visit_Text_P
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_P;
-----------------------------
-- Visit_Text_Page --
-----------------------------
overriding procedure Visit_Text_Page
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page;
-----------------------------
-- Visit_Text_Page_Continuation --
-----------------------------
overriding procedure Visit_Text_Page_Continuation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page_Continuation;
-----------------------------
-- Visit_Text_Page_Count --
-----------------------------
overriding procedure Visit_Text_Page_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page_Count;
-----------------------------
-- Visit_Text_Page_Number --
-----------------------------
overriding procedure Visit_Text_Page_Number
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page_Number;
-----------------------------
-- Visit_Text_Page_Sequence --
-----------------------------
overriding procedure Visit_Text_Page_Sequence
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page_Sequence;
-----------------------------
-- Visit_Text_Page_Variable_Get --
-----------------------------
overriding procedure Visit_Text_Page_Variable_Get
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page_Variable_Get;
-----------------------------
-- Visit_Text_Page_Variable_Set --
-----------------------------
overriding procedure Visit_Text_Page_Variable_Set
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Page_Variable_Set;
-----------------------------
-- Visit_Text_Paragraph_Count --
-----------------------------
overriding procedure Visit_Text_Paragraph_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Paragraph_Count;
-----------------------------
-- Visit_Text_Placeholder --
-----------------------------
overriding procedure Visit_Text_Placeholder
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Placeholder;
-----------------------------
-- Visit_Office_Presentation --
-----------------------------
overriding procedure Visit_Office_Presentation
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Presentation;
-----------------------------
-- Visit_Text_Print_Date --
-----------------------------
overriding procedure Visit_Text_Print_Date
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Print_Date;
-----------------------------
-- Visit_Text_Print_Time --
-----------------------------
overriding procedure Visit_Text_Print_Time
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Print_Time;
-----------------------------
-- Visit_Text_Printed_By --
-----------------------------
overriding procedure Visit_Text_Printed_By
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Printed_By;
-----------------------------
-- Visit_Text_Reference_Mark --
-----------------------------
overriding procedure Visit_Text_Reference_Mark
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Reference_Mark;
-----------------------------
-- Visit_Text_Reference_Mark_End --
-----------------------------
overriding procedure Visit_Text_Reference_Mark_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Reference_Mark_End;
-----------------------------
-- Visit_Text_Reference_Mark_Start --
-----------------------------
overriding procedure Visit_Text_Reference_Mark_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Reference_Mark_Start;
-----------------------------
-- Visit_Text_Reference_Ref --
-----------------------------
overriding procedure Visit_Text_Reference_Ref
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Reference_Ref;
-----------------------------
-- Visit_Text_Ruby --
-----------------------------
overriding procedure Visit_Text_Ruby
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Ruby;
-----------------------------
-- Visit_Text_Ruby_Base --
-----------------------------
overriding procedure Visit_Text_Ruby_Base
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Ruby_Base;
-----------------------------
-- Visit_Text_Ruby_Text --
-----------------------------
overriding procedure Visit_Text_Ruby_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Ruby_Text;
-----------------------------
-- Visit_Text_S --
-----------------------------
overriding procedure Visit_Text_S
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_S;
-----------------------------
-- Visit_Office_Script --
-----------------------------
overriding procedure Visit_Office_Script
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Script;
-----------------------------
-- Visit_Text_Script --
-----------------------------
overriding procedure Visit_Text_Script
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Script;
-----------------------------
-- Visit_Office_Scripts --
-----------------------------
overriding procedure Visit_Office_Scripts
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Scripts;
-----------------------------
-- Visit_Text_Section --
-----------------------------
overriding procedure Visit_Text_Section
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Section;
-----------------------------
-- Visit_Text_Section_Source --
-----------------------------
overriding procedure Visit_Text_Section_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Section_Source;
-----------------------------
-- Visit_Text_Sender_City --
-----------------------------
overriding procedure Visit_Text_Sender_City
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_City;
-----------------------------
-- Visit_Text_Sender_Company --
-----------------------------
overriding procedure Visit_Text_Sender_Company
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Company;
-----------------------------
-- Visit_Text_Sender_Country --
-----------------------------
overriding procedure Visit_Text_Sender_Country
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Country;
-----------------------------
-- Visit_Text_Sender_Email --
-----------------------------
overriding procedure Visit_Text_Sender_Email
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Email;
-----------------------------
-- Visit_Text_Sender_Fax --
-----------------------------
overriding procedure Visit_Text_Sender_Fax
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Fax;
-----------------------------
-- Visit_Text_Sender_Firstname --
-----------------------------
overriding procedure Visit_Text_Sender_Firstname
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Firstname;
-----------------------------
-- Visit_Text_Sender_Initials --
-----------------------------
overriding procedure Visit_Text_Sender_Initials
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Initials;
-----------------------------
-- Visit_Text_Sender_Lastname --
-----------------------------
overriding procedure Visit_Text_Sender_Lastname
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Lastname;
-----------------------------
-- Visit_Text_Sender_Phone_Private --
-----------------------------
overriding procedure Visit_Text_Sender_Phone_Private
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Phone_Private;
-----------------------------
-- Visit_Text_Sender_Phone_Work --
-----------------------------
overriding procedure Visit_Text_Sender_Phone_Work
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Phone_Work;
-----------------------------
-- Visit_Text_Sender_Position --
-----------------------------
overriding procedure Visit_Text_Sender_Position
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Position;
-----------------------------
-- Visit_Text_Sender_Postal_Code --
-----------------------------
overriding procedure Visit_Text_Sender_Postal_Code
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Postal_Code;
-----------------------------
-- Visit_Text_Sender_State_Or_Province --
-----------------------------
overriding procedure Visit_Text_Sender_State_Or_Province
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_State_Or_Province;
-----------------------------
-- Visit_Text_Sender_Street --
-----------------------------
overriding procedure Visit_Text_Sender_Street
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Street;
-----------------------------
-- Visit_Text_Sender_Title --
-----------------------------
overriding procedure Visit_Text_Sender_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sender_Title;
-----------------------------
-- Visit_Text_Sequence --
-----------------------------
overriding procedure Visit_Text_Sequence
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sequence;
-----------------------------
-- Visit_Text_Sequence_Decl --
-----------------------------
overriding procedure Visit_Text_Sequence_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sequence_Decl;
-----------------------------
-- Visit_Text_Sequence_Decls --
-----------------------------
overriding procedure Visit_Text_Sequence_Decls
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sequence_Decls;
-----------------------------
-- Visit_Text_Sequence_Ref --
-----------------------------
overriding procedure Visit_Text_Sequence_Ref
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sequence_Ref;
-----------------------------
-- Visit_Office_Settings --
-----------------------------
overriding procedure Visit_Office_Settings
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Settings;
-----------------------------
-- Visit_Text_Sheet_Name --
-----------------------------
overriding procedure Visit_Text_Sheet_Name
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sheet_Name;
-----------------------------
-- Visit_Text_Soft_Page_Break --
-----------------------------
overriding procedure Visit_Text_Soft_Page_Break
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Soft_Page_Break;
-----------------------------
-- Visit_Text_Sort_Key --
-----------------------------
overriding procedure Visit_Text_Sort_Key
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Sort_Key;
-----------------------------
-- Visit_Text_Span --
-----------------------------
overriding procedure Visit_Text_Span
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Span;
-----------------------------
-- Visit_Office_Spreadsheet --
-----------------------------
overriding procedure Visit_Office_Spreadsheet
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Spreadsheet;
-----------------------------
-- Visit_Office_Styles --
-----------------------------
overriding procedure Visit_Office_Styles
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Styles;
-----------------------------
-- Visit_Text_Subject --
-----------------------------
overriding procedure Visit_Text_Subject
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Subject;
-----------------------------
-- Visit_Text_Tab --
-----------------------------
overriding procedure Visit_Text_Tab
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Tab;
-----------------------------
-- Visit_Text_Table_Count --
-----------------------------
overriding procedure Visit_Text_Table_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Count;
-----------------------------
-- Visit_Text_Table_Formula --
-----------------------------
overriding procedure Visit_Text_Table_Formula
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Formula;
-----------------------------
-- Visit_Text_Table_Index --
-----------------------------
overriding procedure Visit_Text_Table_Index
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Index;
-----------------------------
-- Visit_Text_Table_Index_Entry_Template --
-----------------------------
overriding procedure Visit_Text_Table_Index_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Index_Entry_Template;
-----------------------------
-- Visit_Text_Table_Index_Source --
-----------------------------
overriding procedure Visit_Text_Table_Index_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Index_Source;
-----------------------------
-- Visit_Text_Table_Of_Content --
-----------------------------
overriding procedure Visit_Text_Table_Of_Content
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Of_Content;
-----------------------------
-- Visit_Text_Table_Of_Content_Entry_Template --
-----------------------------
overriding procedure Visit_Text_Table_Of_Content_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Of_Content_Entry_Template;
-----------------------------
-- Visit_Text_Table_Of_Content_Source --
-----------------------------
overriding procedure Visit_Text_Table_Of_Content_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Table_Of_Content_Source;
-----------------------------
-- Visit_Text_Template_Name --
-----------------------------
overriding procedure Visit_Text_Template_Name
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Template_Name;
-----------------------------
-- Visit_Office_Text --
-----------------------------
overriding procedure Visit_Office_Text
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Office_Text;
-----------------------------
-- Visit_Text_Text_Input --
-----------------------------
overriding procedure Visit_Text_Text_Input
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Text_Input;
-----------------------------
-- Visit_Text_Time --
-----------------------------
overriding procedure Visit_Text_Time
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Time;
-----------------------------
-- Visit_Text_Title --
-----------------------------
overriding procedure Visit_Text_Title
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Title;
-----------------------------
-- Visit_Text_Toc_Mark --
-----------------------------
overriding procedure Visit_Text_Toc_Mark
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Toc_Mark;
-----------------------------
-- Visit_Text_Toc_Mark_End --
-----------------------------
overriding procedure Visit_Text_Toc_Mark_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Toc_Mark_End;
-----------------------------
-- Visit_Text_Toc_Mark_Start --
-----------------------------
overriding procedure Visit_Text_Toc_Mark_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Toc_Mark_Start;
-----------------------------
-- Visit_Text_Tracked_Changes --
-----------------------------
overriding procedure Visit_Text_Tracked_Changes
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Tracked_Changes;
-----------------------------
-- Visit_Text_User_Defined --
-----------------------------
overriding procedure Visit_Text_User_Defined
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Defined;
-----------------------------
-- Visit_Text_User_Field_Decl --
-----------------------------
overriding procedure Visit_Text_User_Field_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Field_Decl;
-----------------------------
-- Visit_Text_User_Field_Decls --
-----------------------------
overriding procedure Visit_Text_User_Field_Decls
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Field_Decls;
-----------------------------
-- Visit_Text_User_Field_Get --
-----------------------------
overriding procedure Visit_Text_User_Field_Get
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Field_Get;
-----------------------------
-- Visit_Text_User_Field_Input --
-----------------------------
overriding procedure Visit_Text_User_Field_Input
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Field_Input;
-----------------------------
-- Visit_Text_User_Index --
-----------------------------
overriding procedure Visit_Text_User_Index
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Index;
-----------------------------
-- Visit_Text_User_Index_Entry_Template --
-----------------------------
overriding procedure Visit_Text_User_Index_Entry_Template
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Index_Entry_Template;
-----------------------------
-- Visit_Text_User_Index_Mark --
-----------------------------
overriding procedure Visit_Text_User_Index_Mark
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Index_Mark;
-----------------------------
-- Visit_Text_User_Index_Mark_End --
-----------------------------
overriding procedure Visit_Text_User_Index_Mark_End
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Index_Mark_End;
-----------------------------
-- Visit_Text_User_Index_Mark_Start --
-----------------------------
overriding procedure Visit_Text_User_Index_Mark_Start
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Index_Mark_Start;
-----------------------------
-- Visit_Text_User_Index_Source --
-----------------------------
overriding procedure Visit_Text_User_Index_Source
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_User_Index_Source;
-----------------------------
-- Visit_Text_Variable_Decl --
-----------------------------
overriding procedure Visit_Text_Variable_Decl
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Variable_Decl;
-----------------------------
-- Visit_Text_Variable_Decls --
-----------------------------
overriding procedure Visit_Text_Variable_Decls
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Variable_Decls;
-----------------------------
-- Visit_Text_Variable_Get --
-----------------------------
overriding procedure Visit_Text_Variable_Get
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Variable_Get;
-----------------------------
-- Visit_Text_Variable_Input --
-----------------------------
overriding procedure Visit_Text_Variable_Input
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Variable_Input;
-----------------------------
-- Visit_Text_Variable_Set --
-----------------------------
overriding procedure Visit_Text_Variable_Set
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Variable_Set;
-----------------------------
-- Visit_Text_Word_Count --
-----------------------------
overriding procedure Visit_Text_Word_Count
(Self : in out ODF_Containment_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
begin
Self.Visit_Children (Visitor, Node, Control);
end Visit_Text_Word_Count;
end ODF.DOM.Iterators.Containment;
|
stcarrez/ada-util | Ada | 8,772 | adb | -----------------------------------------------------------------------
-- util-log-appenders -- Log appenders
-- Copyright (C) 2001 - 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 Ada.Calendar.Formatting;
with Ada.Strings;
with Ada.Strings.Fixed;
with Ada.Unchecked_Deallocation;
with Util.Strings.Transforms;
package body Util.Log.Appenders is
use Ada;
use Ada.Finalization;
Appender_Factories : Appender_Factory_Access;
-- ------------------------------
-- Get the log level that triggers display of the log events
-- ------------------------------
function Get_Level (Self : in Appender) return Level_Type is
begin
return Self.Level;
end Get_Level;
-- ------------------------------
-- Set the log level.
-- ------------------------------
procedure Set_Level (Self : in out Appender;
Name : in String;
Properties : in Util.Properties.Manager;
Level : in Level_Type) is
Prop_Name : constant String := "appender." & Name & ".level";
begin
if Properties.Exists (Prop_Name) then
Self.Level := Get_Level (Properties.Get (Prop_Name), Level);
else
Self.Level := Level;
end if;
end Set_Level;
procedure Set_Level (Self : in out Appender;
Level : in Level_Type) is
begin
Self.Level := Level;
end Set_Level;
-- ------------------------------
-- Set the log layout format.
-- ------------------------------
procedure Set_Layout (Self : in out Appender;
Name : in String;
Properties : in Util.Properties.Manager;
Layout : in Layout_Type) is
use Ada.Strings;
use Util.Strings.Transforms;
Prop_Name : constant String := "appender." & Name & ".layout";
begin
if Properties.Exists (Prop_Name) then
declare
Value : constant String
:= To_Lower_Case (Fixed.Trim (Properties.Get (Prop_Name), Both));
begin
if Value = "message" then
Self.Layout := MESSAGE;
elsif Value = "level-message" then
Self.Layout := LEVEL_MESSAGE;
elsif Value = "date-level-message" or else Value = "level-date-message" then
Self.Layout := DATE_LEVEL_MESSAGE;
else
Self.Layout := FULL;
end if;
end;
else
Self.Layout := Layout;
end if;
end Set_Layout;
procedure Set_Layout (Self : in out Appender;
Layout : in Layout_Type) is
begin
Self.Layout := Layout;
end Set_Layout;
-- ------------------------------
-- Format the event into a string
-- ------------------------------
function Format (Self : in Appender'Class;
Date : in Ada.Calendar.Time;
Level : in Level_Type;
Logger : in String) return String is
begin
case Self.Layout is
when MESSAGE =>
return "";
when LEVEL_MESSAGE =>
return Get_Level_Name (Level) & ": ";
when DATE_LEVEL_MESSAGE =>
return "[" & Calendar.Formatting.Image (Date) & "] "
& Get_Level_Name (Level) & ": ";
when FULL =>
return "[" & Calendar.Formatting.Image (Date)
& "] " & Get_Level_Name (Level) & " - " & Logger & " - : ";
end case;
end Format;
overriding
procedure Append (Self : in out List_Appender;
Message : in Util.Strings.Builders.Builder;
Date : in Ada.Calendar.Time;
Level : in Level_Type;
Logger : in String) is
begin
for I in 1 .. Self.Count loop
Self.Appenders (I).Append (Message, Date, Level, Logger);
end loop;
end Append;
-- ------------------------------
-- Flush the log events.
-- ------------------------------
overriding
procedure Flush (Self : in out List_Appender) is
begin
for I in 1 .. Self.Count loop
Self.Appenders (I).Flush;
end loop;
end Flush;
-- ------------------------------
-- Add the appender to the list.
-- ------------------------------
procedure Add_Appender (Self : in out List_Appender;
Object : in Appender_Access) is
begin
if Self.Count < Self.Appenders'Last then
Self.Count := Self.Count + 1;
Self.Appenders (Self.Count) := Object;
end if;
end Add_Appender;
-- ------------------------------
-- Create a list appender and configure it according to the properties
-- ------------------------------
function Create_List_Appender (Name : in String) return List_Appender_Access is
Result : constant List_Appender_Access
:= new List_Appender '(Limited_Controlled with Length => Name'Length,
Name => Name,
others => <>);
begin
return Result;
end Create_List_Appender;
-- ------------------------------
-- Find an appender with a given name from the list of appenders.
-- Returns null if there is no such appender.
-- ------------------------------
function Find_Appender (List : in Appender_List;
Name : in String) return Appender_Access is
Appender : Appender_Access := List.First;
begin
while Appender /= null loop
if Appender.Name = Name then
return Appender;
end if;
Appender := Appender.Next.Next;
end loop;
return null;
end Find_Appender;
-- ------------------------------
-- Add the appender to the list of appenders.
-- ------------------------------
procedure Add_Appender (List : in out Appender_List;
Appender : in Appender_Access) is
begin
Appender.Next.Next := List.First;
List.First := Appender;
end Add_Appender;
-- ------------------------------
-- Clear the list of appenders.
-- ------------------------------
procedure Clear (List : in out Appender_List) is
procedure Free is new Ada.Unchecked_Deallocation (Object => Appender'Class,
Name => Appender_Access);
Appender : Appender_Access;
begin
loop
Appender := List.First;
exit when Appender = null;
List.First := Appender.Next.Next;
Free (Appender);
end loop;
end Clear;
-- ------------------------------
-- Register the factory handler to create an appender instance.
-- ------------------------------
procedure Register (Into : in Appender_Factory_Access;
Name : in String;
Create : in Factory_Access) is
begin
Into.Name := Name;
Into.Factory := Create;
Into.Next_Factory := Appender_Factories;
Appender_Factories := Into;
end Register;
-- ------------------------------
-- Create an appender instance with a factory with the given name.
-- ------------------------------
function Create (Name : in String;
Config : in Util.Properties.Manager;
Default : in Level_Type) return Appender_Access is
Prop_Name : constant String := "appender." & Name;
Appender_Type : constant String := Config.Get (Prop_Name, "console");
Factory : Appender_Factory_Access := Appender_Factories;
begin
while Factory /= null loop
if Factory.Name = Appender_Type then
return Factory.Factory (Name, Config, Default);
end if;
Factory := Factory.Next_Factory;
end loop;
Factory := Appender_Factories;
if Factory /= null then
return Factory.Factory (Name, Config, Default);
end if;
return null;
end Create;
end Util.Log.Appenders;
|
onox/dcf-ada | Ada | 8,653 | ads | -- SPDX-License-Identifier: MIT
--
-- Copyright (c) 2000 - 2018 Gautier de Montmollin
-- SWITZERLAND
--
-- 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, 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
-- AUTHORS OR 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.
-- Zip.Headers
-- -----------
--
-- This package provides:
--
-- * Definition of PKZIP information structures (cf appnote.txt)
-- * Reading a header from a data stream (Read_and_check)
-- * Copying a header from a buffer (Copy_and_check)
-- * Writing a header to a data stream (Write)
--
-- Some quick explanations about the Zip file structure - GdM 2001, 2012
--
-- The zip archive containing N entries can be roughly seen as
-- a data stream with the following structure:
--
-- 1) {local header, then compressed data} - that, N times
-- 2) central directory, with a summary of each of the N entries
-- 3) end-of-central-directory, with a summary of the central directory
--
-- Since N is not necessarily known before or during the phase 1,
-- the central directory's size is also potentially unknown.
-- Then obvious place for the central directory is *after* the data,
-- it is why it appears on phase 2.
--
-- An advantage of that structure is that the .ZIP archive can be later
-- appended to an .exe, for self-extracting purposes, or to other
-- kind of files.
--
-- So, the most general infos are at the end, and we crawl back
-- for more precise infos:
--
-- 1) end-of-central-directory
-- 2) central directory
-- 3) zipped data entries
with DCF.Streams;
use DCF.Streams;
package DCF.Zip.Headers is
pragma Preelaborate;
------------------------------------------------------------------------
-- PKZIP data descriptor, put after streamed compressed data - PK78 --
------------------------------------------------------------------------
type Data_Descriptor is record
-- PK78 -- 1.. 4
Crc_32 : Unsigned_32; -- 5.. 8
Compressed_Size : Unsigned_32;
Uncompressed_Size : Unsigned_32;
end record;
Data_Descriptor_Length : constant := 16;
-- This header needs to be read in continuation of
-- the compressed data -> access to a buffer
procedure Copy_And_Check
(Buffer : in Ada.Streams.Stream_Element_Array;
Descriptor : out Data_Descriptor);
procedure Read_And_Check
(Stream : in out Root_Zipstream_Type'Class;
Descriptor : out Data_Descriptor);
Bad_Data_Descriptor : exception;
procedure Write
(Stream : in out Root_Zipstream_Type'Class;
Descriptor : in Data_Descriptor);
-----------------------------------------------------------------------
-- PKZIP local file header, in front of every file in archive - PK34 --
-----------------------------------------------------------------------
-- Appnote: 4.4.4 general purpose bit flag: (2 bytes)
--
-- Bit 0: If set, indicates that the file is encrypted.
Encryption_Flag_Bit : constant := 2**0;
-- Bit 3: If set, indicates data is followed by a data descriptor
-- See 4.3.9 of appnote
Descriptor_Flag_Bit : constant := 2**3;
-- Bit 11: Language encoding flag (EFS). If this bit is set, the filename and
-- comment fields for this file MUST be encoded using UTF-8.
Language_Encoding_Flag_Bit : constant := 2**11;
type Local_File_Header is record
-- PK34 -- 1.. 4
Needed_Extract_Version : Unsigned_16; -- 5.. 6
Bit_Flag : Unsigned_16; -- Appnote: 4.4.4 general purpose bit flag
Zip_Type : Unsigned_16;
File_Timedate : Time;
Dd : Data_Descriptor;
Filename_Length : Unsigned_16;
Extra_Field_Length : Unsigned_16;
end record;
Local_Header_Length : constant := 30;
procedure Read_And_Check
(Stream : in out Root_Zipstream_Type'Class;
Header : out Local_File_Header);
Bad_Local_Header : exception;
procedure Write
(Stream : in out Root_Zipstream_Type'Class;
Header : in Local_File_Header);
-------------------------------------------------------
-- PKZIP file header, as in central directory - PK12 --
-------------------------------------------------------
-- NB: a central header contains a local header in the middle
type Central_File_Header is record
-- PK12 -- 1 .. 4
Made_By_Version : Unsigned_16; -- 5 .. 6
Short_Info : Local_File_Header; -- 7 .. 32
Comment_Length : Unsigned_16; -- 33 .. 34
Disk_Number_Start : Unsigned_16;
Internal_Attributes : Unsigned_16; -- Internal properties of data
External_Attributes : Unsigned_32; -- First byte if MS-DOS: see below
Local_Header_Offset : Unsigned_32;
end record;
-- MS-DOS external attributes:
--
-- Bit 0 Read-Only
-- Bit 1 Hidden
-- Bit 2 System
-- Bit 3 Volume Label
-- Bit 4 Directory
-- Bit 5 Archive
Central_Header_Length : constant := 46;
procedure Read_And_Check
(Stream : in out Root_Zipstream_Type'Class;
Header : out Central_File_Header);
function Valid_Version (Header : Local_File_Header) return Boolean is
(Header.Needed_Extract_Version <= 45);
function Valid_Bitflag (Header : Local_File_Header) return Boolean is
((Header.Bit_Flag and 2#1111_0111_1111_0001#) = 0);
Bad_Central_Header : exception;
procedure Write (Stream : in out Root_Zipstream_Type'Class; Header : in Central_File_Header);
---------------------------------------------
-- PKZIP end-of-central-directory - PK56 --
---------------------------------------------
type End_Of_Central_Dir is record
-- PK56 -- 1 .. 4
Disknum : Unsigned_16; -- 5 .. 6
Disknum_With_Start : Unsigned_16;
Disk_Total_Entries : Unsigned_16;
Total_Entries : Unsigned_16;
Central_Dir_Size : Unsigned_32;
Central_Dir_Offset : Unsigned_32;
Main_Comment_Length : Unsigned_16;
-- The Zip archive may be appended to another file (for instance an
-- executable for self-extracting purposes) of size N.
-- Then, all offsets need to be shifted by N.
-- N=0 if the Zip archive is on its own.
-- The real offset of the end-of-central-dir
-- will be N + central_dir_size + central_dir_offset.
-- This way, we have an unique chance to determine N when reading the
-- end-of-central-dir. N is stored in the field hereafter:
Offset_Shifting : Zs_Size_Type; -- NB: type is at least 32 bits.
end record;
End_Of_Central_Dir_Length : constant := 22;
-- The End-of-Central-Dir header is followed by a comment of
-- unkown size and hence needs to be searched in special ways (see Load).
-- Copy_and_check and Read_and_check assume a buffer or a stream
-- pointing to the End-of-Central-Dir signature
procedure Copy_And_Check
(Buffer : in Ada.Streams.Stream_Element_Array;
The_End : out End_Of_Central_Dir);
procedure Read_And_Check
(Stream : in out Root_Zipstream_Type'Class;
The_End : out End_Of_Central_Dir);
Bad_End : exception;
-- A bit more elaborated variant: find the End-of-Central-Dir and load it
procedure Load
(Stream : in out Root_Zipstream_Type'Class;
The_End : out End_Of_Central_Dir);
procedure Write
(Stream : in out Root_Zipstream_Type'Class;
The_End : in End_Of_Central_Dir);
end DCF.Zip.Headers;
|
reznikmm/matreshka | Ada | 3,810 | 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 ODF.Constants;
package body Matreshka.ODF_Attributes.Text.List_Tab_Stop_Position is
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Text_List_Tab_Stop_Position_Node)
return League.Strings.Universal_String is
begin
return ODF.Constants.List_Tab_Stop_Position_Name;
end Get_Local_Name;
end Matreshka.ODF_Attributes.Text.List_Tab_Stop_Position;
|
reznikmm/matreshka | Ada | 4,998 | 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.Generic_Collections;
package AMF.UML.Link_Actions.Collections is
pragma Preelaborate;
package UML_Link_Action_Collections is
new AMF.Generic_Collections
(UML_Link_Action,
UML_Link_Action_Access);
type Set_Of_UML_Link_Action is
new UML_Link_Action_Collections.Set with null record;
Empty_Set_Of_UML_Link_Action : constant Set_Of_UML_Link_Action;
type Ordered_Set_Of_UML_Link_Action is
new UML_Link_Action_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Link_Action : constant Ordered_Set_Of_UML_Link_Action;
type Bag_Of_UML_Link_Action is
new UML_Link_Action_Collections.Bag with null record;
Empty_Bag_Of_UML_Link_Action : constant Bag_Of_UML_Link_Action;
type Sequence_Of_UML_Link_Action is
new UML_Link_Action_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Link_Action : constant Sequence_Of_UML_Link_Action;
private
Empty_Set_Of_UML_Link_Action : constant Set_Of_UML_Link_Action
:= (UML_Link_Action_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Link_Action : constant Ordered_Set_Of_UML_Link_Action
:= (UML_Link_Action_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Link_Action : constant Bag_Of_UML_Link_Action
:= (UML_Link_Action_Collections.Bag with null record);
Empty_Sequence_Of_UML_Link_Action : constant Sequence_Of_UML_Link_Action
:= (UML_Link_Action_Collections.Sequence with null record);
end AMF.UML.Link_Actions.Collections;
|
stcarrez/mat | Ada | 3,003 | ads | -----------------------------------------------------------------------
-- mat-readers-marshaller -- Marshalling of data in communication buffer
-- Copyright (C) 2014, 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 Ada.Strings.Unbounded;
with MAT.Types;
with MAT.Events;
package MAT.Readers.Marshaller is
Buffer_Underflow_Error : exception;
Buffer_Overflow_Error : exception;
-- Get an 8-bit value from the buffer.
function Get_Uint8 (Buffer : in Buffer_Ptr) return MAT.Types.Uint8;
-- Get a 16-bit value either from big-endian or little endian.
function Get_Uint16 (Buffer : in Buffer_Ptr) return MAT.Types.Uint16;
-- Get a 32-bit value either from big-endian or little endian.
function Get_Uint32 (Buffer : in Buffer_Ptr) return MAT.Types.Uint32;
-- Get a 64-bit value either from big-endian or little endian.
function Get_Uint64 (Buffer : in Buffer_Ptr) return MAT.Types.Uint64;
-- Extract a string from the buffer. The string starts with a byte that
-- indicates the string length.
function Get_String (Buffer : in Message_Type) return String;
-- Extract a string from the buffer. The string starts with a byte that
-- indicates the string length.
function Get_String (Msg : in Message_Type) return Ada.Strings.Unbounded.Unbounded_String;
generic
type Target_Type is mod <>;
function Get_Target_Value (Msg : in Message_Type;
Kind : in MAT.Events.Attribute_Type) return Target_Type;
function Get_Target_Size (Msg : in Message_Type;
Kind : in MAT.Events.Attribute_Type) return MAT.Types.Target_Size;
function Get_Target_Addr (Msg : in Message_Type;
Kind : in MAT.Events.Attribute_Type) return MAT.Types.Target_Addr;
function Get_Target_Uint32 (Msg : in Message_Type;
Kind : in MAT.Events.Attribute_Type) return MAT.Types.Uint32;
function Get_Target_Process_Ref (Msg : in Message_Type;
Kind : in MAT.Events.Attribute_Type)
return MAT.Types.Target_Process_Ref;
-- Skip the given number of bytes from the message.
procedure Skip (Buffer : in Message_Type;
Size : in Natural);
end MAT.Readers.Marshaller;
|
stcarrez/ada-util | Ada | 1,289 | ads | -----------------------------------------------------------------------
-- util-encodes-kdf-tests - Key derivative function tests
-- Copyright (C) 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 Util.Tests;
package Util.Encoders.KDF.Tests is
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite);
type Test is new Util.Tests.Test with null record;
-- Test derived key generation with HMAC-SHA1.
procedure Test_PBKDF2_HMAC_SHA1 (T : in out Test);
-- Test derived key generation with HMAC-SHA256.
procedure Test_PBKDF2_HMAC_SHA256 (T : in out Test);
end Util.Encoders.KDF.Tests;
|
reznikmm/matreshka | Ada | 8,074 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web 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 Ada.Numerics.Discrete_Random;
with Ada.Streams;
with GNAT.SHA1;
with Interfaces;
with League.Calendars.ISO_8601;
with League.Stream_Element_Vectors.Internals;
with League.Text_Codecs;
with Matreshka.Internals.Stream_Element_Vectors;
package body Web_Services.SOAP.Security.Password_Digest_Utilities is
package Unsigned_64_Random is
new Ada.Numerics.Discrete_Random (Interfaces.Unsigned_64);
Format : constant League.Strings.Universal_String :=
League.Strings.To_Universal_String ("yyyy-MM-ddTHH:mm:ss");
-- Format of Created field in header, except 'Z' at the end, due to 'Z' is
-- pattern symbol
UTF8_Codec : constant League.Text_Codecs.Text_Codec
:= League.Text_Codecs.Codec
(League.Strings.To_Universal_String ("utf-8"));
-- Text codec to convert strings into UTF8 representation.
Generator : Unsigned_64_Random.Generator;
function To_Binary_Message_Digest
(Item : String) return Ada.Streams.Stream_Element_Array;
-- Converts string into array of stream elements. Note: this subprogram is
-- needed for GNAT GPL 2012 only, because it doesn't provide
-- GNAT.SHA1.Digest subprogram which returns Binary_Message_Digest.
--------------------
-- Compute_Digest --
--------------------
function Compute_Digest
(Password : League.Strings.Universal_String;
Nonce : League.Stream_Element_Vectors.Stream_Element_Vector;
Created : League.Strings.Universal_String)
return League.Stream_Element_Vectors.Stream_Element_Vector
is
Data : League.Stream_Element_Vectors.Stream_Element_Vector;
begin
Data.Append (Nonce);
Data.Append (UTF8_Codec.Encode (Created));
Data.Append (UTF8_Codec.Encode (Password));
return
League.Stream_Element_Vectors.To_Stream_Element_Vector
(To_Binary_Message_Digest
(GNAT.SHA1.Digest (Data.To_Stream_Element_Array)));
end Compute_Digest;
----------------------
-- Generate_Created --
----------------------
function Generate_Created return League.Strings.Universal_String is
begin
return Result : League.Strings.Universal_String do
Result :=
League.Calendars.ISO_8601.Image
(Format, League.Calendars.Clock);
Result.Append ('Z');
end return;
end Generate_Created;
--------------------
-- Generate_Nonce --
--------------------
function Generate_Nonce
return League.Stream_Element_Vectors.Stream_Element_Vector
is
Result : constant
Matreshka.Internals.Stream_Element_Vectors.
Shared_Stream_Element_Vector_Access
:= Matreshka.Internals.Stream_Element_Vectors.Allocate (16);
Value : array (Natural range 0 .. 1) of Interfaces.Unsigned_64;
for Value'Address use Result.Value'Address;
pragma Import (Ada, Value);
begin
Value (0) := Unsigned_64_Random.Random (Generator);
Value (1) := Unsigned_64_Random.Random (Generator);
Result.Length := 16;
return League.Stream_Element_Vectors.Internals.Wrap (Result);
end Generate_Nonce;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
Unsigned_64_Random.Reset (Generator);
end Initialize;
------------------------------
-- To_Binary_Message_Digest --
------------------------------
function To_Binary_Message_Digest
(Item : String) return Ada.Streams.Stream_Element_Array
is
use type Ada.Streams.Stream_Element;
use type Ada.Streams.Stream_Element_Offset;
function Decode (Item : Character) return Ada.Streams.Stream_Element;
------------
-- Decode --
------------
function Decode (Item : Character) return Ada.Streams.Stream_Element is
begin
case Item is
when '0' .. '9' =>
return Character'Pos (Item) - Character'Pos ('0');
when 'a' .. 'f' =>
return Character'Pos (Item) - Character'Pos ('a') + 10;
when 'A' .. 'F' =>
return Character'Pos (Item) - Character'Pos ('A') + 10;
when others =>
raise Constraint_Error;
end case;
end Decode;
Result : Ada.Streams.Stream_Element_Array (1 .. Item'Length / 2);
First : Natural := Item'First;
Unused : Ada.Streams.Stream_Element_Offset := Result'First;
begin
while Item'Last - First > 0 loop
Result (Unused) :=
(Decode (Item (First)) * 16) or Decode (Item (First + 1));
Unused := Unused + 1;
First := First + 2;
end loop;
return Result;
end To_Binary_Message_Digest;
end Web_Services.SOAP.Security.Password_Digest_Utilities;
|
AdaCore/libadalang | Ada | 493 | adb | procedure Test is
generic
type Value_T is private;
package Pkg is
type Value_TT is array (0 .. 1) of Pkg.Value_T;
-- When constructing equation for `Value_T`, `Pkg` env should also
-- contain the env of the formal part of `Pkg`.
end Pkg;
package Inst is new Pkg (Value_T => Integer);
procedure Proc (Values : Inst.Value_TT) is
O : Integer := Values (0);
pragma Test_Statement;
begin
null;
end Proc;
begin
null;
end Test;
|
HackInvent/Ada_Drivers_Library | Ada | 10,312 | 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 STMicroelectronics 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 file is based on: --
-- --
-- @file stm32f4xx_hal_usart.h --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief Header file of USARTS HAL module. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
-- This file provides register definitions for the STM32F4 (ARM Cortex M4F)
-- USART from ST Microelectronics.
-- Note that there are board implementation assumptions represented by the
-- private function APB_Clock.
with System;
with HAL.UART; use HAL.UART;
private with STM32_SVD.USART;
package STM32.USARTs is
type Internal_USART is limited private;
type USART (Periph : not null access Internal_USART) is
limited new HAL.UART.UART_Port with private;
procedure Enable (This : in out USART) with
Post => Enabled (This),
Inline;
procedure Disable (This : in out USART) with
Post => not Enabled (This),
Inline;
function Enabled (This : USART) return Boolean with Inline;
procedure Receive (This : USART; Data : out UInt9) with Inline;
-- reads Device.DR into Data
function Current_Input (This : USART) return UInt9 with Inline;
-- returns Device.DR
procedure Transmit (This : in out USART; Data : UInt9) with Inline;
function Tx_Ready (This : USART) return Boolean with Inline;
function Rx_Ready (This : USART) return Boolean with Inline;
type Stop_Bits is (Stopbits_1, Stopbits_2) with Size => 2;
for Stop_Bits use (Stopbits_1 => 0, Stopbits_2 => 2#10#);
procedure Set_Stop_Bits (This : in out USART; To : Stop_Bits);
type Word_Lengths is (Word_Length_8, Word_Length_9);
procedure Set_Word_Length (This : in out USART; To : Word_Lengths);
type Parities is (No_Parity, Even_Parity, Odd_Parity);
procedure Set_Parity (This : in out USART; To : Parities);
subtype Baud_Rates is UInt32;
procedure Set_Baud_Rate (This : in out USART; To : Baud_Rates);
type Oversampling_Modes is (Oversampling_By_8, Oversampling_By_16);
-- oversampling by 16 is the default
procedure Set_Oversampling_Mode
(This : in out USART;
To : Oversampling_Modes);
type UART_Modes is (Rx_Mode, Tx_Mode, Tx_Rx_Mode);
procedure Set_Mode (This : in out USART; To : UART_Modes);
type Flow_Control is
(No_Flow_Control,
RTS_Flow_Control,
CTS_Flow_Control,
RTS_CTS_Flow_Control);
procedure Set_Flow_Control (This : in out USART; To : Flow_Control);
type USART_Interrupt is
(Parity_Error,
Transmit_Data_Register_Empty,
Transmission_Complete,
Received_Data_Not_Empty,
Idle_Line_Detection,
Line_Break_Detection,
Clear_To_Send,
Error);
procedure Enable_Interrupts
(This : in out USART;
Source : USART_Interrupt)
with
Post => Interrupt_Enabled (This, Source),
Inline;
procedure Disable_Interrupts
(This : in out USART;
Source : USART_Interrupt)
with
Post => not Interrupt_Enabled (This, Source),
Inline;
function Interrupt_Enabled
(This : USART;
Source : USART_Interrupt)
return Boolean
with Inline;
type USART_Status_Flag is
(Parity_Error_Indicated,
Framing_Error_Indicated,
USART_Noise_Error_Indicated,
Overrun_Error_Indicated,
Idle_Line_Detection_Indicated,
Read_Data_Register_Not_Empty,
Transmission_Complete_Indicated,
Transmit_Data_Register_Empty,
Line_Break_Detection_Indicated,
Clear_To_Send_Indicated);
function Status (This : USART; Flag : USART_Status_Flag) return Boolean
with Inline;
procedure Clear_Status (This : in out USART; Flag : USART_Status_Flag)
with Inline;
procedure Enable_DMA_Transmit_Requests (This : in out USART) with
Inline,
Post => DMA_Transmit_Requests_Enabled (This);
procedure Disable_DMA_Transmit_Requests (This : in out USART) with
Inline,
Post => not DMA_Transmit_Requests_Enabled (This);
function DMA_Transmit_Requests_Enabled (This : USART) return Boolean with
Inline;
procedure Enable_DMA_Receive_Requests (This : in out USART) with
Inline,
Post => DMA_Receive_Requests_Enabled (This);
procedure Disable_DMA_Receive_Requests (This : in out USART) with
Inline,
Post => not DMA_Receive_Requests_Enabled (This);
function DMA_Receive_Requests_Enabled (This : USART) return Boolean with
Inline;
procedure Pause_DMA_Transmission (This : in out USART)
renames Disable_DMA_Transmit_Requests;
procedure Resume_DMA_Transmission (This : in out USART) with
Inline,
Post => DMA_Transmit_Requests_Enabled (This) and
Enabled (This);
procedure Pause_DMA_Reception (This : in out USART)
renames Disable_DMA_Receive_Requests;
procedure Resume_DMA_Reception (This : in out USART) with
Inline,
Post => DMA_Receive_Requests_Enabled (This) and
Enabled (This);
function Data_Receive_Register_Address (This : USART) return System.Address with
Inline;
function Data_Transmit_Register_Address (This : USART) return System.Address with
Inline;
-- Returns the address of the USART Data Register. This is exported
-- STRICTLY for the sake of clients driving a USART via DMA. All other
-- clients of this package should use the procedural interfaces Transmit
-- and Receive instead of directly accessing the Data Register!
-- Seriously, don't use this function otherwise.
-----------------------------
-- HAL.UART implementation --
-----------------------------
overriding
function Data_Size (This : USART) return HAL.UART.UART_Data_Size;
overriding
procedure Transmit
(This : in out USART;
Data : UART_Data_8b;
Status : out UART_Status;
Timeout : Natural := 1000)
with
Pre'Class => Data_Size (This) = Data_Size_8b;
overriding
procedure Transmit
(This : in out USART;
Data : UART_Data_9b;
Status : out UART_Status;
Timeout : Natural := 1000)
with
Pre'Class => Data_Size (This) = Data_Size_9b;
overriding
procedure Receive
(This : in out USART;
Data : out UART_Data_8b;
Status : out UART_Status;
Timeout : Natural := 1000)
with
Pre'Class => Data_Size (This) = Data_Size_8b;
overriding
procedure Receive
(This : in out USART;
Data : out UART_Data_9b;
Status : out UART_Status;
Timeout : Natural := 1000)
with
Pre'Class => Data_Size (This) = Data_Size_9b;
private
function APB_Clock (This : USART) return UInt32 with Inline;
-- Returns either APB1 or APB2 clock rate, in Hertz, depending on the
-- USART. For the sake of not making this package board-specific, we assume
-- that we are given a valid USART object at a valid address, AND that the
-- USART devices really are configured such that only 1 and 6 are on APB2.
-- Therefore, if a board has additional USARTs beyond USART6, eg USART8 on
-- the F429I Discovery board, they better conform to that assumption.
-- See Note # 2 in each of Tables 139-141 of the RM on pages 970 - 972.
type Internal_USART is new STM32_SVD.USART.USART_Peripheral;
type USART (Periph : not null access Internal_USART) is
limited new HAL.UART.UART_Port with null record;
end STM32.USARTs;
|
Vovanium/stm32-ada | Ada | 2,929 | ads | with System;
with STM32.F4.GPIO;
with STM32.F4.EXTI;
with STM32.F4.RCC;
with STM32.F4.SYSCFG;
with STM32.F4.USART;
with STM32.F4.Address_Map;
package STM32.F429Z is
pragma Preelaborate;
package Address_Map renames STM32.F4.Address_Map;
package Modules is
package EXTI renames STM32.F4.EXTI;
package GPIO renames STM32.F4.GPIO;
package RCC renames STM32.F4.RCC;
package SYSCFG renames STM32.F4.SYSCFG;
package USART renames STM32.F4.USART;
end Modules;
EXTI: Modules.EXTI.EXTI_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.EXTI);
GPIOA: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOA);
GPIOB: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOB);
GPIOC: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOC);
GPIOD: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOD);
GPIOE: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOE);
GPIOF: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOF);
GPIOG: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOG);
GPIOH: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOH);
GPIOI: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOI);
GPIOJ: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOJ);
GPIOK: Modules.GPIO.GPIO_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.GPIOK);
RCC: Modules.RCC.RCC_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.RCC);
SYSCFG: Modules.SYSCFG.SYSCFG_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.SYSCFG);
USART1: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.USART1);
USART2: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.USART2);
USART3: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.USART3);
UART4: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.UART4);
UART5: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.UART5);
USART6: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.USART6);
UART7: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.UART7);
UART8: Modules.USART.USART_Registers
with Volatile, Import, Address => System'To_Address(Address_Map.UART8);
end STM32.F429Z;
|
micahwelf/FLTK-Ada | Ada | 855 | ads |
package FLTK.Widgets.Buttons.Repeat is
type Repeat_Button is new Button with private;
type Repeat_Button_Reference (Data : not null access Repeat_Button'Class) is
limited null record with Implicit_Dereference => Data;
package Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String)
return Repeat_Button;
end Forge;
procedure Draw
(This : in out Repeat_Button);
function Handle
(This : in out Repeat_Button;
Event : in Event_Kind)
return Event_Outcome;
private
type Repeat_Button is new Button with null record;
overriding procedure Finalize
(This : in out Repeat_Button);
pragma Inline (Draw);
pragma Inline (Handle);
end FLTK.Widgets.Buttons.Repeat;
|
BrickBot/Bound-T-H8-300 | Ada | 17,505 | adb | -- Storage.Bitvec_Cell_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.2 $
-- $Date: 2015/10/24 20:05:51 $
--
-- $Log: storage-bitvec_cell_sets.adb,v $
-- Revision 1.2 2015/10/24 20:05:51 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 Ada.Unchecked_Deallocation;
with Faults;
with Output;
with Storage.Cell_Store;
with Storage.Opt;
package body Storage.Bitvec_Cell_Sets is
procedure Discard_Bitset is new Ada.Unchecked_Deallocation (
Object => Bitset_T,
Name => Bitset_Ref);
-- overriding
procedure Adjust (Object : in out Counted_Bitset_Ref)
is
begin
if Object.Ref /= null then
Object.Ref.Ref_Count := Object.Ref.Ref_Count + 1;
end if;
end Adjust;
procedure Unreference (Item : in out Bitset_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 Bitset.
--
is
begin
Item.Ref_Count := Item.Ref_Count - 1;
if Item.Ref_Count > 0 or not Deallocate then
-- There are other users of this Bitset, 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.
Discard_Bitset (Item);
end if;
end Unreference;
-- overriding
procedure Finalize (Object : in out Counted_Bitset_Ref)
is
begin
if Object.Ref /= null then
Unreference (Object.Ref);
end if;
end Finalize;
procedure Ensure_Ownership (Object : in out Set_T)
--
-- Ensures that this Object is the sole user (and thus the owner)
-- of its Member set.
--
is
Ref : Bitset_Ref renames Object.Set.Ref;
begin
if Ref /= null
and then Ref.Ref_Count > 1
then
-- This Object shares its Member.Ref with some other sets, so
-- it must now be given its own copy of the Member.Ref.
Ref.Ref_Count := Ref.Ref_Count - 1;
-- Since Ref_Count was > 1 it remains > 0.
Ref := new Bitset_T'(Ref.all);
Ref.Ref_Count := 1;
end if;
end Ensure_Ownership;
-- overriding
function Empty return Set_T
is
begin
return (Root_Cell_Set_T with Set => (
Ada.Finalization.Controlled with Ref => null));
end Empty;
-- overriding
procedure Erase (Set : in out Set_T)
is
begin
Finalize (Set.Set);
end Erase;
function Is_Empty (Item : Bitvec_T) return Boolean
--
-- Whether the Item is empty, that is Item contains only False elements.
--
is
begin
for I in Item'Range loop
if Item(I) then
return False;
end if;
end loop;
return True;
end Is_Empty;
-- overriding
function Is_Empty (Item : Set_T) return Boolean
is
begin
return Item.Set.Ref = null
or else Is_Empty (Item.Set.Ref.Bitvec);
end Is_Empty;
-- overriding
function Is_Member (
Cell : Cell_T;
Of_Set : Set_T)
return Boolean
is
begin
if Of_Set.Set.Ref = null then
return False;
else
declare
I : constant Cell_Index_T := Index (Cell);
begin
return I in Of_Set.Set.Ref.Bitvec'Range
and then Of_Set.Set.Ref.Bitvec(I);
end;
end if;
end Is_Member;
-- overriding
function Card (Set : Set_T) return Natural
is
Ref : Bitset_Ref renames Set.Set.Ref;
Tally : Natural := 0;
-- The result.
begin
if Ref /= null then
for M in Ref.Bitvec'Range loop
if Ref.Bitvec(M) then
Tally := Tally + 1;
end if;
end loop;
end if;
return Tally;
end Card;
-- overriding
function To_Set (List : Cell_List_T) return Set_T
is
Set : Set_T;
-- The result, initially empty.
begin
Add (Cells => List, To => Set);
return Set;
end To_Set;
-- overriding
function To_List (Set : Set_T) return Cell_List_T
is
Ref : Bitset_Ref renames Set.Set.Ref;
List : Cell_List_T (1 .. Number_Of_Cells);
Last : Natural := 0;
begin
if Ref /= null then
for M in Ref.Bitvec'Range loop
if Ref.Bitvec(M) then
Last := Last + 1;
List(Last) := Cell_Store.Cell_At (M);
end if;
end loop;
end if;
return List(1 .. Last);
end To_List;
-- overriding
procedure Add (
Cell : in Cell_T;
To : in out Set_T)
is
begin
if To.Set.Ref = null then
To.Set.Ref := new Bitset_T'(
Max_Index => Cell_Index_T (Number_Of_Cells),
Ref_Count => 1,
Bitvec => (others => False));
else
Ensure_Ownership (To);
end if;
To.Set.Ref.Bitvec(Index (Cell)) := True;
end Add;
-- overriding
procedure Add (
Cells : in Set_T;
To : in out Set_T)
is
Sref : Bitset_Ref renames Cells.Set.Ref;
Tref : Bitset_Ref renames To.Set.Ref;
-- The source and target bitsets.
begin
if Sref = null
or Sref = Tref
then
-- Nothing to add, or adding a set to the same set.
-- No effect in either case.
null;
elsif Tref = null then
-- Adding Cells To a null set. We can do this
-- quickly by copying the reference.
Tref := Sref;
Sref.Ref_Count := Sref.Ref_Count + 1;
else
-- Adding some cells to a non-null set. Some work.
Ensure_Ownership (To);
-- This may change Tref, but not to null or Sref.
declare
SV : Bitvec_T renames Sref.Bitvec;
TV : Bitvec_T renames Tref.Bitvec;
begin
if Tref.Max_Index = Sref.Max_Index then
-- We can directly "or" the bitvectors.
TV := TV or SV;
elsif Tref.Max_Index < Sref.Max_Index then
-- We can "or" the TV part.
TV := TV or SV(TV'Range);
-- Check that no cells are left out:
for S in TV'Last + 1 .. SV'Last loop
if SV(S) then
-- Oh oh, this cell should be added to TV
-- but is beyond the index range of TV.
raise Constraint_Error;
end if;
end loop;
else
-- Tref.Max_Index > Sref.Max_Index
-- Only SV'Range is affected in TV.
TV(SV'Range) := TV(SV'Range) or SV;
end if;
end;
end if;
end Add;
-- overriding
procedure Remove (
Cell : in Cell_T;
From : in out Set_T)
is
begin
if From.Set.Ref /= null then
Ensure_Ownership (From);
From.Set.Ref.Bitvec(Index (Cell)) := False;
end if;
end Remove;
-- overriding
procedure Move_Cells (
From : in out Set_T;
To : in out Set_T)
is
From_Set_Ref : Bitset_Ref := From.Set.Ref;
begin
if From_Set_Ref = null then
-- Nothing to move; no effect.
null;
elsif To.Set.Ref = null then
-- Simple case: move the reference.
To.Set.Ref := From_Set_Ref;
From.Set.Ref := null;
elsif From_Set_Ref = To.Set.Ref then
-- The From and To set have the same elements, so
-- no effect on To. However, From may become empty
-- if it is not an alias of To.
From.Set.Ref := null;
if To.Set.Ref = null then
-- Aha, From and To are the same object. Thus
-- this procedure shall have no effect on either.
From.Set.Ref := From_Set_Ref;
-- This also restores To.Set.Ref.
else
-- From and To are different objects. Thus
-- this procedure shall leave From empty, so
-- we remove the reference:
Unreference (From_Set_Ref);
end if;
else
-- From is not trivially null and is not the same
-- object as To (which is not trivially null either,
-- but that is not relevant).
Add (Cells => From, To => To);
Erase (From);
end if;
end Move_Cells;
-- overriding
function Copy (Item : Cell_Set_T) return Set_T
is
begin
if Item in Set_T then
-- Just a copy, no type conversion.
return Set_T (Item);
else
-- Copy some other kind of cell-set.
return To_Set (To_List (Item));
end if;
end Copy;
function "=" (Left, Right : Set_T) return Boolean
is
Lref : Bitset_Ref renames Left.Set.Ref;
Rref : Bitset_Ref renames Right.Set.Ref;
begin
if Lref = Rref then
-- Left and Right refer to the same cell-set object
-- so they are equal, of course.
return True;
elsif Lref = null then
-- Left is empty, so we check if Right is empty, too.
return Is_Empty (Right);
elsif Rref = null then
-- Ditto but vice versa.
return Is_Empty (Left);
elsif Lref.Max_Index = Rref.Max_Index then
-- We can directly compare the bit-sets.
return Lref.Bitvec = Rref.Bitvec;
elsif Lref.Max_Index < Rref.Max_Index then
-- For equality, Left and Right must be equal on Left'Range
-- and the rest of Right must be empty.
declare
Lvec : Bitvec_T renames Lref.Bitvec;
Rvec : Bitvec_T renames Rref.Bitvec;
begin
return Lvec = Rvec(Lvec'Range)
and then Is_Empty (Rvec(Lvec'Last + 1 .. Rvec'Last));
end;
else
-- Lref.Max_Index > Rref.Max_Index. Vice versa.
declare
Lvec : Bitvec_T renames Lref.Bitvec;
Rvec : Bitvec_T renames Rref.Bitvec;
begin
return Lvec(Rvec'Range) = Rvec
and then Is_Empty (Lvec(Rvec'Last + 1 .. Lvec'Last));
end;
end if;
end "=";
function Union (Left, Right : Set_T) return Cell_Set_T
is
Lref : Bitset_Ref renames Left.Set.Ref;
Rref : Bitset_Ref renames Right.Set.Ref;
begin
if Lref = null
or Lref = Rref
then
-- The Left set is empty, so the union is the Right set,
-- or the two sets are the same, and so is the union.
return Right;
elsif Rref = null then
-- Vice versa.
return Left;
else
-- Neither set is trivially empty, nor are they the same set.
-- Drat, we must do some work.
declare
Uni : Set_T := (Root_Cell_Set_T with
Set => (Ada.Finalization.Controlled with
Ref => new Bitset_T'(
Max_Index => Cell_Index_T'Max (
Lref.Max_Index,
Rref.Max_Index),
Ref_Count => 1,
Bitvec => <>)));
-- The union to be.
LV : Bitvec_T renames Lref.Bitvec;
RV : Bitvec_T renames Rref.Bitvec;
UV : Bitvec_T renames Uni.Set.Ref.Bitvec;
begin
if LV'Last = RV'Last then
-- We can directly "or" the bitvectors.
UV := LV or RV;
elsif LV'Last < RV'Last then
-- The union will be "Left or Right" on LV'Range, and
-- for the rest it will be a copy of RV.
UV(LV'Range) := LV or RV(LV'Range);
UV(LV'Last + 1 .. RV'Last) := RV(LV'Last + 1 .. RV'Last);
else
-- Vice versa.
UV(RV'Range) := LV(RV'Range) or RV;
UV(RV'Last + 1 .. UV'Last) := LV(RV'Last + 1 .. LV'Last);
end if;
return Uni;
end;
end if;
end Union;
function "-" (Left, Right : Set_T) return Cell_Set_T
is
Lref : Bitset_Ref renames Left.Set.Ref;
Rref : Bitset_Ref renames Right.Set.Ref;
begin
if Lref = null
or Lref = Rref
then
-- The Left set is empty, or equals the Right set.
return Set_T'(Empty);
elsif Rref = null then
-- The Right set (to be subtracted) is empty.
return Left;
else
-- Neither set is trivially empty, nor are they the same set.
-- Drat, we must do some work.
declare
Diff : Set_T := (Root_Cell_Set_T with
Set => (Ada.Finalization.Controlled with
Ref => new Bitset_T'(
Max_Index => Lref.Max_Index,
Ref_Count => 1,
Bitvec => <>)));
-- The difference to be.
LV : Bitvec_T renames Lref.Bitvec;
RV : Bitvec_T renames Rref.Bitvec;
DV : Bitvec_T renames Diff.Set.Ref.Bitvec;
begin
if LV'Last = RV'Last then
-- We can directly compute the whole difference vector.
DV := LV and not RV;
elsif LV'Last < RV'Last then
-- We can ignore the rest of Right.
DV := LV and not RV(LV'Range);
else
-- LV'Last > RV'Last.
-- The rest of Left is copied to the result without change.
DV(RV'Range) := LV(RV'Range) and not RV;
DV(RV'Last + 1 .. DV'Last) := LV(RV'Last + 1 .. LV'Last);
end if;
return Diff;
end;
end if;
end "-";
function Intersection (Left, Right : Set_T) return Cell_Set_T
--
-- The intersection of the given cell-sets.
--
is
Lref : Bitset_Ref renames Left.Set.Ref;
Rref : Bitset_Ref renames Right.Set.Ref;
begin
if Lref = null
or Lref = Rref
then
-- The Left set is empty, or equals the Right set,
-- and so the intersection equals the Left set.
return Left;
elsif Rref = null then
-- The Right set is empty, and so is the intersection.
return Set_T'(Empty);
else
-- Neither set is trivially empty, nor are they the same set.
-- Drat, we must do some work.
declare
Int : Set_T := (Root_Cell_Set_T with
Set => (Ada.Finalization.Controlled with
Ref => new Bitset_T'(
Max_Index => Cell_Index_T'Min (
Lref.Max_Index,
Rref.Max_Index),
Ref_Count => 1,
Bitvec => <>)));
-- The intersection, to be.
LV : Bitvec_T renames Lref.Bitvec;
RV : Bitvec_T renames Rref.Bitvec;
IV : Bitvec_T renames Int.Set.Ref.Bitvec;
begin
if LV'Last = RV'Last then
-- No need to slice.
IV := LV and RV;
else
-- Either LV or RV must be sliced, depending on
-- which is longer. We slice both.
IV := LV(IV'Range) and RV(IV'Range);
end if;
return Int;
end;
end if;
end Intersection;
procedure Print_Debug_Pool
is
begin
--:dbpool GNAT.Debug_Pools.Print_Info_Stdout (Bitset_Pool);
null;
end Print_Debug_Pool;
end Storage.Bitvec_Cell_Sets;
|
msrLi/portingSources | Ada | 954 | ads | -- Copyright 2008-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/>.
package Pck is
type Position is record
X : Integer;
Y : Integer;
end record;
type Circle is record
Pos : Position;
Radius : Integer;
end record;
procedure Do_Nothing (C : in out Circle);
end Pck;
|
Vovanium/libusb1.0-ada | Ada | 25,293 | ads | with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
with Interfaces.C.Strings;
with System;
with USB.Protocol;
use Interfaces;
use Interfaces.C;
use USB.Protocol;
package USB.LibUSB1 is
---- Library initialisation and finalisation
type Status is (
Error_Not_Supported,
Error_No_Mem,
Error_Interrupted,
Error_Pipe,
Error_Overflow,
Error_Timeout,
Error_Busy,
Error_Not_Found,
Error_No_Device,
Error_Access,
Error_Invalid_Param,
Error_IO,
Success
);
for Status use (
-12,
-11,
-10,
-9,
-8,
-7,
-6,
-5,
-4,
-3,
-2,
-1,
0
);
pragma Convention(C, Status);
type Context_Access is new System.Address;
--type Context_Access_Access is access all Context_Access;
--pragma Convention(C, Context_Access_Access);
type Log_Level is (
None,
Error,
Warning,
Info,
Debug
);
for Log_Level use (
0,
1,
2,
3,
4
);
pragma Convention(C, Log_Level);
function Init_Lib(Context: access Context_Access) return Status;
pragma Import(C, Init_Lib, "libusb_init");
procedure Exit_Lib(Ctx: Context_Access);
pragma Import(C, Exit_Lib, "libusb_exit");
procedure Set_Debug(Ctx: Context_Access; Level: Log_Level);
pragma Import(C, Set_Debug, "libusb_set_debug");
---- Device handling and enumeration
type ssize_t is range 1-size_t'Modulus/2..size_t'Modulus/2-1;
for ssize_t'Size use size_t'Size;
pragma Convention(C, ssize_t);
type Device_Handle_Access is new System.Address;
type Device_Access is new System.Address;
type Device_Access_Array is array(ssize_t range <>) of aliased Device_Access;
package Device_Access_Lists is new Interfaces.C.Pointers(
Index => ssize_t,
Element => Device_Access,
Element_Array => Device_Access_Array,
Default_Terminator => Device_Access(System.Null_Address));
type Speed is (
Speed_Unknown,
Speed_Low,
Speed_Full,
Speed_High,
Speed_Super
);
for Speed use (
0,
1,
2,
3,
4
);
pragma Convention(C, Speed);
type Bus_Number is mod 2**8;
pragma Convention(C, Bus_Number);
type Port_Number is mod 2**8;
pragma Convention(C, Port_Number);
type Port_Number_Array is array(Integer range <>) of aliased Port_Number;
package Port_Number_Lists is new Interfaces.C.Pointers(
Index => Integer,
Element => Port_Number,
Element_Array => Port_Number_Array,
Default_Terminator => Port_Number'(0));
type Device_Address is mod 2**8;
pragma Convention(C, Device_Address);
function Get_Device_List(Ctx: Context_Access;
List: access Device_Access_Lists.Pointer) return ssize_t;
pragma Import(C, Get_Device_List, "libusb_get_device_list");
procedure Free_Device_List(List: Device_Access_Lists.Pointer;
Unref_Devices: Int);
pragma Import(C, Free_Device_List, "libusb_free_device_list");
function Get_Bus_Number(Dev: Device_Access) return Bus_Number;
pragma Import(C, Get_Bus_Number, "libusb_get_bus_number");
function Get_Port_Number(Dev: Device_Access) return Port_Number;
pragma Import(C, Get_Port_Number, "libusb_get_port_number");
function Get_Port_Numbers(Dev: Device_Access;
Port_Numbers: Port_Number_Lists.Pointer;
Port_Numbers_Len: Integer) return int;
pragma Import(C, Get_Port_Numbers, "libusb_get_port_numbers");
function Get_Port_Path(Ctx: Context_Access; Dev: Device_Access;
Port_Numbers: Port_Number_Lists.Pointer;
Port_Numbers_Len: Integer) return Integer;
pragma Import(C, Get_Port_Path, "libusb_get_port_path");
function Get_Parent(Dev: Device_Access) return Device_Access;
pragma Import(C, Get_Parent, "libusb_get_parent");
function Get_Device_Address(Dev: Device_Access) return Device_Address;
pragma Import(C, Get_Device_Address, "libusb_get_device_address");
function Get_Device_Speed(Dev: Device_Access) return Speed;
pragma Import(C, Get_Device_Speed, "libusb_get_device_speed");
function Get_Max_Packet_Size(Dev: Device_Access;
Endpoint: unsigned_char) return int; -- ?? endpoint address?
pragma Import(C, Get_Max_Packet_Size, "libusb_get_max_packet_size");
function Get_Max_Iso_Packet_Size(Dev: Device_Access;
Endpoint: unsigned_char) return int;
pragma Import(C, Get_Max_Iso_Packet_Size, "libusb_get_max_iso_packet_size");
function Ref_Device(Dev: Device_Access) return Device_Access;
pragma Import(C, Ref_Device, "libusb_ref_device");
procedure Unref_Device(Dev: Device_Access);
pragma Import(C, Unref_Device, "libusb_unref_device");
function Open(Dev: Device_Access;
Handle: access Device_Handle_Access) return Status;
pragma Import(C, Open, "libusb_open");
function Open_Device_with_VID_PID(Ctx: Context_Access;
VID: USB.Protocol.Vendor_Id;
PID: USB.Protocol.Product_Id) return Device_Handle_Access;
pragma Import(C, Open_Device_with_VID_PID,
"libusb_open_device_with_vid_pid");
procedure Close(Dev_Handle: Device_Handle_Access);
pragma Import(C, Close, "libusb_close");
function Get_Device(Dev_Handle: Device_Handle_Access) return Device_Access;
pragma Import(C, Get_Device, "libusb_get_device");
function Get_Configuration(Dev: Device_Handle_Access;
Config: access int) return Status;
pragma Import(C, Get_Configuration, "libusb_get_configuration");
function Set_Configuration(Dev: Device_Handle_Access;
Configuration: int) return Status;
pragma Import(C, Set_Configuration, "libusb_set_configuration");
function Claim_Interface(Dev: Device_Handle_Access;
Interface_Number: int) return Status;
pragma Import(C, Claim_Interface, "libusb_claim_interface");
function Release_Interface(Dev: Device_Handle_Access;
Interface_Number: int) return Status;
pragma Import(C, Release_Interface, "libusb_release_interface");
function Set_Interface_Alt_Setting(Dev: Device_Handle_Access;
Interface_Number: int; Alternate_Setting: int) return Status;
pragma Import(C, Set_Interface_Alt_Setting,
"libusb_set_interface_alt_setting");
function Clear_Halt(Dev: Device_Handle_Access; Endpoint: int) return Status;
pragma Import(C, Clear_Halt, "libusb_clear_halt");
function Reset_Device(Dev: Device_Handle_Access) return Status;
pragma Import(C, Reset_Device, "libusb_reset_device");
function Kernel_Driver_Active(Dev: Device_Handle_Access;
Interface_Number: int) return int;
pragma Import(C, Kernel_Driver_Active, "libusb_kernel_driver_active");
function Detach_Kernel_Driver(Dev: Device_Handle_Access;
Interface_Number: int) return Status;
pragma Import(C, Detach_Kernel_Driver, "libusb_detach_kernel_driver");
function Attach_Kernel_Driver(Dev: Device_Handle_Access;
Interface_Number: int) return Status;
pragma Import(C, Attach_Kernel_Driver, "libusb_attach_kernel_driver");
function Set_Auto_Detach_Kernel_Driver(Dev: Device_Handle_Access;
Enable: int) return Status;
pragma Import(C, Set_Auto_Detach_Kernel_Driver,
"libusb_set_auto_detach_kernel_driver");
---- Miscellaneus
API_Version: constant Integer := 16#01000104#;
type Lib_Capability is (
Cap_Has_Capability, Cap_Has_Hotplug,
Cap_Has_HID_Access, Cap_Supports_Detach_Kernel_Driver
);
for Lib_Capability use (
16#0000#, 16#0001#,
16#0100#, 16#0101#
);
pragma Convention(C, Lib_Capability);
type Version_Number is mod 2**16 with Size => 16, Convention => C;
type Lib_Version is record
Major, Minor, Micro, Nano: Version_Number;
Rc, Describe: Strings.chars_ptr;
end record;
function Has_Capability(Capability: Lib_Capability) return int;
pragma Import(C, Has_Capability, "libusb_has_capability");
function Error_Name(Error_Code: int) return Strings.chars_ptr;
pragma Import(C, Error_Name, "libusb_error_name");
function Get_Version return access constant Lib_Version;
pragma Import(C, Get_Version, "libusb_get_version");
function SetLocale(Locale: Strings.chars_ptr) return Status;
pragma Import(C, SetLocale, "libusb_setlocale");
function StrError(errcode: Status) return Strings.chars_ptr;
pragma Import(C, StrError, "libusb_strerror");
---- Descriptors
type Transfer_Type is (
Transfer_Type_Control, Transfer_Type_Isochronous,
Transfer_Type_Bulk, Transfer_Type_Interrupt,
Transfer_Type_Bulk_Stream
);
for Transfer_Type use (
0, 1,
2, 3,
4
);
pragma Convention(C, Transfer_Type);
-- Those records corresponds to USB standard ones,
-- except several fields added by LibUSB.
-- Including standard record as element of this
-- could break compatibility due to C alignment issues.
type Endpoint_Descriptor is record
-- Descriptor: USB.Protocol.Endpoint_Descriptor;
bLength: Unsigned_8;
bDescriptorType: Descriptor_Type;
bEndpointAddress: Endpoint_Address;
bmAttributes: Endpoint_Descriptors.Attributes;
wMaxPacketSize: Unsigned_16;
bInterval: Unsigned_8;
bRefresh: Unsigned_8;
bSynchAddress: Unsigned_8;
Extra: System.Address;
Extra_Length: Integer;
end record;
pragma Convention(C, Endpoint_Descriptor);
type Endpoint_Descriptor_Array is array(Integer range <>) of
aliased Endpoint_Descriptor;
Endpoint_Descriptor_Default_Terminator: constant Endpoint_Descriptor := (
0, DT_Endpoint, 0, (
Endpoint_Descriptors.Transfer_Type_Control,
Endpoint_Descriptors.Iso_Sync_Type_None,
Endpoint_Descriptors.Iso_Usage_Type_Data
), 0, 0, 0, 0,
System.Null_Address, 0
); -- just for pointers to compile
package Endpoint_Descriptor_Lists is new Interfaces.C.Pointers(
Index => Integer,
Element => Endpoint_Descriptor,
Element_Array => Endpoint_Descriptor_Array,
Default_Terminator => Endpoint_Descriptor_Default_Terminator);
type Interface_Descriptor is record
-- Descriptor: USB.Protocol.Interface_Descriptor;
bLength: Unsigned_8;
bDescriptorType: Descriptor_Type;
bInterfaceNumber: Unsigned_8;
bAlternateSetting: Unsigned_8;
bNumEndpoints: Unsigned_8;
bInterfaceClass: Class_Code;
bInterfaceSubClass: Unsigned_8;
bInterfaceProtocol: Unsigned_8;
iInterface: Unsigned_8;
Endpoint: Endpoint_Descriptor_Lists.Pointer;
Extra: System.Address;
Extra_Length: Integer;
end record;
pragma Convention(C, Interface_Descriptor);
type Interface_List is record
AltSetting: Endpoint_Descriptor_Lists.Pointer;
Num_AltSetting: Integer;
end record;
type Configuration_Descriptor is record
-- Descriptor: USB.Protocol.Configuration_Descriptor;
bLength: Unsigned_8;
bDescriptorType: Descriptor_Type;
wTotalLength: Unsigned_16;
bNumInterfaces: Unsigned_8;
bConfigurationValue: Unsigned_8;
iConfiguration: Unsigned_8;
bmAttributes: Configuration_Descriptors.Attributes;
bMaxPower: Unsigned_8;
Interface_List: LibUSB1.Interface_List;
Extra: System.Address;
Extra_Length: Integer;
end record;
pragma Convention(C, Configuration_Descriptor);
type Configuration_Descriptor_Access is access all Configuration_Descriptor;
pragma Convention(C, Configuration_Descriptor_Access);
type SS_Endpoint_Companion_Descriptor_Access is
access all Superspeed_Endpoint_Companion_Descriptor;
pragma Convention(C, SS_Endpoint_Companion_Descriptor_Access);
type BOS_Descriptor_Access is access all BOS_Descriptor;
pragma Convention(C, BOS_Descriptor_Access);
type USB_2_0_Extension_Descriptor_Access is
access all USB_2_0_Extension_Descriptor;
pragma Convention(C, USB_2_0_Extension_Descriptor_Access);
type SS_USB_Device_Capability_Descriptor_Access is
access all Superspeed_USB_Device_Capability_Descriptor;
pragma Convention(C, SS_USB_Device_Capability_Descriptor_Access);
type Container_Id_Descriptor_Access is
access all Container_Id_Descriptor;
pragma Convention(C, Container_Id_Descriptor_Access);
function Get_Device_Descriptor(
Dev: Device_Access;
Desc: out Device_Descriptor
) return Status;
pragma Import(C, Get_Device_Descriptor, "libusb_get_device_descriptor");
function Get_Active_Config_Descriptor(
Dev: Device_Access;
Config: access Configuration_Descriptor_Access
) return Status;
pragma Import(C, Get_Active_Config_Descriptor,
"libusb_get_active_config_descriptor");
function Get_Config_Descriptor(
Dev: Device_Access;
Config_Index: Unsigned_8;
Config: out Configuration_Descriptor_Access
) return Status;
pragma Import(C, Get_Config_Descriptor, "libusb_get_config_descriptor");
function Get_Config_Descriptor_by_Value(
Dev: Device_Access;
bConfigurationValue: Unsigned_8;
Config: out Configuration_Descriptor_Access
) return Status;
pragma Import(C, Get_Config_Descriptor_by_Value,
"libusb_get_config_descriptor_by_value");
procedure Free_Config_Descriptor(Config: Configuration_Descriptor_Access);
pragma Import(C, Free_Config_Descriptor, "libusb_free_config_descriptor");
function Get_SS_Endpoint_Companion_Descriptor(
Ctx: Context_Access;
Endpoint: access constant Endpoint_Descriptor;
Ep_Comp: out SS_Endpoint_Companion_Descriptor_Access
) return Status;
pragma Import(C, Get_SS_Endpoint_Companion_Descriptor,
"libusb_get_ss_endpoint_companion_descriptor");
procedure Free_SS_Endpoint_Companion_Descriptor(
Ep_Comp: SS_Endpoint_Companion_Descriptor_Access
);
pragma Import(C, Free_SS_Endpoint_Companion_Descriptor,
"libusb_free_ss_endpoint_companion_descriptor");
function Get_BOS_Descriptor(
Handle: Device_Handle_Access;
BOS: out BOS_Descriptor_Access
) return Status;
pragma Import(C, Get_BOS_Descriptor, "libusb_get_bos_descriptor");
procedure Free_BOS_Descriptor(BOS: BOS_Descriptor_Access);
pragma Import(C, Free_BOS_Descriptor, "libusb_free_bos_descriptor");
function Get_USB_2_0_Extension_Descriptor(
Ctx: Context_Access;
Dev_Cap: access BOS_Device_Capability_Descriptor;
USB_2_0_Extension: out USB_2_0_Extension_Descriptor_Access
) return Status;
pragma Import(C, Get_USB_2_0_Extension_Descriptor,
"libusb_get_usb_2_0_endpoint_descriptor");
procedure Free_USB_2_0_Extension_Descriptor(
USB_2_0_Extension: USB_2_0_Extension_Descriptor_Access
);
pragma Import(C, Free_USB_2_0_Extension_Descriptor,
"libusb_free_usb_2_0_extension_descriptor");
function Get_SS_USB_Device_Capability_Descriptor(
Ctx: Context_Access;
Dev_Cap: access BOS_Device_Capability_Descriptor;
SS_USB_Device_Cap: out SS_USB_Device_Capability_Descriptor_Access
) return Status;
pragma Import(C, Get_SS_USB_Device_Capability_Descriptor,
"libusb_get_ss_usb_device_capability_descriptor");
procedure Free_SS_USB_Device_Capability_Descriptor(
SS_USB_Device_Cap: SS_USB_Device_Capability_Descriptor_Access
);
pragma Import(C, Free_SS_USB_Device_Capability_Descriptor,
"libusb_free_ss_usb_device_capability_descriptor");
function Get_Container_Id_Descriptor(
Ctx: Context_Access;
Dev_Cap: access BOS_Device_Capability_Descriptor;
Container_Id: out Container_Id_Descriptor_Access
) return Status;
pragma Import(C, Get_Container_Id_Descriptor,
"libusb_get_container_id_descriptor");
procedure Free_Container_Id_Descriptor(
Container_Id: Container_Id_Descriptor_Access
);
pragma Import(C, Free_Container_id_Descriptor,
"libusb_free_container_id_descriptor");
function Get_String_Descriptor_ASCII(
Dev: Device_Handle_Access;
Desc_Index: Unsigned_8;
Data: Char_Array;
Length: int
) return int;
pragma Import(C, Get_String_Descriptor_ASCII,
"libusb_get_string_descriptor_ascii");
---- Device hotplug event notification
Hotplug_Match_Any: constant Integer := -1;
type Hotplug_Callback_Handle is new Integer;
type Hotplug_Event is (
Hotplug_Event_Device_Arrived,
Hotplug_Event_Device_Left
);
for Hotplug_Event use (
Hotplug_Event_Device_Arrived => 16#01#,
Hotplug_Event_Device_Left => 16#02#
);
pragma Convention(C, Hotplug_Event);
type Hotplug_Flag is new Unsigned; -- cannot make it stucture
Hotplug_No_Flags: constant Hotplug_Flag := 0;
Hotplug_Enumerate: constant Hotplug_Flag := 1 * 2**0;
type Hotplug_Callback_Fn is access function(
Ctx: Context_Access;
Device: Device_Access;
Event: Hotplug_Event;
User_Data: System.Address
) return int;
pragma Convention(C, Hotplug_Callback_Fn);
function Hotplug_Register_Callback(
Ctx: Context_Access;
events: Hotplug_Event;
flags: Hotplug_Flag;
Vendor: int;
Product: int;
Dev_Class: int;
Cb_Fn: Hotplug_Callback_Fn;
User_Data: System.Address;
Handle: out Hotplug_Callback_Handle
) return Status;
pragma Import(C, Hotplug_Register_Callback,
"libusb_hotplug_register_callback");
function Hotplug_Deregister_Callback(
Ctx: Context_Access;
Handle: Hotplug_Callback_Handle
) return Status;
pragma Import(C, Hotplug_Deregister_Callback,
"libusb_hotplug_deregister_callback");
---- Asynchronous device I/O
type Transfer_Status is (
Transfer_Completed,
Transfer_Error,
Transfer_Timed_Out,
Transfer_Cancelled,
Transfer_Stall,
Transfer_No_Device,
Transfer_Overflow
);
pragma Convention(C, Transfer_Status);
type Iso_Packet_Descriptor is record
Length: unsigned;
Actual_Length: unsigned;
Status: Transfer_Status;
end record;
pragma Convention(C, Iso_Packet_Descriptor);
type Transfer_Flags is record
Short_Not_Ok: Boolean;
Free_Buffer: Boolean;
Free_Transfer: Boolean;
Add_Zero_Packet: Boolean;
end record;
for Transfer_Flags use record
Short_Not_Ok at 0 range 0 .. 0;
Free_Buffer at 0 range 1 .. 1;
Free_Transfer at 0 range 2 .. 2;
Add_Zero_Packet at 0 range 3 .. 3;
end record;
for Transfer_Flags'Size use 8;
pragma Convention(C_Pass_by_Copy, Transfer_Flags);
type Transfer;
type Transfer_Cb_Fn is access procedure(A_Transfer: Transfer);
pragma Convention(C, Transfer_Cb_Fn);
type Iso_Packet_Descriptor_Array is array (0 .. -1) of Iso_Packet_Descriptor;
type Transfer is record
Dev_Handle: Device_Handle_Access;
Flags: Transfer_Flags;
Endpoint: Unsigned_8;
A_Type: Unsigned_8; -- Transfer_type
Timeout: Unsigned;
Status: Transfer_Status;
Length: int;
Actual_Length: int;
Callback: Transfer_Cb_Fn;
User_Data: System.Address;
Buffer: System.Address;
Num_Iso_Packets: int;
Iso_Packet_Desc: Iso_Packet_Descriptor_Array;
end record;
pragma Convention(C, Transfer);
type Transfer_Access is access Transfer;
function Alloc_Streams(
Dev: Device_Handle_Access;
Num_Streams: Unsigned_32;
Endpoints: System.Address;
Num_Endpoints: int
) return int;
pragma Import(C, Alloc_Streams, "libusb_alloc_streams");
function Free_Streams(
Dev: Device_Handle_Access;
Endpoints: System.Address;
Num_Endpoints: int
) return int;
pragma Import(C, Free_Streams, "libusb_free_streams");
function Alloc_Transfer(
Iso_Packets: int
) return Transfer_Access;
pragma Import(C, Alloc_Transfer, "libusb_alloc_transfer");
procedure Free_Transfer(
A_Transfer: Transfer_Access
);
pragma Import(C, Free_Transfer, "libusb_free_transfer");
function Submit_Transfer(
A_Transfer: Transfer_Access
) return int;
pragma Import(C, Submit_Transfer, "libusb_submit_transfer");
function Cancel_Transfer(
A_Transfer: Transfer_Access
) return int;
pragma Import(C, Cancel_Transfer, "libusb_cancel_transfer");
procedure Transfer_Set_Stream_Id(
A_Transfer: Transfer_Access;
Stream_Id: Unsigned_32
);
pragma Import(C, Transfer_Set_Stream_Id, "libusb_transfer_set_stream_id");
function Transfer_Get_Stream_Id(
A_Transfer: Transfer_Access
) return Unsigned_32;
pragma Import(C, Transfer_Get_Stream_Id, "libusb_transfer_get_stream_id");
---- Polling and timing
type PollFD is record
FD: int;
Events: short;
end record;
pragma Convention(C, PollFD);
type PollFD_Access is access constant PollFD;
pragma Convention(C, PollFD_Access);
type PollFD_Access_Array is array(Integer range <>) of aliased PollFD_Access;
package PollFD_Access_Lists is new Interfaces.C.Pointers(
Index => Integer,
Element => PollFD_Access,
Element_Array => PollFD_Access_Array,
Default_Terminator => null);
type PollFD_Added_Cb is access procedure(
FD: int;
Events: short;
User_Data: System.Address
);
pragma Convention(C, PollFD_Added_Cb);
type PollFD_Removed_Cb is access procedure(
FD: int;
User_Data: System.Address
);
pragma Convention(C, PollFD_Removed_Cb);
function Try_Lock_Events(
Ctx: Context_Access
) return int;
pragma Import(C, Try_Lock_Events, "libusb_try_lock_events");
procedure Lock_Events(
Ctx: Context_Access
);
pragma Import(C, Lock_Events, "libusb_lock_events");
procedure Unlock_Events(
Ctx: Context_Access
);
pragma Import(C, Unlock_Events, "libusb_unlock_events");
function Event_Handling_Ok(
Ctx: Context_Access
) return int;
pragma Import(C, Event_Handling_Ok, "libusb_event_handling_ok");
function Event_Handler_Active(
Ctx: Context_Access
) return int;
pragma Import(C, Event_Handler_Active, "libusb_event_handler_active");
procedure Lock_Event_Waiters(
Ctx: Context_Access
);
pragma Import(C, Lock_Event_Waiters, "libusb_lock_event_waiters");
procedure Unlock_Event_Waiters(
Ctx: Context_Access
);
pragma Import(C, Unlock_Event_Waiters, "libusb_unlock_event_waiters");
type Timeval_Access is new System.Address; -- TODO: actual timeval
function Wait_For_Event(
Ctx: Context_Access;
Tv: Timeval_Access
) return int;
pragma Import(C, Wait_For_Event, "libusb_wait_for_event");
function Handle_Events_Timeout_Completed(
Ctx: Context_Access;
Tv: Timeval_Access;
Completed: in out int
) return int;
pragma Import(C, Handle_Events_Timeout_Completed,
"libusb_handle_events_timeout_completed");
function Handle_Events_Timeout(
Ctx: Context_Access;
Tv: Timeval_Access
) return int;
pragma Import(C, Handle_Events_Timeout, "libusb_handle_events_timeout");
function Handle_Events(
Ctx: Context_Access
) return int;
pragma Import(C, Handle_Events, "libusb_handle_events");
function Handle_Events_Completed(
Ctx: Context_Access;
Completed: in out int
) return int;
pragma Import(C, Handle_Events_Completed, "libusb_handle_events_completed");
function Handle_Events_Locked(
Ctx: Context_Access;
Tv: Timeval_Access
) return int;
pragma Import(C, Handle_Events_Locked, "libusb_handle_events_locked");
function PollFDs_Handle_Timeouts(
Ctx: Context_Access
) return int;
pragma Import(C, PollFDs_Handle_Timeouts, "libusb_pollfds_handle_timeouts");
function Get_Next_Timeout(
Ctx: Context_Access;
Tv: Timeval_Access
) return int;
pragma Import(C, Get_Next_Timeout, "libusb_get_next_timeout");
procedure Set_PollFD_Notifiers(
Ctx: Context_Access;
Added_Cb: PollFD_Added_Cb;
Removed_Cb: PollFD_Removed_Cb;
User_Data: System.Address
);
pragma Import(C, Set_PollFD_Notifiers, "libusb_set_pollfd_notifiers");
function Get_PollFDs(
Ctx: Context_Access
) return PollFD_Access_Lists.Pointer;
pragma Import(C, Get_PollFDs, "libusb_get_pollfds");
procedure Free_PollFDs(
PollFDs: PollFD_Access_Lists.Pointer
);
pragma Import(C, Free_PollFDs, "libusb_free_pollfds");
---- Synchronous deivce I/O
function Control_Transfer(
Dev_Handle: Device_Handle_Access;
bmRequestType: Request_Type;
bRequest: Request_Code;
wValue: Unsigned_16;
wIndex: Unsigned_16;
data: System.Address;
wLength: Unsigned_16;
Timeout: Unsigned
) return Integer;
pragma Import(C, Control_Transfer, "libusb_control_transfer");
function Bulk_Transfer(
Dev_Handle: Device_Handle_Access;
Endpoint: Unsigned_Char;
Data: System.Address;
Length: Integer;
Transferres: out Integer;
Timeout: Unsigned
) return Integer;
pragma Import(C, Bulk_Transfer, "libusb_bulk_transfer");
function Interrupt_Transfer(
Dev_Handle: Device_Handle_Access;
Endpoint: Unsigned_Char;
Data: System.Address;
Length: Integer;
Transferres: out Integer;
Timeout: Unsigned
) return Integer;
pragma Import(C, Interrupt_Transfer, "libusb_interrupt_transfer");
end USB.LibUSB1;
|
AdaCore/Ada_Drivers_Library | Ada | 11,823 | adb | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 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 STMicroelectronics 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 file is based on: --
-- @file stm32f746g_discovery_audio.c --
-- @author MCD Application Team --
------------------------------------------------------------------------------
with HAL; use HAL;
with STM32; use STM32;
with STM32.Device; use STM32.Device;
with STM32.Board; use STM32.Board;
with STM32.GPIO; use STM32.GPIO;
with STM32.DMA; use STM32.DMA;
with STM32.SAI; use STM32.SAI;
with STM32.Setup;
with STM32.I2C;
package body Audio is
Audio_SAI : SAI_Controller renames SAI_1;
-- Audio_INT : GPIO_Point renames PB10;
SAI1_MCLK_A : GPIO_Point renames PG7;
SAI1_SCK_A : GPIO_Point renames PE5;
SAI1_SD_A : GPIO_Point renames PE6;
SAI1_SD_B : GPIO_Point renames PE3;
SAI1_FS_A : GPIO_Point renames PE4;
SAI_Pins : constant GPIO_Points :=
(SAI1_MCLK_A, SAI1_SCK_A, SAI1_SD_A, SAI1_SD_B,
SAI1_FS_A);
SAI_Pins_AF : GPIO_Alternate_Function renames GPIO_AF_SAI1_6;
-- SAI in/out conf
SAI_Out_Block : SAI_Block renames Block_A;
-- SAI_In_Block : SAI_Block renames Block_B;
procedure Set_Audio_Clock (Freq : Audio_Frequency);
procedure Initialize_Audio_Out_Pins;
procedure Initialize_SAI_Out (Freq : Audio_Frequency);
procedure Initialize_Audio_I2C;
---------------------
-- Set_Audio_Clock --
---------------------
procedure Set_Audio_Clock (Freq : Audio_Frequency)
is
begin
-- Two groups of frequencies: the 44kHz family and the 48kHz family
-- The Actual audio frequency is calculated then with the following
-- formula:
-- Master_Clock = 256 * FS = SAI_CK / Master_Clock_Divider
-- We need to find a value of SAI_CK that allows such integer master
-- clock divider
case Freq is
when Audio_Freq_11kHz | Audio_Freq_22kHz |
Audio_Freq_32kHz | Audio_Freq_44kHz =>
-- HSE/PLLM = 1MHz = PLLI2S VCO Input
Configure_SAI_I2S_Clock
(Audio_SAI,
PLLI2SN => 429, -- VCO Output = 429MHz
PLLI2SQ => 2, -- SAI Clk(First level) = 214.5 MHz
PLLI2SDIVQ => 19); -- I2S Clk = 215.4 / 19 = 11.289 MHz
when Audio_Freq_8kHz | Audio_Freq_16kHz |
Audio_Freq_48kHz | Audio_Freq_96kHz =>
Configure_SAI_I2S_Clock
(Audio_SAI,
PLLI2SN => 344, -- VCO Output = 344MHz
PLLI2SQ => 7, -- SAI Clk(First level) = 49.142 MHz
PLLI2SDIVQ => 1); -- I2S Clk = 49.142 MHz
end case;
end Set_Audio_Clock;
-------------------------------
-- Initialize_Audio_Out_Pins --
-------------------------------
procedure Initialize_Audio_Out_Pins
is
begin
Enable_Clock (Audio_SAI);
Enable_Clock (SAI_Pins);
Configure_IO
(SAI_Pins,
(Mode => Mode_AF,
AF => SAI_Pins_AF,
AF_Output_Type => Push_Pull,
AF_Speed => Speed_High,
Resistors => Floating));
Enable_Clock (Audio_DMA);
-- Configure the DMA channel to the SAI peripheral
Disable (Audio_DMA, Audio_DMA_Out_Stream);
Configure
(Audio_DMA,
Audio_DMA_Out_Stream,
(Channel => Audio_DMA_Out_Channel,
Direction => Memory_To_Peripheral,
Increment_Peripheral_Address => False,
Increment_Memory_Address => True,
Peripheral_Data_Format => HalfWords,
Memory_Data_Format => HalfWords,
Operation_Mode => Circular_Mode,
Priority => Priority_High,
FIFO_Enabled => True,
FIFO_Threshold => FIFO_Threshold_Full_Configuration,
Memory_Burst_Size => Memory_Burst_Single,
Peripheral_Burst_Size => Peripheral_Burst_Single));
Clear_All_Status (Audio_DMA, Audio_DMA_Out_Stream);
end Initialize_Audio_Out_Pins;
------------------------
-- Initialize_SAI_Out --
------------------------
procedure Initialize_SAI_Out (Freq : Audio_Frequency)
is
begin
STM32.SAI.Disable (Audio_SAI, SAI_Out_Block);
STM32.SAI.Configure_Audio_Block
(Audio_SAI,
SAI_Out_Block,
Frequency => Audio_Frequency'Enum_Rep (Freq),
Stereo_Mode => Stereo,
Mode => Master_Transmitter,
MCD_Enabled => True,
Protocol => Free_Protocol,
Data_Size => Data_16b,
Endianness => Data_MSB_First,
Clock_Strobing => Clock_Strobing_Rising_Edge,
Synchronization => Asynchronous_Mode,
Output_Drive => Drive_Immediate,
FIFO_Threshold => FIFO_1_Quarter_Full);
STM32.SAI.Configure_Block_Frame
(Audio_SAI,
SAI_Out_Block,
Frame_Length => 64,
Frame_Active => 32,
Frame_Sync => FS_Frame_And_Channel_Identification,
FS_Polarity => FS_Active_Low,
FS_Offset => Before_First_Bit);
STM32.SAI.Configure_Block_Slot
(Audio_SAI,
SAI_Out_Block,
First_Bit_Offset => 0,
Slot_Size => Data_Size,
Number_Of_Slots => 4,
Enabled_Slots => Slot_0 or Slot_2);
STM32.SAI.Enable (Audio_SAI, SAI_Out_Block);
end Initialize_SAI_Out;
--------------------------
-- Initialize_Audio_I2C --
--------------------------
procedure Initialize_Audio_I2C
is
begin
if not STM32.I2C.Is_Configured (Audio_I2C) then
STM32.Setup.Setup_I2C_Master (Port => Audio_I2C,
SDA => Audio_I2C_SDA,
SCL => Audio_I2C_SCL,
SDA_AF => Audio_I2C_SDA_AF,
SCL_AF => Audio_I2C_SCL_AF,
Clock_Speed => 100_000);
end if;
end Initialize_Audio_I2C;
----------------
-- Initialize --
----------------
procedure Initialize_Audio_Out
(This : in out WM8994_Audio_Device;
Volume : Audio_Volume;
Frequency : Audio_Frequency)
is
begin
STM32.SAI.Deinitialize (Audio_SAI, SAI_Out_Block);
Set_Audio_Clock (Frequency);
-- Initialize the SAI
Initialize_Audio_Out_Pins;
Initialize_SAI_Out (Frequency);
-- Initialize the I2C Port to send commands to the driver
Initialize_Audio_I2C;
if This.Device.Read_ID /= WM8994.WM8994_ID then
raise Constraint_Error with "Invalid ID received from the Audio Code";
end if;
This.Device.Reset;
This.Device.Init
(Input => WM8994.No_Input,
Output => WM8994.Auto,
Volume => UInt8 (Volume),
Frequency =>
WM8994.Audio_Frequency'Enum_Val
(Audio_Frequency'Enum_Rep (Frequency)));
end Initialize_Audio_Out;
----------
-- Play --
----------
procedure Play
(This : in out WM8994_Audio_Device;
Buffer : Audio_Buffer)
is
begin
This.Device.Play;
Start_Transfer_with_Interrupts
(This => Audio_DMA,
Stream => Audio_DMA_Out_Stream,
Source => Buffer (Buffer'First)'Address,
Destination => Audio_SAI.ADR'Address,
Data_Count => Buffer'Length,
Enabled_Interrupts => (Half_Transfer_Complete_Interrupt => True,
Transfer_Complete_Interrupt => True,
others => False));
Enable_DMA (Audio_SAI, SAI_Out_Block);
if not Enabled (Audio_SAI, SAI_Out_Block) then
Enable (Audio_SAI, SAI_Out_Block);
end if;
end Play;
-----------
-- Pause --
-----------
procedure Pause (This : in out WM8994_Audio_Device) is
begin
This.Device.Pause;
DMA_Pause (Audio_SAI, SAI_Out_Block);
end Pause;
------------
-- Resume --
------------
procedure Resume (This : in out WM8994_Audio_Device)
is
begin
This.Device.Resume;
DMA_Resume (Audio_SAI, SAI_Out_Block);
end Resume;
----------
-- Stop --
----------
procedure Stop (This : in out WM8994_Audio_Device)
is
begin
This.Device.Stop (WM8994.Stop_Power_Down_Sw);
DMA_Stop (Audio_SAI, SAI_Out_Block);
STM32.DMA.Disable (Audio_DMA, Audio_DMA_Out_Stream);
STM32.DMA.Clear_All_Status (Audio_DMA, Audio_DMA_Out_Stream);
end Stop;
----------------
-- Set_Volume --
----------------
procedure Set_Volume
(This : in out WM8994_Audio_Device;
Volume : Audio_Volume)
is
begin
This.Device.Set_Volume (UInt8 (Volume));
end Set_Volume;
-------------------
-- Set_Frequency --
-------------------
procedure Set_Frequency
(This : in out WM8994_Audio_Device;
Frequency : Audio_Frequency)
is
pragma Unreferenced (This);
begin
Set_Audio_Clock (Frequency);
STM32.SAI.Disable (Audio_SAI, SAI_Out_Block);
Initialize_SAI_Out (Frequency);
STM32.SAI.Enable (Audio_SAI, SAI_Out_Block);
end Set_Frequency;
end Audio;
|
persan/A-gst | Ada | 5,141 | ads | pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h;
-- limited -- with GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h;
with System;
with glib;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_net_gstnettimeprovider_h is
-- unsupported macro: GST_TYPE_NET_TIME_PROVIDER (gst_net_time_provider_get_type())
-- arg-macro: function GST_NET_TIME_PROVIDER (obj)
-- return G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NET_TIME_PROVIDER,GstNetTimeProvider);
-- arg-macro: function GST_NET_TIME_PROVIDER_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NET_TIME_PROVIDER,GstNetTimeProviderClass);
-- arg-macro: function GST_IS_NET_TIME_PROVIDER (obj)
-- return G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NET_TIME_PROVIDER);
-- arg-macro: function GST_IS_NET_TIME_PROVIDER_CLASS (klass)
-- return G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NET_TIME_PROVIDER);
-- GStreamer
-- * Copyright (C) 2005 Andy Wingo <[email protected]>
-- * 2006 Joni Valtanen <[email protected]>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library 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
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library 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.
--
-- to determinate os
type GstNetTimeProvider;
type anon_333 (discr : unsigned := 0) is record
case discr is
when 0 =>
u_gst_reserved1 : System.Address; -- gst/net/gstnettimeprovider.h:87
when others =>
active : aliased GLIB.gint; -- gst/net/gstnettimeprovider.h:89
end case;
end record;
pragma Convention (C_Pass_By_Copy, anon_333);
pragma Unchecked_Union (anon_333);type u_GstNetTimeProvider_control_sock_array is array (0 .. 1) of aliased int;
type u_GstNetTimeProvider_u_gst_reserved_array is array (0 .. 1) of System.Address;
--subtype GstNetTimeProvider is u_GstNetTimeProvider; -- gst/net/gstnettimeprovider.h:62
type GstNetTimeProviderClass;
--subtype GstNetTimeProviderClass is u_GstNetTimeProviderClass; -- gst/net/gstnettimeprovider.h:63
-- skipped empty struct u_GstNetTimeProviderPrivate
-- skipped empty struct GstNetTimeProviderPrivate
--*
-- * GstNetTimeProvider:
-- *
-- * Opaque #GstNetTimeProvider structure.
--
type GstNetTimeProvider is record
parent : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h.GstObject; -- gst/net/gstnettimeprovider.h:73
address : access GLIB.gchar; -- gst/net/gstnettimeprovider.h:76
port : aliased int; -- gst/net/gstnettimeprovider.h:77
sock : aliased int; -- gst/net/gstnettimeprovider.h:79
control_sock : aliased u_GstNetTimeProvider_control_sock_array; -- gst/net/gstnettimeprovider.h:80
thread : access GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h.GThread; -- gst/net/gstnettimeprovider.h:82
clock : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClock; -- gst/net/gstnettimeprovider.h:84
active : aliased anon_333; -- gst/net/gstnettimeprovider.h:90
priv : System.Address; -- gst/net/gstnettimeprovider.h:93
u_gst_reserved : u_GstNetTimeProvider_u_gst_reserved_array; -- gst/net/gstnettimeprovider.h:95
end record;
pragma Convention (C_Pass_By_Copy, GstNetTimeProvider); -- gst/net/gstnettimeprovider.h:72
--< private >
-- has to be a gint, we use atomic ops here
--< private >
type GstNetTimeProviderClass is record
parent_class : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstobject_h.GstObjectClass; -- gst/net/gstnettimeprovider.h:99
end record;
pragma Convention (C_Pass_By_Copy, GstNetTimeProviderClass); -- gst/net/gstnettimeprovider.h:98
function gst_net_time_provider_get_type return GLIB.GType; -- gst/net/gstnettimeprovider.h:102
pragma Import (C, gst_net_time_provider_get_type, "gst_net_time_provider_get_type");
function gst_net_time_provider_new
(clock : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstclock_h.GstClock;
address : access GLIB.gchar;
port : GLIB.gint) return access GstNetTimeProvider; -- gst/net/gstnettimeprovider.h:103
pragma Import (C, gst_net_time_provider_new, "gst_net_time_provider_new");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_net_gstnettimeprovider_h;
|
jrcarter/Ada_GUI | Ada | 2,042 | ads | -- --
-- package Strings_Edit.Integers Copyright (c) Dmitry A. Kazakov --
-- Instantiation Luebeck --
-- Spring, 2002 --
-- --
-- Last revision : 21:03 21 Apr 2009 --
-- --
-- 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. --
--____________________________________________________________________--
with Strings_Edit.Integer_Edit;
package Strings_Edit.Integers is
new Strings_Edit.Integer_Edit (Integer);
|
ada-actions/toolchain | Ada | 102 | adb | with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line ("Hello World!");
end Hello;
|
likai3g/afmt | Ada | 138 | ads | with Interfaces;
with Fmt.Generic_Mod_Int_Argument;
package Fmt.Uint8_Argument is
new Generic_Mod_Int_Argument(Interfaces.Unsigned_8);
|
michael-hardeman/contacts_app | Ada | 35,973 | adb | -- This file is covered by the Internet Software Consortium (ISC) License
-- Reference: ../../License.txt
with Ada.Unchecked_Conversion;
with Ada.Characters.Handling;
package body AdaBase.Connection.Base.MySQL is
package ACH renames Ada.Characters.Handling;
---------------------
-- setCompressed --
---------------------
overriding
procedure setCompressed (conn : out MySQL_Connection; compressed : Boolean)
is
begin
if conn.prop_active then
raise NOT_WHILE_CONNECTED;
end if;
conn.prop_compressed := compressed;
end setCompressed;
------------------
-- compressed --
------------------
overriding
function compressed (conn : MySQL_Connection) return Boolean
is
begin
return conn.prop_compressed;
end compressed;
---------------------
-- setMultiQuery --
---------------------
overriding
procedure setMultiQuery (conn : out MySQL_Connection; multiple : Boolean)
is
begin
if conn.prop_active then
declare
use type ABM.my_int;
setting : ABM.enum_mysql_set_option :=
ABM.MYSQL_OPTION_MULTI_STATEMENTS_ON;
result : ABM.my_int;
begin
if not multiple then
setting := ABM.MYSQL_OPTION_MULTI_STATEMENTS_OFF;
end if;
result := ABM.mysql_set_server_option (handle => conn.handle,
option => setting);
if result /= 0 then
raise SET_OPTION_FAIL with "Failed to set MultiQuery option";
end if;
end;
end if;
conn.prop_multiquery := multiple;
end setMultiQuery;
------------------
-- multiquery --
------------------
overriding
function multiquery (conn : MySQL_Connection) return Boolean
is
begin
return conn.prop_multiquery;
end multiquery;
--------------------
-- setUseBuffer --
--------------------
overriding
procedure setUseBuffer (conn : out MySQL_Connection; buffered : Boolean)
is
begin
conn.prop_buffered := buffered;
end setUseBuffer;
-----------------
-- useBuffer --
-----------------
overriding
function useBuffer (conn : MySQL_Connection) return Boolean
is
begin
return conn.prop_buffered;
end useBuffer;
-------------------
-- description --
-------------------
overriding
function description (conn : MySQL_Connection) return String
is
begin
return conn.info_description;
end description;
---------------------
-- setAutoCommit --
---------------------
overriding
procedure setAutoCommit (conn : out MySQL_Connection; auto : Boolean)
is
use type ABM.my_bool;
auto_mode : ABM.my_bool := 0;
result : ABM.my_bool;
begin
if auto then
auto_mode := 1;
end if;
if conn.prop_active then
result := ABM.mysql_autocommit (handle => conn.handle,
mode => auto_mode);
if result /= 0 then
raise AUTOCOMMIT_FAIL with "autocommit result = " & result'Img;
end if;
end if;
conn.prop_auto_commit := auto;
end setAutoCommit;
----------------
-- SqlState --
----------------
overriding
function SqlState (conn : MySQL_Connection) return SQL_State
is
result : ABM.ICS.chars_ptr;
begin
result := ABM.mysql_sqlstate (handle => conn.handle);
declare
convstr : constant String := ABM.ICS.Value (Item => result);
begin
return SQL_State (convstr (1 .. 5));
end;
end SqlState;
---------------------
-- driverMessage --
---------------------
overriding
function driverMessage (conn : MySQL_Connection)
return String
is
result : ABM.ICS.chars_ptr;
begin
result := ABM.mysql_error (handle => conn.handle);
return ABM.ICS.Value (Item => result);
end driverMessage;
------------------
-- driverCode --
------------------
overriding
function driverCode (conn : MySQL_Connection) return Driver_Codes
is
result : ABM.my_uint;
begin
result := ABM.mysql_errno (handle => conn.handle);
return Driver_Codes (result);
end driverCode;
--------------------
-- lastInsertID --
--------------------
overriding
function lastInsertID (conn : MySQL_Connection) return Trax_ID
is
result : ABM.my_ulonglong;
begin
result := ABM.mysql_insert_id (handle => conn.handle);
return Trax_ID (result);
end lastInsertID;
--------------
-- commit --
--------------
overriding
procedure commit (conn : out MySQL_Connection)
is
use type ABM.my_bool;
result : ABM.my_bool;
begin
result := ABM.mysql_commit (handle => conn.handle);
if result /= 0 then
raise COMMIT_FAIL;
end if;
end commit;
----------------
-- rollback --
----------------
overriding
procedure rollback (conn : out MySQL_Connection)
is
use type ABM.my_bool;
result : ABM.my_bool;
begin
result := ABM.mysql_rollback (handle => conn.handle);
if result /= 0 then
raise ROLLBACK_FAIL;
end if;
end rollback;
----------------
-- connect --
----------------
overriding
procedure connect (conn : out MySQL_Connection;
database : String;
username : String := blankstring;
password : String := blankstring;
hostname : String := blankstring;
socket : String := blankstring;
port : Posix_Port := portless)
is
use type ABM.MYSQL_Access;
options : Natural := 0;
opt_compress : constant Natural := 2 ** (ABM.client_flag_order'Pos
(ABM.CLIENT_COMPRESS) - 1);
opt_multi : constant Natural :=
2 ** (ABM.client_flag_order'Pos (ABM.CLIENT_MULTI_RESULTS) - 1)
+
2 ** (ABM.client_flag_order'Pos (ABM.CLIENT_MULTI_STATEMENTS) - 1);
begin
if conn.prop_active then
raise NOT_WHILE_CONNECTED;
end if;
if conn.prop_compressed then
options := options + opt_compress;
end if;
if conn.prop_multiquery then
options := options + opt_multi;
end if;
conn.handle := ABM.mysql_init (null);
if conn.handle = null then
raise INITIALIZE_FAIL;
end if;
declare
hoststr : ABM.ICS.chars_ptr := ABM.ICS.Null_Ptr;
userstr : ABM.ICS.chars_ptr := S2P (username);
passwdstr : ABM.ICS.chars_ptr := S2P (password);
dbstr : ABM.ICS.chars_ptr := S2P (database);
socketstr : ABM.ICS.chars_ptr := ABM.ICS.Null_Ptr;
portval : ABM.my_uint := 0;
test : ABM.MYSQL_Access := null;
begin
if socket = blankstring then
hoststr := S2P (hostname);
portval := ABM.my_uint (port);
else
socketstr := S2P (socket);
end if;
test := ABM.mysql_real_connect
(handle => conn.handle,
host => hoststr,
user => userstr,
passwd => passwdstr,
db => dbstr,
port => portval,
unix_socket => socketstr,
client_flag => ABM.my_ulong (options));
ABM.ICS.Free (userstr);
ABM.ICS.Free (passwdstr);
ABM.ICS.Free (dbstr);
if socket = blankstring then
ABM.ICS.Free (hoststr);
else
ABM.ICS.Free (socketstr);
end if;
if test = null then
raise CONNECT_FAIL;
end if;
end;
conn.prop_active := True;
declare
-- populate client version information
result : ABM.my_ulong := ABM.mysql_get_client_version;
begin
conn.info_client_version := convert_version (Positive (result));
end;
declare
-- populate client information
result : ABM.ICS.chars_ptr := ABM.mysql_get_client_info;
begin
conn.info_client := CT.SUS (ABM.ICS.Value (Item => result));
end;
declare
-- populate server version information
result : ABM.my_ulong := ABM.mysql_get_server_version (conn.handle);
begin
conn.info_server_version := convert_version (Positive (result));
end;
declare
-- populate server information
result : ABM.ICS.chars_ptr := ABM.mysql_get_server_info (conn.handle);
begin
conn.info_server := CT.SUS (ABM.ICS.Value (Item => result));
end;
conn.establish_uniform_encoding;
conn.retrieve_uniform_encoding;
conn.setTransactionIsolation (conn.prop_trax_isolation);
conn.setAutoCommit (conn.prop_auto_commit);
exception
when NOT_WHILE_CONNECTED =>
raise NOT_WHILE_CONNECTED with
"Reconnection attempted during an active connection";
when INITIALIZE_FAIL =>
raise INITIALIZE_FAIL with
"Failed to allocate enough memory for MySQL connection object";
when CONNECT_FAIL =>
conn.disconnect;
raise CONNECT_FAIL with
"Failed to connect to " & database;
when rest : others =>
conn.disconnect;
EX.Reraise_Occurrence (rest);
end connect;
------------------
-- disconnect --
------------------
overriding
procedure disconnect (conn : out MySQL_Connection)
is
use type ABM.MYSQL_Access;
begin
if conn.handle /= null then
ABM.mysql_close (handle => conn.handle);
conn.handle := null;
end if;
conn.prop_active := False;
end disconnect;
---------------
-- execute --
---------------
overriding
procedure execute (conn : out MySQL_Connection; sql : String)
is
use type ABM.my_int;
result : ABM.my_int;
query : ABM.ICS.chars_ptr := ABM.ICS.New_String (Str => sql);
len : constant ABM.my_ulong := ABM.my_ulong (ABM.ICS.Strlen (query));
begin
result := ABM.mysql_real_query (handle => conn.handle,
stmt_str => query,
length => len);
ABM.ICS.Free (Item => query);
if result /= 0 then
raise QUERY_FAIL;
end if;
end execute;
-------------------------------
-- setTransactionIsolation --
-------------------------------
overriding
procedure setTransactionIsolation (conn : out MySQL_Connection;
isolation : Trax_Isolation)
is
use type Trax_Isolation;
sql : constant String := "SET SESSION TRANSACTION ISOLATION LEVEL " &
ISO_Keywords (isolation);
begin
if conn.prop_active then
conn.execute (sql);
end if;
conn.prop_trax_isolation := isolation;
exception
when QUERY_FAIL =>
raise TRAXISOL_FAIL with sql;
end setTransactionIsolation;
-------------------
-- free_result --
-------------------
procedure free_result (conn : MySQL_Connection;
result_handle : out ABM.MYSQL_RES_Access)
is
begin
ABM.mysql_free_result (handle => result_handle);
result_handle := null;
end free_result;
-------------------
-- use_result --
-------------------
procedure use_result (conn : MySQL_Connection;
result_handle : out ABM.MYSQL_RES_Access)
is
use type ABM.MYSQL_RES_Access;
begin
result_handle := ABM.mysql_use_result (handle => conn.handle);
if result_handle = null then
raise RESULT_FAIL with "Direct statement null use result";
end if;
end use_result;
--------------------
-- store_result --
--------------------
procedure store_result (conn : MySQL_Connection;
result_handle : out ABM.MYSQL_RES_Access)
is
use type ABM.MYSQL_RES_Access;
begin
result_handle := ABM.mysql_store_result (handle => conn.handle);
if result_handle = null then
raise RESULT_FAIL with "Direct statement null store result";
end if;
end store_result;
-------------------
-- field_count --
-------------------
function field_count (conn : MySQL_Connection) return Natural
is
result : ABM.my_uint;
begin
result := ABM.mysql_field_count (handle => conn.handle);
return Natural (result);
end field_count;
----------------------------------
-- rows_affected_by_execution --
----------------------------------
overriding
function rows_affected_by_execution (conn : MySQL_Connection)
return Affected_Rows
is
result : ABM.my_ulonglong;
begin
result := ABM.mysql_affected_rows (handle => conn.handle);
return Affected_Rows (result);
end rows_affected_by_execution;
------------------------
-- fields_in_result --
------------------------
function fields_in_result (conn : MySQL_Connection;
result_handle : ABM.MYSQL_RES_Access)
return Natural
is
result : ABM.my_uint;
begin
result := ABM.mysql_num_fields (handle => result_handle);
return Natural (result);
end fields_in_result;
----------------------
-- rows_in_result --
----------------------
function rows_in_result (conn : MySQL_Connection;
result_handle : ABM.MYSQL_RES_Access)
return Affected_Rows
is
result : ABM.my_ulonglong;
begin
result := ABM.mysql_num_rows (handle => result_handle);
return Affected_Rows (result);
end rows_in_result;
-------------------
-- fetch_field --
-------------------
function fetch_field (conn : MySQL_Connection;
result_handle : ABM.MYSQL_RES_Access)
return ABM.MYSQL_FIELD_Access
is
begin
return ABM.mysql_fetch_field (handle => result_handle);
end fetch_field;
------------------------
-- field_name_field --
------------------------
function field_name_field (conn : MySQL_Connection;
field : ABM.MYSQL_FIELD_Access) return String
is
result : constant String := ABM.ICS.Value (Item => field.name);
begin
return result;
end field_name_field;
------------------------
-- field_name_table --
------------------------
function field_name_table (conn : MySQL_Connection;
field : ABM.MYSQL_FIELD_Access) return String
is
result : constant String := ABM.ICS.Value (Item => field.table);
begin
return result;
end field_name_table;
---------------------------
-- field_name_database --
---------------------------
function field_name_database (conn : MySQL_Connection;
field : ABM.MYSQL_FIELD_Access) return String
is
result : constant String := ABM.ICS.Value (Item => field.db);
begin
return result;
end field_name_database;
-----------------------
-- field_data_type --
-----------------------
procedure field_data_type (conn : MySQL_Connection;
field : ABM.MYSQL_FIELD_Access;
std_type : out field_types;
size : out Natural)
is
type flagtype is mod 2 ** 16;
type megasize is mod 2 ** 64;
flag_unsigned : constant flagtype := 2 ** 5;
flag_enumtype : constant flagtype := 2 ** 8;
flag_settype : constant flagtype := 2 ** 11;
mytype : constant ABM.enum_field_types := field.field_type;
flags : constant flagtype := flagtype (field.flags);
unsigned : constant Boolean := (flags and flag_unsigned) > 0;
is_enum : constant Boolean := (flags and flag_enumtype) > 0;
is_set : constant Boolean := (flags and flag_settype) > 0;
fieldlen : constant megasize := megasize (field.length);
maxlen : constant megasize := megasize (field.max_length);
bestlen : Natural;
begin
if fieldlen > megasize (BLOB_Maximum'Last) then
bestlen := Natural (BLOB_Maximum'Last);
else
bestlen := Natural (fieldlen);
end if;
if maxlen /= 0 and then maxlen < megasize (BLOB_Maximum'Last) then
bestlen := Natural (maxlen);
end if;
case mytype is
when ABM.MYSQL_TYPE_FLOAT => std_type := ft_real9;
when ABM.MYSQL_TYPE_DOUBLE => std_type := ft_real18;
when ABM.MYSQL_TYPE_DECIMAL |
ABM.MYSQL_TYPE_NEWDECIMAL =>
-- Fieldlen = Max digits + 2 (decimal point and null char?)
-- The decimal fields is not useful here, we want sig. digits
if Natural (fieldlen) - 2 <= 9 then
std_type := ft_real9;
else
std_type := ft_real18;
end if;
when ABM.MYSQL_TYPE_TINY =>
-- Signed is irrelevant when field length is 1
-- TINY_INT(1) is boolean, both signed and unsigned
if fieldlen = 1 then
std_type := ft_nbyte0;
elsif unsigned then
std_type := ft_nbyte1;
else
std_type := ft_byte1;
end if;
when ABM.MYSQL_TYPE_SHORT | ABM.MYSQL_TYPE_YEAR =>
if unsigned then
std_type := ft_nbyte2;
else
std_type := ft_byte2;
end if;
when ABM.MYSQL_TYPE_INT24 =>
if unsigned then
std_type := ft_nbyte3;
else
std_type := ft_byte3;
end if;
when ABM.MYSQL_TYPE_LONG =>
if unsigned then
std_type := ft_nbyte4;
else
std_type := ft_byte4;
end if;
when ABM.MYSQL_TYPE_LONGLONG =>
if unsigned then
std_type := ft_nbyte8;
else
std_type := ft_byte8;
end if;
when ABM.MYSQL_TYPE_TIMESTAMP |
ABM.MYSQL_TYPE_DATE |
ABM.MYSQL_TYPE_TIME |
ABM.MYSQL_TYPE_DATETIME |
ABM.MYSQL_TYPE_NEWDATE => std_type := ft_timestamp;
when ABM.MYSQL_TYPE_BIT => std_type := ft_bits;
when ABM.MYSQL_TYPE_TINY_BLOB |
ABM.MYSQL_TYPE_BLOB |
ABM.MYSQL_TYPE_MEDIUM_BLOB |
ABM.MYSQL_TYPE_LONG_BLOB |
ABM.MYSQL_TYPE_VARCHAR |
ABM.MYSQL_TYPE_VAR_STRING |
ABM.MYSQL_TYPE_STRING =>
declare
use type ABM.MY_CHARSET_INFO;
chsetnr : constant Natural := Natural (field.charsetnr);
bin_set : constant Natural := 63;
binary : constant Boolean := (chsetnr = bin_set);
csinfo : aliased ABM.MY_CHARSET_INFO;
begin
if is_enum then
std_type := ft_enumtype;
elsif is_set then
std_type := ft_settype;
elsif binary then
std_type := ft_chain;
else
ABM.mysql_get_character_set_info (handle => conn.handle,
cs => csinfo'Access);
declare
setname : constant String :=
ACH.To_Upper (ABM.ICS.Value (Item => csinfo.csname));
begin
if setname = "UTF8" then
std_type := ft_utf8;
else
if conn.encoding_is_utf8 then
raise BINDING_FAIL with
"expected UTF8 encoding, found " & setname;
end if;
case csinfo.mbmaxlen is
when 1 => std_type := ft_textual;
when 2 => std_type := ft_widetext;
when 4 => std_type := ft_supertext;
when others =>
raise BINDING_FAIL with
"Unexpected character set maximum set";
end case;
end if;
end;
end if;
end;
when ABM.MYSQL_TYPE_GEOMETRY => std_type := ft_geometry;
when ABM.MYSQL_TYPE_ENUM | ABM.MYSQL_TYPE_SET =>
raise BINDING_FAIL with
"Unexpected type: " & mytype'Img & " (should appear as string)";
when ABM.MYSQL_TYPE_NULL => std_type := ft_textual;
end case;
case mytype is
when ABM.MYSQL_TYPE_BIT |
ABM.MYSQL_TYPE_TINY_BLOB |
ABM.MYSQL_TYPE_BLOB |
ABM.MYSQL_TYPE_MEDIUM_BLOB |
ABM.MYSQL_TYPE_LONG_BLOB |
ABM.MYSQL_TYPE_VARCHAR |
ABM.MYSQL_TYPE_VAR_STRING |
ABM.MYSQL_TYPE_STRING |
ABM.MYSQL_TYPE_DECIMAL |
ABM.MYSQL_TYPE_GEOMETRY |
ABM.MYSQL_TYPE_NEWDECIMAL => size := bestlen;
when others => size := 0;
end case;
end field_data_type;
-------------------------
-- field_allows_null --
-------------------------
function field_allows_null (conn : MySQL_Connection;
field : ABM.MYSQL_FIELD_Access)
return Boolean
is
type flagtype is mod 2 ** 16;
flag_null : constant flagtype := 2 ** 1;
flags : constant flagtype := flagtype (field.flags);
permitted : constant Boolean := (flags and flag_null) > 0;
begin
return permitted;
end field_allows_null;
------------------
-- fetch_row --
------------------
function fetch_row (conn : MySQL_Connection;
result_handle : ABM.MYSQL_RES_Access)
return ABM.MYSQL_ROW_access
is
begin
return ABM.mysql_fetch_row (handle => result_handle);
end fetch_row;
----------------------
-- fetch_next_set --
----------------------
function fetch_next_set (conn : MySQL_Connection) return Boolean
is
use type ABM.my_int;
result : ABM.my_int;
begin
result := ABM.mysql_next_result (handle => conn.handle);
if result > 0 then
raise RESULT_FAIL with "Error fetching next result set";
end if;
if result = 0 then
return True;
end if;
return False;
end fetch_next_set;
---------------------
-- fetch_lengths --
---------------------
function fetch_lengths (conn : MySQL_Connection;
result_handle : ABM.MYSQL_RES_Access;
num_columns : Positive) return fldlen
is
use type ABM.my_ulong_access;
type cres is record
len : ABM.block_ulong (0 .. num_columns - 1);
end record;
type cres_access is access all cres;
function convert_to_cres is new Ada.Unchecked_Conversion
(Source => ABM.my_ulong_access, Target => cres_access);
result : fldlen (1 .. num_columns) := (others => 0);
naccess : cres_access;
MLA : ABM.my_ulong_access := ABM.mysql_fetch_lengths
(result => result_handle);
begin
if MLA = null then
return result;
end if;
naccess := convert_to_cres (MLA);
for x in naccess.len'Range
loop
result (x + 1) := Natural (naccess.len (x));
end loop;
return result;
end fetch_lengths;
-------------------------
-- prep_LastInsertID --
-------------------------
function prep_LastInsertID (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access) return Trax_ID
is
use type ABM.MYSQL_STMT_Access;
result : ABM.my_ulonglong;
begin
if stmt = null then
raise STMT_NOT_VALID with "PREP: Last Insert ID";
end if;
result := ABM.mysql_stmt_insert_id (handle => stmt);
return Trax_ID (result);
end prep_LastInsertID;
---------------------
-- prep_SqlState --
---------------------
function prep_SqlState (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access) return SQL_State
is
result : ABM.ICS.chars_ptr;
begin
result := ABM.mysql_stmt_sqlstate (handle => stmt);
declare
convstr : constant String := ABM.ICS.Value (Item => result);
begin
return SQL_State (convstr (1 .. 5));
end;
end prep_SqlState;
-----------------------
-- prep_DriverCode --
-----------------------
function prep_DriverCode (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access) return Driver_Codes
is
result : ABM.my_uint;
begin
result := ABM.mysql_stmt_errno (handle => stmt);
return Driver_Codes (result);
end prep_DriverCode;
--------------------------
-- prep_DriverMessage --
--------------------------
function prep_DriverMessage (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access) return String
is
result : ABM.ICS.chars_ptr;
begin
result := ABM.mysql_stmt_error (handle => stmt);
return ABM.ICS.Value (Item => result);
end prep_DriverMessage;
------------------------
-- prep_free_result --
------------------------
procedure prep_free_result (conn : MySQL_Connection;
stmt : out ABM.MYSQL_STMT_Access)
is
use type ABM.my_bool;
result : ABM.my_bool;
begin
result := ABM.mysql_stmt_free_result (handle => stmt);
if result /= 0 then
raise RESULT_FAIL with "Prepared statement free result";
end if;
stmt := null;
end prep_free_result;
-------------------------
-- prep_store_result --
-------------------------
procedure prep_store_result (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access)
is
use type ABM.my_int;
result : ABM.my_int;
begin
result := ABM.mysql_stmt_store_result (handle => stmt);
if result /= 0 then
raise RESULT_FAIL with "Prepared statement store result";
end if;
end prep_store_result;
----------------------------------------
-- initialize_and_prepare_statement --
----------------------------------------
procedure initialize_and_prepare_statement
(conn : MySQL_Connection;
stmt : out ABM.MYSQL_STMT_Access;
sql : String)
is
use type ABM.MYSQL_STMT_Access;
use type ABM.my_int;
result : ABM.my_int;
begin
stmt := ABM.mysql_stmt_init (handle => conn.handle);
if stmt = null then
raise INITIALIZE_FAIL
with "Insufficient memory to initialize prepared statement";
end if;
declare
ss : ABM.ICS.chars_ptr := ABM.ICS.New_String (sql);
begin
result := ABM.mysql_stmt_prepare (handle => stmt, stmt_str => ss,
length => sql'Length);
ABM.ICS.Free (ss);
end;
if result /= 0 then
raise INITIALIZE_FAIL
with "Failed to prepare SQL statement '" & sql & "'";
end if;
end initialize_and_prepare_statement;
--------------------------
-- prep_markers_found --
--------------------------
function prep_markers_found (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access) return Natural
is
result : ABM.my_ulong;
begin
result := ABM.mysql_stmt_param_count (handle => stmt);
return Natural (result);
end prep_markers_found;
----------------------------
-- prep_result_metadata --
----------------------------
function prep_result_metadata (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access)
return ABM.MYSQL_RES_Access is
begin
return ABM.mysql_stmt_result_metadata (handle => stmt);
end prep_result_metadata;
----------------------------
-- prep_bind_parameters --
----------------------------
function prep_bind_parameters (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access;
bind : out ABM.MYSQL_BIND_Array)
return Boolean
is
use type ABM.my_bool;
result : ABM.my_bool;
begin
result := ABM.mysql_stmt_bind_param (handle => stmt,
bind => bind (1)'Access);
return (result = 0);
end prep_bind_parameters;
------------------------
-- prep_bind_result --
------------------------
function prep_bind_result (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access;
bind : out ABM.MYSQL_BIND_Array)
return Boolean
is
use type ABM.my_bool;
result : ABM.my_bool;
begin
result := ABM.mysql_stmt_bind_result (handle => stmt,
bind => bind (1)'Access);
return (result = 0);
end prep_bind_result;
--------------------
-- prep_execute --
--------------------
function prep_execute (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access) return Boolean
is
use type ABM.IC.int;
result : ABM.IC.int;
begin
result := ABM.mysql_stmt_execute (handle => stmt);
return (result = 0);
end prep_execute;
---------------------------
-- prep_rows_in_result --
---------------------------
function prep_rows_in_result (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access)
return Affected_Rows
is
result : ABM.my_ulonglong;
begin
result := ABM.mysql_stmt_num_rows (handle => stmt);
return Affected_Rows (result);
end prep_rows_in_result;
------------------------
-- prep_fetch_bound --
------------------------
function prep_fetch_bound (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access)
return fetch_status
is
use type ABM.my_int;
result : ABM.my_int;
begin
result := ABM.mysql_stmt_fetch (handle => stmt);
if result = 0 then
return success;
elsif result = 1 then
return error;
elsif result = ABM.MYSQL_NO_DATA then
return spent;
elsif result = ABM.MYSQL_DATA_TRUNCATED then
return truncated;
else
raise RESULT_FAIL with "Statement fetch result unrecognized";
end if;
end prep_fetch_bound;
---------------------------------------
-- prep_rows_affected_by_execution --
---------------------------------------
function prep_rows_affected_by_execution (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access)
return Affected_Rows
is
result : ABM.my_ulonglong;
begin
result := ABM.mysql_stmt_affected_rows (handle => stmt);
return Affected_Rows (result);
end prep_rows_affected_by_execution;
----------------------------
-- prep_close_statement --
----------------------------
function prep_close_statement (conn : MySQL_Connection;
stmt : ABM.MYSQL_STMT_Access)
return Boolean
is
use type ABM.my_bool;
result : ABM.my_bool;
begin
result := ABM.mysql_stmt_close (handle => stmt);
return (result = 0);
end prep_close_statement;
------------------------------------------------------------------------
-- From this point on, the routines are private - --
------------------------------------------------------------------------
----------------
-- finalize --
----------------
overriding
procedure finalize (conn : in out MySQL_Connection) is
begin
conn.disconnect;
end finalize;
-----------------------
-- convert_version --
-----------------------
function convert_version (mysql_version : Natural) return CT.Text
is
raw : constant String := mysql_version'Img;
begin
if raw'Length > 6 then
return CT.SUS (raw (2 .. 3) & '.' & raw (4 .. 5) & '.' & raw (6 .. 7));
else
return CT.SUS (raw (2) & '.' & raw (3 .. 4) & '.' & raw (5 .. 6));
end if;
end convert_version;
-----------
-- S2P --
-----------
function S2P (S : CT.Text) return ABM.ICS.chars_ptr
is
begin
return ABM.ICS.New_String (Str => CT.USS (S));
end S2P;
-----------
-- S2P --
-----------
function S2P (S : String) return ABM.ICS.chars_ptr
is
begin
return ABM.ICS.New_String (Str => S);
end S2P;
----------------------------------
-- establish_uniform_encoding --
----------------------------------
procedure establish_uniform_encoding (conn : out MySQL_Connection)
is
use type ABM.my_int;
result : ABM.my_int;
charset : String := CT.USS (conn.character_set);
csname : ABM.ICS.chars_ptr := ABM.ICS.New_String (charset);
begin
if conn.prop_active then
if not CT.IsBlank (conn.character_set) then
result := ABM.mysql_set_character_set (handle => conn.handle,
csname => csname);
ABM.ICS.Free (csname);
if result /= 0 then
raise CHARSET_FAIL
with "Failed to set " & charset & " character set";
end if;
end if;
end if;
end establish_uniform_encoding;
-------------------------
-- set_character_set --
-------------------------
overriding
procedure set_character_set (conn : out MySQL_Connection; charset : String)
is
begin
if conn.prop_active then
raise NOT_WHILE_CONNECTED
with "You may only alter the character set prior to connection";
end if;
conn.character_set := CT.SUS (charset);
end set_character_set;
---------------------
-- character_set --
---------------------
overriding
function character_set (conn : out MySQL_Connection) return String is
begin
if conn.prop_active then
-- conn.dummy := True;
declare
set : ABM.ICS.chars_ptr :=
ABM.mysql_character_set_name (handle => conn.handle);
setstr : String := ABM.ICS.Value (Item => set);
begin
return ACH.To_Upper (setstr);
end;
else
return CT.USS (conn.character_set);
end if;
end character_set;
---------------------------------
-- retrieve_uniform_encoding --
---------------------------------
procedure retrieve_uniform_encoding (conn : out MySQL_Connection)
is
charset : String := character_set (conn => conn);
charsetuc : String := ACH.To_Upper (charset);
begin
conn.encoding_is_utf8 := (charsetuc = "UTF8");
conn.character_set := CT.SUS (charset);
end retrieve_uniform_encoding;
end AdaBase.Connection.Base.MySQL;
|
gerr135/kdevelop_templates | Ada | 736 | adb | {% load kdev_filters %}
{% block license_header %}
{% if license %}
--
{{ license|lines_prepend:"-- " }}
--
{% endif %}
{% endblock license_header %}
{% if baseClasses %}
with {% for b in baseClasses %}b.baseType{% if not forloop.last %}, {% endif %}{% endfor %};
{% endif %}
package body {{ name }} is
{% for f in functions %}
{% with f.arguments as arguments %}
{% if f.returnType == "" %}
procedure {{ f.name }}({% include "arguments_types_names.txt" %}) is
begin
raise Todo;
end;
{% else %}
function {{ f.name }}({% include "arguments_types_names.txt" %}) return {{ f.returnType }} is
begin
raise Todo;
end;
{% endif %}
{% endwith %}
{% endfor %}
end {{ name }};
|
thieryw/game_of_life | Ada | 167 | ads | package display is
type grid is array(1..50,1..100) of boolean ;
screen : grid ;
procedure render(screen : grid) ;
end display ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.