content stringlengths 23 1.05M |
|---|
-- MIT License
-- Copyright (c) 2021 Stephen Merrony
-- 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.
-- TODO Error Handling
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
package body Simh_Tapes is
function Reverse_Dword_Bytes (In_Dw : in Dword_T) return Dword_T is
begin
return Shift_Left (In_Dw and 16#0000_00ff#, 24) or
Shift_Left (In_Dw and 16#0000_ff00#, 8) or
Shift_Right (In_Dw and 16#00ff_0000#, 8) or
Shift_Right (In_Dw and 16#ff00_0000#, 24);
end Reverse_Dword_Bytes;
-- Read_Meta_Data reads a four byte (one doubleword) header, trailer, or other metadata record
-- from the supplied tape image file
procedure Read_Meta_Data
(Img_Stream : in out Stream_Access; Meta_Data : out Dword_T)
is
Tmp_Dw : Dword_T;
begin
Dword_T'Read (Img_Stream, Tmp_Dw);
-- Meta_Data := Reverse_Dword_Bytes (Tmp_Dw);
Meta_Data := Tmp_Dw;
end Read_Meta_Data;
-- Write_Meta_Data writes a 4-byte header/trailer or other metadata
procedure Write_Meta_Data (Img_Stream : in out Stream_Access; Meta_Data : in Dword_T) is
-- Tmp_Dw : Dword_T;
begin
-- Tmp_Dw := Reverse_Dword_Bytes (Meta_Data);
-- Dword_T'Write (Img_Stream, Tmp_Dw);
Dword_T'Write (Img_Stream, Meta_Data);
end Write_Meta_Data;
-- Read_Record_Data attempts to read a data record from SimH tape image, fails if wrong number of bytes read
-- N.B. does not read the header and trailer
procedure Read_Record_Data (Img_Stream : in out Stream_Access; Num_Bytes : in Natural; Rec : out Mt_Rec) is
Tmp_Rec : Mt_Rec (1..Num_Bytes);
Out_Rec_Ix : Integer := Rec'First;
begin
for C in 1 .. Num_Bytes loop
Byte_T'Read (Img_Stream, Tmp_Rec(C));
Rec(Out_Rec_Ix) := Tmp_Rec(C);
Out_Rec_Ix := Out_Rec_Ix + 1;
end loop;
end Read_Record_Data;
-- Write_Record_Data writes the actual data - not the header/trailer
procedure Write_Record_Data (Img_Stream : in out Stream_Access; Rec : in Mt_Rec) is
begin
for C in Rec'Range loop
Byte_T'Write( Img_Stream, Rec(C));
end loop;
end Write_Record_Data;
procedure Rewind (Img_File : in out File_Type) is
begin
Set_Index (Img_File, 1);
end Rewind;
-- internal function
function Space_Forward_1_Rec (Img_Stream : in out Stream_Access) return Mt_Stat is
Hdr, Trailer : Dword_T;
begin
Read_Meta_Data (Img_Stream , Hdr);
if Hdr = Mtr_Tmk then
return Tmk;
end if;
-- read and discard 1 record
declare
Rec : Mt_Rec(1..Natural(Hdr));
begin
Read_Record_Data (Img_Stream , Natural(Hdr), Rec);
end;
-- check trailer
Read_Meta_Data (Img_Stream , Trailer);
if Hdr /= Trailer then
return InvRec;
end if;
return OK;
end Space_Forward_1_Rec;
-- SpaceFwd advances the virtual tape by the specified amount (N.B. 0 means 1 whole file)
function Space_Forward (Img_Stream : in out Stream_Access; Num_Recs : in Integer) return Mt_Stat is
Simh_Stat : Mt_Stat := IOerr;
Done : Boolean := false;
Hdr, Trailer : Dword_T;
Rec_Cnt : Integer := Num_Recs;
begin
if Num_Recs = 0 then
-- one whole file
while not Done loop
Read_Meta_Data (Img_Stream , Hdr);
if Hdr = Mtr_Tmk then
Simh_Stat := OK;
Done := true;
else
-- read and discard 1 record
declare
Rec : Mt_Rec(1..Natural(Hdr));
begin
Read_Record_Data (Img_Stream , Natural(Hdr), Rec);
end;
-- check trailer
Read_Meta_Data (Img_Stream , Trailer);
if Hdr /= Trailer then
return InvRec;
end if;
end if;
end loop;
else
-- otherwise word count is a negative number and we space fwd that many records
while Rec_Cnt /= 0 loop
Rec_Cnt := Rec_Cnt + 1;
Simh_Stat := Space_Forward_1_Rec (Img_Stream);
if Simh_Stat /= OK then
return Simh_Stat;
end if;
end loop;
end if;
return Simh_Stat;
end Space_Forward;
-- Scan_Image - attempt to read a whole tape image ensuring headers, record sizes, and trailers match
-- TODO if csv is true then output is in CSV format
function Scan_Image (Img_Filename : in String) return String is
Result : Unbounded_String;
Img_File : File_Type;
Img_Stream : Stream_Access;
Hdr, Trailer : Dword_T;
File_Count : Integer := -1;
File_Size, Mark_Count, Record_Num : Integer := 0;
Dummy_Rec : Mt_Rec(1..32768);
begin
Open (File => Img_File, Mode => In_File, Name => Img_Filename);
Img_Stream := stream(Img_File);
Record_Loop :
loop
Read_Meta_Data (Img_Stream , Hdr);
case Hdr is
when Mtr_Tmk =>
if File_Size > 0 then
File_Count := File_Count + 1;
Result := Result & Dasher_NL & "File " & Integer'Image(File_Count) &
" : " & Integer'Image(File_Size) & " bytes in " &
Integer'Image(Record_Num) & " blocks";
File_Size := 0;
Record_Num := 0;
end if;
Mark_Count := Mark_Count + 1;
if Mark_Count = 3 then
Result := Result & Dasher_NL & "Triple Mark (old End-of-Tape indicator)";
exit Record_Loop;
end if;
when Mtr_EOM =>
Result := Result & Dasher_NL & "End of Medium";
exit Record_Loop;
when Mtr_Gap =>
Result := Result & Dasher_NL & "Erase Gap";
Mark_Count := 0;
when others =>
Record_Num := Record_Num + 1;
Mark_Count := 0;
Read_Record_Data (Img_Stream, Natural(Hdr), Dummy_Rec);
Read_Meta_Data (Img_Stream , Trailer);
if Hdr = Trailer then
File_Size := File_Size + Integer(Hdr);
else
Result := Result & Dasher_NL & "Non-matching trailer found.";
end if;
end case;
end loop Record_Loop;
Close (Img_File);
return To_String(Result);
end Scan_Image;
end Simh_Tapes;
|
with ACO.Log;
with ACO.Messages; use ACO.Messages;
with Ada.Exceptions;
package body ACO.CANopen is
procedure Put
(This : in out Handler;
Msg : in ACO.Messages.Message)
is
Success : Boolean;
begin
This.Messages.Put (Msg, Success);
if not Success then
ACO.Log.Put_Line (ACO.Log.Warning, "Transmit buffer is full");
end if;
end Put;
procedure Periodic_Actions
(This : in out Handler;
T_Now : in Ada.Real_Time.Time)
is
Msg : ACO.Messages.Message;
begin
while This.Driver.Is_Message_Pending loop
This.Driver.Receive_Message_Blocking (Msg);
This.Events.Handler_Events.Update
((Event => ACO.Events.Received_Message,
Msg => Msg));
end loop;
This.Events.Handler_Events.Update
((Event => ACO.Events.Tick,
Current_Time => T_Now));
while not This.Messages.Is_Empty loop
This.Messages.Get (Msg);
This.Driver.Send_Message (Msg);
end loop;
end Periodic_Actions;
function Current_Time
(This : Handler)
return Ada.Real_Time.Time
is
(This.Driver.Current_Time);
procedure Start
(This : in out Handler)
is
begin
Ada.Synchronous_Task_Control.Set_True (This.Suspension);
end Start;
task body Periodic_Task
is
Next_Release : Ada.Real_Time.Time;
begin
Ada.Synchronous_Task_Control.Suspend_Until_True (This.Suspension);
ACO.Log.Put_Line (ACO.Log.Debug, "Starting periodic worker task...");
Next_Release := This.Current_Time;
loop
begin
This.Periodic_Actions (T_Now => Next_Release);
exception
when E : others =>
ACO.Log.Put_Line
(ACO.Log.Warning,
"EXCEPTION while executing periodic actions: " &
Ada.Exceptions.Exception_Information (E));
end;
Next_Release := Next_Release + To_Time_Span(Period_Dur.all);
delay until Next_Release;
end loop;
end Periodic_Task;
end ACO.CANopen;
|
with Ada.Exception_Identification;
package body Ada.Assertions is
pragma Suppress (All_Checks);
-- implementation
procedure Assert (
Check : Boolean;
Message : String := Debug.Source_Location) is
begin
if not Check then
Raise_Assertion_Error (Message);
end if;
end Assert;
procedure Raise_Assertion_Error (
Message : String := Debug.Source_Location) is
begin
Exception_Identification.Raise_Exception (
Assertion_Error'Identity,
Message => Message);
end Raise_Assertion_Error;
end Ada.Assertions;
|
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
-- Autogenerated by Generate, do not edit
package GL.API.Shorts is
pragma Preelaborate;
Vertex_Attrib1 : T26;
Vertex_Attrib2 : T27;
Vertex_Attrib2v : T28;
Vertex_Attrib3 : T29;
Vertex_Attrib3v : T30;
Vertex_Attrib4 : T31;
Vertex_Attrib4v : T32;
end GL.API.Shorts;
|
package soc.usart.interfaces
with spark_mode => off
is
procedure configure
(usart_id : in unsigned_8;
baudrate : in unsigned_32;
data_len : in t_data_len;
parity : in t_parity;
stop : in t_stop_bits;
success : out boolean);
procedure transmit
(usart_id : in unsigned_8;
data : in t_USART_DR);
end soc.usart.interfaces;
|
"Message of the day:"
""
" " "A" """"
"Characters such as $, %, and } are allowed in string literals"
"Archimedes said ""Εύρηκα"""
"Volume of cylinder (πr2h) = "
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UML_Iterators;
with AMF.Visitors.UML_Visitors;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body AMF.Internals.UML_Final_States is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Final_State_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Enter_Final_State
(AMF.UML.Final_States.UML_Final_State_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Final_State_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Leave_Final_State
(AMF.UML.Final_States.UML_Final_State_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Final_State_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
AMF.Visitors.UML_Iterators.UML_Iterator'Class
(Iterator).Visit_Final_State
(Visitor,
AMF.UML.Final_States.UML_Final_State_Access (Self),
Control);
end if;
end Visit_Element;
--------------------
-- Get_Connection --
--------------------
overriding function Get_Connection
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Connection_Point_References.Collections.Set_Of_UML_Connection_Point_Reference is
begin
return
AMF.UML.Connection_Point_References.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Connection
(Self.Element)));
end Get_Connection;
--------------------------
-- Get_Connection_Point --
--------------------------
overriding function Get_Connection_Point
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Pseudostates.Collections.Set_Of_UML_Pseudostate is
begin
return
AMF.UML.Pseudostates.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Connection_Point
(Self.Element)));
end Get_Connection_Point;
----------------------------
-- Get_Deferrable_Trigger --
----------------------------
overriding function Get_Deferrable_Trigger
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Triggers.Collections.Set_Of_UML_Trigger is
begin
return
AMF.UML.Triggers.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Deferrable_Trigger
(Self.Element)));
end Get_Deferrable_Trigger;
---------------------
-- Get_Do_Activity --
---------------------
overriding function Get_Do_Activity
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Behaviors.UML_Behavior_Access is
begin
return
AMF.UML.Behaviors.UML_Behavior_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Do_Activity
(Self.Element)));
end Get_Do_Activity;
---------------------
-- Set_Do_Activity --
---------------------
overriding procedure Set_Do_Activity
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.Behaviors.UML_Behavior_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Do_Activity
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Do_Activity;
---------------
-- Get_Entry --
---------------
overriding function Get_Entry
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Behaviors.UML_Behavior_Access is
begin
return
AMF.UML.Behaviors.UML_Behavior_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Entry
(Self.Element)));
end Get_Entry;
---------------
-- Set_Entry --
---------------
overriding procedure Set_Entry
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.Behaviors.UML_Behavior_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Entry
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Entry;
--------------
-- Get_Exit --
--------------
overriding function Get_Exit
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Behaviors.UML_Behavior_Access is
begin
return
AMF.UML.Behaviors.UML_Behavior_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Exit
(Self.Element)));
end Get_Exit;
--------------
-- Set_Exit --
--------------
overriding procedure Set_Exit
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.Behaviors.UML_Behavior_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Exit
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Exit;
----------------------
-- Get_Is_Composite --
----------------------
overriding function Get_Is_Composite
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Composite
(Self.Element);
end Get_Is_Composite;
-----------------------
-- Get_Is_Orthogonal --
-----------------------
overriding function Get_Is_Orthogonal
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Orthogonal
(Self.Element);
end Get_Is_Orthogonal;
-------------------
-- Get_Is_Simple --
-------------------
overriding function Get_Is_Simple
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Simple
(Self.Element);
end Get_Is_Simple;
-----------------------------
-- Get_Is_Submachine_State --
-----------------------------
overriding function Get_Is_Submachine_State
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Submachine_State
(Self.Element);
end Get_Is_Submachine_State;
-------------------------
-- Get_Redefined_State --
-------------------------
overriding function Get_Redefined_State
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.States.UML_State_Access is
begin
return
AMF.UML.States.UML_State_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_State
(Self.Element)));
end Get_Redefined_State;
-------------------------
-- Set_Redefined_State --
-------------------------
overriding procedure Set_Redefined_State
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.States.UML_State_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Redefined_State
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Redefined_State;
------------------------------
-- Get_Redefinition_Context --
------------------------------
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access is
begin
raise Program_Error;
return Get_Redefinition_Context (Self);
end Get_Redefinition_Context;
----------------
-- Get_Region --
----------------
overriding function Get_Region
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Regions.Collections.Set_Of_UML_Region is
begin
return
AMF.UML.Regions.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Region
(Self.Element)));
end Get_Region;
-------------------------
-- Get_State_Invariant --
-------------------------
overriding function Get_State_Invariant
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Constraints.UML_Constraint_Access is
begin
return
AMF.UML.Constraints.UML_Constraint_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_State_Invariant
(Self.Element)));
end Get_State_Invariant;
-------------------------
-- Set_State_Invariant --
-------------------------
overriding procedure Set_State_Invariant
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.Constraints.UML_Constraint_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_State_Invariant
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_State_Invariant;
--------------------
-- Get_Submachine --
--------------------
overriding function Get_Submachine
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.State_Machines.UML_State_Machine_Access is
begin
return
AMF.UML.State_Machines.UML_State_Machine_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Submachine
(Self.Element)));
end Get_Submachine;
--------------------
-- Set_Submachine --
--------------------
overriding procedure Set_Submachine
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.State_Machines.UML_State_Machine_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Submachine
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Submachine;
-----------------
-- Get_Is_Leaf --
-----------------
overriding function Get_Is_Leaf
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf
(Self.Element);
end Get_Is_Leaf;
-----------------
-- Set_Is_Leaf --
-----------------
overriding procedure Set_Is_Leaf
(Self : not null access UML_Final_State_Proxy;
To : Boolean) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf
(Self.Element, To);
end Set_Is_Leaf;
---------------------------
-- Get_Redefined_Element --
---------------------------
overriding function Get_Redefined_Element
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is
begin
return
AMF.UML.Redefinable_Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element
(Self.Element)));
end Get_Redefined_Element;
------------------------------
-- Get_Redefinition_Context --
------------------------------
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
begin
return
AMF.UML.Classifiers.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context
(Self.Element)));
end Get_Redefinition_Context;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
begin
return
AMF.UML.Dependencies.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
(Self.Element)));
end Get_Client_Dependency;
-------------------------
-- Get_Name_Expression --
-------------------------
overriding function Get_Name_Expression
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access is
begin
return
AMF.UML.String_Expressions.UML_String_Expression_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
(Self.Element)));
end Get_Name_Expression;
-------------------------
-- Set_Name_Expression --
-------------------------
overriding procedure Set_Name_Expression
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Name_Expression;
-------------------
-- Get_Namespace --
-------------------
overriding function Get_Namespace
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
return
AMF.UML.Namespaces.UML_Namespace_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
(Self.Element)));
end Get_Namespace;
------------------------
-- Get_Qualified_Name --
------------------------
overriding function Get_Qualified_Name
(Self : not null access constant UML_Final_State_Proxy)
return AMF.Optional_String is
begin
declare
use type Matreshka.Internals.Strings.Shared_String_Access;
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end;
end Get_Qualified_Name;
------------------------
-- Get_Element_Import --
------------------------
overriding function Get_Element_Import
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Element_Imports.Collections.Set_Of_UML_Element_Import is
begin
return
AMF.UML.Element_Imports.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Element_Import
(Self.Element)));
end Get_Element_Import;
-------------------------
-- Get_Imported_Member --
-------------------------
overriding function Get_Imported_Member
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
begin
return
AMF.UML.Packageable_Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Imported_Member
(Self.Element)));
end Get_Imported_Member;
----------------
-- Get_Member --
----------------
overriding function Get_Member
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
begin
return
AMF.UML.Named_Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Member
(Self.Element)));
end Get_Member;
----------------------
-- Get_Owned_Member --
----------------------
overriding function Get_Owned_Member
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
begin
return
AMF.UML.Named_Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Member
(Self.Element)));
end Get_Owned_Member;
--------------------
-- Get_Owned_Rule --
--------------------
overriding function Get_Owned_Rule
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
begin
return
AMF.UML.Constraints.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Rule
(Self.Element)));
end Get_Owned_Rule;
------------------------
-- Get_Package_Import --
------------------------
overriding function Get_Package_Import
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Package_Imports.Collections.Set_Of_UML_Package_Import is
begin
return
AMF.UML.Package_Imports.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Package_Import
(Self.Element)));
end Get_Package_Import;
-------------------
-- Get_Container --
-------------------
overriding function Get_Container
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Regions.UML_Region_Access is
begin
return
AMF.UML.Regions.UML_Region_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Container
(Self.Element)));
end Get_Container;
-------------------
-- Set_Container --
-------------------
overriding procedure Set_Container
(Self : not null access UML_Final_State_Proxy;
To : AMF.UML.Regions.UML_Region_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Container
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Container;
------------------
-- Get_Incoming --
------------------
overriding function Get_Incoming
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
begin
return
AMF.UML.Transitions.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Incoming
(Self.Element)));
end Get_Incoming;
------------------
-- Get_Outgoing --
------------------
overriding function Get_Outgoing
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
begin
return
AMF.UML.Transitions.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Outgoing
(Self.Element)));
end Get_Outgoing;
------------------------------
-- Containing_State_Machine --
------------------------------
overriding function Containing_State_Machine
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.State_Machines.UML_State_Machine_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Containing_State_Machine unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Containing_State_Machine";
return Containing_State_Machine (Self);
end Containing_State_Machine;
------------------
-- Is_Composite --
------------------
overriding function Is_Composite
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Composite unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Composite";
return Is_Composite (Self);
end Is_Composite;
------------------------
-- Is_Consistent_With --
------------------------
overriding function Is_Consistent_With
(Self : not null access constant UML_Final_State_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Consistent_With";
return Is_Consistent_With (Self, Redefinee);
end Is_Consistent_With;
-------------------
-- Is_Orthogonal --
-------------------
overriding function Is_Orthogonal
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Orthogonal unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Orthogonal";
return Is_Orthogonal (Self);
end Is_Orthogonal;
-----------------------------------
-- Is_Redefinition_Context_Valid --
-----------------------------------
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Final_State_Proxy;
Redefined : AMF.UML.States.UML_State_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Redefinition_Context_Valid";
return Is_Redefinition_Context_Valid (Self, Redefined);
end Is_Redefinition_Context_Valid;
---------------
-- Is_Simple --
---------------
overriding function Is_Simple
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Simple unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Simple";
return Is_Simple (Self);
end Is_Simple;
-------------------------
-- Is_Submachine_State --
-------------------------
overriding function Is_Submachine_State
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Submachine_State unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Submachine_State";
return Is_Submachine_State (Self);
end Is_Submachine_State;
--------------------------
-- Redefinition_Context --
--------------------------
overriding function Redefinition_Context
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Redefinition_Context unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Redefinition_Context";
return Redefinition_Context (Self);
end Redefinition_Context;
-----------------------------------
-- Is_Redefinition_Context_Valid --
-----------------------------------
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Final_State_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Redefinition_Context_Valid";
return Is_Redefinition_Context_Valid (Self, Redefined);
end Is_Redefinition_Context_Valid;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.All_Owning_Packages";
return All_Owning_Packages (Self);
end All_Owning_Packages;
-----------------------------
-- Is_Distinguishable_From --
-----------------------------
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Final_State_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Is_Distinguishable_From";
return Is_Distinguishable_From (Self, N, Ns);
end Is_Distinguishable_From;
---------------
-- Namespace --
---------------
overriding function Namespace
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Namespace";
return Namespace (Self);
end Namespace;
------------------------
-- Exclude_Collisions --
------------------------
overriding function Exclude_Collisions
(Self : not null access constant UML_Final_State_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Exclude_Collisions unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Exclude_Collisions";
return Exclude_Collisions (Self, Imps);
end Exclude_Collisions;
-------------------------
-- Get_Names_Of_Member --
-------------------------
overriding function Get_Names_Of_Member
(Self : not null access constant UML_Final_State_Proxy;
Element : AMF.UML.Named_Elements.UML_Named_Element_Access)
return AMF.String_Collections.Set_Of_String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Get_Names_Of_Member unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Get_Names_Of_Member";
return Get_Names_Of_Member (Self, Element);
end Get_Names_Of_Member;
--------------------
-- Import_Members --
--------------------
overriding function Import_Members
(Self : not null access constant UML_Final_State_Proxy;
Imps : AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Import_Members unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Import_Members";
return Import_Members (Self, Imps);
end Import_Members;
---------------------
-- Imported_Member --
---------------------
overriding function Imported_Member
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Packageable_Elements.Collections.Set_Of_UML_Packageable_Element is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Imported_Member unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Imported_Member";
return Imported_Member (Self);
end Imported_Member;
---------------------------------
-- Members_Are_Distinguishable --
---------------------------------
overriding function Members_Are_Distinguishable
(Self : not null access constant UML_Final_State_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Members_Are_Distinguishable unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Members_Are_Distinguishable";
return Members_Are_Distinguishable (Self);
end Members_Are_Distinguishable;
------------------
-- Owned_Member --
------------------
overriding function Owned_Member
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Owned_Member unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Owned_Member";
return Owned_Member (Self);
end Owned_Member;
--------------
-- Incoming --
--------------
overriding function Incoming
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Incoming unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Incoming";
return Incoming (Self);
end Incoming;
--------------
-- Outgoing --
--------------
overriding function Outgoing
(Self : not null access constant UML_Final_State_Proxy)
return AMF.UML.Transitions.Collections.Set_Of_UML_Transition is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Outgoing unimplemented");
raise Program_Error with "Unimplemented procedure UML_Final_State_Proxy.Outgoing";
return Outgoing (Self);
end Outgoing;
end AMF.Internals.UML_Final_States;
|
-----------------------------------------------------------------------
-- util-commands-consoles -- Console interface
-- Copyright (C) 2014, 2015, 2017, 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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 body Util.Commands.Consoles is
-- ------------------------------
-- Print the title for the given field and setup the associated field size.
-- ------------------------------
procedure Print_Title (Console : in out Console_Type;
Field : in Field_Type;
Title : in String;
Length : in Positive) is
begin
Console.Sizes (Field) := Length;
if Console.Field_Count >= 1 then
Console.Cols (Field) := Console.Cols (Console.Fields (Console.Field_Count))
+ Console.Sizes (Console.Fields (Console.Field_Count));
else
Console.Cols (Field) := 1;
end if;
Console.Field_Count := Console.Field_Count + 1;
Console.Fields (Console.Field_Count) := Field;
Console_Type'Class (Console).Print_Title (Field, Title);
end Print_Title;
-- ------------------------------
-- Format the integer and print it for the given field.
-- ------------------------------
procedure Print_Field (Console : in out Console_Type;
Field : in Field_Type;
Value : in Integer;
Justify : in Justify_Type := J_LEFT) is
Val : constant String := Util.Strings.Image (Value);
begin
Console_Type'Class (Console).Print_Field (Field, Val, Justify);
end Print_Field;
-- ------------------------------
-- Format the integer and print it for the given field.
-- ------------------------------
procedure Print_Field (Console : in out Console_Type;
Field : in Field_Type;
Value : in Ada.Strings.Unbounded.Unbounded_String;
Justify : in Justify_Type := J_LEFT) is
Item : String := Ada.Strings.Unbounded.To_String (Value);
Size : constant Natural := Console.Sizes (Field);
begin
if Size <= Item'Length then
Item (Item'Last - Size + 2 .. Item'Last - Size + 4) := "...";
Console_Type'Class (Console).Print_Field (Field,
Item (Item'Last - Size + 2 .. Item'Last));
else
Console_Type'Class (Console).Print_Field (Field, Item, Justify);
end if;
end Print_Field;
-- ------------------------------
-- Get the field count that was setup through the Print_Title calls.
-- ------------------------------
function Get_Field_Count (Console : in Console_Type) return Natural is
begin
return Console.Field_Count;
end Get_Field_Count;
-- ------------------------------
-- Reset the field count.
-- ------------------------------
procedure Clear_Fields (Console : in out Console_Type) is
begin
Console.Field_Count := 0;
end Clear_Fields;
end Util.Commands.Consoles;
|
with Asis;
with A_Nodes;
with Dot;
package Asis_Tool_2.Unit is
type Class (Trace : Boolean := False) is tagged limited private; -- Initialized
procedure Process
(This : in out Class;
Unit : in Asis.Compilation_Unit;
Outputs : in Outputs_Record);
private
type Class (Trace : Boolean := False) is tagged limited
record
-- Current, in-progress intermediate output products:
-- Used when making dot edges to child nodes:
Unit_ID : a_nodes_h.Unit_ID := anhS.Invalid_Unit_ID;
Dot_Node : Dot.Node_Stmt.Class; -- Initialized
Dot_Label : Dot.HTML_Like_Labels.Class; -- Initialized
A_Unit : a_nodes_h.Unit_Struct := anhS.Default_Unit_Struct;
-- I would like to just pass Outputs through and not store it in the
-- object, since it is all pointers and we doesn't need to store their
-- values between calls to Process_Element_Tree. Outputs has to go into
-- Add_To_Dot_Label, though, so we'll put it in the object and pass
-- that:
Outputs : Outputs_Record; -- Initialized
end record;
end Asis_Tool_2.Unit;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Numerics.Real_Arrays; use Ada.Numerics.Real_Arrays;
with Ada.Numerics.Generic_Elementary_Functions;
procedure QR is
procedure Show (mat : Real_Matrix) is
package FIO is new Ada.Text_IO.Float_IO (Float);
begin
for row in mat'Range (1) loop
for col in mat'Range (2) loop
FIO.Put (mat (row, col), Exp => 0, Aft => 4, Fore => 5);
end loop;
New_Line;
end loop;
end Show;
function GetCol (mat : Real_Matrix; n : Integer) return Real_Matrix is
column : Real_Matrix (mat'Range (1), 1 .. 1);
begin
for row in mat'Range (1) loop
column (row, 1) := mat (row, n);
end loop;
return column;
end GetCol;
function Mag (mat : Real_Matrix) return Float is
sum : Real_Matrix := Transpose (mat) * mat;
package Math is new Ada.Numerics.Generic_Elementary_Functions
(Float);
begin
return Math.Sqrt (sum (1, 1));
end Mag;
function eVect (col : Real_Matrix; n : Integer) return Real_Matrix is
vect : Real_Matrix (col'Range (1), 1 .. 1);
begin
for row in col'Range (1) loop
if row /= n then vect (row, 1) := 0.0;
else vect (row, 1) := 1.0; end if;
end loop;
return vect;
end eVect;
function Identity (n : Integer) return Real_Matrix is
mat : Real_Matrix (1 .. n, 1 .. n) := (1 .. n => (others => 0.0));
begin
for i in Integer range 1 .. n loop mat (i, i) := 1.0; end loop;
return mat;
end Identity;
function Chop (mat : Real_Matrix; n : Integer) return Real_Matrix is
small : Real_Matrix (n .. mat'Length (1), n .. mat'Length (2));
begin
for row in small'Range (1) loop
for col in small'Range (2) loop
small (row, col) := mat (row, col);
end loop;
end loop;
return small;
end Chop;
function H_n (inmat : Real_Matrix; n : Integer)
return Real_Matrix is
mat : Real_Matrix := Chop (inmat, n);
col : Real_Matrix := GetCol (mat, n);
colT : Real_Matrix (1 .. 1, mat'Range (1));
H : Real_Matrix := Identity (mat'Length (1));
Hall : Real_Matrix := Identity (inmat'Length (1));
begin
col := col - Mag (col) * eVect (col, n);
col := col / Mag (col);
colT := Transpose (col);
H := H - 2.0 * (col * colT);
for row in H'Range (1) loop
for col in H'Range (2) loop
Hall (n - 1 + row, n - 1 + col) := H (row, col);
end loop;
end loop;
return Hall;
end H_n;
A : constant Real_Matrix (1 .. 3, 1 .. 3) := (
(12.0, -51.0, 4.0),
(6.0, 167.0, -68.0),
(-4.0, 24.0, -41.0));
Q1, Q2, Q3, Q, R: Real_Matrix (1 .. 3, 1 .. 3);
begin
Q1 := H_n (A, 1);
Q2 := H_n (Q1 * A, 2);
Q3 := H_n (Q2 * Q1* A, 3);
Q := Transpose (Q1) * Transpose (Q2) * TransPose(Q3);
R := Q3 * Q2 * Q1 * A;
Put_Line ("Q:"); Show (Q);
Put_Line ("R:"); Show (R);
end QR;
|
with GDNative.Console; use GDNative.Console;
package body Adventure is
procedure Process (Self : in out Player; Delta_Time : in Long_Float) is begin
Self.Health := Self.Health - 1;
if Self.Health = 0 then
Put ("Player Died!");
Put ("Player Respawn");
Self.Health := 100;
end if;
end;
procedure Register_Classes is begin
Player_Registration.Register_Class;
Player_Registration.Register_Process;
end;
end; |
------------------------------------------------------------------------------
-- Copyright (c) 2017-2019, 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. --
------------------------------------------------------------------------------
package body Lithium.Spoiler_Filters is
use type Ada.Streams.Stream_Element;
function Next
(Data : in Ada.Streams.Stream_Element_Array;
Start : in Ada.Streams.Stream_Element_Offset;
Pattern : Ada.Streams.Stream_Element_Array)
return Ada.Streams.Stream_Element_Offset;
function Rot_13 (Source : Ada.Streams.Stream_Element_Array)
return Ada.Streams.Stream_Element_Array;
function Rot_13 (Source : Ada.Streams.Stream_Element)
return Ada.Streams.Stream_Element
is (case Source is
when Character'Pos ('A') .. Character'Pos ('M')
| Character'Pos ('a') .. Character'Pos ('m')
=> Source + 13,
when Character'Pos ('N') .. Character'Pos ('Z')
| Character'Pos ('n') .. Character'Pos ('z')
=> Source - 13,
when others => Source);
------------------------------
-- Local Helper Subprograms --
------------------------------
function Next
(Data : in Ada.Streams.Stream_Element_Array;
Start : in Ada.Streams.Stream_Element_Offset;
Pattern : Ada.Streams.Stream_Element_Array)
return Ada.Streams.Stream_Element_Offset
is
use type Ada.Streams.Stream_Element_Array;
use type Ada.Streams.Stream_Element_Offset;
Index : Ada.Streams.Stream_Element_Offset := Start;
begin
while Index + Pattern'Length - 1 in Data'Range loop
if Data (Index .. Index + Pattern'Length - 1) = Pattern then
return Index;
end if;
Index := Index + 1;
end loop;
return Start - 1;
end Next;
function Rot_13 (Source : Ada.Streams.Stream_Element_Array)
return Ada.Streams.Stream_Element_Array is
begin
return Result : Ada.Streams.Stream_Element_Array
(Source'First .. Source'Last)
do
for I in Result'Range loop
Result (I) := Rot_13 (Source (I));
end loop;
end return;
end Rot_13;
----------------------
-- Public Interface --
----------------------
overriding procedure Apply
(Object : in Spoiler_Filter;
Output : in out Ada.Streams.Root_Stream_Type'Class;
Data : in Ada.Streams.Stream_Element_Array)
is
pragma Unreferenced (Object);
use type Ada.Streams.Stream_Element_Array;
use type Ada.Streams.Stream_Element_Offset;
Index : Ada.Streams.Stream_Element_Offset := Data'First;
First, Last : Ada.Streams.Stream_Element_Offset;
begin
while Index in Data'Range loop
First := Next (Data, Index, Begin_HTML);
exit when First < Index;
Last := Next (Data, First + Begin_HTML'Length, End_HTML);
exit when Last < First;
if First > Index then
Output.Write (Data (Index .. First - 1));
end if;
Output.Write
(Begin_Filtered
& Rot_13 (Data (First + Begin_HTML'Length .. Last - 1))
& End_Filtered);
Index := Last + End_HTML'Length;
end loop;
if Index in Data'Range then
Output.Write (Data (Index .. Data'Last));
end if;
end Apply;
function Create
(Arguments : in out Natools.S_Expressions.Lockable.Descriptor'Class)
return Natools.Web.Filters.Filter'Class
is
pragma Unreferenced (Arguments);
begin
return Spoiler_Filter'(null record);
end Create;
end Lithium.Spoiler_Filters;
|
------------------------------------------------------------------------------
-- Copyright (c) 2013-2014, 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.S_Expressions.Printers.Pretty provides an implementation of the --
-- S-expression Printer interface, using user-defines perferences to pretty --
-- print the S-expression into the output stream. --
------------------------------------------------------------------------------
with Ada.Streams;
with Natools.S_Expressions.Encodings;
package Natools.S_Expressions.Printers.Pretty is
pragma Pure (Pretty);
type Atom_Encoding is (Base64, Hexadecimal, Verbatim);
type Character_Encoding is (ASCII, Latin, UTF_8);
type Newline_Encoding is (CR, LF, CR_LF, LF_CR);
type Entity is (Opening, Atom_Data, Closing);
type Entity_Separator is array (Entity, Entity) of Boolean;
type Indent_Type is (Spaces, Tabs, Tabs_And_Spaces);
type Quoted_Escape_Type is (Hex_Escape, Octal_Escape);
type Quoted_Option is (When_Shorter, Single_Line, No_Quoted);
type Token_Option is (Extended_Token, Standard_Token, No_Token);
type Screen_Offset is new Natural;
subtype Screen_Column is Screen_Offset range 1 .. Screen_Offset'Last;
type Parameters is record
Width : Screen_Offset := 0;
Newline_At : Entity_Separator := (others => (others => False));
Space_At : Entity_Separator := (others => (others => False));
Tab_Stop : Screen_Column := 8; -- *
Indentation : Screen_Offset := 0;
Indent : Indent_Type := Spaces; -- *
Quoted : Quoted_Option := No_Quoted;
Token : Token_Option := No_Token;
Hex_Casing : Encodings.Hex_Casing := Encodings.Upper; -- *
Quoted_Escape : Quoted_Escape_Type := Hex_Escape; -- *
Char_Encoding : Character_Encoding := ASCII; -- *
Fallback : Atom_Encoding := Verbatim;
Newline : Newline_Encoding := LF; -- *
end record;
-- Default values yield canonical encoding, though fields marked with
-- an asterisk (*) can have any value and still be canonical.
Canonical : constant Parameters := (others => <>);
type Printer is abstract limited new Printers.Printer with private;
pragma Preelaborable_Initialization (Printer);
procedure Write_Raw
(Output : in out Printer;
Data : in Ada.Streams.Stream_Element_Array)
is abstract;
overriding procedure Open_List (Output : in out Printer);
overriding procedure Append_Atom
(Output : in out Printer;
Data : in Atom);
overriding procedure Close_List (Output : in out Printer);
procedure Newline (Output : in out Printer);
-- Open a new indented line in the output
procedure Set_Parameters (Output : in out Printer; Param : in Parameters);
function Get_Parameters (Output : Printer) return Parameters;
procedure Set_Width
(Output : in out Printer;
Width : in Screen_Offset);
procedure Set_Newline_At
(Output : in out Printer;
Newline_At : in Entity_Separator);
procedure Set_Space_At
(Output : in out Printer;
Space_At : in Entity_Separator);
procedure Set_Tab_Stop
(Output : in out Printer;
Tab_Stop : in Screen_Column);
procedure Set_Indentation
(Output : in out Printer;
Indentation : in Screen_Offset);
procedure Set_Indent
(Output : in out Printer;
Indent : in Indent_Type);
procedure Set_Quoted
(Output : in out Printer;
Quoted : in Quoted_Option);
procedure Set_Token
(Output : in out Printer;
Token : in Token_Option);
procedure Set_Hex_Casing
(Output : in out Printer;
Hex_Casing : in Encodings.Hex_Casing);
procedure Set_Quoted_Escape
(Output : in out Printer;
Quoted_Escape : in Quoted_Escape_Type);
procedure Set_Char_Encoding
(Output : in out Printer;
Char_Encoding : in Character_Encoding);
procedure Set_Fallback
(Output : in out Printer;
Fallback : in Atom_Encoding);
procedure Set_Newline
(Output : in out Printer;
Newline : in Newline_Encoding);
type Stream_Printer (Stream : access Ada.Streams.Root_Stream_Type'Class) is
limited new Printer with private;
private
type Printer is abstract limited new Printers.Printer with record
Param : Parameters;
Cursor : Screen_Column := 1;
Previous : Entity;
First : Boolean := True;
Indent_Level : Screen_Offset := 0;
Need_Blank : Boolean := False;
end record;
type Stream_Printer (Stream : access Ada.Streams.Root_Stream_Type'Class) is
limited new Printer with null record;
overriding procedure Write_Raw
(Output : in out Stream_Printer;
Data : in Ada.Streams.Stream_Element_Array);
end Natools.S_Expressions.Printers.Pretty;
|
-- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ stream to skill tokens --
-- |___/_|\_\_|_|____| by: Timm Felden, Dennis Przytarski --
-- --
pragma Ada_2012;
with Interfaces.C;
with Interfaces.C.Pointers;
with Interfaces.C.Strings;
with Interfaces.C_Streams;
with Skill.Types;
with Ada.Exceptions;
package Skill.Streams.Writer is
type Abstract_Stream is abstract tagged private;
type Output_Stream_T is new Abstract_Stream with private;
type Output_Stream is access Output_Stream_T;
type Sub_Stream_T is new Abstract_Stream with private;
type Sub_Stream is access Sub_Stream_T;
function Open
(Path : not null Skill.Types.String_Access;
Mode : String) return Output_Stream;
-- creates a map for a block and enables usage of map function
procedure Begin_Block_Map (This : access Output_Stream_T; Size : Types.v64);
-- unmaps backing memory map
procedure End_Block_Map (This : access Output_Stream_T);
-- creates a sub stream
-- note: only sub streams use mmaps
function Map
(This : access Output_Stream_T;
Size : Types.v64) return Sub_Stream;
-- destroy a map and close the file
procedure Close (This : access Output_Stream_T);
-- destroy a sub map
procedure Close (This : access Sub_Stream_T);
-- reached end of mapped region?
function Eof (This : access Sub_Stream_T) return Boolean;
--
-- function Path
-- (This : access Output_Stream_T) return Skill.Types.String_Access;
--
function Position
(This : access Abstract_Stream) return Skill.Types.v64 is abstract;
function Position (This : access Output_Stream_T) return Skill.Types.v64;
function Position (This : access Sub_Stream_T) return Skill.Types.v64;
-- bytes remaining in the current buffer
function Remaining_Bytes
(This : access Abstract_Stream'Class) return Skill.Types.v64;
procedure I8
(This : access Abstract_Stream;
V : Skill.Types.i8) is abstract;
procedure I8 (This : access Output_Stream_T; V : Skill.Types.i8);
procedure I8 (This : access Sub_Stream_T; V : Skill.Types.i8);
procedure Bool (This : access Sub_Stream_T; V : Boolean);
pragma Inline (Bool);
procedure I16 (This : access Output_Stream_T; V : Skill.Types.i16);
procedure I16 (This : access Sub_Stream_T; V : Skill.Types.i16);
pragma Inline (I16);
procedure I32
(This : access Abstract_Stream;
V : Skill.Types.i32) is abstract;
pragma Inline (I32);
procedure I32 (This : access Output_Stream_T; V : Skill.Types.i32);
procedure I32 (This : access Sub_Stream_T; V : Skill.Types.i32);
procedure I64 (This : access Output_Stream_T; V : Skill.Types.I64);
procedure I64 (This : access Sub_Stream_T; V : Skill.Types.i64);
pragma Inline (I64);
procedure F32 (This : access Sub_Stream_T; V : Skill.Types.F32);
pragma Inline (F32);
procedure F64 (This : access Sub_Stream_T; V : Skill.Types.F64);
pragma Inline (F64);
procedure V64
(This : access Abstract_Stream;
V : Skill.Types.v64) is abstract;
procedure V64 (This : access Output_Stream_T; Value : Skill.Types.v64);
procedure V64 (This : access Sub_Stream_T; Value : Skill.Types.v64);
-- write the image of a string into a file
procedure Put_Plain_String
(This : access Output_Stream_T;
V : Skill.Types.String_Access);
private
procedure Ensure_Size (This : not null access Output_Stream_T; V : C.ptrdiff_t);
package C renames Interfaces.C;
type Abstract_Stream is abstract tagged record
-- current position
Map : Map_Pointer;
-- first position
Base : Map_Pointer;
-- last position
EOF : Map_Pointer;
end record;
function MMap_Write_Map
(F : Interfaces.C_Streams.FILEs;
Length : Types.v64) return Uchar.Pointer;
pragma Import (C, MMap_Write_Map, "mmap_write_map_block");
procedure MMap_Unmap (Base : Map_Pointer; Eof : Map_Pointer);
pragma Import (C, MMap_Unmap, "mmap_write_unmap");
Buffer_Size : Constant := 1024;
type Output_Stream_T is new Abstract_Stream with record
Path : Skill.Types.String_Access; -- shared string!
File : Interfaces.C_Streams.FILEs;
Bytes_Written : Types.v64;
Buffer : Uchar_Array (1 .. Buffer_Size);
-- true, iff a block is currently mapped
Block_Map_Mode : Boolean;
-- current position in client map
Client_Map : Map_Pointer;
-- first position in client map
Client_Base : Map_Pointer;
-- last position in client map
Client_EOF : Map_Pointer;
end record;
-- a part that is a sub section of an input stream
type Sub_Stream_T is new Abstract_Stream with null record;
end Skill.Streams.Writer;
|
private
with
neural.Set,
fann_c.fann;
package neural.Net
--
-- Provides a neural net.
--
is
type Item is tagged private;
type View is access all Item;
-- forge
--
procedure define (Self : out Item; Name : in String;
Num_Input_Neurons : in Positive;
Num_Hidden_Neurons : in Natural;
Num_Output_Neurons : in Positive);
procedure define (Self : out Item; Name : in String);
No_Net_Error : exception;
--
-- Raised if the named net does not exist, or is undefined.
procedure Store (Self : in Item);
-- attributes
--
function Name (Self : in Item) return String;
function Epoch (Self : in Item) return Positive;
function input_Count (Self : in Item) return Positive;
function output_Count (Self : in Item) return Positive;
-- learning patterns
--
procedure Patterns_are (Self : in out Item; Now : in Neural.Patterns);
function training_Patterns (Self : in Item) return Neural.Patterns;
function test_Patterns (Self : in Item) return Neural.Patterns;
function training_pattern_Count (Self : in Item) return Natural;
-- client actions ~ user supplied actions performed during training.
--
type an_Action is access procedure (Self : not null access Item);
type client_Action is
record
Act : an_Action;
Rate : Positive;
end record;
type client_Actions is array (Positive range <>) of client_Action;
no_Actions : client_Actions (1..0);
-- training
--
type Client_Continue_Test is access function return Boolean;
procedure Train (Self : access Item; Max_Epochs : in Positive := 10_000;
Acceptable_Error : in Signal := 0.1;
Learning_Rate : in Signal := 0.1;
Client_Actions : in Neural.Net.Client_Actions := No_Actions;
Client_Continue : in Client_Continue_Test := null);
--
-- Acceptable_Error: Error level at which the network is considered to be converged.
-- Calculates the Training_RMS_Error.
function Is_Training (Self : in Item) return Boolean;
procedure report_training_Status (Self : not null access Item);
function training_RMS_Error (Self : in Item) return Signal;
function test_RMS_Error (Self : in Item) return Signal;
function min_test_RMS_Error (Self : in Item) return Signal;
procedure store_best_Epoch (Self : access Item);
procedure store_last_Epoch (Self : access Item);
-- response
--
function Response (Self : in Item; To : in Neural.Pattern) return Signals;
--
-- Returns the net's output response for the pattern.
--
-- Calculates the Response_RMS_Error (error between desired outputs in the patterns and
-- their corresponding response outputs).
function Response_RMS_Error (Self : in Item) return Signal;
private
type String_view is access String;
type Item is tagged
record
Name : String_view;
Num_Input_Neurons : Positive;
Num_Hidden_Neurons : Natural;
Num_Output_Neurons : Positive;
Training_Patterns : Neural.Set.Patterns_view;
training_Set : neural.Set.Set;
Test_Patterns : Neural.Set.Patterns_view;
testing_Set : neural.Set.Set;
Epoch : Natural;
Training_RMS_Error : Signal := 0.0;
Test_RMS_Error : Signal := 0.0;
Min_Test_RMS_Error : Signal := Signal'Last;
Response_RMS_Error : Signal := 0.0;
Is_Undefined : Boolean := True;
Is_Training : Boolean := False;
Fann : fann_c.Fann.pointer;
end record;
end Neural.Net;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of 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 stm32f429i_discovery_ts.c --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief This file provides a set of functions needed to manage Touch --
-- screen available with STMPE811 IO Expander device mounted on --
-- STM32F429I-Discovery Kit. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
with STM32.Board; use STM32;
with STM32.I2C; use STM32.I2C;
with STM32.GPIO; use STM32.GPIO;
with STM32.Setup;
with STM32.Device; use STM32.Device;
with HAL.Touch_Panel; use HAL.Touch_Panel;
with STMPE811; use STMPE811;
package body Touch_Panel_STMPE811 is
SCL : GPIO_Point renames PA8;
SDA : GPIO_Point renames PC9;
SCL_SDA_AF : constant GPIO_Alternate_Function := GPIO_AF_I2C3_4;
----------------
-- Initialize --
----------------
function Initialize
(This : in out Touch_Panel;
Orientation : HAL.Framebuffer.Display_Orientation :=
HAL.Framebuffer.Default) return Boolean
is
Status : Boolean;
begin
if not TP_I2C.Port_Enabled then
STM32.Setup.Setup_I2C_Master (Port => TP_I2C,
SDA => SDA,
SCL => SCL,
SDA_AF => SCL_SDA_AF,
SCL_AF => SCL_SDA_AF,
Clock_Speed => 100_000);
end if;
Status := STMPE811_Device (This).Initialize;
This.Set_Orientation (Orientation);
return Status;
end Initialize;
----------------
-- Initialize --
----------------
procedure Initialize (This : in out Touch_Panel;
Orientation : HAL.Framebuffer.Display_Orientation :=
HAL.Framebuffer.Default) is
begin
if not This.Initialize (Orientation) then
raise Constraint_Error with "Cannot initialize the touch panel";
end if;
end Initialize;
---------------------
-- Set_Orientation --
---------------------
procedure Set_Orientation
(This : in out Touch_Panel;
Orientation : HAL.Framebuffer.Display_Orientation)
is
begin
case Orientation is
when HAL.Framebuffer.Default | HAL.Framebuffer.Portrait =>
This.Set_Bounds (STM32.Board.LCD_Natural_Width,
STM32.Board.LCD_Natural_Height,
0);
when HAL.Framebuffer.Landscape =>
This.Set_Bounds (STM32.Board.LCD_Natural_Width,
STM32.Board.LCD_Natural_Height,
Swap_XY or Invert_Y);
end case;
end Set_Orientation;
end Touch_Panel_STMPE811;
|
--
-- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- 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 m4.systick
with spark_mode => on
is
procedure init
is
begin
SYSTICK.LOAD.RELOAD := bits_24
(MAIN_CLOCK_FREQUENCY / TICKS_PER_SECOND);
SYSTICK.VAL.CURRENT := 0;
SYSTICK.CTRL := (ENABLE => true,
TICKINT => true,
CLKSOURCE => PROCESSOR_CLOCK,
COUNTFLAG => 0);
end init;
procedure increment
is
current : constant t_tick := ticks;
begin
ticks := current + 1;
end increment;
function get_ticks return unsigned_64
is
current : constant t_tick := ticks;
begin
return unsigned_64 (current);
end get_ticks;
function to_milliseconds (t : t_tick)
return milliseconds
is
begin
return t * (1000 / TICKS_PER_SECOND);
end to_milliseconds;
function to_microseconds (t : t_tick)
return microseconds
is
begin
return t * (1000000 / TICKS_PER_SECOND);
end to_microseconds;
function to_ticks (ms : milliseconds) return t_tick
is
begin
return ms * TICKS_PER_SECOND / 1000;
end to_ticks;
function get_milliseconds return milliseconds
is
current : constant t_tick := ticks;
begin
return to_milliseconds (current);
end get_milliseconds;
function get_microseconds return microseconds
is
current : constant t_tick := ticks;
begin
return to_microseconds (current);
end get_microseconds;
end m4.systick;
|
-- { dg-do compile }
-- { dg-options "-O2 -gnatws" }
procedure Discr45 is
function Ident_Int (I : Integer) return Integer is
begin
return I;
end;
procedure Proc (Signal : Boolean) is
subtype Index is Integer range 1..10;
type My_Arr is array (Index range <>) OF Integer;
type Rec (D3 : Integer := Ident_Int(1)) is record
case D3 is
when -5..10 => C1 : My_Arr(D3..Ident_Int(11));
when Others => C2 : Integer := Ident_Int(5);
end case;
end record;
X : Rec;
function Value return Rec;
pragma No_Inline (Value);
function Value return Rec is
begin
return X;
end;
begin
if X /= Value then
raise Constraint_Error;
elsif Signal then
raise Program_Error;
end if;
end;
begin
Proc (True);
end;
|
------------------------------------------------------------
-- This is the root for the lowlevel C interface
-- Where the Ada-specs are automaticly generated.
-- The package is private in order to guarantie that
-- no one outsite this libraray is using the internals without
-- beeing aware.
------------------------------------------------------------
private package Sensors.LibSensors is
pragma Linker_Options ("-l" & "sensors");
pragma Linker_Options ("-l" & "m");
end Sensors.libSensors;
|
pragma SPARK_Mode;
with Ada.Numerics.Long_Elementary_Functions;
use Ada.Numerics.Long_Elementary_Functions;
with Wire;
package body Zumo_Motion is
Pi : constant := 3.1415926;
function Get_Heading return Degrees
is
Mag : Axis_Data;
Heading : Degrees;
begin
Zumo_LSM303.Read_Mag (Data => Mag);
Heading := Degrees (
Arctan (
Long_Float (Mag (Y)) / Long_Float (Mag (X))
) * (180.0 / Pi));
if Heading > 360.0 then
Heading := Heading - 360.0;
elsif Heading < 0.0 then
Heading := 360.0 + Heading;
end if;
return Heading;
end Get_Heading;
procedure Init
is
begin
Wire.Init_Master;
Zumo_LSM303.Init;
Zumo_L3gd20h.Init;
Initd := True;
end Init;
end Zumo_Motion;
|
with
ada.unchecked_Deallocation;
package body gel.Dolly
is
use Math;
procedure free (Self : in out View)
is
procedure deallocate is new ada.unchecked_Deallocation (Item'Class, View);
begin
if Self = null
then
return;
end if;
Self.destroy;
deallocate (Self);
end free;
--------------
--- Attributes
--
procedure add_Camera (Self : in out Item'Class; the_Camera : in Camera.view)
is
begin
Self.Cameras.append (the_Camera);
end add_Camera;
procedure is_moving (Self : in out Item'Class; Direction : dolly.Direction; Now : in Boolean := True)
is
begin
Self.Motion (Direction) := Now;
end is_moving;
procedure is_spinning (Self : in out Item'Class; Direction : dolly.Direction; Now : in Boolean := True)
is
begin
Self.Spin (Direction) := Now;
end is_spinning;
procedure is_orbiting (Self : in out Item'Class; Direction : dolly.Direction; Now : in Boolean := True)
is
begin
Self.Orbit (Direction) := Now;
end is_orbiting;
procedure Speed_is (Self : in out Item; Now : in Real)
is
begin
Self.Speed := Now;
end Speed_is;
function Speed (Self : in Item) return Real
is
begin
return Self.Speed;
end Speed;
procedure speed_Multiplier_is (Self : in out Item; Now : in Real)
is
begin
Self.Multiplier := Now;
end speed_Multiplier_is;
end gel.Dolly;
|
pragma License (Unrestricted);
-- implementation unit required by compiler
with System.Packed_Arrays;
package System.Pack_56 is
pragma Preelaborate;
-- It can not be Pure, subprograms would become __attribute__((const)).
type Bits_56 is mod 2 ** 56;
for Bits_56'Size use 56;
package Indexing is new Packed_Arrays.Indexing (Bits_56);
-- required for accessing arrays by compiler
function Get_56 (
Arr : Address;
N : Natural;
Rev_SSO : Boolean)
return Bits_56
renames Indexing.Get;
procedure Set_56 (
Arr : Address;
N : Natural;
E : Bits_56;
Rev_SSO : Boolean)
renames Indexing.Set;
-- required for accessing unaligned arrays by compiler
function GetU_56 (
Arr : Address;
N : Natural;
Rev_SSO : Boolean)
return Bits_56
renames Indexing.Get;
procedure SetU_56 (
Arr : Address;
N : Natural;
E : Bits_56;
Rev_SSO : Boolean)
renames Indexing.Set;
end System.Pack_56;
|
-----------------------------------------------------------------------
-- ping -- Ping hosts application
-- Copyright (C) 2016, 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Real_Time;
with Interfaces;
with STM32.Board;
with BMP_Fonts;
with HAL.Bitmap;
with Net.Buffers;
with Net.Utils;
with Net.DHCP;
with Net.Protos.Arp;
with Net.Protos.IPv4;
with Net.Protos.Dispatchers;
with Receiver;
with Pinger;
with Demos;
pragma Unreferenced (Receiver);
-- == Ping Application ==
-- The <b>Ping</b> application listens to the Ethernet network to identify some local
-- hosts and ping them using ICMP echo requests.
--
-- The <b>Ping</b> application uses the static IP address <b>192.168.1.2</b> and an initial
-- default gateway <b>192.168.1.254</b>. While running, it discovers the gateway by looking
-- at the IGMP query membership packets.
--
-- The <b>Ping</b> application displays the lists of hosts that it currently pings with
-- the number of ICMP requests that are sent and the number of ICMP replies received.
--
-- The application has two tasks. The main task loops to manage the refresh of the STM32
-- display and send the ICMP echo requests each second. The second task is responsible for
-- waiting of Ethernet packets, analyzing them to handle ARP and ICMP packets. The receiver
-- task also looks at IGMP packets to identify the IGMP queries sent by routers.
procedure Ping is
use type Interfaces.Unsigned_32;
use type Net.Ip_Addr;
use type Net.DHCP.State_Type;
use type Ada.Real_Time.Time;
use type Ada.Real_Time.Time_Span;
procedure Refresh;
procedure Header;
procedure Refresh is
Y : Natural := 90;
Hosts : constant Pinger.Ping_Info_Array := Pinger.Get_Hosts;
begin
for I in Hosts'Range loop
Demos.Put (0, Y, Net.Utils.To_String (Hosts (I).Ip));
Demos.Put (250, Y, Net.Uint64 (Hosts (I).Seq));
Demos.Put (350, Y, Net.Uint64 (Hosts (I).Received));
Y := Y + 16;
end loop;
Demos.Refresh_Ifnet_Stats;
STM32.Board.Display.Update_Layer (1);
end Refresh;
procedure Header is
begin
Demos.Put (0, 70, "Host");
Demos.Put (326, 70, "Send");
Demos.Put (402, 70, "Receive");
end Header;
procedure Initialize is new Demos.Initialize (Header);
-- The ping period.
PING_PERIOD : constant Ada.Real_Time.Time_Span := Ada.Real_Time.Milliseconds (1000);
-- Send ping echo request deadline
Ping_Deadline : Ada.Real_Time.Time;
Icmp_Handler : Net.Protos.Receive_Handler;
begin
Initialize ("STM32 Ping");
Pinger.Add_Host ((192, 168, 1, 1));
Pinger.Add_Host ((8, 8, 8, 8));
Net.Protos.Dispatchers.Set_Handler (Proto => Net.Protos.IPv4.P_ICMP,
Handler => Pinger.Receive'Access,
Previous => Icmp_Handler);
-- Change font to 8x8.
Demos.Current_Font := BMP_Fonts.Font8x8;
Ping_Deadline := Ada.Real_Time.Clock;
loop
declare
Now : constant Ada.Real_Time.Time := Ada.Real_Time.Clock;
Dhcp_Deadline : Ada.Real_Time.Time;
begin
Net.Protos.Arp.Timeout (Demos.Ifnet);
Demos.Dhcp.Process (Dhcp_Deadline);
if Demos.Dhcp.Get_State = Net.DHCP.STATE_BOUND then
Pinger.Add_Host (Demos.Dhcp.Get_Config.Router);
Pinger.Add_Host (Demos.Dhcp.Get_Config.Dns1);
Pinger.Add_Host (Demos.Dhcp.Get_Config.Dns2);
Pinger.Add_Host (Demos.Dhcp.Get_Config.Ntp);
Pinger.Add_Host (Demos.Dhcp.Get_Config.Www);
end if;
if Ping_Deadline < Now then
Pinger.Do_Ping;
Refresh;
Ping_Deadline := Ping_Deadline + PING_PERIOD;
end if;
if Ping_Deadline < Dhcp_Deadline then
delay until Ping_Deadline;
else
delay until Dhcp_Deadline;
end if;
end;
end loop;
end Ping;
|
pragma License (Unrestricted);
-- extended unit specialized for FreeBSD (or Linux)
private with C;
package Ada.Environment_Encoding.Names is
-- Constants for schemes of system-specific text encoding.
pragma Preelaborate;
UTF_8 : Encoding_Id
renames Environment_Encoding.UTF_8;
UTF_16 : Encoding_Id
renames Environment_Encoding.UTF_16;
UTF_32 : Encoding_Id
renames Environment_Encoding.UTF_32;
UTF_16BE : constant Encoding_Id;
UTF_16LE : constant Encoding_Id;
UTF_32BE : constant Encoding_Id;
UTF_32LE : constant Encoding_Id;
Latin_1 : constant Encoding_Id;
Windows_31J : constant Encoding_Id;
EUC_JP : constant Encoding_Id;
private
use type C.char_array;
UTF_16BE : constant Encoding_Id :=
Encoding_Id (System.Native_Environment_Encoding.UTF_16BE);
UTF_16LE : constant Encoding_Id :=
Encoding_Id (System.Native_Environment_Encoding.UTF_16LE);
UTF_32BE : constant Encoding_Id :=
Encoding_Id (System.Native_Environment_Encoding.UTF_32BE);
UTF_32LE : constant Encoding_Id :=
Encoding_Id (System.Native_Environment_Encoding.UTF_32LE);
Latin_1_Name : aliased constant C.char_array (0 .. 5) :=
"CP819" & C.char'Val (0);
Latin_1 : constant Encoding_Id := Latin_1_Name (0)'Access;
Windows_31J_Name : aliased constant C.char_array (0 .. 5) :=
"CP932" & C.char'Val (0);
Windows_31J : constant Encoding_Id := Windows_31J_Name (0)'Access;
EUC_JP_Name : aliased constant C.char_array (0 .. 6) :=
"EUC-JP" & C.char'Val (0);
EUC_JP : constant Encoding_Id := EUC_JP_Name (0)'Access;
end Ada.Environment_Encoding.Names;
|
-- Copyright 2017 Steven Stewart-Gallus
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- implied. See the License for the specific language governing
-- permissions and limitations under the License.
private with Interfaces;
generic
type Element_T is mod <>;
package Linted.ABAs is
pragma Pure;
type Tag_T is mod 2**16 with
Default_Value => 0;
type ABA is private with
Preelaborable_Initialization;
function Is_Valid_ABA (X : ABA) return Boolean with
Ghost;
function Initialize (Element : Element_T; Tag : Tag_T) return ABA with
Inline_Always,
Depends => (Initialize'Result => (Element, Tag)),
Post => Is_Valid_ABA (Initialize'Result);
function Element (X : ABA) return Element_T with
Inline_Always,
Depends => (Element'Result => X);
function Tag (X : ABA) return Tag_T with
Inline_Always,
Depends => (Tag'Result => X);
procedure Lemma_Identity (E : Element_T; T : Tag_T) with
Ghost,
Pre => Is_Valid_ABA (Initialize (E, T)),
Post => E = Element (Initialize (E, T)) and T = Tag (Initialize (E, T));
private
subtype U32 is Interfaces.Unsigned_32;
use type U32;
type ABA is new U32 with
Default_Value => 0;
end Linted.ABAs;
|
-- { dg-do run }
-- Test that a static link is correctly passed to a subprogram which is
-- indirectly called through an aggregate.
procedure Nested_Proc1 is
I : Integer := 0;
procedure P1 (X : Integer) is
begin
I := X;
end;
type Func_Ptr is access procedure (X : Integer);
type Arr is array (1..64) of Integer;
type Rec is record
F : Func_Ptr;
A : Arr;
end record;
procedure P2 (R : Rec) is
begin
R.F (1);
end;
begin
P2 ((F => P1'Access, A => (others => 0)));
if I /= 1 then
raise Program_Error;
end if;
end;
|
-- Ada_GUI implementation based on Gnoga. Adapted 2021
-- --
-- GNOGA - The GNU Omnificent GUI for Ada --
-- --
-- G N O G A . S E R V E R . T E M P L A T E _ P A R S E R . S I M P L E --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 2014 David Botton --
-- --
-- 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. --
-- --
-- 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/>. --
-- --
-- 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. --
-- --
-- For more information please go to http://www.gnoga.com --
------------------------------------------------------------------------------
with Ada.Text_IO;
package body Ada_GUI.Gnoga.Server.Template_Parser.Simple is
---------------
-- Load_View --
---------------
function Load_View (Name : String) return String is
Empty_Data : View_Data;
begin
return Load_View (Name, Empty_Data);
end Load_View;
function Load_View (Name : String;
Data_Map : Gnoga.Data_Map_Type;
Var_Name : String := "data")
return String
is
Data : View_Data;
begin
Data.Insert_Map (Data_Map);
Data.Variable_Name (Var_Name);
return Load_View (Name, Data);
end Load_View;
function Load_View (Name : String; Data : View_Data)
return String
is
begin
return Load_View (Name, Data_List => (1 => Data));
end Load_View;
function Load_View (Name : String;
Data_List : View_Data_Array)
return String
is
use Ada.Strings.Unbounded;
Error_Queue_Data : View_Data;
Info_Queue_Data : View_Data;
Parsed_File : Ada.Strings.Unbounded.Unbounded_String;
procedure Load_File;
procedure Parse_Data;
procedure Replace_Values (D : View_Data);
procedure Replace_In_String (S, M : String);
procedure Load_File is
use Ada.Text_IO;
F : File_Type;
begin
Open (File => F,
Mode => In_File,
Name => Parse_Name (Name),
Form => "shared=no");
while not End_Of_File (F) loop
if Length (Parsed_File) > 0 then
Parsed_File :=
Parsed_File & (Character'Val (10) & Get_Line (F));
else
Parsed_File := To_Unbounded_String (Get_Line (F));
end if;
end loop;
Close (F);
end Load_File;
procedure Parse_Data is
begin
for i in Data_List'First .. Data_List'Last loop
Replace_Values (Data_List (i));
end loop;
Error_Queue_Data.Insert_Array (Error_Queue);
Error_Queue_Data.Variable_Name ("gnoga_errors");
Replace_Values (Error_Queue_Data);
Info_Queue_Data.Insert_Array (Info_Queue);
Info_Queue_Data.Variable_Name ("gnoga_infos");
Replace_Values (Info_Queue_Data);
end Parse_Data;
procedure Replace_Values (D : View_Data) is
use Gnoga.Data_Maps;
use Gnoga.Maps_of_Data_Maps;
Var_Name : constant String := To_String (D.Name);
begin
for C in D.String_Values.Iterate loop
Replace_In_String ("@@" & Var_Name & "." & Key (C) & "@@",
Element (C));
end loop;
for M in D.Map_Values.Iterate loop
for C in Element (M).Iterate loop
Replace_In_String
("@@" & Var_Name & "." & Key (M) & "." & Key (C) & "@@",
Element (C));
end loop;
end loop;
end Replace_Values;
procedure Replace_In_String (S, M : String) is
N : Natural := 0;
begin
loop
N := Index (Parsed_File, S);
if N > 0 then
Replace_Slice (Parsed_File, N, N + S'Length - 1, M);
end if;
exit when N = 0;
end loop;
end Replace_In_String;
begin
Load_File;
Parse_Data;
return To_String (Parsed_File);
end Load_View;
end Ada_GUI.Gnoga.Server.Template_Parser.Simple;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ADA.NUMERICS.GENERIC_ELEMENTARY_FUNCTIONS --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001, 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 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This body is specifically for using an Ada interface to C math.h to get
-- the computation engine. Many special cases are handled locally to avoid
-- unnecessary calls. This is not a "strict" implementation, but takes full
-- advantage of the C functions, e.g. in providing interface to hardware
-- provided versions of the elementary functions.
-- Uses functions sqrt, exp, log, pow, sin, asin, cos, acos, tan, atan,
-- sinh, cosh, tanh from C library via math.h
with Ada.Numerics.Aux;
package body Ada.Numerics.Generic_Elementary_Functions is
use type Ada.Numerics.Aux.Double;
Sqrt_Two : constant := 1.41421_35623_73095_04880_16887_24209_69807_85696;
Log_Two : constant := 0.69314_71805_59945_30941_72321_21458_17656_80755;
Half_Log_Two : constant := Log_Two / 2;
subtype T is Float_Type'Base;
subtype Double is Aux.Double;
Two_Pi : constant T := 2.0 * Pi;
Half_Pi : constant T := Pi / 2.0;
Fourth_Pi : constant T := Pi / 4.0;
Epsilon : constant T := 2.0 ** (1 - T'Model_Mantissa);
IEpsilon : constant T := 2.0 ** (T'Model_Mantissa - 1);
Log_Epsilon : constant T := T (1 - T'Model_Mantissa) * Log_Two;
Half_Log_Epsilon : constant T := T (1 - T'Model_Mantissa) * Half_Log_Two;
Log_Inverse_Epsilon : constant T := T (T'Model_Mantissa - 1) * Log_Two;
Sqrt_Epsilon : constant T := Sqrt_Two ** (1 - T'Model_Mantissa);
DEpsilon : constant Double := Double (Epsilon);
DIEpsilon : constant Double := Double (IEpsilon);
-----------------------
-- Local Subprograms --
-----------------------
function Exp_Strict (X : Float_Type'Base) return Float_Type'Base;
-- Cody/Waite routine, supposedly more precise than the library
-- version. Currently only needed for Sinh/Cosh on X86 with the largest
-- FP type.
function Local_Atan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0)
return Float_Type'Base;
-- Common code for arc tangent after cyele reduction
----------
-- "**" --
----------
function "**" (Left, Right : Float_Type'Base) return Float_Type'Base is
A_Right : Float_Type'Base;
Int_Part : Integer;
Result : Float_Type'Base;
R1 : Float_Type'Base;
Rest : Float_Type'Base;
begin
if Left = 0.0
and then Right = 0.0
then
raise Argument_Error;
elsif Left < 0.0 then
raise Argument_Error;
elsif Right = 0.0 then
return 1.0;
elsif Left = 0.0 then
if Right < 0.0 then
raise Constraint_Error;
else
return 0.0;
end if;
elsif Left = 1.0 then
return 1.0;
elsif Right = 1.0 then
return Left;
else
begin
if Right = 2.0 then
return Left * Left;
elsif Right = 0.5 then
return Sqrt (Left);
else
A_Right := abs (Right);
-- If exponent is larger than one, compute integer exponen-
-- tiation if possible, and evaluate fractional part with
-- more precision. The relative error is now proportional
-- to the fractional part of the exponent only.
if A_Right > 1.0
and then A_Right < Float_Type'Base (Integer'Last)
then
Int_Part := Integer (Float_Type'Base'Truncation (A_Right));
Result := Left ** Int_Part;
Rest := A_Right - Float_Type'Base (Int_Part);
-- Compute with two leading bits of the mantissa using
-- square roots. Bound to be better than logarithms, and
-- easily extended to greater precision.
if Rest >= 0.5 then
R1 := Sqrt (Left);
Result := Result * R1;
Rest := Rest - 0.5;
if Rest >= 0.25 then
Result := Result * Sqrt (R1);
Rest := Rest - 0.25;
end if;
elsif Rest >= 0.25 then
Result := Result * Sqrt (Sqrt (Left));
Rest := Rest - 0.25;
end if;
Result := Result *
Float_Type'Base (Aux.Pow (Double (Left), Double (Rest)));
if Right >= 0.0 then
return Result;
else
return (1.0 / Result);
end if;
else
return
Float_Type'Base (Aux.Pow (Double (Left), Double (Right)));
end if;
end if;
exception
when others =>
raise Constraint_Error;
end;
end if;
end "**";
------------
-- Arccos --
------------
-- Natural cycle
function Arccos (X : Float_Type'Base) return Float_Type'Base is
Temp : Float_Type'Base;
begin
if abs X > 1.0 then
raise Argument_Error;
elsif abs X < Sqrt_Epsilon then
return Pi / 2.0 - X;
elsif X = 1.0 then
return 0.0;
elsif X = -1.0 then
return Pi;
end if;
Temp := Float_Type'Base (Aux.Acos (Double (X)));
if Temp < 0.0 then
Temp := Pi + Temp;
end if;
return Temp;
end Arccos;
-- Arbitrary cycle
function Arccos (X, Cycle : Float_Type'Base) return Float_Type'Base is
Temp : Float_Type'Base;
begin
if Cycle <= 0.0 then
raise Argument_Error;
elsif abs X > 1.0 then
raise Argument_Error;
elsif abs X < Sqrt_Epsilon then
return Cycle / 4.0;
elsif X = 1.0 then
return 0.0;
elsif X = -1.0 then
return Cycle / 2.0;
end if;
Temp := Arctan (Sqrt ((1.0 - X) * (1.0 + X)) / X, 1.0, Cycle);
if Temp < 0.0 then
Temp := Cycle / 2.0 + Temp;
end if;
return Temp;
end Arccos;
-------------
-- Arccosh --
-------------
function Arccosh (X : Float_Type'Base) return Float_Type'Base is
begin
-- Return positive branch of Log (X - Sqrt (X * X - 1.0)), or
-- the proper approximation for X close to 1 or >> 1.
if X < 1.0 then
raise Argument_Error;
elsif X < 1.0 + Sqrt_Epsilon then
return Sqrt (2.0 * (X - 1.0));
elsif X > 1.0 / Sqrt_Epsilon then
return Log (X) + Log_Two;
else
return Log (X + Sqrt ((X - 1.0) * (X + 1.0)));
end if;
end Arccosh;
------------
-- Arccot --
------------
-- Natural cycle
function Arccot
(X : Float_Type'Base;
Y : Float_Type'Base := 1.0)
return Float_Type'Base
is
begin
-- Just reverse arguments
return Arctan (Y, X);
end Arccot;
-- Arbitrary cycle
function Arccot
(X : Float_Type'Base;
Y : Float_Type'Base := 1.0;
Cycle : Float_Type'Base)
return Float_Type'Base
is
begin
-- Just reverse arguments
return Arctan (Y, X, Cycle);
end Arccot;
-------------
-- Arccoth --
-------------
function Arccoth (X : Float_Type'Base) return Float_Type'Base is
begin
if abs X > 2.0 then
return Arctanh (1.0 / X);
elsif abs X = 1.0 then
raise Constraint_Error;
elsif abs X < 1.0 then
raise Argument_Error;
else
-- 1.0 < abs X <= 2.0. One of X + 1.0 and X - 1.0 is exact, the
-- other has error 0 or Epsilon.
return 0.5 * (Log (abs (X + 1.0)) - Log (abs (X - 1.0)));
end if;
end Arccoth;
------------
-- Arcsin --
------------
-- Natural cycle
function Arcsin (X : Float_Type'Base) return Float_Type'Base is
begin
if abs X > 1.0 then
raise Argument_Error;
elsif abs X < Sqrt_Epsilon then
return X;
elsif X = 1.0 then
return Pi / 2.0;
elsif X = -1.0 then
return -Pi / 2.0;
end if;
return Float_Type'Base (Aux.Asin (Double (X)));
end Arcsin;
-- Arbitrary cycle
function Arcsin (X, Cycle : Float_Type'Base) return Float_Type'Base is
begin
if Cycle <= 0.0 then
raise Argument_Error;
elsif abs X > 1.0 then
raise Argument_Error;
elsif X = 0.0 then
return X;
elsif X = 1.0 then
return Cycle / 4.0;
elsif X = -1.0 then
return -Cycle / 4.0;
end if;
return Arctan (X / Sqrt ((1.0 - X) * (1.0 + X)), 1.0, Cycle);
end Arcsin;
-------------
-- Arcsinh --
-------------
function Arcsinh (X : Float_Type'Base) return Float_Type'Base is
begin
if abs X < Sqrt_Epsilon then
return X;
elsif X > 1.0 / Sqrt_Epsilon then
return Log (X) + Log_Two;
elsif X < -1.0 / Sqrt_Epsilon then
return -(Log (-X) + Log_Two);
elsif X < 0.0 then
return -Log (abs X + Sqrt (X * X + 1.0));
else
return Log (X + Sqrt (X * X + 1.0));
end if;
end Arcsinh;
------------
-- Arctan --
------------
-- Natural cycle
function Arctan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0)
return Float_Type'Base
is
begin
if X = 0.0
and then Y = 0.0
then
raise Argument_Error;
elsif Y = 0.0 then
if X > 0.0 then
return 0.0;
else -- X < 0.0
return Pi * Float_Type'Copy_Sign (1.0, Y);
end if;
elsif X = 0.0 then
if Y > 0.0 then
return Half_Pi;
else -- Y < 0.0
return -Half_Pi;
end if;
else
return Local_Atan (Y, X);
end if;
end Arctan;
-- Arbitrary cycle
function Arctan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0;
Cycle : Float_Type'Base)
return Float_Type'Base
is
begin
if Cycle <= 0.0 then
raise Argument_Error;
elsif X = 0.0
and then Y = 0.0
then
raise Argument_Error;
elsif Y = 0.0 then
if X > 0.0 then
return 0.0;
else -- X < 0.0
return Cycle / 2.0 * Float_Type'Copy_Sign (1.0, Y);
end if;
elsif X = 0.0 then
if Y > 0.0 then
return Cycle / 4.0;
else -- Y < 0.0
return -Cycle / 4.0;
end if;
else
return Local_Atan (Y, X) * Cycle / Two_Pi;
end if;
end Arctan;
-------------
-- Arctanh --
-------------
function Arctanh (X : Float_Type'Base) return Float_Type'Base is
A, B, D, A_Plus_1, A_From_1 : Float_Type'Base;
Mantissa : constant Integer := Float_Type'Base'Machine_Mantissa;
begin
-- The naive formula:
-- Arctanh (X) := (1/2) * Log (1 + X) / (1 - X)
-- is not well-behaved numerically when X < 0.5 and when X is close
-- to one. The following is accurate but probably not optimal.
if abs X = 1.0 then
raise Constraint_Error;
elsif abs X >= 1.0 - 2.0 ** (-Mantissa) then
if abs X >= 1.0 then
raise Argument_Error;
else
-- The one case that overflows if put through the method below:
-- abs X = 1.0 - Epsilon. In this case (1/2) log (2/Epsilon) is
-- accurate. This simplifies to:
return Float_Type'Copy_Sign (
Half_Log_Two * Float_Type'Base (Mantissa + 1), X);
end if;
-- elsif abs X <= 0.5 then
-- why is above line commented out ???
else
-- Use several piecewise linear approximations.
-- A is close to X, chosen so 1.0 + A, 1.0 - A, and X - A are exact.
-- The two scalings remove the low-order bits of X.
A := Float_Type'Base'Scaling (
Float_Type'Base (Long_Long_Integer
(Float_Type'Base'Scaling (X, Mantissa - 1))), 1 - Mantissa);
B := X - A; -- This is exact; abs B <= 2**(-Mantissa).
A_Plus_1 := 1.0 + A; -- This is exact.
A_From_1 := 1.0 - A; -- Ditto.
D := A_Plus_1 * A_From_1; -- 1 - A*A.
-- use one term of the series expansion:
-- f (x + e) = f(x) + e * f'(x) + ..
-- The derivative of Arctanh at A is 1/(1-A*A). Next term is
-- A*(B/D)**2 (if a quadratic approximation is ever needed).
return 0.5 * (Log (A_Plus_1) - Log (A_From_1)) + B / D;
-- else
-- return 0.5 * Log ((X + 1.0) / (1.0 - X));
-- why are above lines commented out ???
end if;
end Arctanh;
---------
-- Cos --
---------
-- Natural cycle
function Cos (X : Float_Type'Base) return Float_Type'Base is
begin
if X = 0.0 then
return 1.0;
elsif abs X < Sqrt_Epsilon then
return 1.0;
end if;
return Float_Type'Base (Aux.Cos (Double (X)));
end Cos;
-- Arbitrary cycle
function Cos (X, Cycle : Float_Type'Base) return Float_Type'Base is
begin
-- Just reuse the code for Sin. The potential small
-- loss of speed is negligible with proper (front-end) inlining.
return -Sin (abs X - Cycle * 0.25, Cycle);
end Cos;
----------
-- Cosh --
----------
function Cosh (X : Float_Type'Base) return Float_Type'Base is
Lnv : constant Float_Type'Base := 8#0.542714#;
V2minus1 : constant Float_Type'Base := 0.13830_27787_96019_02638E-4;
Y : Float_Type'Base := abs X;
Z : Float_Type'Base;
begin
if Y < Sqrt_Epsilon then
return 1.0;
elsif Y > Log_Inverse_Epsilon then
Z := Exp_Strict (Y - Lnv);
return (Z + V2minus1 * Z);
else
Z := Exp_Strict (Y);
return 0.5 * (Z + 1.0 / Z);
end if;
end Cosh;
---------
-- Cot --
---------
-- Natural cycle
function Cot (X : Float_Type'Base) return Float_Type'Base is
begin
if X = 0.0 then
raise Constraint_Error;
elsif abs X < Sqrt_Epsilon then
return 1.0 / X;
end if;
return 1.0 / Float_Type'Base (Aux.Tan (Double (X)));
end Cot;
-- Arbitrary cycle
function Cot (X, Cycle : Float_Type'Base) return Float_Type'Base is
T : Float_Type'Base;
begin
if Cycle <= 0.0 then
raise Argument_Error;
end if;
T := Float_Type'Base'Remainder (X, Cycle);
if T = 0.0 or abs T = 0.5 * Cycle then
raise Constraint_Error;
elsif abs T < Sqrt_Epsilon then
return 1.0 / T;
elsif abs T = 0.25 * Cycle then
return 0.0;
else
T := T / Cycle * Two_Pi;
return Cos (T) / Sin (T);
end if;
end Cot;
----------
-- Coth --
----------
function Coth (X : Float_Type'Base) return Float_Type'Base is
begin
if X = 0.0 then
raise Constraint_Error;
elsif X < Half_Log_Epsilon then
return -1.0;
elsif X > -Half_Log_Epsilon then
return 1.0;
elsif abs X < Sqrt_Epsilon then
return 1.0 / X;
end if;
return 1.0 / Float_Type'Base (Aux.Tanh (Double (X)));
end Coth;
---------
-- Exp --
---------
function Exp (X : Float_Type'Base) return Float_Type'Base is
Result : Float_Type'Base;
begin
if X = 0.0 then
return 1.0;
end if;
Result := Float_Type'Base (Aux.Exp (Double (X)));
-- Deal with case of Exp returning IEEE infinity. If Machine_Overflows
-- is False, then we can just leave it as an infinity (and indeed we
-- prefer to do so). But if Machine_Overflows is True, then we have
-- to raise a Constraint_Error exception as required by the RM.
if Float_Type'Machine_Overflows and then not Result'Valid then
raise Constraint_Error;
end if;
return Result;
end Exp;
----------------
-- Exp_Strict --
----------------
function Exp_Strict (X : Float_Type'Base) return Float_Type'Base is
G : Float_Type'Base;
Z : Float_Type'Base;
P0 : constant := 0.25000_00000_00000_00000;
P1 : constant := 0.75753_18015_94227_76666E-2;
P2 : constant := 0.31555_19276_56846_46356E-4;
Q0 : constant := 0.5;
Q1 : constant := 0.56817_30269_85512_21787E-1;
Q2 : constant := 0.63121_89437_43985_02557E-3;
Q3 : constant := 0.75104_02839_98700_46114E-6;
C1 : constant := 8#0.543#;
C2 : constant := -2.1219_44400_54690_58277E-4;
Le : constant := 1.4426_95040_88896_34074;
XN : Float_Type'Base;
P, Q, R : Float_Type'Base;
begin
if X = 0.0 then
return 1.0;
end if;
XN := Float_Type'Base'Rounding (X * Le);
G := (X - XN * C1) - XN * C2;
Z := G * G;
P := G * ((P2 * Z + P1) * Z + P0);
Q := ((Q3 * Z + Q2) * Z + Q1) * Z + Q0;
R := 0.5 + P / (Q - P);
R := Float_Type'Base'Scaling (R, Integer (XN) + 1);
-- Deal with case of Exp returning IEEE infinity. If Machine_Overflows
-- is False, then we can just leave it as an infinity (and indeed we
-- prefer to do so). But if Machine_Overflows is True, then we have
-- to raise a Constraint_Error exception as required by the RM.
if Float_Type'Machine_Overflows and then not R'Valid then
raise Constraint_Error;
else
return R;
end if;
end Exp_Strict;
----------------
-- Local_Atan --
----------------
function Local_Atan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0)
return Float_Type'Base
is
Z : Float_Type'Base;
Raw_Atan : Float_Type'Base;
begin
if abs Y > abs X then
Z := abs (X / Y);
else
Z := abs (Y / X);
end if;
if Z < Sqrt_Epsilon then
Raw_Atan := Z;
elsif Z = 1.0 then
Raw_Atan := Pi / 4.0;
else
Raw_Atan := Float_Type'Base (Aux.Atan (Double (Z)));
end if;
if abs Y > abs X then
Raw_Atan := Half_Pi - Raw_Atan;
end if;
if X > 0.0 then
if Y > 0.0 then
return Raw_Atan;
else -- Y < 0.0
return -Raw_Atan;
end if;
else -- X < 0.0
if Y > 0.0 then
return Pi - Raw_Atan;
else -- Y < 0.0
return -(Pi - Raw_Atan);
end if;
end if;
end Local_Atan;
---------
-- Log --
---------
-- Natural base
function Log (X : Float_Type'Base) return Float_Type'Base is
begin
if X < 0.0 then
raise Argument_Error;
elsif X = 0.0 then
raise Constraint_Error;
elsif X = 1.0 then
return 0.0;
end if;
return Float_Type'Base (Aux.Log (Double (X)));
end Log;
-- Arbitrary base
function Log (X, Base : Float_Type'Base) return Float_Type'Base is
begin
if X < 0.0 then
raise Argument_Error;
elsif Base <= 0.0 or else Base = 1.0 then
raise Argument_Error;
elsif X = 0.0 then
raise Constraint_Error;
elsif X = 1.0 then
return 0.0;
end if;
return Float_Type'Base (Aux.Log (Double (X)) / Aux.Log (Double (Base)));
end Log;
---------
-- Sin --
---------
-- Natural cycle
function Sin (X : Float_Type'Base) return Float_Type'Base is
begin
if abs X < Sqrt_Epsilon then
return X;
end if;
return Float_Type'Base (Aux.Sin (Double (X)));
end Sin;
-- Arbitrary cycle
function Sin (X, Cycle : Float_Type'Base) return Float_Type'Base is
T : Float_Type'Base;
begin
if Cycle <= 0.0 then
raise Argument_Error;
elsif X = 0.0 then
-- Is this test really needed on any machine ???
return X;
end if;
T := Float_Type'Base'Remainder (X, Cycle);
-- The following two reductions reduce the argument
-- to the interval [-0.25 * Cycle, 0.25 * Cycle].
-- This reduction is exact and is needed to prevent
-- inaccuracy that may result if the sinus function
-- a different (more accurate) value of Pi in its
-- reduction than is used in the multiplication with Two_Pi.
if abs T > 0.25 * Cycle then
T := 0.5 * Float_Type'Copy_Sign (Cycle, T) - T;
end if;
-- Could test for 12.0 * abs T = Cycle, and return
-- an exact value in those cases. It is not clear that
-- this is worth the extra test though.
return Float_Type'Base (Aux.Sin (Double (T / Cycle * Two_Pi)));
end Sin;
----------
-- Sinh --
----------
function Sinh (X : Float_Type'Base) return Float_Type'Base is
Lnv : constant Float_Type'Base := 8#0.542714#;
V2minus1 : constant Float_Type'Base := 0.13830_27787_96019_02638E-4;
Y : Float_Type'Base := abs X;
F : constant Float_Type'Base := Y * Y;
Z : Float_Type'Base;
Float_Digits_1_6 : constant Boolean := Float_Type'Digits < 7;
begin
if Y < Sqrt_Epsilon then
return X;
elsif Y > Log_Inverse_Epsilon then
Z := Exp_Strict (Y - Lnv);
Z := Z + V2minus1 * Z;
elsif Y < 1.0 then
if Float_Digits_1_6 then
-- Use expansion provided by Cody and Waite, p. 226. Note that
-- leading term of the polynomial in Q is exactly 1.0.
declare
P0 : constant := -0.71379_3159E+1;
P1 : constant := -0.19033_3399E+0;
Q0 : constant := -0.42827_7109E+2;
begin
Z := Y + Y * F * (P1 * F + P0) / (F + Q0);
end;
else
declare
P0 : constant := -0.35181_28343_01771_17881E+6;
P1 : constant := -0.11563_52119_68517_68270E+5;
P2 : constant := -0.16375_79820_26307_51372E+3;
P3 : constant := -0.78966_12741_73570_99479E+0;
Q0 : constant := -0.21108_77005_81062_71242E+7;
Q1 : constant := 0.36162_72310_94218_36460E+5;
Q2 : constant := -0.27773_52311_96507_01667E+3;
begin
Z := Y + Y * F * (((P3 * F + P2) * F + P1) * F + P0)
/ (((F + Q2) * F + Q1) * F + Q0);
end;
end if;
else
Z := Exp_Strict (Y);
Z := 0.5 * (Z - 1.0 / Z);
end if;
if X > 0.0 then
return Z;
else
return -Z;
end if;
end Sinh;
----------
-- Sqrt --
----------
function Sqrt (X : Float_Type'Base) return Float_Type'Base is
begin
if X < 0.0 then
raise Argument_Error;
-- Special case Sqrt (0.0) to preserve possible minus sign per IEEE
elsif X = 0.0 then
return X;
end if;
return Float_Type'Base (Aux.Sqrt (Double (X)));
end Sqrt;
---------
-- Tan --
---------
-- Natural cycle
function Tan (X : Float_Type'Base) return Float_Type'Base is
begin
if abs X < Sqrt_Epsilon then
return X;
elsif abs X = Pi / 2.0 then
raise Constraint_Error;
end if;
return Float_Type'Base (Aux.Tan (Double (X)));
end Tan;
-- Arbitrary cycle
function Tan (X, Cycle : Float_Type'Base) return Float_Type'Base is
T : Float_Type'Base;
begin
if Cycle <= 0.0 then
raise Argument_Error;
elsif X = 0.0 then
return X;
end if;
T := Float_Type'Base'Remainder (X, Cycle);
if abs T = 0.25 * Cycle then
raise Constraint_Error;
elsif abs T = 0.5 * Cycle then
return 0.0;
else
T := T / Cycle * Two_Pi;
return Sin (T) / Cos (T);
end if;
end Tan;
----------
-- Tanh --
----------
function Tanh (X : Float_Type'Base) return Float_Type'Base is
P0 : constant Float_Type'Base := -0.16134_11902E4;
P1 : constant Float_Type'Base := -0.99225_92967E2;
P2 : constant Float_Type'Base := -0.96437_49299E0;
Q0 : constant Float_Type'Base := 0.48402_35707E4;
Q1 : constant Float_Type'Base := 0.22337_72071E4;
Q2 : constant Float_Type'Base := 0.11274_47438E3;
Q3 : constant Float_Type'Base := 0.10000000000E1;
Half_Ln3 : constant Float_Type'Base := 0.54930_61443;
P, Q, R : Float_Type'Base;
Y : Float_Type'Base := abs X;
G : Float_Type'Base := Y * Y;
Float_Type_Digits_15_Or_More : constant Boolean :=
Float_Type'Digits > 14;
begin
if X < Half_Log_Epsilon then
return -1.0;
elsif X > -Half_Log_Epsilon then
return 1.0;
elsif Y < Sqrt_Epsilon then
return X;
elsif Y < Half_Ln3
and then Float_Type_Digits_15_Or_More
then
P := (P2 * G + P1) * G + P0;
Q := ((Q3 * G + Q2) * G + Q1) * G + Q0;
R := G * (P / Q);
return X + X * R;
else
return Float_Type'Base (Aux.Tanh (Double (X)));
end if;
end Tanh;
end Ada.Numerics.Generic_Elementary_Functions;
|
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . I N D E F I N I T E _ H O L D E R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2012-2015, 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/>. --
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body Ada.Containers.Indefinite_Holders is
procedure Free is
new Ada.Unchecked_Deallocation (Element_Type, Element_Access);
---------
-- "=" --
---------
function "=" (Left, Right : Holder) return Boolean is
begin
if Left.Element = null and Right.Element = null then
return True;
elsif Left.Element /= null and Right.Element /= null then
return Left.Element.all = Right.Element.all;
else
return False;
end if;
end "=";
------------
-- Adjust --
------------
overriding procedure Adjust (Container : in out Holder) is
begin
if Container.Element /= null then
Container.Element := new Element_Type'(Container.Element.all);
end if;
Container.Busy := 0;
end Adjust;
overriding procedure Adjust (Control : in out Reference_Control_Type) is
begin
if Control.Container /= null then
declare
B : Natural renames Control.Container.Busy;
begin
B := B + 1;
end;
end if;
end Adjust;
------------
-- Assign --
------------
procedure Assign (Target : in out Holder; Source : Holder) is
begin
if Target.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
end if;
if Target.Element /= Source.Element then
Free (Target.Element);
if Source.Element /= null then
Target.Element := new Element_Type'(Source.Element.all);
end if;
end if;
end Assign;
-----------
-- Clear --
-----------
procedure Clear (Container : in out Holder) is
begin
if Container.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
end if;
Free (Container.Element);
end Clear;
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Holder) return Constant_Reference_Type
is
Ref : constant Constant_Reference_Type :=
(Element => Container.Element.all'Access,
Control => (Controlled with Container'Unrestricted_Access));
B : Natural renames Ref.Control.Container.Busy;
begin
B := B + 1;
return Ref;
end Constant_Reference;
----------
-- Copy --
----------
function Copy (Source : Holder) return Holder is
begin
if Source.Element = null then
return (Controlled with null, 0);
else
return (Controlled with new Element_Type'(Source.Element.all), 0);
end if;
end Copy;
-------------
-- Element --
-------------
function Element (Container : Holder) return Element_Type is
begin
if Container.Element = null then
raise Constraint_Error with "container is empty";
else
return Container.Element.all;
end if;
end Element;
--------------
-- Finalize --
--------------
overriding procedure Finalize (Container : in out Holder) is
begin
if Container.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
end if;
Free (Container.Element);
end Finalize;
overriding procedure Finalize (Control : in out Reference_Control_Type) is
begin
if Control.Container /= null then
declare
B : Natural renames Control.Container.Busy;
begin
B := B - 1;
end;
end if;
Control.Container := null;
end Finalize;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Holder) return Boolean is
begin
return Container.Element = null;
end Is_Empty;
----------
-- Move --
----------
procedure Move (Target : in out Holder; Source : in out Holder) is
begin
if Target.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
end if;
if Source.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
end if;
if Target.Element /= Source.Element then
Free (Target.Element);
Target.Element := Source.Element;
Source.Element := null;
end if;
end Move;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Container : Holder;
Process : not null access procedure (Element : Element_Type))
is
B : Natural renames Container'Unrestricted_Access.Busy;
begin
if Container.Element = null then
raise Constraint_Error with "container is empty";
end if;
B := B + 1;
begin
Process (Container.Element.all);
exception
when others =>
B := B - 1;
raise;
end;
B := B - 1;
end Query_Element;
----------
-- Read --
----------
procedure Read
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Container : out Holder)
is
begin
Clear (Container);
if not Boolean'Input (Stream) then
Container.Element := new Element_Type'(Element_Type'Input (Stream));
end if;
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
---------------
-- Reference --
---------------
function Reference
(Container : aliased in out Holder) return Reference_Type
is
Ref : constant Reference_Type :=
(Element => Container.Element.all'Access,
Control => (Controlled with Container'Unrestricted_Access));
begin
Container.Busy := Container.Busy + 1;
return Ref;
end Reference;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Container : in out Holder;
New_Item : Element_Type)
is
begin
if Container.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
end if;
declare
X : Element_Access := Container.Element;
-- Element allocator may need an accessibility check in case actual
-- type is class-wide or has access discriminants (RM 4.8(10.1) and
-- AI12-0035).
pragma Unsuppress (Accessibility_Check);
begin
Container.Element := new Element_Type'(New_Item);
Free (X);
end;
end Replace_Element;
---------------
-- To_Holder --
---------------
function To_Holder (New_Item : Element_Type) return Holder is
-- The element allocator may need an accessibility check in the case the
-- actual type is class-wide or has access discriminants (RM 4.8(10.1)
-- and AI12-0035).
pragma Unsuppress (Accessibility_Check);
begin
return (Controlled with new Element_Type'(New_Item), 0);
end To_Holder;
--------------------
-- Update_Element --
--------------------
procedure Update_Element
(Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type))
is
B : Natural renames Container.Busy;
begin
if Container.Element = null then
raise Constraint_Error with "container is empty";
end if;
B := B + 1;
begin
Process (Container.Element.all);
exception
when others =>
B := B - 1;
raise;
end;
B := B - 1;
end Update_Element;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Container : Holder)
is
begin
Boolean'Output (Stream, Container.Element = null);
if Container.Element /= null then
Element_Type'Output (Stream, Container.Element.all);
end if;
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
end Ada.Containers.Indefinite_Holders;
|
-- Advanced Resource Embedder 1.1.0
with Ada.Streams;
with Interfaces.C;
package simulator_assets is
type Content_Access is access constant Ada.Streams.Stream_Element_Array;
type Name_Access is access constant String;
type Format_Type is (FILE_RAW, FILE_GZIP);
type Content_Type is record
Name : Name_Access;
Content : Content_Access;
Modtime : Interfaces.C.long := 0;
Format : Format_Type := FILE_RAW;
end record;
Null_Content : constant Content_Type;
-- Returns the data stream with the given name or null.
function Get_Content (Name : String) return Content_Type;
private
Null_Content : constant Content_Type := (others => <>);
end simulator_assets;
|
-- Copyright (c) 2021 Devin Hill
-- zlib License -- see LICENSE for details.
-- Copyright (c) 2021 Devin Hill
-- zlib License -- see LICENSE for details.
with GBA.Interrupts;
use GBA.Interrupts;
with GBA.Numerics;
use GBA.Numerics;
with GBA.Memory;
use GBA.Memory;
with Interfaces;
use Interfaces;
generic
with procedure Soft_Reset is <>;
with procedure Hard_Reset is <>;
with procedure Halt is <>;
with procedure Stop is <>;
with procedure Register_RAM_Reset (Flags : Register_RAM_Reset_Flags) is <>;
with procedure Wait_For_Interrupt
( New_Only : Boolean; Wait_For : Interrupt_Flags ) is <>;
with procedure Wait_For_VBlank is <>;
with function Div_Mod (N, D : Integer) return Long_Long_Integer is <>;
with function Div_Mod_Arm (D, N : Integer) return Long_Long_Integer is <>;
with function Sqrt (N : Unsigned_32) return Unsigned_16 is <>;
with function Arc_Tan (X, Y : Fixed_2_14) return Radians_16 is <>;
with procedure Cpu_Set (S, D : Address; Config : Cpu_Set_Config) is <>;
with procedure Cpu_Fast_Set (S, D : Address; Config : Cpu_Set_Config) is <>;
with function Bios_Checksum return Unsigned_32 is <>;
with procedure Affine_Set_Ext
(Parameters : Address; Transform : Address; Count : Integer) is <>;
with procedure Affine_Set
(Parameters : Address; Transform : Address; Count, Stride : Integer) is <>;
package GBA.BIOS.Generic_Interface is end; |
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C;
use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C;
procedure euler28 is
type stringptr is access all char_array;
procedure PInt(i : in Integer) is
begin
String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left));
end;
--
--
--43 44 45 46 47 48 49
--42 21 22 23 24 25 26
--41 20 7 8 9 10 27
--40 19 6 1 2 11 28
--39 18 5 4 3 12 29
--38 17 16 15 14 13 30
--37 36 35 34 33 32 31
--
--1 3 5 7 9 13 17 21 25 31 37 43 49
-- 2 2 2 2 4 4 4 4 6 6 6 6
--
--
--
function sumdiag(n : in Integer) return Integer is
un : Integer;
sum : Integer;
nterms : Integer;
d : Integer;
begin
nterms := n * 2 - 1;
un := 1;
sum := 1;
for i in integer range 0..nterms - 2 loop
d := 2 * (1 + i / 4);
un := un + d;
-- print int d print "=>" print un print " "
sum := sum + un;
end loop;
return sum;
end;
begin
PInt(sumdiag(1001));
end;
|
package Tkmrpc.Operations.Cfg is
Tkm_Version : constant Operations.Operation_Type := 16#0000#;
Tkm_Limits : constant Operations.Operation_Type := 16#0001#;
Tkm_Reset : constant Operations.Operation_Type := 16#0002#;
end Tkmrpc.Operations.Cfg;
|
-- { dg-do compile }
with Elab2_Pkg; use Elab2_Pkg;
package Elab2 is
type Num is (One, Two);
type Rec2 (D : Index_Type := 0) is record
Data : Rec1(D);
end record;
type Rec3 (D : Num) is record
case D is
when One => R : Rec2;
when others => null;
end case;
end record;
end Elab2;
|
with System, System.Storage_Elements;
use System, System.Storage_Elements;
package body ObjectPack is
function hash(obj: Item) return Integer is
addr : Integer_Address := To_Integer(obj'Address);
begin
return Integer(addr mod 2**31);
end;
end;
|
-- { dg-do compile }
package body Discr11 is
function Create return DT_2 is
begin
return DT_2'(DT_1'(Create) with More => 1234);
end;
end Discr11;
|
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
with Ada.Characters.Wide_Wide_Latin_1;
with League.JSON.Objects;
with League.JSON.Values;
with Jupyter.Kernels;
procedure Magics.Ls_Magic
(IO_Pub : not null Jupyter.Kernels.IO_Pub_Access;
Silent : Boolean)
is
Result : League.Strings.Universal_String;
Data : League.JSON.Objects.JSON_Object;
begin
if not Silent then
Result.Append ("Available line magics:");
Result.Append (Ada.Characters.Wide_Wide_Latin_1.LF);
Result.Append ("%lsmagic? %alr? %%output? %%writefile? ");
Result.Append ("%gargs? %cargs? %largs? %bargs?");
Data.Insert (+"text/plain", League.JSON.Values.To_JSON_Value (Result));
IO_Pub.Execute_Result
(Data => Data,
Metadata => League.JSON.Objects.Empty_JSON_Object,
Transient => League.JSON.Objects.Empty_JSON_Object);
end if;
end Magics.Ls_Magic;
|
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32G474xx.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.COMP is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype C1CSR_INMSEL_Field is HAL.UInt3;
subtype C1CSR_HYST_Field is HAL.UInt3;
subtype C1CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C1CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C1CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C1CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C1CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C1CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype C2CSR_INMSEL_Field is HAL.UInt3;
subtype C2CSR_HYST_Field is HAL.UInt3;
subtype C2CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C2CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C2CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C2CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C2CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype C3CSR_INMSEL_Field is HAL.UInt3;
subtype C3CSR_HYST_Field is HAL.UInt3;
subtype C3CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C3CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C3CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C3CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C3CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C3CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype C4CSR_INMSEL_Field is HAL.UInt3;
subtype C4CSR_HYST_Field is HAL.UInt3;
subtype C4CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C4CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C4CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C4CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C4CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C4CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype C5CSR_INMSEL_Field is HAL.UInt3;
subtype C5CSR_HYST_Field is HAL.UInt3;
subtype C5CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C5CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C5CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C5CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C5CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C5CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype C6CSR_INMSEL_Field is HAL.UInt3;
subtype C6CSR_HYST_Field is HAL.UInt3;
subtype C6CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C6CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C6CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C6CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C6CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C6CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype C7CSR_INMSEL_Field is HAL.UInt3;
subtype C7CSR_HYST_Field is HAL.UInt3;
subtype C7CSR_BLANKSEL_Field is HAL.UInt3;
-- Comparator control/status register
type C7CSR_Register is record
-- EN
EN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- INMSEL
INMSEL : C7CSR_INMSEL_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- INPSEL
INPSEL : Boolean := False;
-- unspecified
Reserved_9_14 : HAL.UInt6 := 16#0#;
-- POL
POL : Boolean := False;
-- HYST
HYST : C7CSR_HYST_Field := 16#0#;
-- BLANKSEL
BLANKSEL : C7CSR_BLANKSEL_Field := 16#0#;
-- BRGEN
BRGEN : Boolean := False;
-- SCALEN
SCALEN : Boolean := False;
-- unspecified
Reserved_24_29 : HAL.UInt6 := 16#0#;
-- Read-only. VALUE
VALUE : Boolean := False;
-- LOCK
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C7CSR_Register use record
EN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
INMSEL at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
INPSEL at 0 range 8 .. 8;
Reserved_9_14 at 0 range 9 .. 14;
POL at 0 range 15 .. 15;
HYST at 0 range 16 .. 18;
BLANKSEL at 0 range 19 .. 21;
BRGEN at 0 range 22 .. 22;
SCALEN at 0 range 23 .. 23;
Reserved_24_29 at 0 range 24 .. 29;
VALUE at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Comparator control and status register
type COMP_Peripheral is record
-- Comparator control/status register
C1CSR : aliased C1CSR_Register;
-- Comparator control/status register
C2CSR : aliased C2CSR_Register;
-- Comparator control/status register
C3CSR : aliased C3CSR_Register;
-- Comparator control/status register
C4CSR : aliased C4CSR_Register;
-- Comparator control/status register
C5CSR : aliased C5CSR_Register;
-- Comparator control/status register
C6CSR : aliased C6CSR_Register;
-- Comparator control/status register
C7CSR : aliased C7CSR_Register;
end record
with Volatile;
for COMP_Peripheral use record
C1CSR at 16#0# range 0 .. 31;
C2CSR at 16#4# range 0 .. 31;
C3CSR at 16#8# range 0 .. 31;
C4CSR at 16#C# range 0 .. 31;
C5CSR at 16#10# range 0 .. 31;
C6CSR at 16#14# range 0 .. 31;
C7CSR at 16#18# range 0 .. 31;
end record;
-- Comparator control and status register
COMP_Periph : aliased COMP_Peripheral
with Import, Address => COMP_Base;
end STM32_SVD.COMP;
|
select
Server.Wake_Up (Parameters);
or delay 5.0;
-- No response, try something else
...
end select;
|
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A 4 G . E N C L _ E L --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2010, Free Software Foundation, Inc. --
-- --
-- ASIS-for-GNAT is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. ASIS-for-GNAT is distributed in the hope that it will be use- --
-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
-- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General --
-- Public License for more details. You should have received a copy of the --
-- GNU General Public License distributed with ASIS-for-GNAT; see file --
-- COPYING. If not, write to the Free Software Foundation, 51 Franklin --
-- Street, Fifth Floor, Boston, MA 02110-1301, USA. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the --
-- Software Engineering Laboratory of the Swiss Federal Institute of --
-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the --
-- Scientific Research Computer Center of Moscow State University (SRCC --
-- MSU), Russia, with funding partially provided by grants from the Swiss --
-- National Science Foundation and the Swiss Academy of Engineering --
-- Sciences. ASIS-for-GNAT is now maintained by AdaCore --
-- (http://www.adacore.com). --
-- --
------------------------------------------------------------------------------
-- This package contains routines for computing the enclosing element
-- for the Asis.Elements.Enclosing_Element function
with Asis;
package A4G.Encl_El is
function Corresponding_Instantiation
(Element : Asis.Element)
return Asis.Element;
-- This function accepts an Element representing an expanded generic
-- declaration as an argument and returns the generic instantiation
-- which was expanded in the argument declaration. According to subclause
-- 15.26, this instantiation should be returned as the Enclosing_Element
-- for the expanded generic declaration.
--
-- Should we move this function in Asis.Extensions?
function Enclosing_For_Explicit_Instance_Component
(Element : Asis.Element)
return Asis.Element;
-- Computes the Enclosing Element for an explicit component of an
-- expanded generic declaration. The problem in this case is, that if
-- the result represents the whole expanded declaration, the
-- Special_Case field of the result should be properly set
function Enclosing_Element_For_Explicit
(Element : Asis.Element)
return Asis.Element;
-- This is the general constructor of enclosing element for explicit
-- elements
function Enclosing_Element_For_Implicit
(Element : Asis.Element)
return Asis.Element;
-- This is the general constructor of enclosing element for implicit
-- elements. It's only partially implemented for now.
function Enclosing_Element_For_Limited_View
(Element : Asis.Element)
return Asis.Element;
-- This is the general constructor of enclosing element for elements from
-- limited view.
end A4G.Encl_El;
|
package openGL.Model.billboard
--
-- Models a rectangle capable of displaying an image.
--
is
type Item is abstract new Model.item with private;
type Plane is (xy, xz, yz);
type Size_t is
record
Width : Real;
Height : Real;
end record;
type Coordinates is array (1 .. 4) of Coordinate_2D;
---------
--- Forge
--
default_Size : constant Size_t;
procedure define (Self : out Item; Size : Size_t := default_Size);
--------------
--- Attributes
--
function Size (Self : in Item) return Size_t;
function Width (Self : in Item) return Real;
function Height (Self : in Item) return Real;
private
type Item is abstract new Model.item with
record
Plane : billboard.Plane := xy;
Size : Size_t;
end record;
subtype site_Id is Index_t range 1 .. 4;
subtype Sites is Vector_3_array (site_Id'Range);
function vertex_Sites (for_Plane : in Plane;
Width, Height : in Real) return Sites;
Normal : constant Vector_3 := (0.0, 0.0, 1.0);
default_Size : constant Size_t := (Width => 1.0,
Height => 1.0);
end openGL.Model.billboard;
|
with Ada.Synchronous_Barriers; use Ada.Synchronous_Barriers;
with System;
with Computation_Type;
with Image_Types;
generic
with package CT is new Computation_Type (<>);
with package IT is new Image_Types (<>);
with procedure Calculate_Pixel (Re : CT.Real;
Im : CT.Real;
Z_Escape : out CT.Real;
Iter_Escape : out Natural);
Task_Pool_Size : Natural;
package Fractal is
use CT;
use IT;
procedure Init (Viewport : Viewport_Info);
procedure Set_Size (Viewport : Viewport_Info);
procedure Calculate_Image (Buffer : not null Buffer_Access);
-- procedure Increment_Frame;
function Get_Buffer_Size return Buffer_Offset;
procedure Calculate_Row (Y : ImgHeight;
Idx : Buffer_Offset;
Buffer : not null Buffer_Access);
private
Real_Distance_Unzoomed : constant Real := To_Real (4);
type Complex_Coordinate is record
Re : Real;
Im : Real;
end record;
S_Width : ImgWidth;
S_Height : ImgHeight;
S_Zoom : ImgZoom;
S_Center : Complex_Coordinate;
S_Step : Complex_Coordinate;
S_Max : Complex_Coordinate;
S_Min : Complex_Coordinate;
-- S_Frame_Counter : Color := Color'First;
-- S_Cnt_Up : Boolean := True;
procedure Calculate_Bounds;
procedure Calculate_Step;
-- procedure Calculate_Pixel_Color (Z_Escape : Real;
-- Iter_Escape : Natural;
-- Px : out Pixel);
function Get_Coordinate (X : ImgWidth;
Y : ImgHeight)
return Complex_Coordinate;
function Get_Coordinate (Coord : Coordinate) return Complex_Coordinate is
(Get_Coordinate (X => Coord.X,
Y => Coord.Y));
function Get_Width return ImgWidth is
(S_Width);
function Get_Height return ImgHeight is
(S_Height);
function Get_Buffer_Size return Buffer_Offset is
(Buffer_Offset (S_Width * S_Height * (Pixel'Size / 8)));
end Fractal;
|
with System;
with STM32_SVD.MPU; use STM32_SVD.MPU;
package STM32.MPU is
type MPU_Regions is range 0 .. 7;
type Attr_Type is record
Outer : UInt4;
Inner : UInt4;
end record
with Pack, Size => 8;
procedure Add_Region (Region_Num : MPU_Regions;
Addr : UInt32;
Size : UInt32;
AttIdx : UInt3);
procedure Add_Attrib (AttrIdx : UInt3; Attrib : Attr_Type);
procedure Enable_MPU;
end STM32.MPU;
|
with Ada.Text_Io;
with Ada.Strings.Unbounded;
package body Labels is
procedure Paint_Event (This : in out Label'Class) is
begin
Ada.Text_Io.Put_Line("Labels.Paint_Event() called");
Ada.Text_Io.Put_Line(" Label_Text = """ & Ada.Strings.Unbounded.To_String(This.Label_Text.Get) & """");
end;
end Labels;
|
-- C37411A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT THE OPERATIONS OF ASSIGNMENT, COMPARISON, MEMBERSHIP
-- TESTS, QUALIFICATION, TYPE CONVERSION, 'BASE, 'SIZE AND 'ADDRESS,
-- ARE DEFINED FOR NULL RECORDS.
-- HISTORY:
-- DHH 03/04/88 CREATED ORIGINAL TEST.
-- PWN 11/30/94 REMOVED 'BASE USE ILLEGAL IN ADA 9X.
WITH SYSTEM; USE SYSTEM;
WITH REPORT; USE REPORT;
PROCEDURE C37411A IS
TYPE S IS
RECORD
NULL;
END RECORD;
SUBTYPE SS IS S;
U,V,W : S;
X : SS;
BEGIN
TEST("C37411A", "CHECK THAT THE OPERATIONS OF ASSIGNMENT, " &
"COMPARISON, MEMBERSHIP TESTS, QUALIFICATION, " &
"TYPE CONVERSION, 'BASE, 'SIZE AND 'ADDRESS, " &
"ARE DEFINED FOR NULL RECORDS");
U := W;
IF U /= W THEN
FAILED("EQUALITY/ASSIGNMENT DOES NOT PERFORM CORRECTLY");
END IF;
IF V NOT IN S THEN
FAILED("MEMBERSHIP DOES NOT PERFORM CORRECTLY");
END IF;
IF X /= SS(V) THEN
FAILED("TYPE CONVERSION DOES NOT PERFORM CORRECTLY");
END IF;
IF S'(U) /= S'(W) THEN
FAILED("QUALIFIED EXPRESSION DOES NOT PERFORM CORRECTLY");
END IF;
IF X'SIZE /= V'SIZE THEN
FAILED("'BASE'SIZE DOES NOT PERFORM CORRECTLY WHEN PREFIX " &
"IS AN OBJECT");
END IF;
IF X'ADDRESS = V'ADDRESS THEN
COMMENT("NULL RECORDS HAVE THE SAME ADDRESS");
ELSE
COMMENT("NULL RECORDS DO NOT HAVE THE SAME ADDRESS");
END IF;
RESULT;
END C37411A;
|
-- (c) Copyright, Real-Time Innovations, $Date:: 2012-02-16 #$
-- All rights reserved.
--
-- No duplications, whole or partial, manual or electronic, may be made
-- without express written permission. Any such copies, or
-- revisions thereof, must display this notice unaltered.
-- This code contains trade secrets of Real-Time Innovations, Inc.
pragma Ada_05;
with DDS.DomainParticipantListener;
with DDS.TopicListener;
with DDS.SubscriberListener;
with DDS.PublisherListener;
with DDS.Publisher;
with DDS.PublisherSeq;
with DDS.Topic;
with DDS.TopicDescription;
with DDS.Subscriber;
with DDS.SubscriberSeq;
with DDS.ContentFilteredTopic;
with DDS.MultiTopic;
with DDS.DomainParticipant;
limited with dds.DomainParticipantFactory;
-- limited with DDS.FlowController;
with DDS.Entity_Impl;
with DDS.DataWriter;
with DDS.DataWriterListener;
with DDS.DataReader;
with DDS.DataReaderListener;
package DDS.DomainParticipant_Impl is
type Ref is new DDS.Entity_Impl.Ref and DDS.DomainParticipant.Ref with record
factory : access DDS.DomainParticipantFactory.Ref'Class;
end record;
type Ref_Access is access all Ref'Class;
function Create_Publisher
(Self : not null access Ref;
Qos : in DDS.PublisherQos;
A_Listener : in DDS.PublisherListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.Publisher.Ref_Access;
function Create_Publisher_With_Profile
(Self : not null access Ref;
Library_Name : in DDS.String;
profile_name : in DDS.String;
A_Listener : in DDS.PublisherListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Publisher.Ref_Access;
function Create_Publisher_With_Profile
(Self : not null access Ref;
Library_Name : in Standard.String;
profile_name : in Standard.String;
A_Listener : in DDS.PublisherListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Publisher.Ref_Access;
procedure Delete_Publisher
(Self : not null access Ref;
Publisher : in out DDS.Publisher.Ref_Access);
function Create_Subscriber
(Self : not null access Ref;
Qos : in DDS.SubscriberQos;
A_Listener : in DDS.SubscriberListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.Subscriber.Ref_Access;
function Create_Subscriber_With_Profile
(Self : not null access Ref;
Library_Name : in DDS.String;
profile_name : in DDS.String;
A_Listener : in DDS.SubscriberListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Subscriber.Ref_Access;
function Create_Subscriber_With_Profile
(Self : not null access Ref;
Library_Name : in Standard.String;
profile_name : in Standard.String;
A_Listener : in DDS.SubscriberListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Subscriber.Ref_Access;
procedure Delete_Subscriber
(Self : not null access Ref;
Subscriber : in out DDS.Subscriber.Ref_Access);
function Create_DataWriter
(Self : not null access Ref;
A_Topic : in DDS.Topic.Ref_Access;
Qos : in DDS.DataWriterQos := DDS.Publisher.DATAWRITER_QOS_DEFAULT;
A_Listener : in DDS.DataWriterListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataWriter.Ref_Access;
function Create_DataWriter_With_Profile
(Self : not null access Ref;
A_Topic : in DDS.Topic.Ref_Access;
Library_Name : in DDS.String;
profile_name : in DDS.String;
A_Listener : in DDS.DataWriterListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataWriter.Ref_Access;
function Create_DataWriter_With_Profile
(Self : not null access Ref;
A_Topic : in DDS.Topic.Ref_Access;
Library_Name : in Standard.String;
profile_name : in Standard.String;
A_Listener : in DDS.DataWriterListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataWriter.Ref_Access;
procedure Delete_DataWriter
(Self : not null access Ref;
A_DataWriter : in out DDS.DataWriter.Ref_Access);
function Create_DataReader
(Self : not null access Ref;
Topic : not null access DDS.TopicDescription.Ref'Class;
Qos : in DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT;
A_Listener : in DDS.DataReaderListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataReader.Ref_Access;
function Create_DataReader_With_Profile
(Self : not null access Ref;
Topic : not null access DDS.TopicDescription.Ref'Class;
Library_Name : in DDS.String;
profile_name : in DDS.String;
A_Listener : in DDS.DataReaderListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataReader.Ref_Access;
function Create_DataReader_With_Profile
(Self : not null access Ref;
Topic : not null access DDS.TopicDescription.Ref'Class;
Library_Name : in Standard.String;
profile_name : in Standard.String;
A_Listener : in DDS.DataReaderListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.DataReader.Ref_Access;
procedure Delete_DataReader
(Self : not null access Ref;
A_DataReader : in out DDS.DataReader.Ref_Access);
function Get_Builtin_Subscriber
(Self : not null access Ref)
return DDS.Subscriber.Ref_Access;
function Get_Implicit_Publisher
(Self : not null access Ref)
return DDS.Publisher.Ref_Access;
function Get_Implicit_Subscriber
(Self : not null access Ref)
return DDS.Subscriber.Ref_Access;
function Create_Topic
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Qos : in DDS.TopicQos;
A_Listener : in DDS.TopicListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.Topic.Ref_Access;
function Create_Topic_With_Profile
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Library_Name : in DDS.String;
profile_name : in DDS.String;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Topic.Ref_Access;
function Create_Topic_With_Profile
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Library_Name : in Standard.String;
profile_name : in Standard.String;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)
return DDS.Topic.Ref_Access;
function Get_Or_Create_Topic
(Self : not null Access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Qos : in DDS.TopicQos := DDS.DomainParticipant.TOPIC_QOS_DEFAULT;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE)return DDS.Topic.Ref_Access;
function Get_Or_Create_Topic_With_Profile
(Self : not null access Ref;
Topic_Name : in DDS.String;
Type_Name : in DDS.String;
Library_Name : in DDS.String;
Profile_Name : in DDS.String;
A_Listener : in DDS.TopicListener.Ref_Access := null;
Mask : in DDS.StatusMask := STATUS_MASK_NONE) return DDS.Topic.Ref_Access;
procedure Delete_Topic
(Self : not null access Ref;
A_Topic : in out DDS.Topic.Ref_Access);
function Find_Topic
(Self : not null access Ref;
Topic_Name : in DDS.String;
Timeout : in DDS.Duration_T)
return DDS.Topic.Ref_Access;
function Lookup_Topicdescription
(Self : not null access Ref;
Name : in DDS.String)
return DDS.TopicDescription.Ref_Access;
function Create_Contentfilteredtopic
(Self : not null access Ref;
Name : in DDS.String;
Related_Topic : in DDS.Topic.Ref_Access;
Filter_Expression : in DDS.String;
Filter_Parameters : access DDS.String_Seq.Sequence)
return DDS.ContentFilteredTopic.Ref_Access;
procedure Delete_Contentfilteredtopic
(Self : not null access Ref;
CFTopic : in out DDS.ContentFilteredTopic.Ref_Access);
function Create_MultiTopic
(Self : not null access Ref;
Name : in DDS.String;
Type_Name : in DDS.String;
Subscription_Expression : in DDS.String;
Expression_Parameters : access DDS.String_Seq.Sequence)
return DDS.MultiTopic.Ref_Access;
procedure Delete_MultiTopic
(Self : not null access Ref;
MTopic : in out DDS.MultiTopic.Ref_Access);
-- function Create_FlowController
-- (Self : not null access Ref;
-- name : DDS.String;
-- prop : access DDS.FlowControllerProperty_T)
-- return access DDS.FlowController.Ref'Class;
procedure Delete_Contained_Entities
(Self : not null access Ref);
procedure Set_Qos
(Self : not null access Ref;
Qos : in DDS.DomainParticipantQos);
procedure Set_Qos_With_Profile
(Self : not null access Ref;
library_name : in String;
profile_name : in String);
procedure Set_Qos_With_Profile
(Self : not null access Ref;
library_name : in Standard.String;
profile_name : in Standard.String);
procedure Get_Qos
(Self : not null access Ref;
Qos : in out DDS.DomainParticipantQos);
procedure Set_Listener
(Self : not null access Ref;
A_Listener : DDS.DomainParticipantListener.Ref_Access;
Mask : in DDS.StatusMask);
function Get_Listener
(Self : not null access Ref)
return DDS.DomainParticipantListener.Ref_Access;
procedure Ignore_Participant
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T);
procedure Ignore_Topic
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T);
procedure Ignore_Publication
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T);
procedure Ignore_Subscription
(Self : not null access Ref;
Handle : in DDS.InstanceHandle_T);
function Get_Domain_Id
(Self : not null access Ref)
return DDS.DomainId_T;
function Get_Factory
(Self : not null access Ref)
return not null access DDS.DomainParticipantFactory.Ref;
procedure Assert_Liveliness
(Self : not null access Ref);
procedure Set_Default_DataReader_Qos
(Self : not null access Ref;
Qos : in DDS.DataReaderQoS);
procedure Set_Default_DataReader_Qos_With_Profile
(Self : not null access Ref;
libName : DDS.String;
profName : DDS.String);
procedure Set_Default_DataReader_Qos_With_Profile
(Self : not null access Ref;
libName : Standard.String;
profName : Standard.String);
procedure Set_Default_DataWriter_Qos
(Self : not null access Ref;
Qos : in DDS.DataWriterQoS);
procedure Set_Default_DataWriter_Qos_With_Profile
(Self : not null access Ref;
libName : DDS.String;
profName : DDS.String);
procedure Set_Default_DataWriter_Qos_With_Profile
(Self : not null access Ref;
libName : Standard.String;
profName : Standard.String);
procedure Set_Default_Publisher_Qos
(Self : not null access Ref;
Qos : in DDS.PublisherQos);
procedure Set_Default_Publisher_Qos_With_Profile
(Self : not null access Ref;
libName : DDS.String;
profName : DDS.String);
procedure Set_Default_Publisher_Qos_With_Profile
(Self : not null access Ref;
libName : Standard.String;
profName : Standard.String);
procedure Get_Default_Publisher_Qos
(Self : not null access Ref;
Qos : in out DDS.PublisherQos);
procedure Set_Default_Subscriber_Qos
(Self : not null access Ref;
Qos : in DDS.SubscriberQos);
procedure Set_Default_Subscriber_Qos_With_Profile
(Self : not null access Ref;
libraryName : DDS.String;
profileName : DDS.String);
procedure Set_Default_Subscriber_Qos_With_Profile
(Self : not null access Ref;
libraryName : Standard.String;
profileName : Standard.String);
procedure Get_Default_Subscriber_Qos
(Self : not null access Ref;
Qos : in out DDS.SubscriberQos);
procedure Get_Default_DataReader_Qos
(Self : not null access Ref;
Qos : in out DDS.DataReaderQoS);
procedure Get_Default_DataWriter_Qos
(Self : not null access Ref;
Qos : in out DDS.DataWriterQos);
procedure Set_Default_Topic_Qos
(Self : not null access Ref;
Qos : in DDS.TopicQos);
procedure Set_Default_Topic_Qos_With_Profile
(Self : not null access Ref;
libraryName : DDS.String;
profileName : DDS.String);
procedure Set_Default_Topic_Qos_With_Profile
(Self : not null access Ref;
libraryName : Standard.String;
profileName : Standard.String);
procedure Get_Default_Topic_Qos
(Self : not null access Ref;
Qos : in out DDS.TopicQos);
procedure Set_Default_Profile
(Self : not null access Ref;
library_name : DDS.String;
profile_name : DDS.String);
procedure Set_Default_Library
(Self : not null access Ref;
library_name : DDS.String);
function Get_Default_Library
(Self : not null access Ref)
return DDS.String;
function Get_Default_Profile
(Self : not null access Ref)
return DDS.String;
function Get_Default_Profile_Library
(Self : not null access Ref)
return DDS.String;
procedure Get_Default_Flowcontroller_Property
(Self : not null access Ref;
Property : in out DDS.FlowControllerProperty_T);
procedure Set_Default_Flowcontroller_Property
(Self : not null access Ref;
Property : in DDS.FlowControllerProperty_T);
function Get_Discovered_Participants
(Self : access Ref)
return DDS.InstanceHandle_Seq.Sequence;
function Get_Discovered_Participant_Data
(Self : not null access Ref;
Participant_Handle : in DDS.InstanceHandle_T)
return DDS.ParticipantBuiltinTopicData;
function Get_Discovered_Topics
(Self : access Ref)
return DDS.InstanceHandle_Seq.Sequence;
function Get_Discovered_Topic_Data
(Self : not null access Ref;
Topic_Handle : in DDS.InstanceHandle_T)
return DDS.TopicBuiltinTopicData;
procedure Get_Discovered_Topic_Data
(Self : not null access Ref;
Topic_Handle : in DDS.InstanceHandle_T;
data : access DDS.TopicBuiltinTopicData);
function Contains_Entity
(Self : not null access Ref;
A_Handle : in DDS.InstanceHandle_T)
return Boolean;
function Get_Current_Time
(Self : not null access Ref)
return DDS.Time_T;
procedure Free (This : in out Ref_Access);
function CreateI
(Participant_Factory : not null access dds.DomainParticipantFactory.ref;
Domain_Id : in DDS.DomainId_T;
Qos : in DDS.DomainParticipantQos;
A_Listener : in DDS.DomainParticipantListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.DomainParticipant.Ref_Access;
function CreateI
(Participant_Factory : not null access dds.DomainParticipantFactory.ref;
Domain_Id : in DDS.DomainId_T;
library_name : in DDS.String;
profile_name : in DDS.String;
A_Listener : in DDS.DomainParticipantListener.Ref_Access;
Mask : in DDS.StatusMask)
return DDS.DomainParticipant.Ref_Access;
function Get_FacadeI (C_DomainParticpant : System.Address)
return Ref_Access;
procedure Add_Peer
(Self : not null access Ref;
peer_desc_string : DDS.String);
procedure Register_Builtin_TypesI (Self : not null access Ref);
procedure Register_User_TypesI (Self : not null access Ref);
procedure Delete_Implicit_EntitiesI (Self : not null access Ref);
procedure Get_Publishers
(Self : not null access Ref;
publishers : access DDS.PublisherSeq.Sequence);
procedure Get_Subscribers
(Self : not null access Ref;
subscribers : access DDS.SubscriberSeq.Sequence);
type Register_Type_Procedure is not null access procedure
(Participant : not null access DDS.DomainParticipant.Ref'Class);
procedure Register_Type_Registration (P : Register_Type_Procedure);
private
procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access);
procedure Free_Mem (This : in out Ref_Access) renames Free_Impl;
end DDS.DomainParticipant_Impl;
|
-- simple small package for the print stmt
package body Printer is
function Pr_Str (M : Types.Lovelace_Handle) return String is
begin
if Types.Is_Null (M) then
return "";
else
return Types.To_String (Types.Deref (M).all);
end if;
end Pr_Str;
end Printer;
|
with Extraction.Node_Edge_Types;
with Extraction.Utilities;
package body Extraction.Bodies_For_Entries is
use type LALCO.Ada_Node_Kind_Type;
procedure Extract_Edges
(Node : LAL.Ada_Node'Class;
Graph : Graph_Operations.Graph_Context)
is
begin
if Node.Kind = LALCO.Ada_Entry_Body then
declare
Entry_Body : constant LAL.Entry_Body := Node.As_Entry_Body;
Entry_Decl : constant LAL.Basic_Decl := Entry_Body.P_Decl_Part;
begin
Graph.Write_Edge(Entry_Decl, Entry_Body, Node_Edge_Types.Edge_Type_Is_Implemented_By);
end;
elsif Node.Kind in LALCO.Ada_Accept_Stmt_Range then
declare
Accept_Stmt : constant LAL.Accept_Stmt := Node.As_Accept_Stmt;
Task_Body : constant LAL.Basic_Decl := Utilities.Get_Parent_Basic_Decl(Accept_Stmt);
Entry_Decl : constant LAL.Basic_Decl := Utilities.Get_Referenced_Decl(Accept_Stmt.F_Name);
begin
Graph.Write_Edge(Entry_Decl, Task_Body, Node_Edge_Types.Edge_Type_Is_Implemented_By);
end;
end if;
end Extract_Edges;
end Extraction.Bodies_For_Entries;
|
pragma Ada_2012;
package body Protypo.Code_Trees.Interpreter.Symbol_Table_References is
use Api.Symbols.Protypo_Tables;
----------
-- Read --
----------
function Read (X : Symbol_Reference) return Engine_Value is
begin
return Value (X.Position);
end Read;
-----------
-- Write --
-----------
procedure Write (What : Symbol_Reference; Value : Engine_Value) is
begin
Update (Pos => What.Position,
New_Value => Value);
end Write;
----------------------------
-- Symbol_Table_Reference --
----------------------------
function Symbol_Table_Reference (Position : Api.Symbols.Protypo_Tables.Cursor)
return Api.Engine_Values.Handlers.Reference_Interface_Access
is
begin
return Api.Engine_Values.Handlers.Reference_Interface_Access'(new Symbol_Reference'(Position => Position));
end Symbol_Table_Reference;
end Protypo.Code_Trees.Interpreter.Symbol_Table_References;
|
with SDL.Video.Windows.Makers;
with SDL.Video.Renderers.Makers;
with SDL.Video.Palettes;
with SDL.Events.Events;
procedure Colour_Pinstripe_Display is
Width : constant := 1_200;
Height : constant := 800;
Window : SDL.Video.Windows.Window;
Renderer : SDL.Video.Renderers.Renderer;
Event : SDL.Events.Events.Events;
procedure Draw_Pinstripe (Line_Width : in Integer;
Line_Height : in Integer;
Screen_Width : in Integer;
Y : in Integer)
is
type Colour_Range is (Black, Red, Green, Blue, Magenta, Cyan, Yellow, White);
Colours : constant array (Colour_Range) of SDL.Video.Palettes.Colour
:= (Black => (0, 0, 0, 255), Red => (255, 0, 0, 255),
Green => (0, 255, 0, 255), Blue => (0, 0, 255, 255),
Magenta => (255, 0, 255, 255), Cyan => (0, 255, 255, 255),
Yellow => (255, 255, 0, 255), White => (255, 255, 255, 255));
Col : Colour_Range := Colour_Range'First;
Count : constant Integer := Screen_Width / Line_Width;
begin
for A in 0 .. Count loop
Renderer.Set_Draw_Colour (Colour => Colours (Col));
Renderer.Fill (Rectangle => (X => SDL.C.int (A * Line_Width), Y => SDL.C.int (Y),
Width => SDL.C.int (Line_Width),
Height => SDL.C.int (Line_Height)));
Col := (if Col = Colour_Range'Last
then Colour_Range'First
else Colour_Range'Succ (Col));
end loop;
end Draw_Pinstripe;
procedure Wait is
use type SDL.Events.Event_Types;
begin
loop
while SDL.Events.Events.Poll (Event) loop
if Event.Common.Event_Type = SDL.Events.Quit then
return;
end if;
end loop;
delay 0.100;
end loop;
end Wait;
begin
if not SDL.Initialise (Flags => SDL.Enable_Screen) then
return;
end if;
SDL.Video.Windows.Makers.Create (Win => Window,
Title => "Pinstripe",
Position => SDL.Natural_Coordinates'(X => 10, Y => 10),
Size => SDL.Positive_Sizes'(Width, Height),
Flags => 0);
SDL.Video.Renderers.Makers.Create (Renderer, Window.Get_Surface);
Draw_Pinstripe (1, Height / 4, Width, 0);
Draw_Pinstripe (2, Height / 4, Width, 200);
Draw_Pinstripe (3, Height / 4, Width, 400);
Draw_Pinstripe (4, Height / 4, Width, 600);
Window.Update_Surface;
Wait;
Window.Finalize;
SDL.Finalise;
end Colour_Pinstripe_Display;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- I N T E R F A C E S . C A C H E --
-- --
-- S p e c --
-- --
-- Copyright (C) 2016-2018, 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/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with System.Machine_Code; use System.Machine_Code;
use System;
package body Interfaces.Cache is
use System.Storage_Elements;
-- Binding of aarch64 instructions:
procedure DC_CIVAC (Addr : Unsigned_64) with Inline_Always;
procedure DC_IVAC (Addr : Unsigned_64) with Inline_Always;
procedure DSB with Inline_Always;
procedure Set_CSSELR_EL1 (Val : Unsigned_32) with Inline_Always;
-- Utility
function To_U64 is new Ada.Unchecked_Conversion
(Address, Unsigned_64);
-- Intermediate subprograms
procedure DCache_Invalidate_Line (Addr : Unsigned_64) with Inline_Always;
procedure DCache_Flush_Line (Addr : Unsigned_64) with Inline_Always;
--------------
-- DC_CIVAC --
--------------
procedure DC_CIVAC (Addr : Unsigned_64) is
begin
Asm ("dc civac, %0",
Inputs => Unsigned_64'Asm_Input ("r", Addr),
Volatile => True);
end DC_CIVAC;
-------------
-- DC_IVAC --
-------------
procedure DC_IVAC (Addr : Unsigned_64) is
begin
Asm ("dc ivac, %0",
Inputs => Unsigned_64'Asm_Input ("r", Addr),
Volatile => True);
end DC_IVAC;
---------
-- DSB --
---------
procedure DSB is
begin
Asm ("dsb sy", Volatile => True);
end DSB;
--------------------
-- Set_CSSELR_EL1 --
--------------------
procedure Set_CSSELR_EL1 (Val : Unsigned_32) is
begin
Asm ("msr csselr_el1, %0",
Inputs => Unsigned_32'Asm_Input ("r", Val),
Volatile => True);
end Set_CSSELR_EL1;
----------------------------
-- DCache_Invalidate_Line --
----------------------------
procedure DCache_Invalidate_Line (Addr : Unsigned_64)
is
begin
-- Select L1 D-cache
Set_CSSELR_EL1 (0);
DC_IVAC (Addr);
DSB;
-- Select L2 D-cache
Set_CSSELR_EL1 (2);
DC_IVAC (Addr);
DSB;
end DCache_Invalidate_Line;
-----------------------
-- DCache_Flush_Line --
-----------------------
procedure DCache_Flush_Line (Addr : Unsigned_64)
is
begin
-- Select L1 D-cache
Set_CSSELR_EL1 (0);
DC_CIVAC (Addr);
DSB;
-- Select L2 D-cache
Set_CSSELR_EL1 (2);
DC_CIVAC (Addr);
DSB;
end DCache_Flush_Line;
--------------------------------
-- Dcache_Invalidate_By_Range --
--------------------------------
procedure Dcache_Invalidate_By_Range
(Start : System.Address;
Len : System.Storage_Elements.Storage_Count)
is
Cache_Line : constant := 64;
Start_Addr : constant Unsigned_64 := To_U64 (Start);
Tmp_Addr : Unsigned_64 := Start_Addr and (not (Cache_Line - 1));
-- Start address aligned on a cache line
End_Addr : constant Unsigned_64 := To_U64 (Start + Len);
Tmp_End : constant Unsigned_64 := End_Addr and (not (Cache_Line - 1));
-- End address aligned on a cache line
begin
if Len = 0 then
return;
end if;
-- Mask IRQs/FIQs during cache maintenance
Asm ("msr DAIFSet, #3", Volatile => True);
-- If the cache lines span outside the range, flush instead of
-- invalidate, else we could lose neighbouring data
if Tmp_Addr /= To_U64 (Start) then
DCache_Flush_Line (Tmp_Addr);
Tmp_Addr := Tmp_Addr + Cache_Line;
end if;
if Tmp_End /= End_Addr and then End_Addr > Tmp_Addr then
DCache_Flush_Line (Tmp_End);
end if;
while Tmp_Addr < Tmp_End loop
DCache_Invalidate_Line (Tmp_Addr);
Tmp_Addr := Tmp_Addr + Cache_Line;
end loop;
-- Unmask interrupts
Asm ("msr DAIFClr, #3", Volatile => True);
end Dcache_Invalidate_By_Range;
---------------------------
-- Dcache_Flush_By_Range --
---------------------------
procedure Dcache_Flush_By_Range
(Start : System.Address;
Len : System.Storage_Elements.Storage_Count)
is
Cache_Line : constant := 64;
Tmp_Addr : Unsigned_64 := To_U64 (Start);
End_Addr : constant Unsigned_64 := To_U64 (Start + Len);
begin
if Len = 0 then
return;
end if;
-- Mask IRQs/FIQs during cache maintenance
Asm ("msr DAIFSet, #3", Volatile => True);
if (Tmp_Addr and (Cache_Line - 1)) /= 0 then
-- Unaligned start address
Tmp_Addr := Tmp_Addr and (not (Cache_Line - 1));
end if;
while Tmp_Addr < End_Addr loop
DCache_Flush_Line (Tmp_Addr);
Tmp_Addr := Tmp_Addr + Cache_Line;
end loop;
-- Unmask interrupts
Asm ("msr DAIFClr, #3", Volatile => True);
end Dcache_Flush_By_Range;
end Interfaces.Cache;
|
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with System;
private package CUPS.stdarg_h is
-- arg-macro: procedure va_start __builtin_va_start(v,l)
-- __builtin_va_start(v,l)
-- arg-macro: procedure va_end __builtin_va_end(v)
-- __builtin_va_end(v)
-- arg-macro: procedure va_arg __builtin_va_arg(v,l)
-- __builtin_va_arg(v,l)
-- arg-macro: procedure va_copy __builtin_va_copy(d,s)
-- __builtin_va_copy(d,s)
-- Copyright (C) 1989-2014 Free Software Foundation, Inc.
--This file is part of GCC.
--GCC 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, or (at your option)
--any later version.
--GCC 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.
--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/>.
-- * ISO C Standard: 7.15 Variable arguments <stdarg.h>
--
-- Define __gnuc_va_list.
subtype uu_gnuc_va_list is System.Address; -- /usr/gnat/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include/stdarg.h:40
-- Define the standard macros for the user,
-- if this invocation was from the user program.
-- Define va_list, if desired, from __gnuc_va_list.
-- We deliberately do not define va_list when called from
-- stdio.h, because ANSI C says that stdio.h is not supposed to define
-- va_list. stdio.h needs to have access to that data type,
-- but must not use that name. It should use the name __gnuc_va_list,
-- which is safe because it is reserved for the implementation.
-- SVR4.2 uses _VA_LIST for an internal alias for va_list,
-- so we must avoid testing it and setting it here.
-- SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
-- have no conflict with that.
-- The macro _VA_LIST_ is the same thing used by this file in Ultrix.
-- But on BSD NET2 we must not test or define or undef it.
-- (Note that the comments in NET 2's ansi.h
-- are incorrect for _VA_LIST_--see stdio.h!)
-- The macro _VA_LIST_DEFINED is used in Windows NT 3.5
-- The macro _VA_LIST is used in SCO Unix 3.2.
-- The macro _VA_LIST_T_H is used in the Bull dpx2
-- The macro __va_list__ is used by BeOS.
end CUPS.stdarg_h;
|
package Basic_Subprogram_Calls.Child is
function Child_F1 return Integer;
procedure Child_P1;
end Basic_Subprogram_Calls.Child;
|
-- { dg-do compile }
with Discr16_G;
with Discr16_Cont; use Discr16_Cont;
procedure Discr16 is
generic
type T is (<>);
function MAX_ADD_G(X : T; I : INTEGER) return T;
function MAX_ADD_G(X : T; I : INTEGER) return T is
begin
return T'val(T'pos(X) + LONG_INTEGER(I));
end;
function MAX_ADD is new MAX_ADD_G(ES6A);
package P is new Discr16_G(ES6A, MAX_ADD);
begin
null;
end;
|
-----------------------------------------------------------------------
-- wiki-parsers -- Wiki parser
-- Copyright (C) 2011 - 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Wide_Wide_Fixed;
with Ada.Wide_Wide_Characters.Handling;
with Interfaces;
with Wiki.Parsers.Html;
with Wiki.Helpers;
with Wiki.Helpers.Parser;
with Wiki.Nodes;
package body Wiki.Parsers is
use Wiki.Helpers;
use Wiki.Nodes;
use Wiki.Strings.Wide_Wide_Builders;
-- Parse the beginning or the end of a double character sequence. This procedure
-- is instantiated for several format types (bold, italic, superscript, subscript, code).
-- Example:
-- --name-- **bold** ~~strike~~
generic
Format : Format_Type;
procedure Parse_Double_Format (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse the beginning or the end of a single character sequence. This procedure
-- is instantiated for several format types (bold, italic, superscript, subscript, code).
-- Example:
-- _name_ *bold* `code`
generic
Format : Format_Type;
procedure Parse_Single_Format (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse an italic, bold or bold + italic sequence.
-- Example:
-- ''name'' (italic)
-- '''name''' (bold)
-- '''''name''''' (bold+italic)
procedure Parse_Bold_Italic (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a line break.
-- Example:
-- \\ (Creole)
-- %%% (Dotclear)
procedure Parse_Line_Break (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Escape a single character and append it to the wiki text buffer.
procedure Parse_Escape (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a link.
-- Example:
-- [name]
-- [name|url]
-- [name|url|language]
-- [name|url|language|title]
-- [[link]]
-- [[link|name]]
-- ------------------------------
procedure Parse_Link (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a template parameter and expand it to the target buffer.
-- Example:
-- {{{1}}} MediaWiki
-- <<<1>>> Creole extension
procedure Expand_Parameter (P : in out Parser;
Into : in out Wiki.Strings.BString);
-- Parse a template parameter and expand it.
-- Example:
-- {{{1}}} MediaWiki
procedure Parse_Parameter (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a template with parameters.
-- Example:
-- {{Name|param|...}} MediaWiki
-- {{Name|param=value|...}} MediaWiki
-- <<Name param=value ...>> Creole
-- [{Name param=value ...}] JSPWiki
procedure Parse_Template (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a space and take necessary formatting actions.
-- Example:
-- item1 item2 => add space in text buffer
-- ' * item' => start a bullet list (Google)
-- ' # item' => start an ordered list (Google)
-- ' item' => preformatted text (Google, Creole)
procedure Parse_Space (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a wiki heading. The heading could start with '=' or '!'.
-- The trailing equals are ignored.
-- Example:
-- == Level 2 ==
-- !!! Level 3
procedure Parse_Header (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse an image.
-- Example:
-- ((url|alt text))
-- ((url|alt text|position))
-- ((url|alt text|position||description))
procedure Parse_Image (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse an image or a pre-formatted section.
-- Example:
-- {{url|alt text}}
-- {{{text}}}
-- {{{
-- pre-formatted
-- }}}
procedure Parse_Creole_Image_Or_Preformatted (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a markdown image.
-- Example:
-- 
procedure Parse_Markdown_Image (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_Markdown_Link (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_Markdown_Escape (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse an italic or bold sequence or a list.
-- Example:
-- *name* (italic)
-- **name** (bold)
-- * item (list)
procedure Parse_Markdown_Bold_Italic (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a markdown table/column.
-- Example:
-- | col1 | col2 | ... | colN |
procedure Parse_Markdown_Table (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_Markdown_Horizontal_Rule (P : in out Parser;
Token : in Wiki.Strings.WChar);
pragma Unreferenced (Parse_Markdown_Horizontal_Rule);
-- Parse a quote.
-- Example:
-- {{name}}
-- {{name|language}}
-- {{name|language|url}}
procedure Parse_Quote (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a horizontal rule.
-- Example:
-- ----
procedure Parse_Horizontal_Rule (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_End_Line (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_Preformatted (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_Preformatted_Block (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a blockquote.
-- Example:
-- >>>quote level 3
-- >>quote level 2
-- >quote level 1
procedure Parse_Blockquote (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_List (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Parse_List_Or_Bold (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a HTML component.
-- Example:
-- <b> or </b>
procedure Parse_Maybe_Html (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a list definition:
-- ;item 1
-- : definition 1
procedure Parse_Item (P : in out Parser;
Token : in Wiki.Strings.WChar);
-- Parse a list definition:
-- ;item 1
-- : definition 1
procedure Parse_Definition (P : in out Parser;
Token : in Wiki.Strings.WChar);
procedure Toggle_Format (P : in out Parser;
Format : in Format_Type);
-- ------------------------------
-- Peek the next character from the wiki text buffer.
-- ------------------------------
procedure Peek (P : in out Parser'Class;
Token : out Wiki.Strings.WChar) is
begin
if not P.Has_Pending then
-- Get the next character.
P.Reader.Read (Token, P.Is_Eof);
if P.Is_Eof then
-- Return a \n on end of file (this simplifies the implementation).
Token := LF;
P.Pending := LF;
P.Has_Pending := True;
end if;
else
-- Return the pending character.
Token := P.Pending;
if not P.Is_Eof then
P.Has_Pending := False;
end if;
end if;
end Peek;
-- ------------------------------
-- Put back the character so that it will be returned by the next call to Peek.
-- ------------------------------
procedure Put_Back (P : in out Parser;
Token : in Wiki.Strings.WChar) is
begin
P.Pending := Token;
P.Has_Pending := True;
end Put_Back;
-- ------------------------------
-- Flush the wiki text that was collected in the text buffer.
-- ------------------------------
procedure Flush_Text (P : in out Parser) is
procedure Add_Text (Content : in Wiki.Strings.WString);
procedure Add_Text (Content : in Wiki.Strings.WString) is
begin
P.Context.Filters.Add_Text (P.Document, Content, P.Format);
end Add_Text;
pragma Inline (Add_Text);
procedure Add_Text is
new Wiki.Strings.Wide_Wide_Builders.Get (Add_Text);
pragma Inline (Add_Text);
begin
if Length (P.Text) > 0 then
if P.Previous_Tag /= UNKNOWN_TAG and then No_End_Tag (P.Previous_Tag) then
if not P.Context.Is_Hidden then
P.Context.Filters.Pop_Node (P.Document, P.Previous_Tag);
end if;
P.Previous_Tag := UNKNOWN_TAG;
end if;
if not P.Context.Is_Hidden then
Add_Text (P.Text);
end if;
Clear (P.Text);
end if;
end Flush_Text;
-- ------------------------------
-- Flush the wiki dl/dt/dd definition list.
-- ------------------------------
procedure Flush_List (P : in out Parser) is
begin
if P.In_List then
if not P.Context.Is_Hidden then
P.Context.Filters.Pop_Node (P.Document, Wiki.DL_TAG);
end if;
P.In_List := False;
end if;
end Flush_List;
-- ------------------------------
-- Skip white spaces and tabs.
-- ------------------------------
procedure Skip_Spaces (P : in out Parser) is
C : Wiki.Strings.WChar;
begin
while not P.Is_Eof loop
Peek (P, C);
if not Wiki.Helpers.Is_Space_Or_Newline (C) then
Put_Back (P, C);
return;
end if;
end loop;
end Skip_Spaces;
-- ------------------------------
-- Append a character to the wiki text buffer.
-- ------------------------------
procedure Parse_Text (P : in out Parser;
Token : in Wiki.Strings.WChar) is
begin
if Token /= CR then
Append (P.Text, Token);
end if;
P.Empty_Line := False;
end Parse_Text;
-- ------------------------------
-- Escape a single character and append it to the wiki text buffer.
-- ------------------------------
procedure Parse_Escape (P : in out Parser;
Token : in Wiki.Strings.WChar) is
pragma Unreferenced (Token);
C : Wiki.Strings.WChar;
begin
if not P.Is_Eof then
Peek (P, C);
if C /= CR and C /= LF then
Append (P.Text, C);
else
Put_Back (P, C);
end if;
end if;
end Parse_Escape;
-- ------------------------------
-- Skip all the spaces and tabs as well as end of the current line (CR+LF).
-- ------------------------------
procedure Skip_End_Of_Line (P : in out Parser) is
C : Wiki.Strings.WChar;
begin
loop
Peek (P, C);
exit when C /= ' ' and C /= HT;
end loop;
if C = CR then
Peek (P, C);
if C /= LF then
Put_Back (P, C);
end if;
elsif C = LF then
Peek (P, C);
if C /= CR then
Put_Back (P, C);
end if;
end if;
end Skip_End_Of_Line;
-- ------------------------------
-- Parse a wiki heading. The heading could start with '=' or '!'.
-- The trailing equals are ignored.
-- Example:
-- == Level 2 ==
-- !!! Level 3
-- ------------------------------
procedure Parse_Header (P : in out Parser;
Token : in Wiki.Strings.WChar) is
procedure Add_Header (Content : in Wiki.Strings.WString);
C : Wiki.Strings.WChar;
Level : Integer := 1;
procedure Add_Header (Content : in Wiki.Strings.WString) is
Last : Natural := Content'Last;
Ignore_Token : Boolean := True;
Seen_Token : Boolean := False;
begin
-- Remove the spaces and '=' at end of header string.
while Last > Content'First loop
if Content (Last) = Token then
exit when not Ignore_Token;
Seen_Token := True;
elsif Content (Last) = ' ' or Content (Last) = HT then
Ignore_Token := not Seen_Token;
else
exit;
end if;
Last := Last - 1;
end loop;
P.Context.Filters.Add_Header (P.Document, Content (Content'First .. Last), Level);
end Add_Header;
procedure Add_Header is
new Wiki.Strings.Wide_Wide_Builders.Get (Add_Header);
begin
if not P.Empty_Line then
Parse_Text (P, Token);
return;
end if;
while Level <= 6 loop
Peek (P, C);
exit when C /= Token;
Level := Level + 1;
end loop;
-- Ignore spaces after '=' signs
while C = ' ' or C = HT loop
Peek (P, C);
end loop;
Flush_Text (P);
Flush_List (P);
loop
Append (P.Text, C);
Peek (P, C);
exit when C = LF or C = CR;
end loop;
-- dotclear header is the opposite of Creole for the level.
Level := Level + P.Header_Offset;
if Level < 0 then
Level := -Level;
end if;
if Level = 0 then
Level := 1;
end if;
if not P.Context.Is_Hidden then
Add_Header (P.Text);
end if;
P.Empty_Line := True;
P.In_Paragraph := False;
Clear (P.Text);
end Parse_Header;
-- ------------------------------
-- Check if the link refers to an image and must be rendered as an image.
-- Returns a positive index of the start the the image link.
-- ------------------------------
function Is_Image (P : in Parser;
Link : in Wide_Wide_String) return Natural is
Pos : Natural;
begin
if not P.Check_Image_Link then
return 0;
elsif Wiki.Helpers.Is_Url (Link) then
Pos := Ada.Strings.Wide_Wide_Fixed.Index (Link, ".", Ada.Strings.Backward);
if Pos = 0 then
return 0;
elsif Wiki.Helpers.Is_Image_Extension (Link (Pos .. Link'Last)) then
return Link'First;
else
return 0;
end if;
elsif Link'Length <= 5 then
return 0;
elsif Link (Link'First .. Link'First + 5) = "Image:" then
return Link'First + 6;
elsif Link (Link'First .. Link'First + 4) /= "File:" and
Link (Link'First .. Link'First + 5) /= "Image:"
then
return 0;
else
Pos := Ada.Strings.Wide_Wide_Fixed.Index (Link, ".", Ada.Strings.Backward);
if Pos = 0 then
return 0;
elsif Wiki.Helpers.Is_Image_Extension (Link (Pos .. Link'Last)) then
return Link'First;
else
return 0;
end if;
end if;
end Is_Image;
-- ------------------------------
-- Parse a template parameter and expand it to the target buffer.
-- Example:
-- {{{1}}} MediaWiki
-- <<<1>>> Creole extension
-- ------------------------------
procedure Expand_Parameter (P : in out Parser;
Into : in out Wiki.Strings.BString) is
procedure Expand (Content : in Wiki.Strings.WString);
C : Wiki.Strings.WChar;
Expect : Wiki.Strings.WChar;
Param : Wiki.Strings.BString (256);
procedure Expand (Content : in Wiki.Strings.WString) is
Name : constant String := Wiki.Strings.To_String (Content);
Pos : constant Attributes.Cursor := Wiki.Attributes.Find (P.Context.Variables, Name);
begin
if Wiki.Attributes.Has_Element (Pos) then
Append (Into, Wiki.Attributes.Get_Wide_Value (Pos));
else
Append (Into, P.Param_Char);
Append (Into, P.Param_Char);
Append (Into, P.Param_Char);
Append (Into, Content);
Append (Into, Expect);
Append (Into, Expect);
Append (Into, Expect);
end if;
end Expand;
procedure Expand is
new Wiki.Strings.Wide_Wide_Builders.Get (Expand);
begin
Peek (P, C);
if C /= P.Param_Char then
Append (Into, P.Param_Char);
Put_Back (P, C);
return;
end if;
Peek (P, C);
if C /= P.Param_Char then
Append (Into, P.Param_Char);
Append (Into, P.Param_Char);
Put_Back (P, C);
return;
end if;
if P.Param_Char = '{' then
Expect := '}';
else
Expect := '>';
end if;
-- Collect the parameter name or index until we find the end marker.
loop
Peek (P, C);
exit when P.Is_Eof;
if C = Expect then
Peek (P, C);
if C = Expect then
Peek (P, C);
exit when C = Expect;
Append (Param, Expect);
end if;
Append (Param, C);
else
Append (Param, C);
end if;
end loop;
-- Expand the result.
Expand (Param);
end Expand_Parameter;
-- ------------------------------
-- Extract a list of parameters separated by the given separator (ex: '|').
-- ------------------------------
procedure Parse_Parameters (P : in out Parser;
Separator : in Wiki.Strings.WChar;
Terminator : in Wiki.Strings.WChar;
Names : in String_Array;
Max : in Positive := 200) is
procedure Add_Parameter (Content : in Wiki.Strings.WString);
Index : Positive := 1;
procedure Add_Parameter (Content : in Wiki.Strings.WString) is
Last : Natural := Content'Last;
begin
while Last >= Content'First and then Wiki.Helpers.Is_Space (Content (Last)) loop
Last := Last - 1;
end loop;
if Index <= Names'Last then
Wiki.Attributes.Append (P.Attributes, Names (Index).all,
Content (Content'First .. Last));
else
declare
Name : constant String := Positive'Image (Index - Names'Length);
begin
Wiki.Attributes.Append (P.Attributes, Name (Name'First + 1 .. Name'Last),
Content (Content'First .. Last));
end;
end if;
Index := Index + 1;
end Add_Parameter;
procedure Add_Attribute is
new Wiki.Strings.Wide_Wide_Builders.Get (Add_Parameter);
C : Wiki.Strings.WChar;
Text : Wiki.Strings.BString (256);
begin
Wiki.Attributes.Clear (P.Attributes);
loop
Peek (P, C);
if C = P.Escape_Char then
Peek (P, C);
Append (Text, C);
elsif C = Separator and Index <= Max then
Add_Attribute (Text);
Clear (Text);
elsif C = P.Param_Char then
Expand_Parameter (P, Text);
elsif C = Terminator or P.Is_Eof then
Add_Attribute (Text);
return;
elsif Length (Text) > 0 or not Wiki.Helpers.Is_Space (C) then
Append (Text, C);
end if;
end loop;
end Parse_Parameters;
NAME_ATTR : aliased constant String := "name";
HREF_ATTR : aliased constant String := "href";
LANG_ATTR : aliased constant String := "lang";
TITLE_ATTR : aliased constant String := "title";
Attr_Names_Title_First : constant String_Array (1 .. 4)
:= (NAME_ATTR'Access, HREF_ATTR'Access, LANG_ATTR'Access, TITLE_ATTR'Access);
Attr_Names_Link_First : constant String_Array (1 .. 4)
:= (HREF_ATTR'Access, NAME_ATTR'Access, LANG_ATTR'Access, TITLE_ATTR'Access);
Attr_Name : constant String_Array (1 .. 1)
:= (1 => NAME_ATTR'Access);
-- ------------------------------
-- Parse a link.
-- Example:
-- [name]
-- [url]
-- [name|url]
-- [name|url|language]
-- [name|url|language|title]
-- MediaWiki
-- [[link]]
-- [[link|name]]
-- [[link|mode|size|center|alt]]
-- [http://...]
-- [http://... title]
-- ------------------------------
procedure Parse_Link (P : in out Parser;
Token : in Wiki.Strings.WChar) is
procedure Add_Mediawiki_Image (Link : in Wiki.Strings.WString);
-- ------------------------------
-- Extract MediaWiki image attribute and normalize them for the renderer.
-- Attributes: alt, src, align, frame
-- border,frameless,thumb,thumbnail
-- left,right,center,none
-- baseline,sup,super,top,text-top,middle,bottom,text-bottom
-- <width>px, x<height>px, <width>x<height>px
-- ------------------------------
procedure Add_Mediawiki_Image (Link : in Wiki.Strings.WString) is
procedure Collect_Attribute (Name : in String;
Value : in Wiki.Strings.WString);
Len : constant Natural := Wiki.Attributes.Length (P.Attributes);
Pos : Natural := 0;
Attr : Wiki.Attributes.Attribute_List;
procedure Collect_Attribute (Name : in String;
Value : in Wiki.Strings.WString) is
pragma Unreferenced (Name);
begin
Pos := Pos + 1;
if Pos = 1 then
return;
end if;
if Value = "border" or Value = "frameless" or Value = "thumb"
or Value = "thumbnail"
then
Wiki.Attributes.Append (Attr, String '("frame"), Value);
elsif Value = "left" or Value = "right" or Value = "center" or Value = "none" then
Wiki.Attributes.Append (Attr, String '("align"), Value);
elsif Value = "baseline" or Value = "sup" or Value = "super" or Value = "top"
or Value = "text-top" or Value = "middle" or Value = "bottom"
or Value = "text-bottom"
then
Wiki.Attributes.Append (Attr, String '("valign"), Value);
elsif Value'Length > 3 and then Value (Value'Last - 1 .. Value'Last) = "px" then
Wiki.Attributes.Append (Attr, String '("size"), Value);
else
Wiki.Attributes.Append (Attr, String '("alt"), Value);
if Pos = Len then
P.Context.Filters.Add_Image (P.Document, Value, Attr);
end if;
return;
end if;
if Pos = Len then
P.Context.Filters.Add_Image (P.Document, Link, Attr);
end if;
end Collect_Attribute;
begin
Wiki.Attributes.Append (Attr, String '("src"), Link);
Wiki.Attributes.Iterate (P.Attributes, Collect_Attribute'Access);
end Add_Mediawiki_Image;
C : Wiki.Strings.WChar;
Separator : Wiki.Strings.WChar := '|';
Double_Bracket : Boolean := P.Link_Double_Bracket;
Max_Count : Positive := 200;
begin
-- If links have the form '[[link]]', check the second bracket.
if Double_Bracket then
Peek (P, C);
if C /= Token then
if P.Context.Syntax /= SYNTAX_MEDIA_WIKI and C /= 'h' then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Put_Back (P, C);
Separator := ' ';
Double_Bracket := False;
Max_Count := 1;
end if;
end if;
if P.Link_No_Space then
Peek (P, C);
if C = ' ' then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Put_Back (P, C);
end if;
Flush_Text (P);
Wiki.Attributes.Clear (P.Attributes);
if P.Link_Title_First then
Parse_Parameters (P, Separator, ']', Attr_Names_Title_First, Max_Count);
else
Parse_Parameters (P, Separator, ']', Attr_Names_Link_First, Max_Count);
end if;
if Double_Bracket then
Peek (P, C);
if C /= ']' then
Put_Back (P, C);
end if;
end if;
P.Empty_Line := False;
if not P.Context.Is_Hidden then
declare
Link : constant Strings.WString := Attributes.Get_Attribute (P.Attributes, HREF_ATTR);
Name : constant Strings.WString := Attributes.Get_Attribute (P.Attributes, NAME_ATTR);
Pos : constant Natural := P.Is_Image (Link);
begin
if Pos > 0 then
Add_Mediawiki_Image (Link (Pos .. Link'Last));
else
if P.Link_Title_First and Link'Length = 0 then
Wiki.Attributes.Append (P.Attributes, HREF_ATTR, Name);
end if;
if not P.Link_Title_First and Name'Length = 0 then
P.Context.Filters.Add_Link (P.Document, Link, P.Attributes);
else
P.Context.Filters.Add_Link (P.Document, Name, P.Attributes);
end if;
end if;
end;
end if;
Peek (P, C);
if not P.Is_Eof then
if C = CR or C = LF then
Append (P.Text, C);
end if;
Put_Back (P, C);
end if;
end Parse_Link;
-- ------------------------------
-- Parse a markdown link.
-- Example:
-- [title](url)
-- ------------------------------
procedure Parse_Markdown_Link (P : in out Parser;
Token : in Wiki.Strings.WChar) is
pragma Unreferenced (Token);
-- Parse a title/link component
procedure Parse_Link_Token (Into : in out Wiki.Strings.UString;
Marker : in Wiki.Strings.WChar);
Link : Wiki.Strings.UString;
Title : Wiki.Strings.UString;
C : Wiki.Strings.WChar;
procedure Parse_Link_Token (Into : in out Wiki.Strings.UString;
Marker : in Wiki.Strings.WChar) is
begin
loop
Peek (P, C);
if C = P.Escape_Char then
Peek (P, C);
else
exit when C = LF or C = CR or C = Marker;
end if;
Wiki.Strings.Append (Into, C);
end loop;
end Parse_Link_Token;
begin
Parse_Link_Token (Title, ']');
Peek (P, C);
if C /= '(' then
Append (P.Text, '[');
Append (P.Text, Wiki.Strings.To_WString (Title));
Append (P.Text, ']');
Put_Back (P, C);
return;
end if;
Parse_Link_Token (Link, ')');
Flush_Text (P);
if not P.Context.Is_Hidden then
Wiki.Attributes.Clear (P.Attributes);
Wiki.Attributes.Append (P.Attributes, HREF_ATTR, Link);
P.Context.Filters.Add_Link (P.Document, Wiki.Strings.To_WString (Title),
P.Attributes);
end if;
P.Empty_Line := False;
end Parse_Markdown_Link;
-- ------------------------------
-- Parse a line break or escape character for Markdown.
-- Example:
-- \
-- \`
-- ------------------------------
procedure Parse_Markdown_Escape (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
Peek (P, C);
case C is
when LF | CR =>
P.Empty_Line := True;
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_LINE_BREAK);
end if;
when '\' | '`' | '*' | '_' | '{' | '}'
| '[' | ']' | '(' | ')' | '#' | '+'
| '-' | '.' | '!' | '^' =>
Parse_Text (P, C);
when others =>
Parse_Text (P, Token);
Put_Back (P, C);
end case;
end Parse_Markdown_Escape;
-- ------------------------------
-- Parse an italic or bold sequence or a list.
-- Example:
-- *name* (italic)
-- **name** (bold)
-- * item (list)
-- ------------------------------
procedure Parse_Markdown_Bold_Italic (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
Peek (P, C);
if Token = '*' and P.Empty_Line and C = ' ' then
Put_Back (P, C);
Parse_List (P, Token);
return;
end if;
if C = Token then
Toggle_Format (P, BOLD);
else
Toggle_Format (P, ITALIC);
Put_Back (P, C);
end if;
end Parse_Markdown_Bold_Italic;
-- ------------------------------
-- Parse a horizontal rule or a list.
-- Example:
-- --- (horizontal rule)
-- - (list)
-- ------------------------------
procedure Parse_Markdown_Horizontal_Rule (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Count : Natural := 1;
begin
loop
Peek (P, C);
exit when C /= Token;
Count := Count + 1;
end loop;
if Count >= 4 then
Flush_Text (P);
Flush_List (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_HORIZONTAL_RULE);
end if;
if C /= LF and C /= CR then
Put_Back (P, C);
end if;
elsif P.Is_Dotclear and Count = 2 then
Toggle_Format (P, STRIKEOUT);
Put_Back (P, C);
else
for I in 1 .. Count loop
Append (P.Text, Token);
end loop;
Put_Back (P, C);
end if;
end Parse_Markdown_Horizontal_Rule;
-- Parse a markdown table/column.
-- Example:
-- | col1 | col2 | ... | colN |
procedure Parse_Markdown_Table (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
if not P.In_Table then
if not P.Empty_Line then
P.Parse_Text (Token);
return;
end if;
P.In_Table := True;
P.Context.Filters.Add_Row (P.Document);
Wiki.Attributes.Clear (P.Attributes);
P.Context.Filters.Add_Column (P.Document, P.Attributes);
return;
end if;
Flush_Text (P);
Flush_List (P);
Peek (P, C);
if C = CR or C = LF then
Put_Back (P, C);
return;
end if;
if P.Empty_Line then
P.Context.Filters.Add_Row (P.Document);
end if;
Wiki.Attributes.Clear (P.Attributes);
P.Context.Filters.Add_Column (P.Document, P.Attributes);
end Parse_Markdown_Table;
-- ------------------------------
-- Returns true if we are included from another wiki content.
-- ------------------------------
function Is_Included (P : in Parser) return Boolean is
begin
return P.Context.Is_Included;
end Is_Included;
-- ------------------------------
-- Find the plugin with the given name.
-- Returns null if there is no such plugin.
-- ------------------------------
function Find (P : in Parser;
Name : in Wiki.Strings.WString) return Wiki.Plugins.Wiki_Plugin_Access is
use type Wiki.Plugins.Plugin_Factory_Access;
begin
if P.Context.Factory = null then
return null;
else
return P.Context.Factory.Find (Wiki.Strings.To_String (Name));
end if;
end Find;
-- ------------------------------
-- Parse a template parameter and expand it.
-- Example:
-- {{{1}}} MediaWiki
-- ------------------------------
procedure Parse_Parameter (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Expect : Wiki.Strings.WChar;
Pos : Wiki.Attributes.Cursor;
begin
if Token = '{' then
Expect := '}';
else
Expect := '>';
end if;
Parse_Parameters (P, '|', Expect, Attr_Name);
Peek (P, C);
if C = Expect then
Peek (P, C);
if C /= Expect then
Put_Back (P, C);
end if;
else
Put_Back (P, C);
end if;
if not P.Context.Is_Hidden then
declare
Name : constant String := Attributes.Get_Value (Wiki.Attributes.First (P.Attributes));
begin
Pos := Wiki.Attributes.Find (P.Context.Variables, Name);
if Wiki.Attributes.Has_Element (Pos) then
Append (P.Text, Wiki.Attributes.Get_Wide_Value (Pos));
end if;
end;
end if;
end Parse_Parameter;
-- ------------------------------
-- Parse a template with parameters.
-- Example:
-- {{Name|param|...}} MediaWiki
-- {{Name|param=value|...}} MediaWiki
-- <<Name param=value ...>> Creole
-- [{Name param=value ...}] JSPWiki
-- ------------------------------
procedure Parse_Template (P : in out Parser;
Token : in Wiki.Strings.WChar) is
use type Wiki.Plugins.Wiki_Plugin_Access;
C : Wiki.Strings.WChar;
Expect : Wiki.Strings.WChar;
begin
Peek (P, C);
if C /= Token then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Peek (P, C);
if C = Token then
Parse_Parameter (P, Token);
return;
end if;
Flush_Text (P);
Put_Back (P, C);
if Token = '{' then
Expect := '}';
else
Expect := '>';
end if;
Wiki.Attributes.Clear (P.Attributes);
if P.Context.Syntax = SYNTAX_MEDIA_WIKI then
Parse_Parameters (P, '|', Expect, Attr_Name);
else
Parse_Parameters (P, ' ', Expect, Attr_Name);
end if;
Peek (P, C);
if C /= Expect then
Put_Back (P, C);
end if;
P.Empty_Line := False;
declare
use type Wiki.Strings.UString;
Name : constant Strings.WString := Attributes.Get_Attribute (P.Attributes, NAME_ATTR);
Plugin : constant Wiki.Plugins.Wiki_Plugin_Access := P.Find (Name);
Context : Wiki.Plugins.Plugin_Context;
Ctx : access Wiki.Plugins.Plugin_Context;
begin
if Plugin /= null then
-- Check that we are not including the template recursively.
Ctx := P.Context'Access;
while Ctx /= null loop
if Ctx.Ident = Name then
Append (P.Text, "Recursive call to ");
Append (P.Text, Name);
return;
end if;
Ctx := Ctx.Previous;
end loop;
Context.Previous := P.Context'Unchecked_Access;
Context.Factory := P.Context.Factory;
Context.Syntax := P.Context.Syntax;
Context.Variables := P.Attributes;
Context.Is_Included := True;
Context.Ident := Wiki.Strings.To_UString (Name);
Context.Filters.Set_Chain (P.Context.Filters);
Plugin.Expand (P.Document, P.Attributes, Context);
end if;
end;
end Parse_Template;
-- ------------------------------
-- Parse a quote.
-- Example:
-- {{name}}
-- {{name|language}}
-- {{name|language|url}}
-- ------------------------------
procedure Parse_Quote (P : in out Parser;
Token : in Wiki.Strings.WChar) is
-- Parse a quote component
procedure Parse_Quote_Token (Into : in out Wiki.Strings.UString);
Link : Wiki.Strings.UString;
Quote : Wiki.Strings.UString;
Language : Wiki.Strings.UString;
C : Wiki.Strings.WChar;
procedure Parse_Quote_Token (Into : in out Wiki.Strings.UString) is
begin
loop
Peek (P, C);
if C = P.Escape_Char then
Peek (P, C);
else
exit when C = LF or C = CR or C = '}' or C = '|';
end if;
Wiki.Strings.Append (Into, C);
end loop;
end Parse_Quote_Token;
begin
Peek (P, C);
if C /= Token then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Parse_Quote_Token (Quote);
if C = '|' then
Parse_Quote_Token (Language);
if C = '|' then
Parse_Quote_Token (Link);
end if;
end if;
if C /= '}' then
Put_Back (P, C);
end if;
Flush_Text (P);
if not P.Context.Is_Hidden then
Wiki.Attributes.Clear (P.Attributes);
Wiki.Attributes.Append (P.Attributes, "cite", Link);
Wiki.Attributes.Append (P.Attributes, "lang", Language);
P.Context.Filters.Add_Quote (P.Document, Wiki.Strings.To_WString (Quote), P.Attributes);
end if;
Peek (P, C);
if C /= '}' then
Put_Back (P, C);
end if;
end Parse_Quote;
-- ------------------------------
-- Parse a horizontal rule.
-- Example:
-- ---- (dotclear)
-- ------------------------------
procedure Parse_Horizontal_Rule (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Count : Natural := 1;
begin
loop
Peek (P, C);
exit when C /= Token;
Count := Count + 1;
end loop;
if Count >= 4 then
Flush_Text (P);
Flush_List (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_HORIZONTAL_RULE);
end if;
if C /= LF and C /= CR then
Put_Back (P, C);
end if;
elsif P.Is_Dotclear and Count = 2 then
Toggle_Format (P, STRIKEOUT);
Put_Back (P, C);
else
for I in 1 .. Count loop
Append (P.Text, Token);
end loop;
Put_Back (P, C);
end if;
end Parse_Horizontal_Rule;
-- ------------------------------
-- Parse an image.
-- Example:
-- ((url|alt text))
-- ((url|alt text|position))
-- ((url|alt text|position||description))
-- ------------------------------
procedure Parse_Image (P : in out Parser;
Token : in Wiki.Strings.WChar) is
-- Parse a image component
procedure Parse_Image_Token (Into : in out Wiki.Strings.UString);
use type Wiki.Strings.UString;
Link : Wiki.Strings.UString;
Alt : Wiki.Strings.UString;
Position : Wiki.Strings.UString;
Desc : Wiki.Strings.UString;
C : Wiki.Strings.WChar;
procedure Parse_Image_Token (Into : in out Wiki.Strings.UString) is
begin
loop
Peek (P, C);
if C = P.Escape_Char then
Peek (P, C);
else
exit when C = LF or C = CR or C = ')' or C = '|';
end if;
Wiki.Strings.Append (Into, C);
end loop;
end Parse_Image_Token;
begin
Peek (P, C);
if C /= Token then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Parse_Image_Token (Link);
if C = '|' then
Parse_Image_Token (Alt);
if C = '|' then
Parse_Image_Token (Position);
if C = '|' then
Parse_Image_Token (Desc);
end if;
end if;
end if;
if C /= ')' then
Put_Back (P, C);
end if;
Flush_Text (P);
if not P.Context.Is_Hidden then
Wiki.Attributes.Clear (P.Attributes);
Wiki.Attributes.Append (P.Attributes, "src", Link);
if Position = "L" or Position = "G" then
Wiki.Attributes.Append (P.Attributes, String '("align"), "left");
elsif Position = "R" or Position = "D" then
Wiki.Attributes.Append (P.Attributes, String '("align"), "right");
elsif Position = "C" then
Wiki.Attributes.Append (P.Attributes, String '("align"), "center");
end if;
Wiki.Attributes.Append (P.Attributes, "longdesc", Desc);
P.Context.Filters.Add_Image (P.Document, Wiki.Strings.To_WString (Alt), P.Attributes);
end if;
Peek (P, C);
if C /= ')' then
Put_Back (P, C);
end if;
end Parse_Image;
-- ------------------------------
-- Parse an image or a pre-formatted section.
-- Example:
-- {{url|alt text}}
-- {{{text}}}
-- {{{
-- pre-formatted
-- }}}
-- ------------------------------
procedure Parse_Creole_Image_Or_Preformatted (P : in out Parser;
Token : in Wiki.Strings.WChar) is
-- Parse a image component
procedure Parse_Image_Token (Into : in out Wiki.Strings.UString);
Link : Wiki.Strings.UString;
Alt : Wiki.Strings.UString;
C : Wiki.Strings.WChar;
procedure Parse_Image_Token (Into : in out Wiki.Strings.UString) is
begin
loop
Peek (P, C);
if C = P.Escape_Char then
Peek (P, C);
else
exit when C = LF or C = CR or C = '}' or C = '|';
end if;
Wiki.Strings.Append (Into, C);
end loop;
end Parse_Image_Token;
begin
Peek (P, C);
if C /= Token then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Peek (P, C);
if C = Token then
Peek (P, C);
if C /= LF and C /= CR then
Put_Back (P, C);
P.Format (CODE) := True;
return;
end if;
Put_Back (P, C);
Parse_Preformatted_Block (P, Token);
return;
end if;
Put_Back (P, C);
Parse_Image_Token (Link);
if C = '|' then
Parse_Image_Token (Alt);
end if;
if C /= '}' then
Put_Back (P, C);
end if;
Flush_Text (P);
if not P.Context.Is_Hidden then
Wiki.Attributes.Clear (P.Attributes);
Wiki.Attributes.Append (P.Attributes, "src", Link);
P.Context.Filters.Add_Image (P.Document, Wiki.Strings.To_WString (Alt), P.Attributes);
end if;
Peek (P, C);
if C /= '}' then
Put_Back (P, C);
end if;
end Parse_Creole_Image_Or_Preformatted;
-- ------------------------------
-- Parse a markdown image.
-- Example:
-- 
-- ------------------------------
procedure Parse_Markdown_Image (P : in out Parser;
Token : in Wiki.Strings.WChar) is
-- Parse a image component
procedure Parse_Image_Token (Into : in out Wiki.Strings.UString;
Marker : in Wiki.Strings.WChar);
Link : Wiki.Strings.UString;
Title : Wiki.Strings.UString;
C : Wiki.Strings.WChar;
procedure Parse_Image_Token (Into : in out Wiki.Strings.UString;
Marker : in Wiki.Strings.WChar) is
begin
loop
Peek (P, C);
if C = P.Escape_Char then
Peek (P, C);
else
exit when C = LF or C = CR or C = Marker;
end if;
Wiki.Strings.Append (Into, C);
end loop;
end Parse_Image_Token;
begin
Peek (P, C);
if C /= '[' then
Append (P.Text, Token);
Put_Back (P, C);
return;
end if;
Parse_Image_Token (Title, ']');
Peek (P, C);
if C = '(' then
Parse_Image_Token (Link, ')');
end if;
Flush_Text (P);
if not P.Context.Is_Hidden then
Wiki.Attributes.Clear (P.Attributes);
Wiki.Attributes.Append (P.Attributes, "src", Link);
P.Context.Filters.Add_Image (P.Document, Wiki.Strings.To_WString (Title),
P.Attributes);
end if;
end Parse_Markdown_Image;
procedure Toggle_Format (P : in out Parser;
Format : in Format_Type) is
begin
Flush_Text (P);
P.Format (Format) := not P.Format (Format);
end Toggle_Format;
-- ------------------------------
-- Parse the beginning or the end of a single character sequence. This procedure
-- is instantiated for several format types (bold, italic, superscript, subscript, code).
-- Example:
-- _name_ *bold* `code`
-- ------------------------------
procedure Parse_Single_Format (P : in out Parser;
Token : in Wiki.Strings.WChar) is
pragma Unreferenced (Token);
begin
Toggle_Format (P, Format);
end Parse_Single_Format;
procedure Parse_Single_Italic is new Parse_Single_Format (ITALIC);
procedure Parse_Single_Bold is new Parse_Single_Format (BOLD);
procedure Parse_Single_Code is new Parse_Single_Format (CODE);
procedure Parse_Single_Superscript is new Parse_Single_Format (SUPERSCRIPT);
-- procedure Parse_Single_Subscript is new Parse_Single_Format (SUBSCRIPT);
-- procedure Parse_Single_Strikeout is new Parse_Single_Format (STRIKEOUT);
-- ------------------------------
-- Parse the beginning or the end of a double character sequence. This procedure
-- is instantiated for several format types (bold, italic, superscript, subscript, code).
-- Example:
-- --name-- **bold** ~~strike~~
-- ------------------------------
procedure Parse_Double_Format (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
Peek (P, C);
if C = Token then
Toggle_Format (P, Format);
else
Parse_Text (P, Token);
Put_Back (P, C);
end if;
end Parse_Double_Format;
procedure Parse_Double_Italic is new Parse_Double_Format (ITALIC);
procedure Parse_Double_Bold is new Parse_Double_Format (BOLD);
procedure Parse_Double_Code is new Parse_Double_Format (CODE);
-- procedure Parse_Double_Superscript is new Parse_Double_Format (SUPERSCRIPT);
procedure Parse_Double_Subscript is new Parse_Double_Format (SUBSCRIPT);
procedure Parse_Double_Superscript is new Parse_Double_Format (SUPERSCRIPT);
procedure Parse_Double_Strikeout is new Parse_Double_Format (STRIKEOUT);
-- ------------------------------
-- Parse an italic, bold or bold + italic sequence.
-- Example:
-- ''name'' (italic)
-- '''name''' (bold)
-- '''''name''''' (bold+italic)
-- ------------------------------
procedure Parse_Bold_Italic (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Count : Natural := 1;
begin
loop
Peek (P, C);
exit when C /= Token;
Count := Count + 1;
end loop;
if Count > 10 then
Count := Count mod 10;
if Count = 0 then
Put_Back (P, C);
return;
end if;
end if;
case Count is
when 1 =>
Parse_Text (P, Token);
when 2 =>
Toggle_Format (P, ITALIC);
when 3 =>
Toggle_Format (P, BOLD);
when 4 =>
Toggle_Format (P, BOLD);
Parse_Text (P, Token);
when 5 =>
Toggle_Format (P, BOLD);
Toggle_Format (P, ITALIC);
when others =>
null;
end case;
Put_Back (P, C);
end Parse_Bold_Italic;
-- ------------------------------
-- Parse a pre-formatted text which starts either by a space or by a sequence
-- of characters. Example:
-- {{{
-- pre-formatted
-- }}}
-- ' pre-formattted'
-- ------------------------------
procedure Parse_Preformatted (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
if Token /= ' ' then
Peek (P, C);
if C /= Token then
if Token = '`' then
Parse_Single_Code (P, Token);
else
Parse_Text (P, Token);
end if;
Put_Back (P, C);
return;
end if;
Peek (P, C);
if C /= Token then
Parse_Text (P, Token);
Parse_Text (P, Token);
Put_Back (P, C);
return;
end if;
Peek (P, C);
if Token = '{' then
if C /= LF and C /= CR then
Put_Back (P, C);
Flush_Text (P);
P.Format (CODE) := True;
return;
end if;
Put_Back (P, C);
elsif Token = '}' then
Put_Back (P, C);
Flush_Text (P);
P.Format (CODE) := True;
return;
else
Put_Back (P, C);
end if;
elsif not P.Empty_Line or else (not P.Is_Dotclear and P.Context.Syntax /= SYNTAX_MEDIA_WIKI)
or else not P.Document.Is_Root_Node
then
Parse_Text (P, Token);
return;
end if;
Parse_Preformatted_Block (P, Token);
end Parse_Preformatted;
-- ------------------------------
-- Parse a pre-formatted text which starts either by a space or by a sequence
-- of characters. Example:
-- {{{
-- pre-formatted
-- }}}
-- ------------------------------
procedure Parse_Preformatted_Block (P : in out Parser;
Token : in Wiki.Strings.WChar) is
use Ada.Wide_Wide_Characters.Handling;
procedure Add_Preformatted (Content : in Wiki.Strings.WString);
C : Wiki.Strings.WChar;
Stop_Token : Wiki.Strings.WChar;
Format : Wiki.Strings.UString;
Col : Natural;
Is_Html : Boolean := False;
procedure Add_Preformatted (Content : in Wiki.Strings.WString) is
begin
P.Context.Filters.Add_Preformatted (P.Document, Content,
Wiki.Strings.To_WString (Format));
end Add_Preformatted;
procedure Add_Preformatted is
new Wiki.Strings.Wide_Wide_Builders.Get (Add_Preformatted);
pragma Inline (Add_Preformatted);
begin
Flush_Text (P);
Flush_List (P);
if Token = ' ' then
Col := P.Preformat_Column + 1;
while not P.Is_Eof loop
Peek (P, C);
if Col < P.Preformat_Column then
if C /= ' ' then
Put_Back (P, C);
exit;
end if;
Col := Col + 1;
elsif C = LF or C = CR then
Col := 0;
-- Check for CR + LF and treat it as a single LF.
if C = CR and then not P.Is_Eof then
Peek (P, C);
if C = LF then
Append (P.Text, C);
else
Put_Back (P, C);
Append (P.Text, LF);
end if;
else
Append (P.Text, LF);
end if;
else
Col := Col + 1;
Append (P.Text, C);
end if;
end loop;
else
Peek (P, C);
while not P.Is_Eof and C /= LF and C /= CR loop
if Strings.Is_Alphanumeric (C) then
Wiki.Strings.Append (Format, To_Lower (C));
end if;
Peek (P, C);
end loop;
if Token = '{' then
Stop_Token := '}';
else
Stop_Token := Token;
end if;
Flush_List (P);
Is_Html := Wiki.Strings.To_WString (Format) = "html";
Col := 0;
while not P.Is_Eof loop
Peek (P, C);
if Stop_Token = C and Col = 0 then
Peek (P, C);
if C = Stop_Token then
Peek (P, C);
exit when C = Stop_Token;
end if;
Append (P.Text, Stop_Token);
Col := Col + 1;
elsif C = CR then
Col := 0;
Peek (P, C);
if C /= LF then
Put_Back (P, C);
end if;
C := LF;
elsif C = LF or C = CR then
Col := 0;
else
Col := Col + 1;
end if;
if Is_Html and C = '<' then
Wiki.Parsers.Html.Parse_Element (P);
else
Append (P.Text, C);
end if;
end loop;
Skip_End_Of_Line (P);
end if;
P.Empty_Line := True;
if not Is_Html then
Add_Preformatted (P.Text);
Clear (P.Text);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_PARAGRAPH);
end if;
P.In_Paragraph := True;
end if;
end Parse_Preformatted_Block;
procedure Parse_List (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Level : Natural := 1;
begin
if not P.Empty_Line then
Parse_Text (P, Token);
return;
end if;
loop
Peek (P, C);
exit when C /= Token;
Level := Level + 1;
end loop;
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_List_Item (P.Document, Level, Token = '#');
end if;
-- Ignore the first white space after the list item.
if C /= ' ' and C /= HT then
Put_Back (P, C);
end if;
end Parse_List;
procedure Parse_List_Or_Bold (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Level : Natural := 1;
begin
if not P.Empty_Line then
Parse_Double_Bold (P, Token);
return;
end if;
loop
Peek (P, C);
exit when C /= '#' and C /= '*';
Level := Level + 1;
end loop;
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_List_Item (P.Document, Level, Token = '#');
end if;
-- Ignore the first white space after the list item.
if C /= ' ' and C /= HT then
Put_Back (P, C);
end if;
end Parse_List_Or_Bold;
-- ------------------------------
-- Parse a list definition:
-- ;item 1
-- : definition 1
-- ------------------------------
procedure Parse_Item (P : in out Parser;
Token : in Wiki.Strings.WChar) is
begin
if not P.Empty_Line then
Parse_Text (P, Token);
return;
end if;
Flush_Text (P);
Wiki.Attributes.Clear (P.Attributes);
if not P.Context.Is_Hidden then
if not P.In_List then
P.Context.Filters.Push_Node (P.Document, Wiki.DL_TAG, P.Attributes);
end if;
P.Context.Filters.Push_Node (P.Document, Wiki.DT_TAG, P.Attributes);
end if;
P.In_List := True;
end Parse_Item;
-- ------------------------------
-- Parse a list definition:
-- ;item 1
-- : definition 1
-- ------------------------------
procedure Parse_Definition (P : in out Parser;
Token : in Wiki.Strings.WChar) is
begin
if not P.Empty_Line then
Parse_Text (P, Token);
return;
end if;
Flush_Text (P);
Wiki.Attributes.Clear (P.Attributes);
if not P.Context.Is_Hidden then
P.Context.Filters.Push_Node (P.Document, Wiki.DD_TAG, P.Attributes);
end if;
end Parse_Definition;
-- ------------------------------
-- Parse a blockquote.
-- Example:
-- >>>quote level 3
-- >>quote level 2
-- >quote level 1
-- ------------------------------
procedure Parse_Blockquote (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
Level : Natural := 1;
begin
if not P.Empty_Line then
Parse_Text (P, Token);
return;
end if;
loop
Peek (P, C);
exit when C /= '>';
Level := Level + 1;
end loop;
Flush_Text (P);
Flush_List (P);
P.Empty_Line := True;
P.Quote_Level := Level;
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Blockquote (P.Document, Level);
end if;
-- Ignore the first white space after the quote character.
if C /= ' ' and C /= HT then
Put_Back (P, C);
end if;
end Parse_Blockquote;
-- ------------------------------
-- Parse a space and take necessary formatting actions.
-- Example:
-- item1 item2 => add space in text buffer
-- ' * item' => start a bullet list (Google)
-- ' # item' => start an ordered list (Google)
-- ' item' => preformatted text (Google, Creole)
-- ------------------------------
procedure Parse_Space (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
if P.Empty_Line then
-- Skip spaces for multi-space preformatted blocks or when we are within HTML elements.
if P.Preformat_Column > 1 or not P.Document.Is_Root_Node then
loop
Peek (P, C);
exit when C /= ' ' and C /= HT;
end loop;
else
Peek (P, C);
end if;
if C = '*' or C = '#' then
Parse_List (P, C);
elsif C = '-' then
Parse_Horizontal_Rule (P, C);
elsif C = CR or C = LF then
Parse_End_Line (P, C);
else
Put_Back (P, C);
Parse_Preformatted (P, Token);
end if;
else
Append (P.Text, Token);
end if;
end Parse_Space;
procedure Parse_End_Line (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar := Token;
Count : Positive := 1;
begin
if P.Is_Eof then
return;
end if;
loop
Peek (P, C);
exit when P.Is_Eof;
if C = Token then
Count := Count + 1;
elsif C /= CR and C /= LF then
Put_Back (P, C);
exit;
end if;
end loop;
if Count >= 2 then
Flush_Text (P);
Flush_List (P);
-- Finish the active table.
if P.In_Table then
P.Context.Filters.Finish_Table (P.Document);
P.In_Table := False;
end if;
-- Finish the active blockquotes if a new paragraph is started on an empty line.
if P.Quote_Level > 0 then
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Blockquote (P.Document, 0);
end if;
P.Quote_Level := 0;
end if;
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_PARAGRAPH);
end if;
P.In_Paragraph := True;
elsif (Length (P.Text) > 0 or not P.Empty_Line) and then not P.Is_Eof then
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_NEWLINE);
end if;
end if;
-- Finish the active blockquotes if a new paragraph is started immediately after
-- the blockquote.
if P.Quote_Level > 0 and C /= '>' then
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Blockquote (P.Document, 0);
end if;
P.Quote_Level := 0;
end if;
P.Empty_Line := True;
end Parse_End_Line;
-- ------------------------------
-- Parse a line break.
-- Example:
-- \\ (Creole)
-- %%% (Dotclear)
-- ------------------------------
procedure Parse_Line_Break (P : in out Parser;
Token : in Wiki.Strings.WChar) is
C : Wiki.Strings.WChar;
begin
Peek (P, C);
-- Check for escape character
if Token = P.Escape_Char then
Parse_Text (P, C);
return;
end if;
if C /= Token then
Parse_Text (P, Token);
Put_Back (P, C);
return;
end if;
-- Check for a third '%'.
if P.Is_Dotclear then
Peek (P, C);
if C /= Token then
Parse_Text (P, Token);
Parse_Text (P, Token);
Put_Back (P, C);
return;
end if;
end if;
P.Empty_Line := True;
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Add_Node (P.Document, Wiki.Nodes.N_LINE_BREAK);
end if;
end Parse_Line_Break;
-- ------------------------------
-- Parse a HTML component.
-- Example:
-- <b> or </b>
-- ------------------------------
procedure Parse_Maybe_Html (P : in out Parser;
Token : in Wiki.Strings.WChar) is
begin
-- Don't parse HTML if a formatting text mode is setup.
if (for some Mode of P.Format => Mode) then
Parse_Text (P, Token);
return;
end if;
Wiki.Parsers.Html.Parse_Element (P);
end Parse_Maybe_Html;
Google_Wiki_Table : aliased constant Parser_Table
:= (
16#0A# => Parse_End_Line'Access,
16#0D# => Parse_End_Line'Access,
Character'Pos (' ') => Parse_Space'Access,
Character'Pos ('=') => Parse_Header'Access,
Character'Pos ('*') => Parse_Single_Bold'Access,
Character'Pos ('_') => Parse_Single_Italic'Access,
Character'Pos ('`') => Parse_Single_Code'Access,
Character'Pos ('^') => Parse_Single_Superscript'Access,
Character'Pos ('~') => Parse_Double_Strikeout'Access,
Character'Pos (',') => Parse_Double_Subscript'Access,
Character'Pos ('[') => Parse_Link'Access,
Character'Pos ('\') => Parse_Line_Break'Access,
Character'Pos ('#') => Parse_List'Access,
Character'Pos ('{') => Parse_Preformatted'Access,
Character'Pos ('}') => Parse_Preformatted'Access,
Character'Pos ('<') => Parse_Maybe_Html'Access,
others => Parse_Text'Access
);
Dotclear_Wiki_Table : aliased constant Parser_Table
:= (
16#0A# => Parse_End_Line'Access,
16#0D# => Parse_End_Line'Access,
Character'Pos (' ') => Parse_Space'Access,
Character'Pos ('!') => Parse_Header'Access,
Character'Pos ('_') => Parse_Double_Bold'Access,
Character'Pos (''') => Parse_Double_Italic'Access,
Character'Pos ('@') => Parse_Double_Code'Access,
Character'Pos ('^') => Parse_Single_Superscript'Access,
Character'Pos ('-') => Parse_Horizontal_Rule'Access,
Character'Pos ('+') => Parse_Double_Strikeout'Access,
Character'Pos (',') => Parse_Double_Subscript'Access,
Character'Pos ('[') => Parse_Link'Access,
Character'Pos ('\') => Parse_Line_Break'Access,
Character'Pos ('{') => Parse_Quote'Access,
Character'Pos ('#') => Parse_List'Access,
Character'Pos ('*') => Parse_List'Access,
Character'Pos ('(') => Parse_Image'Access,
Character'Pos ('/') => Parse_Preformatted'Access,
Character'Pos ('%') => Parse_Line_Break'Access,
Character'Pos ('>') => Parse_Blockquote'Access,
Character'Pos ('<') => Parse_Template'Access,
others => Parse_Text'Access
);
Creole_Wiki_Table : aliased constant Parser_Table
:= (
16#0A# => Parse_End_Line'Access,
16#0D# => Parse_End_Line'Access,
Character'Pos (' ') => Parse_Space'Access,
Character'Pos ('=') => Parse_Header'Access,
Character'Pos ('*') => Parse_List_Or_Bold'Access,
Character'Pos ('/') => Parse_Double_Italic'Access,
Character'Pos ('@') => Parse_Double_Code'Access,
Character'Pos ('^') => Parse_Double_Superscript'Access,
Character'Pos ('-') => Parse_Double_Strikeout'Access,
Character'Pos ('+') => Parse_Double_Strikeout'Access,
Character'Pos (',') => Parse_Double_Subscript'Access,
Character'Pos ('[') => Parse_Link'Access,
Character'Pos ('\') => Parse_Line_Break'Access,
Character'Pos ('#') => Parse_List'Access,
Character'Pos ('{') => Parse_Creole_Image_Or_Preformatted'Access,
Character'Pos ('%') => Parse_Line_Break'Access,
Character'Pos (';') => Parse_Item'Access,
Character'Pos ('<') => Parse_Template'Access,
Character'Pos (':') => Parse_Definition'Access,
Character'Pos ('~') => Parse_Escape'Access,
others => Parse_Text'Access
);
Markdown_Wiki_Table : aliased constant Parser_Table
:= (
16#0A# => Parse_End_Line'Access,
16#0D# => Parse_End_Line'Access,
Character'Pos (' ') => Parse_Space'Access,
Character'Pos ('#') => Parse_Header'Access,
Character'Pos ('*') => Parse_Markdown_Bold_Italic'Access,
Character'Pos ('_') => Parse_Markdown_Bold_Italic'Access,
Character'Pos ('-') => Parse_List'Access,
Character'Pos ('^') => Parse_Single_Superscript'Access,
-- Character'Pos ('~') => Parse_Double_Strikeout'Access,
-- Character'Pos (',') => Parse_Double_Subscript'Access,
Character'Pos ('!') => Parse_Markdown_Image'Access,
Character'Pos ('[') => Parse_Markdown_Link'Access,
Character'Pos ('\') => Parse_Markdown_Escape'Access,
Character'Pos ('>') => Parse_Blockquote'Access,
Character'Pos ('<') => Parse_Maybe_Html'Access,
Character'Pos ('`') => Parse_Preformatted'Access,
Character'Pos ('|') => Parse_Markdown_Table'Access,
others => Parse_Text'Access
);
Mediawiki_Wiki_Table : aliased constant Parser_Table
:= (
16#0A# => Parse_End_Line'Access,
16#0D# => Parse_End_Line'Access,
Character'Pos (' ') => Parse_Space'Access,
Character'Pos ('=') => Parse_Header'Access,
Character'Pos (''') => Parse_Bold_Italic'Access,
Character'Pos ('[') => Parse_Link'Access,
Character'Pos ('\') => Parse_Line_Break'Access,
Character'Pos ('#') => Parse_List'Access,
Character'Pos ('*') => Parse_List'Access,
Character'Pos ('<') => Parse_Maybe_Html'Access,
Character'Pos ('&') => Html.Parse_Entity'Access,
Character'Pos ('-') => Parse_Horizontal_Rule'Access,
Character'Pos (';') => Parse_Item'Access,
Character'Pos ('{') => Parse_Template'Access,
Character'Pos (':') => Parse_Definition'Access,
Character'Pos ('~') => Parse_Escape'Access,
others => Parse_Text'Access
);
Misc_Wiki_Table : aliased constant Parser_Table
:= (
16#0A# => Parse_End_Line'Access,
16#0D# => Parse_End_Line'Access,
Character'Pos (' ') => Parse_Space'Access,
Character'Pos ('=') => Parse_Header'Access,
Character'Pos ('*') => Parse_Single_Bold'Access,
Character'Pos ('_') => Parse_Single_Italic'Access,
Character'Pos ('`') => Parse_Single_Code'Access,
Character'Pos ('^') => Parse_Single_Superscript'Access,
Character'Pos ('~') => Parse_Double_Strikeout'Access,
Character'Pos (',') => Parse_Double_Subscript'Access,
Character'Pos ('[') => Parse_Link'Access,
Character'Pos ('\') => Parse_Line_Break'Access,
Character'Pos ('#') => Parse_List'Access,
Character'Pos ('@') => Parse_Double_Code'Access,
Character'Pos ('<') => Parse_Maybe_Html'Access,
others => Parse_Text'Access
);
Html_Table : aliased constant Parser_Table
:= (
Character'Pos ('<') => Parse_Maybe_Html'Access,
Character'Pos ('&') => Html.Parse_Entity'Access,
others => Parse_Text'Access
);
type Syntax_Parser_Tables is array (Wiki_Syntax) of Parser_Table_Access;
Syntax_Tables : constant Syntax_Parser_Tables
:= (
SYNTAX_GOOGLE => Google_Wiki_Table'Access,
SYNTAX_CREOLE => Creole_Wiki_Table'Access,
SYNTAX_DOTCLEAR => Dotclear_Wiki_Table'Access,
SYNTAX_PHPBB => Mediawiki_Wiki_Table'Access,
SYNTAX_MEDIA_WIKI => Mediawiki_Wiki_Table'Access,
SYNTAX_MARKDOWN => Markdown_Wiki_Table'Access,
SYNTAX_MIX => Misc_Wiki_Table'Access,
SYNTAX_HTML => Html_Table'Access
);
procedure Start_Element (P : in out Parser;
Tag : in Wiki.Html_Tag;
Attributes : in out Wiki.Attributes.Attribute_List) is
begin
if P.Previous_Tag /= UNKNOWN_TAG and then No_End_Tag (P.Previous_Tag) then
if not P.Context.Is_Hidden then
P.Context.Filters.Pop_Node (P.Document, P.Previous_Tag);
end if;
P.Previous_Tag := UNKNOWN_TAG;
end if;
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Push_Node (P.Document, Tag, Attributes);
end if;
-- When we are within a <pre> HTML element, switch to HTML to emit the text as is.
if Tag = PRE_TAG and P.Context.Syntax /= SYNTAX_HTML then
P.Previous_Syntax := P.Context.Syntax;
P.Set_Syntax (SYNTAX_HTML);
end if;
P.Previous_Tag := Tag;
end Start_Element;
procedure End_Element (P : in out Parser;
Tag : in Wiki.Html_Tag) is
Previous_Tag : constant Wiki.Html_Tag := P.Previous_Tag;
begin
P.Previous_Tag := UNKNOWN_TAG;
if Previous_Tag /= UNKNOWN_TAG
and then Previous_Tag /= Tag
and then No_End_Tag (Previous_Tag)
then
End_Element (P, Previous_Tag);
end if;
Flush_Text (P);
if not P.Context.Is_Hidden then
P.Context.Filters.Pop_Node (P.Document, Tag);
end if;
-- Switch back to the previous syntax when we reached the </pre> HTML element.
if P.Previous_Syntax /= P.Context.Syntax and Tag = PRE_TAG then
P.Set_Syntax (P.Previous_Syntax);
end if;
end End_Element;
-- ------------------------------
-- Set the plugin factory to find and use plugins.
-- ------------------------------
procedure Set_Plugin_Factory (Engine : in out Parser;
Factory : in Wiki.Plugins.Plugin_Factory_Access) is
begin
Engine.Context.Factory := Factory;
end Set_Plugin_Factory;
-- ------------------------------
-- Set the wiki syntax that the wiki engine must use.
-- ------------------------------
procedure Set_Syntax (Engine : in out Parser;
Syntax : in Wiki_Syntax := SYNTAX_MIX) is
begin
Engine.Context.Syntax := Syntax;
Engine.Table := Syntax_Tables (Syntax);
end Set_Syntax;
-- ------------------------------
-- Add a filter in the wiki engine.
-- ------------------------------
procedure Add_Filter (Engine : in out Parser;
Filter : in Wiki.Filters.Filter_Type_Access) is
begin
Engine.Context.Filters.Add_Filter (Filter);
end Add_Filter;
-- ------------------------------
-- Set the plugin context.
-- ------------------------------
procedure Set_Context (Engine : in out Parser;
Context : in Wiki.Plugins.Plugin_Context) is
begin
Engine.Context.Previous := Context.Previous;
Engine.Context.Filters.Set_Chain (Context.Filters);
Engine.Context.Factory := Context.Factory;
Engine.Context.Variables := Context.Variables;
Engine.Context.Is_Included := Context.Is_Included;
Engine.Context.Ident := Context.Ident;
Engine.Set_Syntax (Context.Syntax);
end Set_Context;
-- ------------------------------
-- Parse the wiki text contained in <b>Text</b> according to the wiki syntax
-- defined on the parser. The string is assumed to be in UTF-8 format.
-- ------------------------------
procedure Parse (Engine : in out Parser;
Text : in String;
Doc : in out Wiki.Documents.Document) is
procedure Element (Content : in String;
Pos : in out Natural;
Char : out Wiki.Strings.WChar);
function Length (Content : in String) return Natural;
procedure Element (Content : in String;
Pos : in out Natural;
Char : out Wiki.Strings.WChar) is
use Interfaces;
Val : Unsigned_32;
begin
Val := Character'Pos (Content (Pos));
Pos := Pos + 1;
-- UTF-8 conversion
-- 7 U+0000 U+007F 1 0xxxxxxx
-- 11 U+0080 U+07FF 2 110xxxxx 10xxxxxx
-- 16 U+0800 U+FFFF 3 1110xxxx 10xxxxxx 10xxxxxx
-- 21 U+10000 U+1FFFFF 4 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
if Val >= 16#80# and Pos <= Content'Last then
Val := Shift_Left (Val, 6);
Val := Val or (Character'Pos (Content (Pos)) and 16#3F#);
Pos := Pos + 1;
if Val <= 16#37FF# or Pos > Content'Last then
Val := Val and 16#07ff#;
else
Val := Shift_Left (Val, 6);
Val := Val or (Character'Pos (Content (Pos)) and 16#3F#);
Pos := Pos + 1;
if Val <= 16#EFFFF# or Pos > Content'Last then
Val := Val and 16#FFFF#;
else
Val := Shift_Left (Val, 6);
Val := Val or (Character'Pos (Content (Pos)) and 16#3F#);
Val := Val and 16#1FFFFF#;
Pos := Pos + 1;
end if;
end if;
end if;
Char := Wiki.Strings.WChar'Val (Val);
end Element;
pragma Inline (Element);
function Length (Content : in String) return Natural is
begin
return Content'Length;
end Length;
pragma Inline_Always (Length);
procedure Parse_Text is
new Wiki.Helpers.Parser (Engine_Type => Parser,
Element_Type => String);
pragma Inline (Parse_Text);
begin
Parse_Text (Engine, Text, Doc);
end Parse;
-- ------------------------------
-- Parse the wiki text contained in <b>Text</b> according to the wiki syntax
-- defined on the parser.
-- ------------------------------
procedure Parse (Engine : in out Parser;
Text : in Wide_Wide_String;
Doc : in out Wiki.Documents.Document) is
procedure Element (Content : in Wide_Wide_String;
Pos : in out Natural;
Char : out Wiki.Strings.WChar);
function Length (Content : in Wide_Wide_String) return Natural;
procedure Element (Content : in Wide_Wide_String;
Pos : in out Natural;
Char : out Wiki.Strings.WChar) is
begin
Char := Content (Pos);
Pos := Pos + 1;
end Element;
pragma Inline (Element);
function Length (Content : in Wide_Wide_String) return Natural is
begin
return Content'Length;
end Length;
pragma Inline_Always (Length);
procedure Parse_Text is
new Wiki.Helpers.Parser (Engine_Type => Parser,
Element_Type => Wiki.Strings.WString);
pragma Inline (Parse_Text);
begin
Parse_Text (Engine, Text, Doc);
end Parse;
-- ------------------------------
-- Parse the wiki text contained in <b>Text</b> according to the wiki syntax
-- defined on the parser.
-- ------------------------------
procedure Parse (Engine : in out Parser;
Text : in Wiki.Strings.UString;
Doc : in out Wiki.Documents.Document) is
procedure Element (Content : in Wiki.Strings.UString;
Pos : in out Natural;
Char : out Wiki.Strings.WChar) is
begin
Char := Wiki.Strings.Element (Content, Pos);
Pos := Pos + 1;
end Element;
pragma Inline_Always (Element);
procedure Parse_Text is
new Wiki.Helpers.Parser (Engine_Type => Parser,
Element_Type => Wiki.Strings.UString,
Length => Wiki.Strings.Length);
pragma Inline (Parse_Text);
begin
Parse_Text (Engine, Text, Doc);
end Parse;
-- ------------------------------
-- Parse the wiki stream managed by <tt>Stream</tt> according to the wiki syntax configured
-- on the wiki engine.
-- ------------------------------
procedure Parse (Engine : in out Parser;
Stream : in Wiki.Streams.Input_Stream_Access;
Doc : in out Wiki.Documents.Document) is
Main : constant Boolean := Doc.Is_Empty;
begin
Engine.Document := Doc;
Engine.Previous_Syntax := Engine.Context.Syntax;
Engine.Empty_Line := True;
Engine.Format := (others => False);
Engine.Is_Eof := False;
Engine.In_Paragraph := True;
Engine.Has_Pending := False;
Engine.Reader := Stream;
Engine.Link_Double_Bracket := False;
Engine.Escape_Char := '~';
Engine.Param_Char := Wiki.Strings.WChar'Last;
if Main then
Engine.Context.Filters.Add_Node (Engine.Document, Wiki.Nodes.N_PARAGRAPH);
end if;
case Engine.Context.Syntax is
when SYNTAX_DOTCLEAR =>
Engine.Is_Dotclear := True;
Engine.Escape_Char := '\';
Engine.Header_Offset := -6;
Engine.Link_Title_First := True;
when SYNTAX_CREOLE =>
Engine.Link_Double_Bracket := True;
Engine.Param_Char := '<';
when SYNTAX_MEDIA_WIKI =>
Engine.Link_Double_Bracket := True;
Engine.Check_Image_Link := True;
Engine.Param_Char := '{';
when SYNTAX_MIX =>
Engine.Is_Dotclear := True;
when SYNTAX_GOOGLE =>
Engine.Link_No_Space := True;
when SYNTAX_MARKDOWN =>
Engine.Preformat_Column := 4;
Engine.Escape_Char := '\';
when others =>
null;
end case;
Parse_Token (Engine);
Flush_Text (Engine);
if Main then
Engine.Context.Filters.Finish (Engine.Document);
end if;
Doc := Engine.Document;
end Parse;
procedure Parse_Token (P : in out Parser) is
C : Wiki.Strings.WChar;
begin
loop
Peek (P, C);
exit when P.Is_Eof;
if C > '~' then
Parse_Text (P, C);
else
P.Table (Wiki.Strings.WChar'Pos (C)).all (P, C);
end if;
end loop;
end Parse_Token;
end Wiki.Parsers;
|
with Ada.Text_IO; use Ada.Text_IO;
with Native.Filesystem; use Native.Filesystem;
with HAL.Filesystem; use HAL.Filesystem;
with Partitions; use Partitions;
with File_Block_Drivers; use File_Block_Drivers;
with Test_Directories; use Test_Directories;
procedure TC_Read_Partitions is
procedure List_Partitions (FS : in out FS_Driver'Class;
Path_To_Disk_Image : Pathname);
---------------------
-- List_Partitions --
---------------------
procedure List_Partitions (FS : in out FS_Driver'Class;
Path_To_Disk_Image : Pathname)
is
File : Any_File_Handle;
begin
if FS.Open (Path_To_Disk_Image, Read_Only, File) /= Status_Ok then
Put_Line ("Cannot open disk image '" & Path_To_Disk_Image & "'");
return;
end if;
declare
Disk : aliased File_Block_Driver (File);
Nbr : Natural;
P_Entry : Partition_Entry;
begin
Nbr := Number_Of_Partitions (Disk'Unchecked_Access);
Put_Line ("Disk '" & Path_To_Disk_Image & "' has " &
Nbr'Img & " parition(s)");
for Id in 1 .. Nbr loop
if Get_Partition_Entry (Disk'Unchecked_Access,
Id,
P_Entry) /= Status_Ok
then
Put_Line ("Cannot read partition :" & Id'Img);
else
Put_Line (" - partition :" & Id'Img);
Put_Line (" Status:" & P_Entry.Status'Img);
Put_Line (" Kind: " & P_Entry.Kind'Img);
Put_Line (" LBA: " & P_Entry.First_Sector_LBA'Img);
Put_Line (" Number of sectors: " & P_Entry.Number_Of_Sectors'Img);
end if;
end loop;
end;
end List_Partitions;
FS : aliased Native_FS_Driver;
begin
if FS.Create (Root_Dir => Test_Dir) /= Status_Ok then
raise Program_Error with "Cannot create native file system at '" &
Test_Dir & "'";
end if;
List_Partitions (FS, "disk_8_partitions.img");
end TC_Read_Partitions;
|
-----------------------------------------------------------------------
-- applications.messages-factory -- Application Message Factory
-- Copyright (C) 2011, 2012, 2015, 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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 ASF.Contexts.Faces;
package ASF.Applications.Messages.Factory is
-- Get a localized message. The message identifier is composed of a resource bundle name
-- prefix and a bundle key. The prefix and key are separated by the first '.'.
-- If the message identifier does not contain any prefix, the default bundle is "messages".
function Get_Message (Context : in ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String) return String;
-- Build a localized message.
function Get_Message (Context : in ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String;
Severity : in Messages.Severity := ERROR) return Message;
-- Build a localized message and format the message with one argument.
function Get_Message (Context : in ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String;
Param1 : in String;
Severity : in Messages.Severity := ERROR) return Message;
-- Build a localized message and format the message with two argument.
function Get_Message (Context : in ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String;
Param1 : in String;
Param2 : in String;
Severity : in Messages.Severity := ERROR) return Message;
-- Build a localized message and format the message with some arguments.
function Get_Message (Context : in ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String;
Args : in ASF.Utils.Object_Array;
Severity : in Messages.Severity := ERROR) return Message;
-- Add a localized global message in the current faces context.
procedure Add_Message (Message_Id : in String;
Severity : in Messages.Severity := ERROR);
-- Add a localized field message in the current faces context. The message is associated
-- with the component identified by <tt>Client_Id</tt>.
procedure Add_Field_Message (Client_Id : in String;
Message_Id : in String;
Severity : in Messages.Severity := ERROR);
-- Add a localized global message in the faces context.
procedure Add_Message (Context : in out ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String;
Param1 : in String;
Severity : in Messages.Severity := ERROR);
-- Add a localized global message in the faces context.
procedure Add_Message (Context : in out ASF.Contexts.Faces.Faces_Context'Class;
Message_Id : in String;
Severity : in Messages.Severity := ERROR);
end ASF.Applications.Messages.Factory;
|
private with Ada.Containers.Red_Black_Trees;
private with Ada.Finalization;
private with Ada.Streams;
generic
type Priority (<>) is private;
type Element_Type (<>) is private;
with function "<" (Left, Right : Priority) return Boolean is <>;
with function "=" (Left, Right : Priority) return Boolean is <>;
package PriorityQueue is
pragma Preelaborate;
pragma Remote_Types;
type Queue is tagged private;
pragma Preelaborable_Initialization (Queue);
type Cursor is private;
pragma Preelaborable_Initialization (Cursor);
Empty_Queue : constant Set;
No_Element : constant Cursor;
function Is_Empty (Container : Set) return Boolean;
end PriorityQueue;
|
-- Adobe Experience Manager (AEM) API
-- Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API
--
-- The version of the OpenAPI document: 3.5.0_pre.0
-- Contact: opensource@shinesolutions.com
--
-- NOTE: This package is auto generated by OpenAPI-Generator 5.2.1.
-- https://openapi-generator.tech
-- Do not edit the class manually.
with Swagger.Streams;
with Ada.Containers.Vectors;
package .Models is
pragma Style_Checks ("-mr");
type InstallStatusStatus_Type is
record
Finished : Swagger.Nullable_Boolean;
Item_Count : Swagger.Nullable_Integer;
end record;
package InstallStatusStatus_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => InstallStatusStatus_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InstallStatusStatus_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InstallStatusStatus_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InstallStatusStatus_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InstallStatusStatus_Type_Vectors.Vector);
type InstallStatus_Type is
record
Status : .Models.InstallStatusStatus_Type;
end record;
package InstallStatus_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => InstallStatus_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InstallStatus_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in InstallStatus_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InstallStatus_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out InstallStatus_Type_Vectors.Vector);
type SamlConfigurationPropertyItemsString_Type is
record
Name : Swagger.Nullable_UString;
Optional : Swagger.Nullable_Boolean;
Is_Set : Swagger.Nullable_Boolean;
P_Type : Swagger.Nullable_Integer;
Value : Swagger.Nullable_UString;
Description : Swagger.Nullable_UString;
end record;
package SamlConfigurationPropertyItemsString_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => SamlConfigurationPropertyItemsString_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsString_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsString_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsString_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsString_Type_Vectors.Vector);
type SamlConfigurationPropertyItemsBoolean_Type is
record
Name : Swagger.Nullable_UString;
Optional : Swagger.Nullable_Boolean;
Is_Set : Swagger.Nullable_Boolean;
P_Type : Swagger.Nullable_Integer;
Value : Swagger.Nullable_Boolean;
Description : Swagger.Nullable_UString;
end record;
package SamlConfigurationPropertyItemsBoolean_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => SamlConfigurationPropertyItemsBoolean_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsBoolean_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsBoolean_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsBoolean_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsBoolean_Type_Vectors.Vector);
type TruststoreItems_Type is
record
Alias : Swagger.Nullable_UString;
Entry_Type : Swagger.Nullable_UString;
Subject : Swagger.Nullable_UString;
Issuer : Swagger.Nullable_UString;
Not_Before : Swagger.Nullable_UString;
Not_After : Swagger.Nullable_UString;
Serial_Number : Swagger.Nullable_Integer;
end record;
package TruststoreItems_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => TruststoreItems_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in TruststoreItems_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in TruststoreItems_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out TruststoreItems_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out TruststoreItems_Type_Vectors.Vector);
type TruststoreInfo_Type is
record
Aliases : .Models.TruststoreItems_Type_Vectors.Vector;
Exists : Swagger.Nullable_Boolean;
end record;
package TruststoreInfo_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => TruststoreInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in TruststoreInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in TruststoreInfo_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out TruststoreInfo_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out TruststoreInfo_Type_Vectors.Vector);
type KeystoreChainItems_Type is
record
Subject : Swagger.Nullable_UString;
Issuer : Swagger.Nullable_UString;
Not_Before : Swagger.Nullable_UString;
Not_After : Swagger.Nullable_UString;
Serial_Number : Swagger.Nullable_Integer;
end record;
package KeystoreChainItems_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => KeystoreChainItems_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in KeystoreChainItems_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in KeystoreChainItems_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out KeystoreChainItems_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out KeystoreChainItems_Type_Vectors.Vector);
type KeystoreItems_Type is
record
Alias : Swagger.Nullable_UString;
Entry_Type : Swagger.Nullable_UString;
Algorithm : Swagger.Nullable_UString;
Format : Swagger.Nullable_UString;
Chain : .Models.KeystoreChainItems_Type_Vectors.Vector;
end record;
package KeystoreItems_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => KeystoreItems_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in KeystoreItems_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in KeystoreItems_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out KeystoreItems_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out KeystoreItems_Type_Vectors.Vector);
type KeystoreInfo_Type is
record
Aliases : .Models.KeystoreItems_Type_Vectors.Vector;
Exists : Swagger.Nullable_Boolean;
end record;
package KeystoreInfo_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => KeystoreInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in KeystoreInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in KeystoreInfo_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out KeystoreInfo_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out KeystoreInfo_Type_Vectors.Vector);
type SamlConfigurationPropertyItemsArray_Type is
record
Name : Swagger.Nullable_UString;
Optional : Swagger.Nullable_Boolean;
Is_Set : Swagger.Nullable_Boolean;
P_Type : Swagger.Nullable_Integer;
Values : Swagger.UString_Vectors.Vector;
Description : Swagger.Nullable_UString;
end record;
package SamlConfigurationPropertyItemsArray_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => SamlConfigurationPropertyItemsArray_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsArray_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsArray_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsArray_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsArray_Type_Vectors.Vector);
type SamlConfigurationPropertyItemsLong_Type is
record
Name : Swagger.Nullable_UString;
Optional : Swagger.Nullable_Boolean;
Is_Set : Swagger.Nullable_Boolean;
P_Type : Swagger.Nullable_Integer;
Value : Swagger.Nullable_Integer;
Description : Swagger.Nullable_UString;
end record;
package SamlConfigurationPropertyItemsLong_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => SamlConfigurationPropertyItemsLong_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsLong_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationPropertyItemsLong_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsLong_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationPropertyItemsLong_Type_Vectors.Vector);
type SamlConfigurationProperties_Type is
record
Path : .Models.SamlConfigurationPropertyItemsArray_Type;
Service_Ranking : .Models.SamlConfigurationPropertyItemsLong_Type;
Idp_Url : .Models.SamlConfigurationPropertyItemsString_Type;
Idp_Cert_Alias : .Models.SamlConfigurationPropertyItemsString_Type;
Idp_Http_Redirect : .Models.SamlConfigurationPropertyItemsBoolean_Type;
Service_Provider_Entity_Id : .Models.SamlConfigurationPropertyItemsString_Type;
Assertion_Consumer_Service_URL : .Models.SamlConfigurationPropertyItemsString_Type;
Sp_Private_Key_Alias : .Models.SamlConfigurationPropertyItemsString_Type;
Key_Store_Password : .Models.SamlConfigurationPropertyItemsString_Type;
Default_Redirect_Url : .Models.SamlConfigurationPropertyItemsString_Type;
User_IDAttribute : .Models.SamlConfigurationPropertyItemsString_Type;
Use_Encryption : .Models.SamlConfigurationPropertyItemsBoolean_Type;
Create_User : .Models.SamlConfigurationPropertyItemsBoolean_Type;
Add_Group_Memberships : .Models.SamlConfigurationPropertyItemsBoolean_Type;
Group_Membership_Attribute : .Models.SamlConfigurationPropertyItemsString_Type;
Default_Groups : .Models.SamlConfigurationPropertyItemsArray_Type;
Name_Id_Format : .Models.SamlConfigurationPropertyItemsString_Type;
Synchronize_Attributes : .Models.SamlConfigurationPropertyItemsArray_Type;
Handle_Logout : .Models.SamlConfigurationPropertyItemsBoolean_Type;
Logout_Url : .Models.SamlConfigurationPropertyItemsString_Type;
Clock_Tolerance : .Models.SamlConfigurationPropertyItemsLong_Type;
Digest_Method : .Models.SamlConfigurationPropertyItemsString_Type;
Signature_Method : .Models.SamlConfigurationPropertyItemsString_Type;
User_Intermediate_Path : .Models.SamlConfigurationPropertyItemsString_Type;
end record;
package SamlConfigurationProperties_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => SamlConfigurationProperties_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationProperties_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationProperties_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationProperties_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationProperties_Type_Vectors.Vector);
type SamlConfigurationInfo_Type is
record
Pid : Swagger.Nullable_UString;
Title : Swagger.Nullable_UString;
Description : Swagger.Nullable_UString;
Bundle_Location : Swagger.Nullable_UString;
Service_Location : Swagger.Nullable_UString;
Properties : .Models.SamlConfigurationProperties_Type;
end record;
package SamlConfigurationInfo_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => SamlConfigurationInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in SamlConfigurationInfo_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationInfo_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out SamlConfigurationInfo_Type_Vectors.Vector);
type BundleDataProp_Type is
record
Key : Swagger.Nullable_UString;
Value : Swagger.Nullable_UString;
end record;
package BundleDataProp_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => BundleDataProp_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BundleDataProp_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BundleDataProp_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BundleDataProp_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BundleDataProp_Type_Vectors.Vector);
type BundleData_Type is
record
Id : Swagger.Nullable_Integer;
Name : Swagger.Nullable_UString;
Fragment : Swagger.Nullable_Boolean;
State_Raw : Swagger.Nullable_Integer;
State : Swagger.Nullable_UString;
Version : Swagger.Nullable_UString;
Symbolic_Name : Swagger.Nullable_UString;
Category : Swagger.Nullable_UString;
Props : .Models.BundleDataProp_Type_Vectors.Vector;
end record;
package BundleData_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => BundleData_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BundleData_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BundleData_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BundleData_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BundleData_Type_Vectors.Vector);
type BundleInfo_Type is
record
Status : Swagger.Nullable_UString;
S : Integer_Vectors.Vector;
Data : .Models.BundleData_Type_Vectors.Vector;
end record;
package BundleInfo_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => BundleInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BundleInfo_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in BundleInfo_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BundleInfo_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out BundleInfo_Type_Vectors.Vector);
end .Models;
|
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2016 onox <denkpadje@gmail.com>
--
-- 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 AUnit.Test_Suites;
with AUnit.Test_Fixtures;
package Test_Parsers is
function Suite return AUnit.Test_Suites.Access_Test_Suite;
private
type Test is new AUnit.Test_Fixtures.Test_Fixture with null record;
-- Keyword
procedure Test_True_Text (Object : in out Test);
procedure Test_False_Text (Object : in out Test);
procedure Test_Null_Text (Object : in out Test);
-- String
procedure Test_Empty_String_Text (Object : in out Test);
procedure Test_Non_Empty_String_Text (Object : in out Test);
procedure Test_Number_String_Text (Object : in out Test);
-- Integer/float number
procedure Test_Integer_Number_Text (Object : in out Test);
procedure Test_Integer_Number_To_Float_Text (Object : in out Test);
procedure Test_Float_Number_Text (Object : in out Test);
-- Array
procedure Test_Empty_Array_Text (Object : in out Test);
procedure Test_One_Element_Array_Text (Object : in out Test);
procedure Test_Multiple_Elements_Array_Text (Object : in out Test);
procedure Test_Array_Iterable (Object : in out Test);
procedure Test_Multiple_Array_Iterable (Object : in out Test);
-- Object
procedure Test_Empty_Object_Text (Object : in out Test);
procedure Test_One_Member_Object_Text (Object : in out Test);
procedure Test_Multiple_Members_Object_Text (Object : in out Test);
procedure Test_Object_Iterable (Object : in out Test);
procedure Test_Array_Object_Array (Object : in out Test);
procedure Test_Object_Array_Object (Object : in out Test);
procedure Test_Object_No_Array (Object : in out Test);
procedure Test_Object_No_Object (Object : in out Test);
-- Exceptions
procedure Test_Empty_Text_Exception (Object : in out Test);
procedure Test_Array_No_Value_Separator_Exception (Object : in out Test);
procedure Test_Array_No_End_Array_Exception (Object : in out Test);
procedure Test_No_EOF_After_Array_Exception (Object : in out Test);
procedure Test_Object_No_Value_Separator_Exception (Object : in out Test);
procedure Test_Object_No_Name_Separator_Exception (Object : in out Test);
procedure Test_Object_Key_No_String_Exception (Object : in out Test);
procedure Test_Object_No_Second_Member_Exception (Object : in out Test);
procedure Test_Object_Duplicate_Keys_Exception (Object : in out Test);
procedure Test_Object_No_Value_Exception (Object : in out Test);
procedure Test_Object_No_End_Object_Exception (Object : in out Test);
procedure Test_No_EOF_After_Object_Exception (Object : in out Test);
end Test_Parsers;
|
-----------------------------------------------------------------------
-- helios-monitor -- Helios monitor
-- Copyright (C) 2017, 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Unchecked_Deallocation;
with Util.Log.Loggers;
package body Helios.Datas is
use type Schemas.Definition_Type_Access;
use type Schemas.Value_Index;
function Allocate (Queue : in Snapshot_Queue_Type) return Snapshot_Type_Access;
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Helios.Datas");
Reports : Report_Queue_Type;
function Allocate (Queue : in Snapshot_Queue_Type) return Snapshot_Type_Access is
Snapshot : constant Snapshot_Type_Access := new Snapshot_Type;
Count : constant Value_Array_Index
:= Queue.Schema.Index * Value_Array_Index (Queue.Count);
begin
Log.Info ("Allocate snapshot with {0} values", Value_Array_Index'Image (Count));
Snapshot.Schema := Queue.Schema;
Snapshot.Offset := 0;
Snapshot.Count := Queue.Schema.Index;
Snapshot.Values := new Value_Array (1 .. Count);
Snapshot.Values.all := (others => 0);
Snapshot.Start_Time := Ada.Real_Time.Clock;
return Snapshot;
end Allocate;
-- ------------------------------
-- Initialize the snapshot queue for the schema.
-- ------------------------------
procedure Initialize (Queue : in out Snapshot_Queue_Type;
Schema : in Helios.Schemas.Definition_Type_Access;
Count : in Positive) is
begin
Log.Info ("Initialize schema queue {0} with{1} samples of{2} values",
Schema.Name, Positive'Image (Count),
Value_Array_Index'Image (Schema.Index));
Queue.Schema := Schema;
Queue.Count := Count;
Queue.Current := Allocate (Queue);
end Initialize;
-- ------------------------------
-- Get the snapshot start time.
-- ------------------------------
function Get_Start_Time (Data : in Snapshot_Type) return Ada.Real_Time.Time is
begin
return Data.Start_Time;
end Get_Start_Time;
-- ------------------------------
-- Get the snapshot end time.
-- ------------------------------
function Get_End_Time (Data : in Snapshot_Type) return Ada.Real_Time.Time is
begin
return Data.End_Time;
end Get_End_Time;
-- ------------------------------
-- Finish updating the current values of the snapshot.
-- ------------------------------
procedure Finish (Data : in out Snapshot_Type) is
begin
Data.Offset := Data.Offset + Data.Count;
end Finish;
-- ------------------------------
-- Set the value in the snapshot.
-- ------------------------------
procedure Set_Value (Into : in out Snapshot_Type;
Def : in Schemas.Definition_Type_Access;
Value : in Uint64) is
begin
if Def /= null and then Def.Index > 0 then
Into.Values (Def.Index + Into.Offset) := Value;
end if;
end Set_Value;
-- ------------------------------
-- Iterate over the values in the snapshot and collected for the definition node.
-- ------------------------------
procedure Iterate (Data : in Helios.Datas.Snapshot_Type;
Node : in Helios.Schemas.Definition_Type_Access;
Process : not null access procedure (Value : in Uint64)) is
Count : constant Helios.Datas.Value_Array_Index := Data.Count;
Pos : Helios.Datas.Value_Array_Index := Node.Index;
begin
Log.Debug ("Iterate {0} from {1} to {2} step {3}", Node.Name,
Value_Array_Index'Image (Count),
Value_Array_Index'Image (Pos));
while Pos < Data.Offset loop
Process (Data.Values (Pos));
Pos := Pos + Count;
end loop;
end Iterate;
-- ------------------------------
-- Iterate over the values in the snapshot and collected for the definition node.
-- ------------------------------
procedure Iterate (Data : in Helios.Datas.Snapshot_Type;
Node : in Helios.Schemas.Definition_Type_Access;
Process_Snapshot : not null access
procedure (D : in Snapshot_Type;
N : in Definition_Type_Access);
Process_Values : not null access
procedure (D : in Snapshot_Type;
N : in Definition_Type_Access)) is
Child : Helios.Schemas.Definition_Type_Access;
begin
Child := Node.Child;
while Child /= null loop
if Child.Child /= null then
Process_Snapshot (Data, Child);
elsif Child.Index > 0 then
Process_Values (Data, Child);
end if;
Child := Child.Next;
end loop;
end Iterate;
-- ------------------------------
-- Iterate over the values of the reports.
-- ------------------------------
procedure Iterate (Report : in Report_Queue_Type;
Process : not null access procedure (Data : in Snapshot_Type;
Node : in Definition_Type_Access)) is
begin
if not Report.Snapshot.Is_Null then
declare
List : constant Snapshot_Accessor := Report.Snapshot.Value;
Snapshot : Snapshot_Type_Access := List.First;
begin
while Snapshot /= null loop
Process (Snapshot.all, Snapshot.Schema);
Snapshot := Snapshot.Next;
end loop;
end;
end if;
end Iterate;
-- ------------------------------
-- Prepare the snapshot queue to collect new values.
-- ------------------------------
procedure Prepare (Queue : in out Snapshot_Queue_Type;
Snapshot : out Snapshot_Type_Access) is
begin
Snapshot := Queue.Current;
-- Snapshot.Offset := Snapshot.Offset + Snapshot.Count;
if Snapshot.Offset >= Snapshot.Values'Last then
Flush (Queue);
Snapshot := Queue.Current;
end if;
end Prepare;
-- ------------------------------
-- Flush the snapshot to start a fresh one for the queue.
-- ------------------------------
procedure Flush (Queue : in out Snapshot_Queue_Type) is
Snapshot : constant Snapshot_Type_Access := Queue.Current;
begin
if Reports.Snapshot.Is_Null then
Reports.Snapshot := Snapshot_Refs.Create;
end if;
Snapshot.Next := Reports.Snapshot.Value.First;
Reports.Snapshot.Value.First := Queue.Current;
Queue.Current := Allocate (Queue);
Snapshot.End_Time := Queue.Current.Start_Time;
end Flush;
-- ------------------------------
-- Release the snapshots when the reference counter reaches 0.
-- ------------------------------
overriding
procedure Finalize (Object : in out Snapshot_List) is
procedure Free is
new Ada.Unchecked_Deallocation (Object => Snapshot_Type,
Name => Snapshot_Type_Access);
procedure Free is
new Ada.Unchecked_Deallocation (Object => Value_Array,
Name => Value_Array_Access);
Snapshot : Snapshot_Type_Access := Object.First;
Next : Snapshot_Type_Access;
begin
while Snapshot /= null loop
Next := Snapshot.Next;
Free (Snapshot.Values);
Free (Snapshot);
Snapshot := Next;
end loop;
end Finalize;
Empty_Snapshot : Snapshot_Refs.Ref;
function Get_Report return Report_Queue_Type is
Result : constant Report_Queue_Type := Reports;
begin
Reports.Snapshot := Empty_Snapshot;
return Result;
end Get_Report;
end Helios.Datas;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . M B B S _ F L O A T _ R A N D O M --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Calendar;
package body GNAT.MBBS_Float_Random is
-------------------------
-- Implementation Note --
-------------------------
-- The design of this spec is a bit awkward, as a result of Ada 95 not
-- permitting in-out parameters for function formals (most naturally
-- Generator values would be passed this way). In pure Ada 95, the only
-- solution would be to add a self-referential component to the generator
-- allowing access to the generator object from inside the function. This
-- would work because the generator is limited, which prevents any copy.
-- This is a bit heavy, so what we do is to use Unrestricted_Access to
-- get a pointer to the state in the passed Generator. This works because
-- Generator is a limited type and will thus always be passed by reference.
package Calendar renames Ada.Calendar;
type Pointer is access all State;
-----------------------
-- Local Subprograms --
-----------------------
procedure Euclid (P, Q : Int; X, Y : out Int; GCD : out Int);
function Euclid (P, Q : Int) return Int;
function Square_Mod_N (X, N : Int) return Int;
------------
-- Euclid --
------------
procedure Euclid (P, Q : Int; X, Y : out Int; GCD : out Int) is
XT : Int := 1;
YT : Int := 0;
procedure Recur
(P, Q : Int; -- a (i-1), a (i)
X, Y : Int; -- x (i), y (i)
XP, YP : in out Int; -- x (i-1), y (i-1)
GCD : out Int);
procedure Recur
(P, Q : Int;
X, Y : Int;
XP, YP : in out Int;
GCD : out Int)
is
Quo : Int := P / Q; -- q <-- |_ a (i-1) / a (i) _|
XT : Int := X; -- x (i)
YT : Int := Y; -- y (i)
begin
if P rem Q = 0 then -- while does not divide
GCD := Q;
XP := X;
YP := Y;
else
Recur (Q, P - Q * Quo, XP - Quo * X, YP - Quo * Y, XT, YT, Quo);
-- a (i) <== a (i)
-- a (i+1) <-- a (i-1) - q*a (i)
-- x (i+1) <-- x (i-1) - q*x (i)
-- y (i+1) <-- y (i-1) - q*y (i)
-- x (i) <== x (i)
-- y (i) <== y (i)
XP := XT;
YP := YT;
GCD := Quo;
end if;
end Recur;
-- Start of processing for Euclid
begin
Recur (P, Q, 0, 1, XT, YT, GCD);
X := XT;
Y := YT;
end Euclid;
function Euclid (P, Q : Int) return Int is
X, Y, GCD : Int;
pragma Unreferenced (Y, GCD);
begin
Euclid (P, Q, X, Y, GCD);
return X;
end Euclid;
-----------
-- Image --
-----------
function Image (Of_State : State) return String is
begin
return Int'Image (Of_State.X1) & ',' & Int'Image (Of_State.X2)
& ',' &
Int'Image (Of_State.P) & ',' & Int'Image (Of_State.Q);
end Image;
------------
-- Random --
------------
function Random (Gen : Generator) return Uniformly_Distributed is
Genp : constant Pointer := Gen.Gen_State'Unrestricted_Access;
begin
Genp.X1 := Square_Mod_N (Genp.X1, Genp.P);
Genp.X2 := Square_Mod_N (Genp.X2, Genp.Q);
return
Float ((Flt (((Genp.X2 - Genp.X1) * Genp.X)
mod Genp.Q) * Flt (Genp.P)
+ Flt (Genp.X1)) * Genp.Scl);
end Random;
-----------
-- Reset --
-----------
-- Version that works from given initiator value
procedure Reset (Gen : Generator; Initiator : Integer) is
Genp : constant Pointer := Gen.Gen_State'Unrestricted_Access;
X1, X2 : Int;
begin
X1 := 2 + Int (Initiator) mod (K1 - 3);
X2 := 2 + Int (Initiator) mod (K2 - 3);
-- Eliminate effects of small initiators
for J in 1 .. 5 loop
X1 := Square_Mod_N (X1, K1);
X2 := Square_Mod_N (X2, K2);
end loop;
Genp.all :=
(X1 => X1,
X2 => X2,
P => K1,
Q => K2,
X => 1,
Scl => Scal);
end Reset;
-- Version that works from specific saved state
procedure Reset (Gen : Generator; From_State : State) is
Genp : constant Pointer := Gen.Gen_State'Unrestricted_Access;
begin
Genp.all := From_State;
end Reset;
-- Version that works from calendar
procedure Reset (Gen : Generator) is
Genp : constant Pointer := Gen.Gen_State'Unrestricted_Access;
Now : constant Calendar.Time := Calendar.Clock;
X1, X2 : Int;
begin
X1 := Int (Calendar.Year (Now)) * 12 * 31 +
Int (Calendar.Month (Now)) * 31 +
Int (Calendar.Day (Now));
X2 := Int (Calendar.Seconds (Now) * Duration (1000.0));
X1 := 2 + X1 mod (K1 - 3);
X2 := 2 + X2 mod (K2 - 3);
-- Eliminate visible effects of same day starts
for J in 1 .. 5 loop
X1 := Square_Mod_N (X1, K1);
X2 := Square_Mod_N (X2, K2);
end loop;
Genp.all :=
(X1 => X1,
X2 => X2,
P => K1,
Q => K2,
X => 1,
Scl => Scal);
end Reset;
----------
-- Save --
----------
procedure Save (Gen : Generator; To_State : out State) is
begin
To_State := Gen.Gen_State;
end Save;
------------------
-- Square_Mod_N --
------------------
function Square_Mod_N (X, N : Int) return Int is
Temp : constant Flt := Flt (X) * Flt (X);
Div : Int;
begin
Div := Int (Temp / Flt (N));
Div := Int (Temp - Flt (Div) * Flt (N));
if Div < 0 then
return Div + N;
else
return Div;
end if;
end Square_Mod_N;
-----------
-- Value --
-----------
function Value (Coded_State : String) return State is
Last : constant Natural := Coded_State'Last;
Start : Positive := Coded_State'First;
Stop : Positive := Coded_State'First;
Outs : State;
begin
while Stop <= Last and then Coded_State (Stop) /= ',' loop
Stop := Stop + 1;
end loop;
if Stop > Last then
raise Constraint_Error;
end if;
Outs.X1 := Int'Value (Coded_State (Start .. Stop - 1));
Start := Stop + 1;
loop
Stop := Stop + 1;
exit when Stop > Last or else Coded_State (Stop) = ',';
end loop;
if Stop > Last then
raise Constraint_Error;
end if;
Outs.X2 := Int'Value (Coded_State (Start .. Stop - 1));
Start := Stop + 1;
loop
Stop := Stop + 1;
exit when Stop > Last or else Coded_State (Stop) = ',';
end loop;
if Stop > Last then
raise Constraint_Error;
end if;
Outs.P := Int'Value (Coded_State (Start .. Stop - 1));
Outs.Q := Int'Value (Coded_State (Stop + 1 .. Last));
Outs.X := Euclid (Outs.P, Outs.Q);
Outs.Scl := 1.0 / (Flt (Outs.P) * Flt (Outs.Q));
-- Now do *some* sanity checks
if Outs.Q < 31 or else Outs.P < 31
or else Outs.X1 not in 2 .. Outs.P - 1
or else Outs.X2 not in 2 .. Outs.Q - 1
then
raise Constraint_Error;
end if;
return Outs;
end Value;
end GNAT.MBBS_Float_Random;
|
with Support; use Support;
with ADMBase; use ADMBase;
package Metric.Kasner is
function set_3d_lapse (t, x, y, z : Real) return Real;
function set_3d_metric (t, x, y, z : Real) return MetricPointArray;
function set_3d_extcurv (t, x, y, z : Real) return ExtcurvPointArray;
function set_3d_lapse (t : Real; point : GridPoint) return Real;
function set_3d_metric (t : Real; point : GridPoint) return MetricPointArray;
function set_3d_extcurv (t : Real; point : GridPoint) return ExtcurvPointArray;
procedure get_pi (p1, p2, p3 : out Real);
procedure report_kasner_params;
end Metric.Kasner;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- Copyright (C) 2016-2021, 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.Unchecked_Conversion;
with Interfaces; use Interfaces;
with Interfaces.ARM_V7AR; use Interfaces.ARM_V7AR;
with System; use System;
with System.MPU_Definitions; use System.MPU_Definitions;
with System.Board_Parameters; use System.Board_Parameters;
package body System.MPU_Init is
--------------
-- MPU_Init --
--------------
procedure MPU_Init
is
SCTLR : Unsigned_32;
MPUIR : Unsigned_32;
Num_Rgn : Unsigned_32;
begin
-- Get the number of MPU regions
MPUIR := CP15.Get_MPUIR;
Num_Rgn := Shift_Right (MPUIR and 16#FF00#, 8);
-- Configure memory regions.
for Index in MPU_Config'Range loop
declare
C : MPU_Region_Configuration renames MPU_Config (Index);
begin
CP15.Set_MPU_Region_Number (Index);
CP15.Set_MPU_Region_Base_Address (C.Base_Address);
CP15.Set_MPU_Region_Size_And_Enable (As_W32 (C.Size_And_Enable));
CP15.Set_MPU_Region_Access_Control (As_W32 (C.Access_Control));
end;
end loop;
-- Disable the unused regions
for Index in MPU_Config'Last + 1 .. Num_Rgn loop
CP15.Set_MPU_Region_Number (Index);
CP15.Set_MPU_Region_Base_Address (16#0000_0000#);
CP15.Set_MPU_Region_Size_And_Enable (0);
CP15.Set_MPU_Region_Access_Control (0);
end loop;
-- Enable MPU with background region activated (respectively bits 0 and
-- 17 of SCTLR)
SCTLR := CP15.Get_SCTLR;
SCTLR := SCTLR or 1 or (2 ** 17);
Barriers.DSB;
CP15.Set_SCTLR (SCTLR);
Barriers.ISB;
end MPU_Init;
end System.MPU_Init;
|
--------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Video.Windows
--
-- Operating system window access and control.
--------------------------------------------------------------------------------------------------------------------
with Ada.Finalization;
with Ada.Strings.UTF_Encoding;
private with SDL.C_Pointers;
with SDL.Video.Displays;
with SDL.Video.Pixel_Formats;
with SDL.Video.Rectangles;
with SDL.Video.Surfaces;
with System;
package SDL.Video.Windows is
Window_Error : exception;
-- Return a special coordinate value to indicate that you don't care what
-- the window position is. Note that you can still specify a target
-- display.
function Undefined_Window_Position
(Display : Natural := 0) return SDL.Natural_Coordinate;
-- Return a special coordinate value to indicate that the window position
-- should be centered.
function Centered_Window_Position
(Display : Natural := 0) return SDL.Natural_Coordinate;
type Window_Flags is mod 2 ** 32 with
Convention => C;
Windowed : constant Window_Flags := 16#0000_0000#;
Full_Screen : constant Window_Flags := 16#0000_0001#;
OpenGL : constant Window_Flags := 16#0000_0002#;
Shown : constant Window_Flags := 16#0000_0004#;
Hidden : constant Window_Flags := 16#0000_0008#;
Borderless : constant Window_Flags := 16#0000_0010#;
Resizable : constant Window_Flags := 16#0000_0020#;
Minimised : constant Window_Flags := 16#0000_0040#;
Maximised : constant Window_Flags := 16#0000_0080#;
Input_Grabbed : constant Window_Flags := 16#0000_0100#;
Input_Focus : constant Window_Flags := 16#0000_0200#;
Mouse_Focus : constant Window_Flags := 16#0000_0400#;
Full_Screen_Desktop : constant Window_Flags := Full_Screen or 16#0000_1000#;
Foreign : constant Window_Flags := 16#0000_0800#; -- TODO: Not implemented yet.
-- TODO: This isn't raising any exception when I pass a different value for some reason.
subtype Full_Screen_Flags is Window_Flags with
Static_Predicate => Full_Screen_Flags in Windowed | Full_Screen | Full_Screen_Desktop;
type ID is mod 2 ** 32 with
Convention => C;
type Native_Window is private;
-- Allow users to derive new types from this.
type User_Data is tagged private;
type User_Data_Access is access all User_Data'Class;
pragma No_Strict_Aliasing (User_Data_Access);
-- TODO: Check this type!
type Brightness is digits 3 range 0.0 .. 1.0;
-- type Window is tagged limited Private;
type Window is new Ada.Finalization.Limited_Controlled with private;
Null_Window : constant Window;
-- TODO: Normalise the API by adding a destroy sub program and making this one call destroy,
-- see textures for more info.
overriding
procedure Finalize (Self : in out Window);
function Get_Brightness (Self : in Window) return Brightness with
Inline => True;
procedure Set_Brightness (Self : in out Window; How_Bright : in Brightness);
function Get_Data (Self : in Window; Name : in String) return User_Data_Access;
function Set_Data (Self : in out Window; Name : in String; Item : in User_Data_Access) return User_Data_Access;
function Display_Index (Self : in Window) return SDL.Video.Displays.Display_Indices;
procedure Get_Display_Mode (Self : in Window; Mode : out SDL.Video.Displays.Mode);
procedure Set_Display_Mode (Self : in out Window; Mode : in SDL.Video.Displays.Mode);
function Get_Flags (Self : in Window) return Window_Flags;
function From_ID (Window_ID : in ID) return Window;
procedure Get_Gamma_Ramp (Self : in Window; Red, Green, Blue : out SDL.Video.Pixel_Formats.Gamma_Ramp);
procedure Set_Gamma_Ramp (Self : in out Window; Red, Green, Blue : in SDL.Video.Pixel_Formats.Gamma_Ramp);
function Is_Grabbed (Self : in Window) return Boolean with
Inline => True;
procedure Set_Grabbed (Self : in out Window; Grabbed : in Boolean := True) with
Inline => True;
function Get_ID (Self : in Window) return ID with
Inline => True;
function Get_Maximum_Size (Self : in Window) return SDL.Sizes;
procedure Set_Maximum_Size (Self : in out Window; Size : in SDL.Sizes) with
Inline => True;
function Get_Minimum_Size (Self : in Window) return SDL.Sizes;
procedure Set_Minimum_Size (Self : in out Window; Size : in SDL.Sizes) with
Inline => True;
function Pixel_Format (Self : in Window) return SDL.Video.Pixel_Formats.Pixel_Format with
Inline => True;
function Get_Position (Self : in Window) return SDL.Natural_Coordinates;
procedure Set_Position (Self : in out Window; Position : SDL.Natural_Coordinates) with
Inline => True;
function Get_Size (Self : in Window) return SDL.Sizes;
procedure Set_Size (Self : in out Window; Size : in SDL.Sizes) with
Inline => True;
function Get_Surface (Self : in Window) return SDL.Video.Surfaces.Surface;
function Get_Title (Self : in Window) return Ada.Strings.UTF_Encoding.UTF_8_String;
procedure Set_Title (Self : in Window; Title : in Ada.Strings.UTF_Encoding.UTF_8_String);
-- SDL_GetWindowWMInfo
procedure Hide (Self : in Window) with
Inline => True;
procedure Show (Self : in Window) with
Inline => True;
procedure Maximise (Self : in Window) with
Inline => True;
procedure Minimise (Self : in Window) with
Inline => True;
procedure Raise_And_Focus (Self : in Window) with
Inline => True;
procedure Restore (Self : in Window) with
Inline => True;
procedure Set_Mode (Self : in out Window; Flags : in Full_Screen_Flags);
procedure Set_Icon (Self : in out Window; Icon : in SDL.Video.Surfaces.Surface) with
Inline => True;
procedure Update_Surface (Self : in Window);
procedure Update_Surface_Rectangle (Self : in Window; Rectangle : in SDL.Video.Rectangles.Rectangle);
procedure Update_Surface_Rectangles (Self : in Window; Rectangles : in SDL.Video.Rectangles.Rectangle_Arrays);
-- Determine whether any windows have been created.
function Exist return Boolean with
Inline => True;
private
-- TODO: Make this a proper type.
type Native_Window is new System.Address;
type User_Data is new Ada.Finalization.Controlled with null record;
type Window is new Ada.Finalization.Limited_Controlled with
record
Internal : SDL.C_Pointers.Windows_Pointer := null; -- System.Address := System.Null_Address;
Owns : Boolean := True; -- Does this Window type own the Internal data?
end record;
function Get_Internal_Window (Self : in Window) return SDL.C_Pointers.Windows_Pointer with
Export => True,
Convention => Ada;
Null_Window : constant Window := (Ada.Finalization.Limited_Controlled with
Internal => null, -- System.Null_Address,
Owns => True);
Total_Windows_Created : Natural := Natural'First;
procedure Increment_Windows;
procedure Decrement_Windows;
end SDL.Video.Windows;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . T E X T _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2021, 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. --
-- --
------------------------------------------------------------------------------
-- Implementation for the MPC5200B.
-- This package uses PSC1 and configures it for UART operation with a baud
-- speed of 115,200, 8 data bits, no parity and 1 stop bit.
with System;
with Interfaces;
with System.BB.Board_Parameters;
package body System.Text_IO is
use Interfaces;
use System.BB.Board_Parameters;
Baud_Rate : constant := 115_200;
-- UART baud rate
-- GPS Port Configuration Register
-- See MPC5200B User's Manual, Section 7.3.2
type Other_GPS_Data is mod 2 ** 29;
type PSC1_Pins_Configuration is (GPIO, UART);
for PSC1_Pins_Configuration use (GPIO => 2#0#, UART => 2#100#);
type UART_GPS_Port_Configuration is record
Other_Data : Other_GPS_Data;
PSC1 : PSC1_Pins_Configuration;
end record with Size => 32;
for UART_GPS_Port_Configuration use record
Other_Data at 0 range 0 .. 28;
PSC1 at 0 range 29 .. 31;
end record;
GPS_Port_Configuration_Register : UART_GPS_Port_Configuration
with Volatile_Full_Access,
Address =>
System'To_Address (MBAR + 16#0B00#);
-- PSC1 Registers
-- See MPC5200B User's Manual, Chapter 15
pragma Warnings (Off, "*is not referenced*");
-- Disable warnings on unused interface entities
PSC1_Base_Address : constant := MBAR + 16#2000#;
Mode_Offset : constant := 16#00#;
Status_Offset : constant := 16#04#;
Clock_Select_Offset : constant := 16#04#;
Command_Offset : constant := 16#08#;
Buffer_Offset : constant := 16#0C#;
Counter_Timer_Upper_Offfset : constant := 16#18#;
Counter_Timer_Lower_Offfset : constant := 16#1C#;
Serial_Interface_Control_Offset : constant := 16#40#;
Tx_FIFO_Control_Offset : constant := 16#88#;
Transmitter_FIFO_Alarm_Offset : constant := 16#8E#;
type Receiver_Interrupt_Source is (RxRDY, FFULL);
type Parity_Mode is (With_Parity, Force_Parity, No_Parity, Multidrop_Mode);
type Parity_Option is (Even_Low_Data_Char, Odd_High_Addr_Char);
type Bits_Option is (Five, Six, Seven, Eight);
type Mode_1 is record
Receiver_Request_To_Send : Boolean;
Receiver_Interrupt : Receiver_Interrupt_Source;
Parity : Parity_Mode;
Parity_Type : Parity_Option;
Bits_Per_Character : Bits_Option;
end record;
for Mode_1 use record
Receiver_Request_To_Send at 0 range 0 .. 0;
Receiver_Interrupt at 0 range 1 .. 1;
Parity at 0 range 3 .. 4;
Parity_Type at 0 range 5 .. 5;
Bits_Per_Character at 0 range 6 .. 7;
end record;
type Channel_Mode_Type is
(Normal, Automatic_Echo, Local_Loop_Back, Remote_Loop_Back);
type Four_Bits is mod 2 ** 4;
type Mode_2 is record
Channel_Mode : Channel_Mode_Type;
Transmitter_Ready_To_Send : Boolean;
Transmitter_Clear_To_Send : Boolean;
Stop_Bit_Length : Four_Bits;
end record;
for Mode_2 use record
Channel_Mode at 0 range 0 .. 1;
Transmitter_Ready_To_Send at 0 range 2 .. 2;
Transmitter_Clear_To_Send at 0 range 3 .. 3;
Stop_Bit_Length at 0 range 4 .. 7;
end record;
type Status is record
Received_Break : Boolean;
Framing_Error : Boolean;
Parity_Error : Boolean;
Overrun_Error : Boolean;
Transmitter_Empty : Boolean;
Transmitter_Ready : Boolean;
Receiver_FIFO_Full : Boolean;
Receiver_Ready : Boolean;
DCD_Error : Boolean;
Error_Status_Detect : Boolean;
end record with Size => 16;
for Status use record
Received_Break at 0 range 0 .. 0;
Framing_Error at 0 range 1 .. 1;
Parity_Error at 0 range 2 .. 2;
Overrun_Error at 0 range 3 .. 3;
Transmitter_Empty at 0 range 4 .. 4;
Transmitter_Ready at 0 range 5 .. 5;
Receiver_FIFO_Full at 0 range 6 .. 6;
Receiver_Ready at 0 range 7 .. 7;
DCD_Error at 0 range 8 .. 8;
Error_Status_Detect at 0 range 9 .. 9;
end record;
type Clock_Source is
(IPB_Divided_By_32, Disable_Clock, IPB_Divided_By_4);
for Clock_Source use
(IPB_Divided_By_32 => 2#0#,
Disable_Clock => 2#1110#,
IPB_Divided_By_4 => 2#1111#);
type Clock_Select is record
Receiver_Clock_Select : Clock_Source;
Transmitter_Clock_Select : Clock_Source;
end record;
for Clock_Select use record
Receiver_Clock_Select at 0 range 0 .. 3;
Transmitter_Clock_Select at 0 range 4 .. 7;
end record;
type Misc_Commands is
(No_Command, Reset_Mode_Register_Pointer, Reset_Receiver,
Reset_Transmitter, Reset_Error_Status, Reset_Break_Change_Interrupt,
Start_Break, Stop_Break);
type Tx_Rx_Commands is (No_Action, Enable, Disable);
type Command is record
Misc : Misc_Commands;
Transmitter : Tx_Rx_Commands;
Receiver : Tx_Rx_Commands;
end record;
for Command use record
Misc at 0 range 1 .. 3;
Transmitter at 0 range 4 .. 5;
Receiver at 0 range 6 .. 7;
end record;
type PSC_Modes is (UART, UART_DCD_Effective);
for PSC_Modes use (UART => 2#0000#, UART_DCD_Effective => 2#1000#);
type Serial_Interface_Control is record
Operation_Mode : PSC_Modes;
end record;
for Serial_Interface_Control use record
Operation_Mode at 0 range 4 .. 7;
end record;
type Alarm_Type is mod 2 ** 11 with Size => 16;
Mode_1_Register : Mode_1
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Mode_Offset);
Mode_2_Register : Mode_2
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Mode_Offset);
Status_Register : Status
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Status_Offset);
Clock_Select_Register : Clock_Select
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Clock_Select_Offset);
Command_Register : Command
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Command_Offset);
Transmitter_Buffer : Character
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Buffer_Offset);
Receiver_Buffer : Character
with Volatile_Full_Access,
Address => System'To_Address (PSC1_Base_Address + Buffer_Offset);
Counter_Timer_Upper_Register : Unsigned_8
with Volatile_Full_Access,
Address =>
System'To_Address (PSC1_Base_Address + Counter_Timer_Upper_Offfset);
Counter_Timer_Lower_Register : Unsigned_8
with Volatile_Full_Access,
Address =>
System'To_Address (PSC1_Base_Address + Counter_Timer_Lower_Offfset);
Serial_Interface_Control_Register : Serial_Interface_Control
with Volatile_Full_Access,
Address =>
System'To_Address
(PSC1_Base_Address + Serial_Interface_Control_Offset);
Tx_FIFO_Control_Register : Unsigned_8
with Volatile_Full_Access, Size => 8,
Address =>
System'To_Address (PSC1_Base_Address + Tx_FIFO_Control_Offset);
Transmitter_FIFO_Alarm : Alarm_Type
with Volatile_Full_Access, Size => 16,
Address =>
System'To_Address (PSC1_Base_Address + Transmitter_FIFO_Alarm_Offset);
---------
-- Get --
---------
function Get return Character is
begin
return Receiver_Buffer;
end Get;
----------------
-- Initialize --
----------------
procedure Initialize is
Counter_Timer : constant Unsigned_16 :=
Unsigned_16 (IPB_Frequency / (32 * Baud_Rate) + 1);
begin
-- Initialize PSC1 following the guide in MPC5200B User's Manual,
-- Section 15.3.1.
-- Explicitly set Mode Register Pointer to Mode_1_Register in case the
-- bootloader had set up PSC1 for its own use. If we did not do this
-- then the next instructions will end up writing to the wrong address.
Command_Register :=
(Misc => Reset_Mode_Register_Pointer,
Transmitter => No_Action,
Receiver => No_Action);
-- Reset the Transmitter and receiver to a known state before
-- configuring.
Command_Register :=
(Misc => Reset_Receiver,
Transmitter => No_Action,
Receiver => No_Action);
Command_Register :=
(Misc => Reset_Transmitter,
Transmitter => No_Action,
Receiver => No_Action);
-- PSC1 is configured for eight data bits, no parity and 1 stop bit
Clock_Select_Register :=
(Receiver_Clock_Select => IPB_Divided_By_32,
Transmitter_Clock_Select => IPB_Divided_By_32);
Serial_Interface_Control_Register :=
(Operation_Mode => UART);
Mode_1_Register :=
(Receiver_Request_To_Send => False,
Receiver_Interrupt => RxRDY,
Parity => No_Parity,
Parity_Type => Even_Low_Data_Char,
Bits_Per_Character => Eight);
Mode_2_Register :=
(Channel_Mode => Normal,
Transmitter_Ready_To_Send => False,
Transmitter_Clear_To_Send => False,
Stop_Bit_Length => 2#0111#);
-- Split Counter_Timer into its upper and lower halves
Counter_Timer_Lower_Register := Unsigned_8 (Counter_Timer and 16#FF#);
Counter_Timer_Upper_Register :=
Unsigned_8 (Shift_Right (Counter_Timer, 8));
Tx_FIFO_Control_Register := 1;
Transmitter_FIFO_Alarm := 428;
GPS_Port_Configuration_Register.PSC1 := UART;
-- Enable PSC1 transmitter and receiver units
Command_Register :=
(Misc => No_Command,
Transmitter => Enable,
Receiver => Enable);
Initialized := True;
end Initialize;
-----------------
-- Is_Rx_Ready --
-----------------
function Is_Rx_Ready return Boolean is
begin
return Status_Register.Receiver_Ready;
end Is_Rx_Ready;
-----------------
-- Is_Tx_Ready --
-----------------
function Is_Tx_Ready return Boolean is
begin
return Status_Register.Transmitter_Ready;
end Is_Tx_Ready;
---------
-- Put --
---------
procedure Put (C : Character) is
begin
Transmitter_Buffer := C;
end Put;
----------------------------
-- Use_Cr_Lf_For_New_Line --
----------------------------
function Use_Cr_Lf_For_New_Line return Boolean is
begin
return True;
end Use_Cr_Lf_For_New_Line;
end System.Text_IO;
|
with System.Long_Long_Float_Types;
package body Ada.Float is
pragma Suppress (All_Checks);
function Infinity return Float_Type is
begin
if Float_Type'Digits <= Standard.Float'Digits then
declare
function inff return Standard.Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_inff";
begin
return Float_Type (inff);
end;
elsif Float_Type'Digits <= Long_Float'Digits then
declare
function inf return Long_Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_inf";
begin
return Float_Type (inf);
end;
else
declare
function infl return Long_Long_Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_infl";
begin
return Float_Type (infl);
end;
end if;
end Infinity;
function NaN return Float_Type is
begin
if Float_Type'Digits <= Standard.Float'Digits then
declare
function nanf (tagp : access constant Character)
return Standard.Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_nanf";
Z : constant array (0 .. 0) of aliased Character :=
(0 => Character'Val (0));
begin
return Float_Type (nanf (Z (0)'Access));
end;
elsif Float_Type'Digits <= Long_Float'Digits then
declare
function nan (tagp : access constant Character) return Long_Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_nan";
Z : constant array (0 .. 0) of aliased Character :=
(0 => Character'Val (0));
begin
return Float_Type (nan (Z (0)'Access));
end;
else
declare
function nanl (tagp : access constant Character)
return Long_Long_Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_nanl";
Z : constant array (0 .. 0) of aliased Character :=
(0 => Character'Val (0));
begin
return Float_Type (nanl (Z (0)'Access));
end;
end if;
end NaN;
function Is_Infinity (X : Float_Type) return Boolean is
begin
if Float_Type'Digits <= Standard.Float'Digits then
declare
function isinff (x : Standard.Float) return Integer
with Import,
Convention => Intrinsic, External_Name => "__builtin_isinff";
begin
return isinff (Standard.Float (X)) /= 0;
end;
elsif Float_Type'Digits <= Long_Float'Digits then
declare
function isinf (x : Long_Float) return Integer
with Import,
Convention => Intrinsic, External_Name => "__builtin_isinf";
pragma Warnings (Off, isinf);
-- [gcc 4.6] excessive prototype checking
begin
return isinf (Long_Float (X)) /= 0;
end;
else
declare
function isinfl (x : Long_Long_Float) return Integer
with Import,
Convention => Intrinsic, External_Name => "__builtin_isinfl";
begin
return isinfl (Long_Long_Float (X)) /= 0;
end;
end if;
end Is_Infinity;
function Is_NaN (X : Float_Type) return Boolean is
begin
if Float_Type'Digits <= Standard.Float'Digits then
declare
function isnanf (x : Standard.Float) return Integer
with Import,
Convention => Intrinsic, External_Name => "__builtin_isnanf";
begin
return isnanf (Standard.Float (X)) /= 0;
end;
elsif Float_Type'Digits <= Long_Float'Digits then
declare
function isnan (x : Long_Float) return Integer
with Import,
Convention => Intrinsic, External_Name => "__builtin_isnan";
pragma Warnings (Off, isnan);
-- [gcc 4.6] excessive prototype checking
begin
return isnan (Long_Float (X)) /= 0;
end;
else
declare
function isnanl (x : Long_Long_Float) return Integer
with Import,
Convention => Intrinsic, External_Name => "__builtin_isnanl";
begin
return isnanl (Long_Long_Float (X)) /= 0;
end;
end if;
end Is_NaN;
procedure Divide (
Dividend : Dividend_Type;
Divisor : Divisor_Type;
Quotient : out Quotient_Type;
Remainder : out Remainder_Type) is
begin
System.Long_Long_Float_Types.Divide (
Long_Long_Float (Dividend),
Long_Long_Float (Divisor),
Long_Long_Float (Quotient),
Long_Long_Float (Remainder));
end Divide;
procedure Divide_By_1 (
Dividend : Dividend_Type;
Quotient : out Quotient_Type;
Remainder : out Remainder_Type) is
begin
if Dividend_Type'Digits <= Standard.Float'Digits then
declare
function modff (
value : Standard.Float;
iptr : access Standard.Float)
return Standard.Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_modff";
Q : aliased Standard.Float;
begin
Remainder := Remainder_Type (
modff (Standard.Float (Dividend), Q'Access));
Quotient := Quotient_Type (Q);
end;
elsif Dividend_Type'Digits <= Long_Float'Digits then
declare
function modf (
value : Long_Float;
iptr : access Long_Float)
return Long_Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_modf";
Q : aliased Long_Float;
begin
Remainder := Remainder_Type (
modf (Long_Float (Dividend), Q'Access));
Quotient := Quotient_Type (Q);
end;
else
declare
function modfl (
value : Long_Long_Float;
iptr : access Long_Long_Float)
return Long_Long_Float
with Import,
Convention => Intrinsic, External_Name => "__builtin_modfl";
Q : aliased Long_Long_Float;
begin
Remainder := Remainder_Type (
modfl (Long_Long_Float (Dividend), Q'Access));
Quotient := Quotient_Type (Q);
end;
end if;
end Divide_By_1;
procedure Modulo_Divide_By_1 (
Dividend : Dividend_Type;
Quotient : out Quotient_Type;
Remainder : out Remainder_Type)
is
procedure Divide_By_1 is
new Float.Divide_By_1 (Dividend_Type, Quotient_Type, Remainder_Type);
begin
Divide_By_1 (Dividend, Quotient, Remainder);
if Remainder < 0.0 then
Quotient := Quotient - 1.0;
Remainder := Remainder + 1.0;
end if;
end Modulo_Divide_By_1;
end Ada.Float;
|
pragma Profile_Warnings (Ravenscar);
with profile_warning_p;
package profile_warning is
pragma Elaborate_Body;
procedure I is new profile_warning_p.Proc;
end;
|
-- Copyright 2016-2021 Bartek thindil Jasicki
--
-- This file is part of Steam Sky.
--
-- Steam Sky 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.
--
-- Steam Sky 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 Steam Sky. If not, see <http://www.gnu.org/licenses/>.
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ships; use Ships;
-- ****h* Config/Config
-- FUNCTION
-- Provide code for load and save the game configuration
-- SOURCE
package Config is
-- ****
-- ****t* Config/Config.Bonus_Type
-- FUNCTION
-- Used to store the game difficulty settings
-- SOURCE
subtype Bonus_Type is Float range 0.0 .. 5.0;
-- ****
-- ****t* Config/Config.Difficulty_Type
-- FUNCTION
-- Used to set the game difficulty level
-- SOURCE
type Difficulty_Type is
(VERY_EASY, EASY, NORMAL, HARD, VERY_HARD, CUSTOM) with
Default_Value => NORMAL;
-- ****
-- ****d* Config/Config.Default_Difficulty_Type
-- FUNCTION
-- Default difficulty level for the game
-- SOURCE
Default_Difficulty_Type: constant Difficulty_Type := NORMAL;
-- ****
-- ****s* Config/Config.New_Game_Record
-- FUNCTION
-- Data for new game settings
-- PARAMETERS
-- Player_Name - Default player name
-- Player_Gender - Default player gender
-- Ship_Name - Default ship name
-- Player_Faction - Default player faction index
-- Player_Career - Default player career index
-- Starting_Base - Default starting base type
-- Enemy_Damage_Bonus - Default bonus for enemy ship to damage
-- Player_Damage_Bonus - Default bonus for player ship to damage
-- Enemy_Melee_Damage_Bonus - Default bonus for enemy to damage in melee
-- combat
-- Player_Melee_Damage_Bonus - Default bonus for player and player's ship
-- crew to damage in melee combat
-- Experience_Bonus - Default bonus to gained experience
-- Reputation_Bonus - Default bonus to gained or lost reputation in
-- bases
-- Upgrade_Cost_Bonus - Default bonus to amount of materials needed for
-- player's ship upgrades.
-- Prices_Bonus - Default bonus to prices for services in bases
-- Difficulty_Level - Default the game difficulty level
-- SOURCE
type New_Game_Record is record
Player_Name: Unbounded_String;
Player_Gender: Character;
Ship_Name: Unbounded_String;
Player_Faction: Unbounded_String;
Player_Career: Unbounded_String;
Starting_Base: Unbounded_String;
Enemy_Damage_Bonus: Bonus_Type;
Player_Damage_Bonus: Bonus_Type;
Enemy_Melee_Damage_Bonus: Bonus_Type;
Player_Melee_Damage_Bonus: Bonus_Type;
Experience_Bonus: Bonus_Type;
Reputation_Bonus: Bonus_Type;
Upgrade_Cost_Bonus: Bonus_Type;
Prices_Bonus: Bonus_Type;
Difficulty_Level: Difficulty_Type;
end record;
-- ****
-- ****d* Config/Config.Default_New_Game_Settings
-- FUNCTION
-- Default settings for the new game
-- SOURCE
Default_New_Game_Settings: constant New_Game_Record :=
(Player_Name => To_Unbounded_String(Source => "Laeran"),
Player_Gender => 'M',
Ship_Name => To_Unbounded_String(Source => "Anaria"),
Player_Faction => To_Unbounded_String(Source => "POLEIS"),
Player_Career => To_Unbounded_String(Source => "general"),
Starting_Base => To_Unbounded_String(Source => "Any"),
Enemy_Damage_Bonus => 1.0, Player_Damage_Bonus => 1.0,
Enemy_Melee_Damage_Bonus => 1.0, Player_Melee_Damage_Bonus => 1.0,
Experience_Bonus => 1.0, Reputation_Bonus => 1.0,
Upgrade_Cost_Bonus => 1.0, Prices_Bonus => 1.0,
Difficulty_Level => Default_Difficulty_Type);
-- ****
-- ****t* Config/Config.Auto_Move_Break
-- FUNCTION
-- Options when stop auto move of player ship
-- SOURCE
type Auto_Move_Break is (NEVER, ANY, FRIENDLY, ENEMY) with
Default_Value => NEVER;
-- ****
-- ****d* Config/Config.Default_Auto_Move_Stop
-- FUNCTION
-- Default setting for stop automovement of the player ship
-- SOURCE
Default_Auto_Move_Stop: constant Auto_Move_Break := NEVER;
-- ****
-- ****t* Config/Config.Messages_Order_Type
-- FUNCTION
-- Options to set showing messages order
-- SOURCE
type Messages_Order_Type is (OLDER_FIRST, NEWER_FIRST) with
Default_Value => OLDER_FIRST;
-- ****
-- ****d* Config/Config.Default_Messages_Order
-- FUNCTION
-- Default order of show the last messages
-- SOURCE
Default_Messages_Order: constant Messages_Order_Type := OLDER_FIRST;
-- ****
-- ****t* Config/Config.Auto_Save_Type
-- FUNCTION
-- Type used to set how often autosave is done
-- SOURCE
type Auto_Save_Type is (NONE, DOCK, UNDOCK, DAILY, MONTHLY, YEARLY) with
Default_Value => NONE;
-- ****
-- ****d* Config/Config.Default_Auto_Save_Time
-- FUNCTION
-- Default time when to auto save the game
-- SOURCE
Default_Auto_Save_Time: constant Auto_Save_Type := NONE;
-- ****
-- ****s* Config/Config.Game_Settings_Record
-- FUNCTION
-- Data for game settings
-- PARAMETERS
-- Auto_Rest - If true, rest when pilot/engineer need rest
-- Undock_Speed - Default player ship speed after undock
-- Auto_Center - If true, back to ship after sets destination for
-- it
-- Auto_Return - If true, set base as destination for ship after
-- finished mission
-- Auto_Finish - If true, complete mission if ship is near
-- corresponding base
-- Low_Fuel - Amount of fuel below which warning about low
-- level is show
-- Low_Drinks - Amount of drinkis below which warning about low
-- level is show
-- Low_Food - Amount of food below which warning about low
-- level is show
-- Auto_Move_Stop - When stop automoving of player ship
-- Window_Width - Game window default width
-- Window_Height - Game window default height
-- Messages_Limit - Max amount of messages showed in game
-- Saved_Messages - Max amount fo messages saved to file
-- Help_Font_Size - Size of font used in help
-- Map_Font_Size - Size of font used in map
-- Interface_Font_Size - Size of font used in interface
-- Interface_Theme - Name of current user interface theme
-- Messages_Order - Order of showing messages
-- Auto_Ask_For_Bases - If true, auto ask for new bases when ship docked
-- Auto_Ask_For_Events - If true, auto ask for new events in bases when
-- ship docked
-- Show_Tooltips - If true, show tooltips to player
-- Show_Last_Messages - If true, show last messages window everywhere
-- Messages_Position - Height of last messages window in pixels from
-- bottom of the game window
-- Full_Screen - If true, set the game window in full screen mode
-- Auto_Close_Messages_Time - Amount of seconds after which message box is
-- auto closed
-- Auto_Save - How often game is autosaved
-- Topic_Position - Position of help topics window in pixels from
-- top of the help window
-- Show_Numbers - If true, show numbers values instead of text for
-- various things (like weapon strength, etc)
-- Right_Button - If true, use right mouse button for show various
-- in game menus. Otherwise use the left button
-- Lists_Limit - The amount of items displayed in various lists
-- SOURCE
type Game_Settings_Record is record
Auto_Rest: Boolean;
Undock_Speed: Ship_Speed;
Auto_Center: Boolean;
Auto_Return: Boolean;
Auto_Finish: Boolean;
Low_Fuel: Positive range 1 .. 10_000;
Low_Drinks: Positive range 1 .. 10_000;
Low_Food: Positive range 1 .. 10_000;
Auto_Move_Stop: Auto_Move_Break;
Window_Width: Positive := 800;
Window_Height: Positive := 600;
Messages_Limit: Positive range 10 .. 5_000;
Saved_Messages: Positive range 5 .. 200;
Help_Font_Size: Positive range 2 .. 51;
Map_Font_Size: Positive range 2 .. 51;
Interface_Font_Size: Positive range 2 .. 51;
Interface_Theme: Unbounded_String;
Messages_Order: Messages_Order_Type;
Auto_Ask_For_Bases: Boolean;
Auto_Ask_For_Events: Boolean;
Show_Tooltips: Boolean;
Show_Last_Messages: Boolean;
Messages_Position: Natural;
Full_Screen: Boolean;
Auto_Close_Messages_Time: Positive range 1 .. 60;
Auto_Save: Auto_Save_Type;
Topics_Position: Natural;
Show_Numbers: Boolean;
Right_Button: Boolean;
Lists_Limit: Positive range 5 .. 100;
end record;
-- ****
-- ****d* Config/Config.Default_Game_Settings
-- FUNCTION
-- Default setting for the game
-- SOURCE
Default_Game_Settings: constant Game_Settings_Record :=
(Auto_Rest => True, Undock_Speed => FULL_SPEED, Auto_Center => True,
Auto_Return => True, Auto_Finish => True, Low_Fuel => 100,
Low_Drinks => 50, Low_Food => 25,
Auto_Move_Stop => Default_Auto_Move_Stop, Window_Width => 800,
Window_Height => 600, Messages_Limit => 500, Saved_Messages => 10,
Help_Font_Size => 14, Map_Font_Size => 16, Interface_Font_Size => 14,
Interface_Theme => To_Unbounded_String(Source => "steamsky"),
Messages_Order => Default_Messages_Order, Auto_Ask_For_Bases => False,
Auto_Ask_For_Events => False, Show_Tooltips => True,
Show_Last_Messages => True, Messages_Position => 213,
Full_Screen => False, Auto_Close_Messages_Time => 6,
Auto_Save => Default_Auto_Save_Time, Topics_Position => 200,
Show_Numbers => False, Right_Button => False, Lists_Limit => 25);
-- ****
-- ****v* Config/Config.New_Game_Settings
-- FUNCTION
-- Settings for the new game
-- SOURCE
New_Game_Settings: New_Game_Record;
-- ****
-- ****v* Config/Config.Game_Settings
-- FUNCTION
-- General settings for the game
-- SOURCE
Game_Settings: Game_Settings_Record;
-- ****
-- ****f* Config/Config.Load_Config
-- FUNCTION
-- Load game configuration from file
-- SOURCE
procedure Load_Config;
-- ****
-- ****f* Config/Config.SaveConfig
-- FUNCTION
-- Save game configuration to file
-- SOURCE
procedure Save_Config;
-- ****
end Config;
|
with Ada.Characters.Latin_9,
Ada.Exceptions,
Ada.Integer_Text_IO,
Ada.Text_IO;
with Utils;
procedure Main is
use Ada.Text_IO;
use Utils;
package L9 renames Ada.Characters.Latin_9;
type Movements is (Forward, Down, Up);
File : File_Type;
Horizontal_Position : Natural := 0;
Depth : Natural := 0;
Aim : Natural := 0;
begin
Get_File (File);
-- Get all values
while not End_Of_File (File) loop
declare
Line : constant String := Get_Line (File);
begin
Split_Value : for Index in Line'Range loop
if Line (Index) = L9.Space then
Solve_Puzzle : declare
Movement : constant Movements := Movements'Value (Line (Line'First .. Index - 1));
Value : constant Natural := Natural'Value (Line (Index + 1 .. Line'Last));
begin
case Movement is
when Forward =>
Horizontal_Position := Horizontal_Position + Value;
Depth := Depth + Aim * Value;
when Down =>
Aim := Aim + Value;
when Up =>
Aim := Aim - Value;
end case;
end Solve_Puzzle;
exit Split_Value;
end if;
end loop Split_Value;
end;
end loop;
-- Print the result
Put ("Result: ");
Ada.Integer_Text_IO.Put (Item => Horizontal_Position * Depth,
Width => 0);
New_Line;
Close_If_Open (File);
exception
when Occur : others =>
Put_Line ("Error: " & Ada.Exceptions.Exception_Message (Occur));
Close_If_Open (File);
end Main;
|
with impact.d2.orbs.Collision,
impact.d2.orbs.Contact,
impact.d2.orbs.Solid,
impact.d2.Math;
package impact.d2.orbs.toi_Solver
--
--
--
is
use impact.d2.Math;
--
-- class b2Contact;
-- class b2Body;
-- struct b2TOIConstraint;
-- class b2StackAllocator;
-- This is a pure position solver for a single movable body in contact with
-- multiple non-moving bodies.
--
type b2TOISolver is tagged private;
procedure destruct (Self : in out b2TOISolver);
procedure Initialize (Self : in out b2TOISolver; contacts : in Contact.views;
toiBody : access Solid.item'Class);
procedure Clear (Self : in out b2TOISolver);
-- Perform one solver iteration. Returns true if converged.
--
function Solve (Self : in b2TOISolver; baumgarte : float32) return Boolean;
private
type Solid_view is access all Solid.item'Class;
type b2TOIConstraint is
record
localPoints : b2Vec2_array (1 .. b2_maxManifoldPoints);
localNormal : b2Vec2;
localPoint : b2Vec2;
kind : collision.b2Manifold_Kind;
radius : float32;
pointCount : int32;
bodyA : Solid_view;
bodyB : Solid_view;
end record;
type b2TOIConstraints is array (int32 range <>) of aliased b2TOIConstraint;
type b2TOIConstraints_view is access all b2TOIConstraints;
type b2TOISolver is tagged
record
m_constraints : b2TOIConstraints_view;
m_count : int32 := 0;
m_toiBody : access Solid.item'Class;
end record;
-- class b2TOISolver
-- {
-- public:
-- ~b2TOISolver();
--
-- void Initialize(b2Contact** contacts, int32 contactCount, b2Body* toiBody);
-- void Clear();
--
-- // Perform one solver iteration. Returns true if converged.
-- bool Solve(float32 baumgarte);
--
-- private:
--
-- b2TOIConstraint* m_constraints;
-- int32 m_count;
-- b2Body* m_toiBody;
-- b2StackAllocator* m_allocator;
-- };
--
-- #endif
end impact.d2.orbs.toi_Solver;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- B I N D O . U N I T S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2019-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Bindo.Writers;
use Bindo.Writers;
use Bindo.Writers.Phase_Writers;
package body Bindo.Units is
-------------------
-- Signature set --
-------------------
package Signature_Sets is new Membership_Sets
(Element_Type => Invocation_Signature_Id,
"=" => "=",
Hash => Hash_Invocation_Signature);
-----------------
-- Global data --
-----------------
-- The following set stores all invocation signatures that appear in
-- elaborable units.
Elaborable_Constructs : Signature_Sets.Membership_Set := Signature_Sets.Nil;
-- The following set stores all units the need to be elaborated
Elaborable_Units : Unit_Sets.Membership_Set := Unit_Sets.Nil;
-----------------------
-- Local subprograms --
-----------------------
function Corresponding_Unit (Nam : Name_Id) return Unit_Id;
pragma Inline (Corresponding_Unit);
-- Obtain the unit which corresponds to name Nam
function Is_Stand_Alone_Library_Unit (U_Id : Unit_Id) return Boolean;
pragma Inline (Is_Stand_Alone_Library_Unit);
-- Determine whether unit U_Id is part of a stand-alone library
procedure Process_Invocation_Construct (IC_Id : Invocation_Construct_Id);
pragma Inline (Process_Invocation_Construct);
-- Process invocation construct IC_Id by adding its signature to set
-- Elaborable_Constructs_Set.
procedure Process_Invocation_Constructs (U_Id : Unit_Id);
pragma Inline (Process_Invocation_Constructs);
-- Process all invocation constructs of unit U_Id for classification
-- purposes.
procedure Process_Unit (U_Id : Unit_Id);
pragma Inline (Process_Unit);
-- Process unit U_Id for unit classification purposes
------------------------------
-- Collect_Elaborable_Units --
------------------------------
procedure Collect_Elaborable_Units is
begin
Start_Phase (Unit_Collection);
for U_Id in ALI.Units.First .. ALI.Units.Last loop
Process_Unit (U_Id);
end loop;
End_Phase (Unit_Collection);
end Collect_Elaborable_Units;
------------------------
-- Corresponding_Body --
------------------------
function Corresponding_Body (U_Id : Unit_Id) return Unit_Id is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
pragma Assert (U_Rec.Utype = Is_Spec);
return U_Id - 1;
end Corresponding_Body;
------------------------
-- Corresponding_Spec --
------------------------
function Corresponding_Spec (U_Id : Unit_Id) return Unit_Id is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
pragma Assert (U_Rec.Utype = Is_Body);
return U_Id + 1;
end Corresponding_Spec;
------------------------
-- Corresponding_Unit --
------------------------
function Corresponding_Unit (FNam : File_Name_Type) return Unit_Id is
begin
return Corresponding_Unit (Name_Id (FNam));
end Corresponding_Unit;
------------------------
-- Corresponding_Unit --
------------------------
function Corresponding_Unit (Nam : Name_Id) return Unit_Id is
begin
return Unit_Id (Get_Name_Table_Int (Nam));
end Corresponding_Unit;
------------------------
-- Corresponding_Unit --
------------------------
function Corresponding_Unit (UNam : Unit_Name_Type) return Unit_Id is
begin
return Corresponding_Unit (Name_Id (UNam));
end Corresponding_Unit;
---------------
-- File_Name --
---------------
function File_Name (U_Id : Unit_Id) return File_Name_Type is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.Sfile;
end File_Name;
--------------------
-- Finalize_Units --
--------------------
procedure Finalize_Units is
begin
Signature_Sets.Destroy (Elaborable_Constructs);
Unit_Sets.Destroy (Elaborable_Units);
end Finalize_Units;
------------------------------
-- For_Each_Elaborable_Unit --
------------------------------
procedure For_Each_Elaborable_Unit (Processor : Unit_Processor_Ptr) is
Iter : Elaborable_Units_Iterator;
U_Id : Unit_Id;
begin
Iter := Iterate_Elaborable_Units;
while Has_Next (Iter) loop
Next (Iter, U_Id);
Processor.all (U_Id);
end loop;
end For_Each_Elaborable_Unit;
-------------------
-- For_Each_Unit --
-------------------
procedure For_Each_Unit (Processor : Unit_Processor_Ptr) is
begin
for U_Id in ALI.Units.First .. ALI.Units.Last loop
Processor.all (U_Id);
end loop;
end For_Each_Unit;
--------------
-- Has_Next --
--------------
function Has_Next (Iter : Elaborable_Units_Iterator) return Boolean is
begin
return Unit_Sets.Has_Next (Unit_Sets.Iterator (Iter));
end Has_Next;
-----------------------------
-- Has_No_Elaboration_Code --
-----------------------------
function Has_No_Elaboration_Code (U_Id : Unit_Id) return Boolean is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.No_Elab;
end Has_No_Elaboration_Code;
-------------------------------
-- Hash_Invocation_Signature --
-------------------------------
function Hash_Invocation_Signature
(IS_Id : Invocation_Signature_Id) return Bucket_Range_Type
is
begin
pragma Assert (Present (IS_Id));
return Bucket_Range_Type (IS_Id);
end Hash_Invocation_Signature;
---------------
-- Hash_Unit --
---------------
function Hash_Unit (U_Id : Unit_Id) return Bucket_Range_Type is
begin
pragma Assert (Present (U_Id));
return Bucket_Range_Type (U_Id);
end Hash_Unit;
----------------------
-- Initialize_Units --
----------------------
procedure Initialize_Units is
begin
Elaborable_Constructs := Signature_Sets.Create (Number_Of_Units);
Elaborable_Units := Unit_Sets.Create (Number_Of_Units);
end Initialize_Units;
-------------------------------
-- Invocation_Graph_Encoding --
-------------------------------
function Invocation_Graph_Encoding
(U_Id : Unit_Id) return Invocation_Graph_Encoding_Kind
is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
U_ALI : ALIs_Record renames ALI.ALIs.Table (U_Rec.My_ALI);
begin
return U_ALI.Invocation_Graph_Encoding;
end Invocation_Graph_Encoding;
-------------------------------
-- Is_Dynamically_Elaborated --
-------------------------------
function Is_Dynamically_Elaborated (U_Id : Unit_Id) return Boolean is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.Dynamic_Elab;
end Is_Dynamically_Elaborated;
----------------------
-- Is_Internal_Unit --
----------------------
function Is_Internal_Unit (U_Id : Unit_Id) return Boolean is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.Internal;
end Is_Internal_Unit;
------------------------
-- Is_Predefined_Unit --
------------------------
function Is_Predefined_Unit (U_Id : Unit_Id) return Boolean is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.Predefined;
end Is_Predefined_Unit;
---------------------------------
-- Is_Stand_Alone_Library_Unit --
---------------------------------
function Is_Stand_Alone_Library_Unit (U_Id : Unit_Id) return Boolean is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.SAL_Interface;
end Is_Stand_Alone_Library_Unit;
------------------------------
-- Iterate_Elaborable_Units --
------------------------------
function Iterate_Elaborable_Units return Elaborable_Units_Iterator is
begin
return Elaborable_Units_Iterator (Unit_Sets.Iterate (Elaborable_Units));
end Iterate_Elaborable_Units;
----------
-- Name --
----------
function Name (U_Id : Unit_Id) return Unit_Name_Type is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
return U_Rec.Uname;
end Name;
-----------------------
-- Needs_Elaboration --
-----------------------
function Needs_Elaboration
(IS_Id : Invocation_Signature_Id) return Boolean
is
begin
pragma Assert (Present (IS_Id));
return Signature_Sets.Contains (Elaborable_Constructs, IS_Id);
end Needs_Elaboration;
-----------------------
-- Needs_Elaboration --
-----------------------
function Needs_Elaboration (U_Id : Unit_Id) return Boolean is
begin
pragma Assert (Present (U_Id));
return Unit_Sets.Contains (Elaborable_Units, U_Id);
end Needs_Elaboration;
----------
-- Next --
----------
procedure Next
(Iter : in out Elaborable_Units_Iterator;
U_Id : out Unit_Id)
is
begin
Unit_Sets.Next (Unit_Sets.Iterator (Iter), U_Id);
end Next;
--------------------------------
-- Number_Of_Elaborable_Units --
--------------------------------
function Number_Of_Elaborable_Units return Natural is
begin
return Unit_Sets.Size (Elaborable_Units);
end Number_Of_Elaborable_Units;
---------------------
-- Number_Of_Units --
---------------------
function Number_Of_Units return Natural is
begin
return Natural (ALI.Units.Last) - Natural (ALI.Units.First) + 1;
end Number_Of_Units;
----------------------------------
-- Process_Invocation_Construct --
----------------------------------
procedure Process_Invocation_Construct (IC_Id : Invocation_Construct_Id) is
pragma Assert (Present (IC_Id));
IS_Id : constant Invocation_Signature_Id := Signature (IC_Id);
pragma Assert (Present (IS_Id));
begin
Signature_Sets.Insert (Elaborable_Constructs, IS_Id);
end Process_Invocation_Construct;
-----------------------------------
-- Process_Invocation_Constructs --
-----------------------------------
procedure Process_Invocation_Constructs (U_Id : Unit_Id) is
pragma Assert (Present (U_Id));
U_Rec : Unit_Record renames ALI.Units.Table (U_Id);
begin
for IC_Id in U_Rec.First_Invocation_Construct ..
U_Rec.Last_Invocation_Construct
loop
Process_Invocation_Construct (IC_Id);
end loop;
end Process_Invocation_Constructs;
------------------
-- Process_Unit --
------------------
procedure Process_Unit (U_Id : Unit_Id) is
begin
pragma Assert (Present (U_Id));
-- A stand-alone library unit must not be elaborated as part of the
-- current compilation because the library already carries its own
-- elaboration code.
if Is_Stand_Alone_Library_Unit (U_Id) then
null;
-- Otherwise the unit needs to be elaborated. Add it to the set
-- of units that require elaboration, as well as all invocation
-- signatures of constructs it declares.
else
Unit_Sets.Insert (Elaborable_Units, U_Id);
Process_Invocation_Constructs (U_Id);
end if;
end Process_Unit;
end Bindo.Units;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASK_PRIMITIVES.OPERATIONS.SELF --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1991-1998, Florida State University --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 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. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This is a Solaris Sparc (native) version of this package.
with System.Machine_Code;
-- used for Asm
separate (System.Task_Primitives.Operations)
----------
-- Self --
----------
-- For Solaris version of RTS, we use a short cut to get the self
-- information faster:
-- We have noticed that on Sparc Solaris, the register g7 always
-- contains the address near the frame pointer (fp) of the active
-- thread (fixed offset). This means, if we declare a variable near
-- the top of the stack for each threads (in our case in the task wrapper)
-- and let the variable hold the Task_ID information, we can get the
-- value without going through the thr_getspecific kernel call.
--
-- There are two things to take care in this trick.
--
-- 1) We need to calculate the offset between the g7 value and the
-- local variable address.
-- Possible Solutions :
-- a) Use gdb to figure out the offset.
-- b) Figure it out during the elaboration of RTS by, say,
-- creating a dummy task.
-- We used solution a) mainly because it is more efficient and keeps
-- the RTS from being cluttered with stuff that we won't be used
-- for all environments (i.e., we would have to at least introduce
-- new interfaces).
--
-- On Sparc Solaris the offset was #10#108# (= #16#6b#) with gcc 2.7.2.
-- With gcc 2.8.0, the offset is #10#116# (= #16#74#).
--
-- 2) We can not use the same offset business for the main thread
-- because we do not use a wrapper for the main thread.
-- Previousely, we used the difference between g7 and fp to determine
-- wether a task was the main task or not. But this was obviousely
-- wrong since it worked only for tasks that use small amount of
-- stack.
-- So, we now take advantage of the code that recognizes foreign
-- threads (see below) for the main task.
--
-- NOTE: What we are doing here is ABSOLUTELY for Solaris 2.4, 2.5 and 2.6
-- on Sun.
-- We need to make sure this is OK when we move to other versions
-- of the same OS.
-- We always can go back to the old way of doing this and we include
-- the code which use thr_getspecifics. Also, look for %%%%%
-- in comments for other necessary modifications.
-- This code happens to work with Solaris 2.5.1 too, but with gcc
-- 2.8.0, this offset is different.
-- ??? Try to rethink the approach here to get a more flexible
-- solution at run time ?
-- One other solution (close to 1-b) would be to add some scanning
-- routine in Enter_Task to compute the offset since now we have
-- a magic number at the beginning of the task code.
-- function Self return Task_ID is
-- Temp : aliased System.Address;
-- Result : Interfaces.C.int;
--
-- begin
-- Result := thr_getspecific (ATCB_Key, Temp'Unchecked_Access);
-- pragma Assert (Result = 0);
-- return To_Task_ID (Temp);
-- end Self;
-- To make Ada tasks and C threads interoperate better, we have
-- added some functionality to Self. Suppose a C main program
-- (with threads) calls an Ada procedure and the Ada procedure
-- calls the tasking run-time system. Eventually, a call will be
-- made to self. Since the call is not coming from an Ada task,
-- there will be no corresponding ATCB.
-- (The entire Ada run-time system may not have been elaborated,
-- either, but that is a different problem, that we will need to
-- solve another way.)
-- What we do in Self is to catch references that do not come
-- from recognized Ada tasks, and create an ATCB for the calling
-- thread.
-- The new ATCB will be "detached" from the normal Ada task
-- master hierarchy, much like the existing implicitly created
-- signal-server tasks.
-- We will also use such points to poll for disappearance of the
-- threads associated with any implicit ATCBs that we created
-- earlier, and take the opportunity to recover them.
-- A nasty problem here is the limitations of the compilation
-- order dependency, and in particular the GNARL/GNULLI layering.
-- To initialize an ATCB we need to assume System.Tasking has
-- been elaborated.
function Self return Task_ID is
X : Ptr;
Result : Interfaces.C.int;
function Get_G7 return Interfaces.C.unsigned;
pragma Inline (Get_G7);
use System.Machine_Code;
------------
-- Get_G7 --
------------
function Get_G7 return Interfaces.C.unsigned is
Result : Interfaces.C.unsigned;
begin
Asm ("mov %%g7,%0", Interfaces.C.unsigned'Asm_Output ("=r", Result));
return Result;
end Get_G7;
-- Start of processing for Self
begin
if To_Iptr (Get_G7 - 120).all /=
Interfaces.C.unsigned (ATCB_Magic_Code)
then
-- Check whether this is a thread we have seen before (e.g the
-- main task).
-- 120 = 116 + Magic_Type'Size/System.Storage_Unit
declare
Unknown_Task : aliased System.Address;
begin
Result :=
thr_getspecific (ATCB_Key, Unknown_Task'Unchecked_Access);
pragma Assert (Result = 0);
if Unknown_Task = System.Null_Address then
-- We are seeing this thread for the first time.
return New_Fake_ATCB (Get_G7);
else
return To_Task_ID (Unknown_Task);
end if;
end;
end if;
X := To_Ptr (Get_G7 - 116);
return X.all;
end Self;
|
-- part of OpenGLAda, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
with GL.Types;
private with GL.Low_Level;
package GL.Culling is
pragma Preelaborate;
type Face_Selector is (Front, Back, Front_And_Back);
use GL.Types;
procedure Set_Front_Face (Face : Orientation);
function Front_Face return Orientation;
procedure Set_Cull_Face (Selector : Face_Selector);
function Cull_Face return Face_Selector;
private
for Face_Selector use (Front => 16#0404#,
Back => 16#0405#,
Front_And_Back => 16#0408#);
for Face_Selector'Size use Low_Level.Enum'Size;
pragma Convention (StdCall, Set_Cull_Face);
pragma Convention (StdCall, Set_Front_Face);
end GL.Culling;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of 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. --
-- --
------------------------------------------------------------------------------
with System;
with Ada.Unchecked_Conversion;
package STM32.DMA2D is
type DMA2D_Color is record
Alpha : Byte;
Red : Byte;
Green : Byte;
Blue : Byte;
end record;
for DMA2D_Color use record
Blue at 0 range 0 .. 7;
Green at 1 range 0 .. 7;
Red at 2 range 0 .. 7;
Alpha at 3 range 0 .. 7;
end record;
Black : constant DMA2D_Color := (255, 0, 0, 0);
White : constant DMA2D_Color := (255, 255, 255, 255);
Transparent : constant DMA2D_Color := (others => 0);
-- This bit is set and cleared by software. It cannot be modified
-- while a transfer is ongoing.
type DMA2D_MODE is
(
-- Memory-to-memory (FG fetch only)
M2M,
-- Memory-to-memory with PFC (FG fetch only with FG PFC active)
M2M_PFC,
-- Memory-to-memory with blending (FG and BG fetch with PFC and
-- blending)
M2M_BLEND,
-- Register-to-memory (no FG nor BG, only output stage active)
R2M
);
for DMA2D_MODE'Size use 2;
-- Configuration Error Interrupt Enable
type DMA2D_FLAG is
(Disable,
Enable);
-- Abort
-- This bit can be used to abort the current transfer. This bit is
-- set by software and is automatically reset by hardware when the
-- START bit is reset.
type DMA2D_ABORT is
(
-- 0: No transfer abort requested
Not_Requested,
-- 1: Transfer abort requested
Requested);
-- Suspend
-- This bit can be used to suspend the current transfer. This bit
-- is set and reset by software. It is automatically reset by
-- hardware when the START bit is reset.
type DMA2D_SUSPEND is
(
-- Transfer not suspended
Not_Suspended,
-- Transfer suspended
Supended);
-- Start
-- This bit can be used to launch the DMA2D according to the
-- parameters loaded in the various configuration registers. This
-- bit is automatically reset by the following events:
-- - At the end of the transfer
-- - When the data transfer is aborted by the user application by
-- setting the ABORT bit in DMA2D_CR
-- - When a data transfer error occurs
-- - When the data transfer has not started due to a configuration
-- error or another transfer operation already ongoing (automatic
-- CLUT loading)
type DMA2D_START is
(Not_Started,
Start);
-- These bits defines the color format
type DMA2D_Color_Mode is
(ARGB8888,
RGB888,
RGB565,
ARGB1555,
ARGB4444,
L8,
AL44,
AL88,
L4,
A8,
A4) with Size => 4;
subtype DMA2D_Dst_Color_Mode is DMA2D_Color_Mode range ARGB8888 .. ARGB4444;
subtype Foreground_Color_Mode is DMA2D_Color_Mode;
subtype Background_Color_Mode is DMA2D_Color_Mode;
subtype Output_Color_Mode is DMA2D_Color_Mode range ARGB8888 .. ARGB4444;
-- function Bytes_Per_Pixel (CM : DMA2D_Color_Mode) return Positive
-- is (case CM is
-- when ARGB8888 => 4,
-- when RGB888 => 3,
-- when others => 2);
-- Alpha mode
-- 00: No modification of the foreground image alpha channel value
-- 01: Replace original foreground image alpha channel value by ALPHA[7:0]
-- 10: Replace original foreground image alpha channel value by ALPHA[7:0]
-- multiplied with original alpha channel value
-- other configurations are meaningless
type DMA2D_AM is
(NO_MODIF,
REPLACE,
MULTIPLY);
for DMA2D_AM'Size use 2;
procedure DMA2D_DeInit;
type DMA2D_Sync_Procedure is access procedure;
procedure DMA2D_Init
(Init : DMA2D_Sync_Procedure;
Wait : DMA2D_Sync_Procedure);
type DMA2D_Buffer is record
Addr : System.Address;
Width : Natural;
Height : Natural;
Color_Mode : DMA2D_Color_Mode;
end record;
Null_Buffer : constant DMA2D_Buffer :=
(Addr => System'To_Address (0),
Width => 0,
Height => 0,
Color_Mode => DMA2D_Color_Mode'First);
procedure DMA2D_Fill
(Buffer : DMA2D_Buffer;
Color : Word;
Synchronous : Boolean := False)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
-- Same as above, using the destination buffer native color representation
procedure DMA2D_Set_Pixel
(Buffer : DMA2D_Buffer;
X, Y : Integer;
Color : Word;
Synchronous : Boolean := False)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
-- Same as above, using the destination buffer native color representation
procedure DMA2D_Set_Pixel_Blend
(Buffer : DMA2D_Buffer;
X, Y : Integer;
Color : DMA2D_Color;
Synchronous : Boolean := False)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
procedure DMA2D_Fill_Rect
(Buffer : DMA2D_Buffer;
Color : Word;
X : Integer;
Y : Integer;
Width : Integer;
Height : Integer;
Synchronous : Boolean := False)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
-- Same as above, using the destination buffer native color representation
procedure DMA2D_Draw_Rect
(Buffer : DMA2D_Buffer;
Color : Word;
X : Integer;
Y : Integer;
Width : Integer;
Height : Integer)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
-- Fill the specified area of the buffer with 'Color'
procedure DMA2D_Copy_Rect
(Src_Buffer : DMA2D_Buffer;
X_Src : Natural;
Y_Src : Natural;
Dst_Buffer : DMA2D_Buffer;
X_Dst : Natural;
Y_Dst : Natural;
Bg_Buffer : DMA2D_Buffer;
X_Bg : Natural;
Y_Bg : Natural;
Width : Natural;
Height : Natural;
Synchronous : Boolean := False)
with Pre => Dst_Buffer.Color_Mode in Output_Color_Mode;
-- Copy a rectangular area from Src to Dst
-- If Blend is set, then the rectangle will be merged with the destination
-- area, taking into account the opacity of the source. Else, it is simply
-- copied.
--
-- if Bg_Buffer is not Null_Buffer, then the copy will be performed in
-- blend mode: Bg_Buffer and Src_Buffer are combined first and then copied
-- to Dst_Buffer.
procedure DMA2D_Draw_Vertical_Line
(Buffer : DMA2D_Buffer;
Color : Word;
X : Integer;
Y : Integer;
Height : Integer;
Synchronous : Boolean := False)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
-- Draws a vertical line
procedure DMA2D_Draw_Horizontal_Line
(Buffer : DMA2D_Buffer;
Color : Word;
X : Integer;
Y : Integer;
Width : Integer;
Synchronous : Boolean := False)
with Pre => Buffer.Color_Mode in Output_Color_Mode;
-- Draws a vertical line
procedure DMA2D_Wait_Transfer;
-- Makes sure the DMA2D transfers are done
private
function As_UInt3 is new Ada.Unchecked_Conversion
(DMA2D_Dst_Color_Mode, UInt3);
function As_UInt4 is new Ada.Unchecked_Conversion
(DMA2D_Color_Mode, UInt4);
end STM32.DMA2D;
|
-- This package contains extensions to GL as well as items
-- that are in the GL standard but are not (yet) in the GL libraries
-- on all platforms. For instance, standard Opengl32.dll on Windows up
-- to XP support up to GL 1.1; Vista, up to GL 1.4; and even versions
-- provided by graphics card makers lack 1.5 support (as in 2007).
-- *** Windows version - > uses GLEE (just link with glee.o) ***
with GL;
package GL.Extended is
procedure GenBuffers (n : GL.Sizei;
buffers : GL.uintPtr);
procedure DeleteBuffers (n : GL.Sizei;
buffers : GL.uintPtr);
procedure BindBuffer (target : GL.VBO_Target;
buffer : GL.Uint);
procedure BufferData (target : GL.VBO_Target;
size : GL.sizeiPtr;
data : GL.pointer;
usage : GL.VBO_Usage);
procedure BufferSubData (target : GL.VBO_Target;
offset : GL.intPtr;
size : GL.sizeiPtr;
data : GL.pointer);
function MapBuffer (target : GL.VBO_Target;
Policy : GL.Access_Policy) return GL.pointer;
function UnmapBuffer (target : GL.VBO_Target) return GL.GL_Boolean;
procedure GetBufferParameter (target : GL.VBO_Target;
value : GL.Buffer_Parameter;
data : GL.intPointer);
-- vertex buffer object imports (GL 1.5)
--
pragma Import (Stdcall, GenBuffers, "_Lazy_glGenBuffers");
pragma Import (Stdcall, DeleteBuffers, "_Lazy_glDeleteBuffers");
pragma Import (Stdcall, BindBuffer, "_Lazy_glBindBuffer");
pragma Import (Stdcall, BufferData, "_Lazy_glBufferData");
pragma Import (Stdcall, BufferSubData, "_Lazy_glBufferSubData");
pragma Import (Stdcall, MapBuffer, "_Lazy_glMapBuffer");
pragma Import (Stdcall, UnmapBuffer, "_Lazy_glUnmapBuffer");
pragma Import (Stdcall, GetBufferParameter, "_Lazy_glGetBufferParameteriv");
end GL.Extended;
|
with Ada.Unchecked_Conversion;
with STM32.Device; use STM32.Device;
with STM32.DMA2D.Interrupt;
with STM32.DMA2D.Polling;
with STM32.SDRAM; use STM32.SDRAM;
package body Framebuffer_LTDC is
procedure Internal_Update_Layer
(Display : in out Frame_Buffer;
Layer : Positive);
----------------
-- Initialize --
----------------
procedure Initialize
(Display : in out Frame_Buffer;
Width : Positive;
Height : Positive;
H_Sync : Natural;
H_Back_Porch : Natural;
H_Front_Porch : Natural;
V_Sync : Natural;
V_Back_Porch : Natural;
V_Front_Porch : Natural;
PLLSAI_N : UInt9;
PLLSAI_R : UInt3;
DivR : Natural;
Orientation : HAL.Framebuffer.Display_Orientation := Default;
Mode : HAL.Framebuffer.Wait_Mode := Interrupt)
is
begin
Display.Width := Width;
Display.Height := Height;
if (Width > Height and then Orientation = Portrait)
or else (Height > Width and then Orientation = Landscape)
then
Display.Swapped := True;
else
Display.Swapped := False;
end if;
STM32.LTDC.Initialize
(Width => Width,
Height => Height,
H_Sync => H_Sync,
H_Back_Porch => H_Back_Porch,
H_Front_Porch => H_Front_Porch,
V_Sync => V_Sync,
V_Back_Porch => V_Back_Porch,
V_Front_Porch => V_Front_Porch,
PLLSAI_N => PLLSAI_N,
PLLSAI_R => PLLSAI_R,
DivR => DivR);
STM32.SDRAM.Initialize;
case Mode is
when Polling =>
STM32.DMA2D.Polling.Initialize;
when Interrupt =>
STM32.DMA2D.Interrupt.Initialize;
end case;
end Initialize;
---------------------
-- Set_Orientation --
---------------------
overriding procedure Set_Orientation
(Display : in out Frame_Buffer;
Orientation : HAL.Framebuffer.Display_Orientation)
is
Old : constant Boolean := Display.Swapped;
Tmp : Natural;
use STM32.DMA2D_Bitmap;
begin
if (Display.Width > Display.Height and then Orientation = Portrait)
or else
(Display.Height > Display.Width and then Orientation = Landscape)
then
Display.Swapped := True;
else
Display.Swapped := False;
end if;
if Old = Display.Swapped then
return;
end if;
for Layer in STM32.LTDC.LCD_Layer loop
for Buf in 1 .. 2 loop
if Display.Buffers (Layer, Buf) /= Null_Buffer then
Display.Buffers (Layer, Buf).Swapped := Display.Swapped;
Tmp := Display.Buffers (Layer, Buf).Width;
Display.Buffers (Layer, Buf).Width :=
Display.Buffers (Layer, Buf).Height;
Display.Buffers (Layer, Buf).Height := Tmp;
Display.Buffers (Layer, Buf).Fill (0);
end if;
end loop;
end loop;
end Set_Orientation;
--------------
-- Set_Mode --
--------------
overriding procedure Set_Mode
(Display : in out Frame_Buffer;
Mode : HAL.Framebuffer.Wait_Mode)
is
pragma Unreferenced (Display);
begin
case Mode is
when Polling =>
STM32.DMA2D.Polling.Initialize;
when Interrupt =>
STM32.DMA2D.Interrupt.Initialize;
end case;
end Set_Mode;
-----------------
-- Initialized --
-----------------
overriding function Initialized
(Display : Frame_Buffer) return Boolean
is
pragma Unreferenced (Display);
begin
return STM32.LTDC.Initialized;
end Initialized;
--------------------
-- Get_Max_Layers --
--------------------
overriding function Get_Max_Layers
(Display : Frame_Buffer)
return Positive
is
pragma Unreferenced (Display);
begin
return 2;
end Get_Max_Layers;
------------------
-- Is_Supported --
------------------
overriding function Is_Supported
(Display : Frame_Buffer;
Mode : HAL.Framebuffer.FB_Color_Mode) return Boolean
is
pragma Unreferenced (Display, Mode);
begin
-- The LTDC supports all HAL color modes
return True;
end Is_Supported;
---------------
-- Get_Width --
---------------
overriding function Get_Width
(Display : Frame_Buffer)
return Positive
is
begin
if not Display.Swapped then
return Display.Width;
else
return Display.Height;
end if;
end Get_Width;
----------------
-- Get_Height --
----------------
overriding function Get_Height
(Display : Frame_Buffer)
return Positive
is
begin
if not Display.Swapped then
return Display.Height;
else
return Display.Width;
end if;
end Get_Height;
----------------
-- Is_Swapped --
----------------
overriding function Is_Swapped
(Display : Frame_Buffer) return Boolean
is
begin
return Display.Swapped;
end Is_Swapped;
--------------------
-- Set_Background --
--------------------
overriding procedure Set_Background
(Display : Frame_Buffer; R, G, B : Byte)
is
pragma Unreferenced (Display);
begin
STM32.LTDC.Set_Background (R, G, B);
end Set_Background;
----------------------
-- Initialize_Layer --
----------------------
overriding procedure Initialize_Layer
(Display : in out Frame_Buffer;
Layer : Positive;
Mode : HAL.Framebuffer.FB_Color_Mode;
X : Natural := 0;
Y : Natural := 0;
Width : Positive := Positive'Last;
Height : Positive := Positive'Last)
is
function To_LTDC_Mode is new Ada.Unchecked_Conversion
(HAL.Framebuffer.FB_Color_Mode, STM32.LTDC.Pixel_Format);
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
W : Natural := Width;
H : Natural := Height;
X0 : Natural := X;
Y0 : Natural := Y;
begin
if Display.Swapped then
if Height = Positive'Last then
W := Display.Width;
else
W := Height;
end if;
if Width = Positive'Last then
H := Display.Height;
else
H := Width;
end if;
X0 := Y;
Y0 := Display.Height - X - H;
end if;
if X0 >= Display.Width then
raise Constraint_Error with "Layer X position outside of screen";
elsif Y0 >= Display.Height then
raise Constraint_Error with "Layer Y position outside of screen";
end if;
if W = Positive'Last or else X0 + W > Display.Width then
W := Display.Width - X0;
end if;
if H = Positive'Last or else Y0 + H > Display.Height then
H := Display.Height - Y0;
end if;
if not Display.Swapped then
for Buf in 1 .. 2 loop
Display.Buffers (LCD_Layer, Buf) :=
(Addr =>
Reserve (Word (HAL.Bitmap.Bits_Per_Pixel (Mode) * W * H / 8)),
Width => W,
Height => H,
Color_Mode => Mode,
Swapped => False);
Display.Buffers (LCD_Layer, Buf).Fill (0);
end loop;
else
for Buf in 1 .. 2 loop
Display.Buffers (LCD_Layer, Buf) :=
(Addr =>
Reserve (Word (HAL.Bitmap.Bits_Per_Pixel (Mode) * W * H / 8)),
Width => H,
Height => W,
Color_Mode => Mode,
Swapped => True);
Display.Buffers (LCD_Layer, Buf).Fill (0);
end loop;
end if;
Display.Current (LCD_Layer) := 1;
STM32.LTDC.Layer_Init
(Layer => LCD_Layer,
Config => To_LTDC_Mode (Mode),
Buffer => Display.Buffers (LCD_Layer, 1).Addr,
X => X0,
Y => Y0,
W => W,
H => H,
Constant_Alpha => 255,
BF => STM32.LTDC.BF_Pixel_Alpha_X_Constant_Alpha);
end Initialize_Layer;
-----------------
-- Initialized --
-----------------
overriding function Initialized
(Display : Frame_Buffer;
Layer : Positive) return Boolean
is
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
use type STM32.DMA2D_Bitmap.DMA2D_Bitmap_Buffer;
begin
return
Display.Buffers (LCD_Layer, 1) /= STM32.DMA2D_Bitmap.Null_Buffer;
end Initialized;
---------------------------
-- Internal_Update_Layer --
---------------------------
procedure Internal_Update_Layer
(Display : in out Frame_Buffer;
Layer : Positive)
is
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
begin
case Display.Current (LCD_Layer) is
when 0 =>
null;
when 1 =>
Display.Buffers (LCD_Layer, 2).Wait_Transfer;
STM32.LTDC.Set_Frame_Buffer
(Layer => LCD_Layer,
Addr => Display.Buffers (LCD_Layer, 2).Addr);
Display.Current (LCD_Layer) := 2;
when 2 =>
Display.Buffers (LCD_Layer, 1).Wait_Transfer;
STM32.LTDC.Set_Frame_Buffer
(Layer => LCD_Layer,
Addr => Display.Buffers (LCD_Layer, 1).Addr);
Display.Current (LCD_Layer) := 1;
end case;
end Internal_Update_Layer;
------------------
-- Update_Layer --
------------------
overriding procedure Update_Layer
(Display : in out Frame_Buffer;
Layer : Positive;
Copy_Back : Boolean := False)
is
Visible, Hidden : STM32.DMA2D_Bitmap.DMA2D_Bitmap_Buffer;
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
begin
Internal_Update_Layer (Display, Layer);
STM32.LTDC.Reload_Config (Immediate => False);
if Copy_Back then
if Display.Current (LCD_Layer) = 1 then
Visible := Display.Buffers (LCD_Layer, 1);
Hidden := Display.Buffers (LCD_Layer, 2);
else
Visible := Display.Buffers (LCD_Layer, 2);
Hidden := Display.Buffers (LCD_Layer, 1);
end if;
STM32.DMA2D_Bitmap.Copy_Rect
(Visible, 0, 0, Hidden, 0, 0, Visible.Width, Visible.Height);
STM32.DMA2D.DMA2D_Wait_Transfer;
end if;
end Update_Layer;
-------------------
-- Update_Layers --
-------------------
overriding procedure Update_Layers
(Display : in out Frame_Buffer)
is
begin
for J in 1 .. 2 loop
if Display.Initialized (J) then
Internal_Update_Layer (Display, J);
end if;
end loop;
STM32.LTDC.Reload_Config (Immediate => False);
end Update_Layers;
-------------------
-- Update_Layers --
-------------------
procedure Update_Layers
(Display : in out Frame_Buffer;
Copy_Layer1 : Boolean;
Copy_Layer2 : Boolean)
is
use type STM32.LTDC.LCD_Layer;
Visible, Hidden : STM32.DMA2D_Bitmap.DMA2D_Bitmap_Buffer;
begin
for J in 1 .. 2 loop
if Display.Initialized (J) then
Internal_Update_Layer (Display, J);
end if;
end loop;
STM32.LTDC.Reload_Config (Immediate => False);
for LCD_Layer in STM32.LTDC.LCD_Layer'Range loop
if (LCD_Layer = STM32.LTDC.Layer1 and then Copy_Layer1)
or else (LCD_Layer = STM32.LTDC.Layer2 and then Copy_Layer2)
then
if Display.Current (LCD_Layer) = 1 then
Visible := Display.Buffers (LCD_Layer, 1);
Hidden := Display.Buffers (LCD_Layer, 2);
else
Visible := Display.Buffers (LCD_Layer, 2);
Hidden := Display.Buffers (LCD_Layer, 1);
end if;
STM32.DMA2D_Bitmap.Copy_Rect
(Visible, 0, 0, Hidden, 0, 0, Visible.Width, Visible.Height);
STM32.DMA2D.DMA2D_Wait_Transfer;
end if;
end loop;
end Update_Layers;
--------------------
-- Get_Color_Mode --
--------------------
overriding function Get_Color_Mode
(Display : Frame_Buffer;
Layer : Positive)
return HAL.Framebuffer.FB_Color_Mode
is
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
begin
return Display.Buffers (LCD_Layer, 1).Color_Mode;
end Get_Color_Mode;
-----------------------
-- Get_Hidden_Buffer --
-----------------------
overriding function Get_Hidden_Buffer
(Display : Frame_Buffer;
Layer : Positive)
return HAL.Bitmap.Bitmap_Buffer'Class
is
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
begin
case Display.Current (LCD_Layer) is
when 0 | 2 =>
return Display.Buffers (LCD_Layer, 1);
when 1 =>
return Display.Buffers (LCD_Layer, 2);
end case;
end Get_Hidden_Buffer;
--------------------
-- Get_Pixel_Size --
--------------------
overriding function Get_Pixel_Size
(Display : Frame_Buffer;
Layer : Positive) return Positive
is
LCD_Layer : constant STM32.LTDC.LCD_Layer :=
(if Layer = 1
then STM32.LTDC.Layer1
else STM32.LTDC.Layer2);
begin
return
HAL.Bitmap.Bits_Per_Pixel
(Display.Buffers (LCD_Layer, 1).Color_Mode) / 8;
end Get_Pixel_Size;
end Framebuffer_LTDC;
|
-----------------------------------------------------------------------
-- awa-images-modules -- Image management module
-- Copyright (C) 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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 ASF.Applications;
with AWA.Modules;
with AWA.Storages.Models;
with AWA.Storages.Services;
with AWA.Images.Services;
-- == Image Module ==
-- The <tt>Image_Module</tt> type represents the image module. An instance of the image
-- module must be declared and registered when the application is created and initialized.
-- The image module is associated with the image service which provides and implements
-- the image management operations.
--
-- When the image module is initialized, it registers itself as a listener to the storage
-- module to be notified when a storage file is created, updated or removed. When a file
-- is added, it looks at the file type and extracts the image information if the storage file
-- is an image.
package AWA.Images.Modules is
NAME : constant String := "images";
type Image_Module is new AWA.Modules.Module and AWA.Storages.Services.Listener with private;
type Image_Module_Access is access all Image_Module'Class;
-- Initialize the image module.
overriding
procedure Initialize (Plugin : in out Image_Module;
App : in AWA.Modules.Application_Access;
Props : in ASF.Applications.Config);
-- Configures the module after its initialization and after having read its XML configuration.
overriding
procedure Configure (Plugin : in out Image_Module;
Props : in ASF.Applications.Config);
-- Get the image manager.
function Get_Image_Manager (Plugin : in Image_Module)
return Services.Image_Service_Access;
-- Create an image manager. This operation can be overridden to provide another
-- image service implementation.
function Create_Image_Manager (Plugin : in Image_Module)
return Services.Image_Service_Access;
-- The `On_Create` procedure is called by `Notify_Create` to notify the creation of the item.
overriding
procedure On_Create (Instance : in Image_Module;
Item : in AWA.Storages.Models.Storage_Ref'Class);
-- The `On_Update` procedure is called by `Notify_Update` to notify the update of the item.
overriding
procedure On_Update (Instance : in Image_Module;
Item : in AWA.Storages.Models.Storage_Ref'Class);
-- The `On_Delete` procedure is called by `Notify_Delete` to notify the deletion of the item.
overriding
procedure On_Delete (Instance : in Image_Module;
Item : in AWA.Storages.Models.Storage_Ref'Class);
-- Get the image module instance associated with the current application.
function Get_Image_Module return Image_Module_Access;
-- Get the image manager instance associated with the current application.
function Get_Image_Manager return Services.Image_Service_Access;
-- Returns true if the storage file has an image mime type.
function Is_Image (File : in AWA.Storages.Models.Storage_Ref'Class) return Boolean;
private
type Image_Module is new AWA.Modules.Module and AWA.Storages.Services.Listener with record
Manager : Services.Image_Service_Access := null;
end record;
end AWA.Images.Modules; |
-- This package contains routines for ASIS Elements processing.
with Asis;
package AdaM.Assist.Query.find_Entities.element_Processing is
procedure Process_Construct (The_Element : Asis.Element);
-- This is the template for the procedure which is supposed to
-- perform the analysis of its argument Element (The_Element) based on
-- the recursive traversing of the Element hierarchy rooted by
-- The_Element. It calls the instantiation of the ASIS Traverse_Element
-- generic procedure for The_Element.
--
-- This procedure should not be called for Nil_Element;
--
-- Note, that the instantiation of Traverse_Element and the way how it is
-- called is no more then a template. It uses a dummy enumeration type
-- as the actual type for the state of the traversal, and it uses
-- dummy procedures which do nothing as actual procedures for Pre- and
-- Post-operations. The Control parameter of the traversal is set
-- to Continue and it is not changed by actual Pre- or Post-operations.
-- All this things will definitely require revising when using this
-- set of templates to build any real application. (At least you will
-- have to provide real Pre- and/or Post-operation)
--
-- See the package body for more details.
end AdaM.Assist.Query.find_Entities.element_Processing;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ D I S P --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2006, 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 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Checks; use Checks;
with Debug; use Debug;
with Einfo; use Einfo;
with Elists; use Elists;
with Errout; use Errout;
with Exp_Ch7; use Exp_Ch7;
with Exp_Dbug; use Exp_Dbug;
with Exp_Tss; use Exp_Tss;
with Exp_Util; use Exp_Util;
with Itypes; use Itypes;
with Nlists; use Nlists;
with Nmake; use Nmake;
with Namet; use Namet;
with Opt; use Opt;
with Output; use Output;
with Restrict; use Restrict;
with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Disp; use Sem_Disp;
with Sem_Res; use Sem_Res;
with Sem_Type; use Sem_Type;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Snames; use Snames;
with Stand; use Stand;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
package body Exp_Disp is
--------------------------------
-- Select_Expansion_Utilities --
--------------------------------
-- The following package contains helper routines used in the expansion of
-- dispatching asynchronous, conditional and timed selects.
package Select_Expansion_Utilities is
procedure Build_B
(Loc : Source_Ptr;
Params : List_Id);
-- Generate:
-- B : out Communication_Block
procedure Build_C
(Loc : Source_Ptr;
Params : List_Id);
-- Generate:
-- C : out Prim_Op_Kind
procedure Build_Common_Dispatching_Select_Statements
(Loc : Source_Ptr;
Typ : Entity_Id;
DT_Ptr : Entity_Id;
Stmts : List_Id);
-- Ada 2005 (AI-345): Generate statements that are common between
-- asynchronous, conditional and timed select expansion.
procedure Build_F
(Loc : Source_Ptr;
Params : List_Id);
-- Generate:
-- F : out Boolean
procedure Build_P
(Loc : Source_Ptr;
Params : List_Id);
-- Generate:
-- P : Address
procedure Build_S
(Loc : Source_Ptr;
Params : List_Id);
-- Generate:
-- S : Integer
procedure Build_T
(Loc : Source_Ptr;
Typ : Entity_Id;
Params : List_Id);
-- Generate:
-- T : in out Typ
end Select_Expansion_Utilities;
package body Select_Expansion_Utilities is
-------------
-- Build_B --
-------------
procedure Build_B
(Loc : Source_Ptr;
Params : List_Id)
is
begin
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uB),
Parameter_Type =>
New_Reference_To (RTE (RE_Communication_Block), Loc),
Out_Present => True));
end Build_B;
-------------
-- Build_C --
-------------
procedure Build_C
(Loc : Source_Ptr;
Params : List_Id)
is
begin
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uC),
Parameter_Type =>
New_Reference_To (RTE (RE_Prim_Op_Kind), Loc),
Out_Present => True));
end Build_C;
------------------------------------------------
-- Build_Common_Dispatching_Select_Statements --
------------------------------------------------
procedure Build_Common_Dispatching_Select_Statements
(Loc : Source_Ptr;
Typ : Entity_Id;
DT_Ptr : Entity_Id;
Stmts : List_Id)
is
begin
-- Generate:
-- C := get_prim_op_kind (tag! (<type>VP), S);
-- where C is the out parameter capturing the call kind and S is the
-- dispatch table slot number.
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uC),
Expression =>
Make_DT_Access_Action (Typ,
Action =>
Get_Prim_Op_Kind,
Args =>
New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)),
Make_Identifier (Loc, Name_uS)))));
-- Generate:
-- if C = POK_Procedure
-- or else C = POK_Protected_Procedure
-- or else C = POK_Task_Procedure;
-- then
-- F := True;
-- return;
-- where F is the out parameter capturing the status of a potential
-- entry call.
Append_To (Stmts,
Make_If_Statement (Loc,
Condition =>
Make_Or_Else (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Identifier (Loc, Name_uC),
Right_Opnd =>
New_Reference_To (RTE (RE_POK_Procedure), Loc)),
Right_Opnd =>
Make_Or_Else (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Identifier (Loc, Name_uC),
Right_Opnd =>
New_Reference_To (RTE (
RE_POK_Protected_Procedure), Loc)),
Right_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Identifier (Loc, Name_uC),
Right_Opnd =>
New_Reference_To (RTE (
RE_POK_Task_Procedure), Loc)))),
Then_Statements =>
New_List (
Make_Assignment_Statement (Loc,
Name => Make_Identifier (Loc, Name_uF),
Expression => New_Reference_To (Standard_True, Loc)),
Make_Return_Statement (Loc))));
end Build_Common_Dispatching_Select_Statements;
-------------
-- Build_F --
-------------
procedure Build_F
(Loc : Source_Ptr;
Params : List_Id)
is
begin
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uF),
Parameter_Type =>
New_Reference_To (Standard_Boolean, Loc),
Out_Present => True));
end Build_F;
-------------
-- Build_P --
-------------
procedure Build_P
(Loc : Source_Ptr;
Params : List_Id)
is
begin
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uP),
Parameter_Type =>
New_Reference_To (RTE (RE_Address), Loc)));
end Build_P;
-------------
-- Build_S --
-------------
procedure Build_S
(Loc : Source_Ptr;
Params : List_Id)
is
begin
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uS),
Parameter_Type =>
New_Reference_To (Standard_Integer, Loc)));
end Build_S;
-------------
-- Build_T --
-------------
procedure Build_T
(Loc : Source_Ptr;
Typ : Entity_Id;
Params : List_Id)
is
begin
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uT),
Parameter_Type =>
New_Reference_To (Typ, Loc),
In_Present => True,
Out_Present => True));
end Build_T;
end Select_Expansion_Utilities;
package SEU renames Select_Expansion_Utilities;
Ada_Actions : constant array (DT_Access_Action) of RE_Id :=
(CW_Membership => RE_CW_Membership,
IW_Membership => RE_IW_Membership,
DT_Entry_Size => RE_DT_Entry_Size,
DT_Prologue_Size => RE_DT_Prologue_Size,
Get_Access_Level => RE_Get_Access_Level,
Get_Entry_Index => RE_Get_Entry_Index,
Get_External_Tag => RE_Get_External_Tag,
Get_Predefined_Prim_Op_Address => RE_Get_Predefined_Prim_Op_Address,
Get_Prim_Op_Address => RE_Get_Prim_Op_Address,
Get_Prim_Op_Kind => RE_Get_Prim_Op_Kind,
Get_RC_Offset => RE_Get_RC_Offset,
Get_Remotely_Callable => RE_Get_Remotely_Callable,
Get_Tagged_Kind => RE_Get_Tagged_Kind,
Inherit_DT => RE_Inherit_DT,
Inherit_TSD => RE_Inherit_TSD,
Register_Interface_Tag => RE_Register_Interface_Tag,
Register_Tag => RE_Register_Tag,
Set_Access_Level => RE_Set_Access_Level,
Set_Entry_Index => RE_Set_Entry_Index,
Set_Expanded_Name => RE_Set_Expanded_Name,
Set_External_Tag => RE_Set_External_Tag,
Set_Interface_Table => RE_Set_Interface_Table,
Set_Offset_Index => RE_Set_Offset_Index,
Set_OSD => RE_Set_OSD,
Set_Predefined_Prim_Op_Address => RE_Set_Predefined_Prim_Op_Address,
Set_Prim_Op_Address => RE_Set_Prim_Op_Address,
Set_Prim_Op_Kind => RE_Set_Prim_Op_Kind,
Set_RC_Offset => RE_Set_RC_Offset,
Set_Remotely_Callable => RE_Set_Remotely_Callable,
Set_Signature => RE_Set_Signature,
Set_SSD => RE_Set_SSD,
Set_TSD => RE_Set_TSD,
Set_Tagged_Kind => RE_Set_Tagged_Kind,
TSD_Entry_Size => RE_TSD_Entry_Size,
TSD_Prologue_Size => RE_TSD_Prologue_Size);
Action_Is_Proc : constant array (DT_Access_Action) of Boolean :=
(CW_Membership => False,
IW_Membership => False,
DT_Entry_Size => False,
DT_Prologue_Size => False,
Get_Access_Level => False,
Get_Entry_Index => False,
Get_External_Tag => False,
Get_Predefined_Prim_Op_Address => False,
Get_Prim_Op_Address => False,
Get_Prim_Op_Kind => False,
Get_RC_Offset => False,
Get_Remotely_Callable => False,
Get_Tagged_Kind => False,
Inherit_DT => True,
Inherit_TSD => True,
Register_Interface_Tag => True,
Register_Tag => True,
Set_Access_Level => True,
Set_Entry_Index => True,
Set_Expanded_Name => True,
Set_External_Tag => True,
Set_Interface_Table => True,
Set_Offset_Index => True,
Set_OSD => True,
Set_Predefined_Prim_Op_Address => True,
Set_Prim_Op_Address => True,
Set_Prim_Op_Kind => True,
Set_RC_Offset => True,
Set_Remotely_Callable => True,
Set_Signature => True,
Set_SSD => True,
Set_TSD => True,
Set_Tagged_Kind => True,
TSD_Entry_Size => False,
TSD_Prologue_Size => False);
Action_Nb_Arg : constant array (DT_Access_Action) of Int :=
(CW_Membership => 2,
IW_Membership => 2,
DT_Entry_Size => 0,
DT_Prologue_Size => 0,
Get_Access_Level => 1,
Get_Entry_Index => 2,
Get_External_Tag => 1,
Get_Predefined_Prim_Op_Address => 2,
Get_Prim_Op_Address => 2,
Get_Prim_Op_Kind => 2,
Get_RC_Offset => 1,
Get_Remotely_Callable => 1,
Get_Tagged_Kind => 1,
Inherit_DT => 3,
Inherit_TSD => 2,
Register_Interface_Tag => 3,
Register_Tag => 1,
Set_Access_Level => 2,
Set_Entry_Index => 3,
Set_Expanded_Name => 2,
Set_External_Tag => 2,
Set_Interface_Table => 2,
Set_Offset_Index => 3,
Set_OSD => 2,
Set_Predefined_Prim_Op_Address => 3,
Set_Prim_Op_Address => 3,
Set_Prim_Op_Kind => 3,
Set_RC_Offset => 2,
Set_Remotely_Callable => 2,
Set_Signature => 2,
Set_SSD => 2,
Set_TSD => 2,
Set_Tagged_Kind => 2,
TSD_Entry_Size => 0,
TSD_Prologue_Size => 0);
procedure Collect_All_Interfaces (T : Entity_Id);
-- Ada 2005 (AI-251): Collect the whole list of interfaces that are
-- directly or indirectly implemented by T. Used to compute the size
-- of the table of interfaces.
function Default_Prim_Op_Position (E : Entity_Id) return Uint;
-- Ada 2005 (AI-251): Returns the fixed position in the dispatch table
-- of the default primitive operations.
function Original_View_In_Visible_Part (Typ : Entity_Id) return Boolean;
-- Check if the type has a private view or if the public view appears
-- in the visible part of a package spec.
function Prim_Op_Kind
(Prim : Entity_Id;
Typ : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Determine the primitive operation kind of Prim
-- according to its type Typ. Return a reference to an RE_Prim_Op_Kind
-- enumeration value.
function Tagged_Kind (T : Entity_Id) return Node_Id;
-- Ada 2005 (AI-345): Determine the tagged kind of T and return a reference
-- to an RE_Tagged_Kind enumeration value.
----------------------------
-- Collect_All_Interfaces --
----------------------------
procedure Collect_All_Interfaces (T : Entity_Id) is
procedure Add_Interface (Iface : Entity_Id);
-- Add the interface it if is not already in the list
procedure Collect (Typ : Entity_Id);
-- Subsidiary subprogram used to traverse the whole list
-- of directly and indirectly implemented interfaces
-------------------
-- Add_Interface --
-------------------
procedure Add_Interface (Iface : Entity_Id) is
Elmt : Elmt_Id;
begin
Elmt := First_Elmt (Abstract_Interfaces (T));
while Present (Elmt) and then Node (Elmt) /= Iface loop
Next_Elmt (Elmt);
end loop;
if No (Elmt) then
Append_Elmt (Iface, Abstract_Interfaces (T));
end if;
end Add_Interface;
-------------
-- Collect --
-------------
procedure Collect (Typ : Entity_Id) is
Ancestor : Entity_Id;
Id : Node_Id;
Iface : Entity_Id;
Nod : Node_Id;
begin
if Ekind (Typ) = E_Record_Type_With_Private then
Nod := Type_Definition (Parent (Full_View (Typ)));
else
Nod := Type_Definition (Parent (Typ));
end if;
pragma Assert (False
or else Nkind (Nod) = N_Derived_Type_Definition
or else Nkind (Nod) = N_Record_Definition);
-- Include the ancestor if we are generating the whole list
-- of interfaces. This is used to know the size of the table
-- that stores the tag of all the ancestor interfaces.
Ancestor := Etype (Typ);
if Ancestor /= Typ then
Collect (Ancestor);
end if;
if Is_Interface (Ancestor) then
Add_Interface (Ancestor);
end if;
-- Traverse the graph of ancestor interfaces
if Is_Non_Empty_List (Interface_List (Nod)) then
Id := First (Interface_List (Nod));
while Present (Id) loop
Iface := Etype (Id);
if Is_Interface (Iface) then
Add_Interface (Iface);
Collect (Iface);
end if;
Next (Id);
end loop;
end if;
end Collect;
-- Start of processing for Collect_All_Interfaces
begin
Collect (T);
end Collect_All_Interfaces;
------------------------------
-- Default_Prim_Op_Position --
------------------------------
function Default_Prim_Op_Position (E : Entity_Id) return Uint is
TSS_Name : TSS_Name_Type;
begin
Get_Name_String (Chars (E));
TSS_Name :=
TSS_Name_Type
(Name_Buffer (Name_Len - TSS_Name'Length + 1 .. Name_Len));
if Chars (E) = Name_uSize then
return Uint_1;
elsif Chars (E) = Name_uAlignment then
return Uint_2;
elsif TSS_Name = TSS_Stream_Read then
return Uint_3;
elsif TSS_Name = TSS_Stream_Write then
return Uint_4;
elsif TSS_Name = TSS_Stream_Input then
return Uint_5;
elsif TSS_Name = TSS_Stream_Output then
return Uint_6;
elsif Chars (E) = Name_Op_Eq then
return Uint_7;
elsif Chars (E) = Name_uAssign then
return Uint_8;
elsif TSS_Name = TSS_Deep_Adjust then
return Uint_9;
elsif TSS_Name = TSS_Deep_Finalize then
return Uint_10;
elsif Ada_Version >= Ada_05 then
if Chars (E) = Name_uDisp_Asynchronous_Select then
return Uint_11;
elsif Chars (E) = Name_uDisp_Conditional_Select then
return Uint_12;
elsif Chars (E) = Name_uDisp_Get_Prim_Op_Kind then
return Uint_13;
elsif Chars (E) = Name_uDisp_Get_Task_Id then
return Uint_14;
elsif Chars (E) = Name_uDisp_Timed_Select then
return Uint_15;
end if;
end if;
raise Program_Error;
end Default_Prim_Op_Position;
-----------------------------
-- Expand_Dispatching_Call --
-----------------------------
procedure Expand_Dispatching_Call (Call_Node : Node_Id) is
Loc : constant Source_Ptr := Sloc (Call_Node);
Call_Typ : constant Entity_Id := Etype (Call_Node);
Ctrl_Arg : constant Node_Id := Controlling_Argument (Call_Node);
Param_List : constant List_Id := Parameter_Associations (Call_Node);
Subp : Entity_Id := Entity (Name (Call_Node));
CW_Typ : Entity_Id;
New_Call : Node_Id;
New_Call_Name : Node_Id;
New_Params : List_Id := No_List;
Param : Node_Id;
Res_Typ : Entity_Id;
Subp_Ptr_Typ : Entity_Id;
Subp_Typ : Entity_Id;
Typ : Entity_Id;
Eq_Prim_Op : Entity_Id := Empty;
Controlling_Tag : Node_Id;
function New_Value (From : Node_Id) return Node_Id;
-- From is the original Expression. New_Value is equivalent to a call
-- to Duplicate_Subexpr with an explicit dereference when From is an
-- access parameter.
function Controlling_Type (Subp : Entity_Id) return Entity_Id;
-- Returns the tagged type for which Subp is a primitive subprogram
---------------
-- New_Value --
---------------
function New_Value (From : Node_Id) return Node_Id is
Res : constant Node_Id := Duplicate_Subexpr (From);
begin
if Is_Access_Type (Etype (From)) then
return Make_Explicit_Dereference (Sloc (From), Res);
else
return Res;
end if;
end New_Value;
----------------------
-- Controlling_Type --
----------------------
function Controlling_Type (Subp : Entity_Id) return Entity_Id is
begin
if Ekind (Subp) = E_Function
and then Has_Controlling_Result (Subp)
then
return Base_Type (Etype (Subp));
else
declare
Formal : Entity_Id;
begin
Formal := First_Formal (Subp);
while Present (Formal) loop
if Is_Controlling_Formal (Formal) then
if Is_Access_Type (Etype (Formal)) then
return Base_Type (Designated_Type (Etype (Formal)));
else
return Base_Type (Etype (Formal));
end if;
end if;
Next_Formal (Formal);
end loop;
end;
end if;
-- Controlling type not found (should never happen)
return Empty;
end Controlling_Type;
-- Start of processing for Expand_Dispatching_Call
begin
Check_Restriction (No_Dispatching_Calls, Call_Node);
-- If this is an inherited operation that was overridden, the body
-- that is being called is its alias.
if Present (Alias (Subp))
and then Is_Inherited_Operation (Subp)
and then No (DTC_Entity (Subp))
then
Subp := Alias (Subp);
end if;
-- Expand_Dispatching_Call is called directly from the semantics,
-- so we need a check to see whether expansion is active before
-- proceeding.
if not Expander_Active then
return;
end if;
-- Definition of the class-wide type and the tagged type
-- If the controlling argument is itself a tag rather than a tagged
-- object, then use the class-wide type associated with the subprogram's
-- controlling type. This case can occur when a call to an inherited
-- primitive has an actual that originated from a default parameter
-- given by a tag-indeterminate call and when there is no other
-- controlling argument providing the tag (AI-239 requires dispatching).
-- This capability of dispatching directly by tag is also needed by the
-- implementation of AI-260 (for the generic dispatching constructors).
if Etype (Ctrl_Arg) = RTE (RE_Tag)
or else (RTE_Available (RE_Interface_Tag)
and then Etype (Ctrl_Arg) = RTE (RE_Interface_Tag))
then
CW_Typ := Class_Wide_Type (Controlling_Type (Subp));
elsif Is_Access_Type (Etype (Ctrl_Arg)) then
CW_Typ := Designated_Type (Etype (Ctrl_Arg));
else
CW_Typ := Etype (Ctrl_Arg);
end if;
Typ := Root_Type (CW_Typ);
if Ekind (Typ) = E_Incomplete_Type then
Typ := Non_Limited_View (Typ);
end if;
if not Is_Limited_Type (Typ) then
Eq_Prim_Op := Find_Prim_Op (Typ, Name_Op_Eq);
end if;
if Is_CPP_Class (Root_Type (Typ)) then
-- Create a new parameter list with the displaced 'this'
New_Params := New_List;
Param := First_Actual (Call_Node);
while Present (Param) loop
Append_To (New_Params, Relocate_Node (Param));
Next_Actual (Param);
end loop;
elsif Present (Param_List) then
-- Generate the Tag checks when appropriate
New_Params := New_List;
Param := First_Actual (Call_Node);
while Present (Param) loop
-- No tag check with itself
if Param = Ctrl_Arg then
Append_To (New_Params,
Duplicate_Subexpr_Move_Checks (Param));
-- No tag check for parameter whose type is neither tagged nor
-- access to tagged (for access parameters)
elsif No (Find_Controlling_Arg (Param)) then
Append_To (New_Params, Relocate_Node (Param));
-- No tag check for function dispatching on result if the
-- Tag given by the context is this one
elsif Find_Controlling_Arg (Param) = Ctrl_Arg then
Append_To (New_Params, Relocate_Node (Param));
-- "=" is the only dispatching operation allowed to get
-- operands with incompatible tags (it just returns false).
-- We use Duplicate_Subexpr_Move_Checks instead of calling
-- Relocate_Node because the value will be duplicated to
-- check the tags.
elsif Subp = Eq_Prim_Op then
Append_To (New_Params,
Duplicate_Subexpr_Move_Checks (Param));
-- No check in presence of suppress flags
elsif Tag_Checks_Suppressed (Etype (Param))
or else (Is_Access_Type (Etype (Param))
and then Tag_Checks_Suppressed
(Designated_Type (Etype (Param))))
then
Append_To (New_Params, Relocate_Node (Param));
-- Optimization: no tag checks if the parameters are identical
elsif Is_Entity_Name (Param)
and then Is_Entity_Name (Ctrl_Arg)
and then Entity (Param) = Entity (Ctrl_Arg)
then
Append_To (New_Params, Relocate_Node (Param));
-- Now we need to generate the Tag check
else
-- Generate code for tag equality check
-- Perhaps should have Checks.Apply_Tag_Equality_Check???
Insert_Action (Ctrl_Arg,
Make_Implicit_If_Statement (Call_Node,
Condition =>
Make_Op_Ne (Loc,
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => New_Value (Ctrl_Arg),
Selector_Name =>
New_Reference_To
(First_Tag_Component (Typ), Loc)),
Right_Opnd =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (Typ, New_Value (Param)),
Selector_Name =>
New_Reference_To
(First_Tag_Component (Typ), Loc))),
Then_Statements =>
New_List (New_Constraint_Error (Loc))));
Append_To (New_Params, Relocate_Node (Param));
end if;
Next_Actual (Param);
end loop;
end if;
-- Generate the appropriate subprogram pointer type
if Etype (Subp) = Typ then
Res_Typ := CW_Typ;
else
Res_Typ := Etype (Subp);
end if;
Subp_Typ := Create_Itype (E_Subprogram_Type, Call_Node);
Subp_Ptr_Typ := Create_Itype (E_Access_Subprogram_Type, Call_Node);
Set_Etype (Subp_Typ, Res_Typ);
Init_Size_Align (Subp_Ptr_Typ);
Set_Returns_By_Ref (Subp_Typ, Returns_By_Ref (Subp));
-- Create a new list of parameters which is a copy of the old formal
-- list including the creation of a new set of matching entities.
declare
Old_Formal : Entity_Id := First_Formal (Subp);
New_Formal : Entity_Id;
Extra : Entity_Id;
begin
if Present (Old_Formal) then
New_Formal := New_Copy (Old_Formal);
Set_First_Entity (Subp_Typ, New_Formal);
Param := First_Actual (Call_Node);
loop
Set_Scope (New_Formal, Subp_Typ);
-- Change all the controlling argument types to be class-wide
-- to avoid a recursion in dispatching.
if Is_Controlling_Formal (New_Formal) then
Set_Etype (New_Formal, Etype (Param));
end if;
if Is_Itype (Etype (New_Formal)) then
Extra := New_Copy (Etype (New_Formal));
if Ekind (Extra) = E_Record_Subtype
or else Ekind (Extra) = E_Class_Wide_Subtype
then
Set_Cloned_Subtype (Extra, Etype (New_Formal));
end if;
Set_Etype (New_Formal, Extra);
Set_Scope (Etype (New_Formal), Subp_Typ);
end if;
Extra := New_Formal;
Next_Formal (Old_Formal);
exit when No (Old_Formal);
Set_Next_Entity (New_Formal, New_Copy (Old_Formal));
Next_Entity (New_Formal);
Next_Actual (Param);
end loop;
Set_Last_Entity (Subp_Typ, Extra);
-- Copy extra formals
New_Formal := First_Entity (Subp_Typ);
while Present (New_Formal) loop
if Present (Extra_Constrained (New_Formal)) then
Set_Extra_Formal (Extra,
New_Copy (Extra_Constrained (New_Formal)));
Extra := Extra_Formal (Extra);
Set_Extra_Constrained (New_Formal, Extra);
elsif Present (Extra_Accessibility (New_Formal)) then
Set_Extra_Formal (Extra,
New_Copy (Extra_Accessibility (New_Formal)));
Extra := Extra_Formal (Extra);
Set_Extra_Accessibility (New_Formal, Extra);
end if;
Next_Formal (New_Formal);
end loop;
end if;
end;
Set_Etype (Subp_Ptr_Typ, Subp_Ptr_Typ);
Set_Directly_Designated_Type (Subp_Ptr_Typ, Subp_Typ);
-- If the controlling argument is a value of type Ada.Tag or an abstract
-- interface class-wide type then use it directly. Otherwise, the tag
-- must be extracted from the controlling object.
if Etype (Ctrl_Arg) = RTE (RE_Tag)
or else (RTE_Available (RE_Interface_Tag)
and then Etype (Ctrl_Arg) = RTE (RE_Interface_Tag))
then
Controlling_Tag := Duplicate_Subexpr (Ctrl_Arg);
-- Ada 2005 (AI-251): Abstract interface class-wide type
elsif Is_Interface (Etype (Ctrl_Arg))
and then Is_Class_Wide_Type (Etype (Ctrl_Arg))
then
Controlling_Tag := Duplicate_Subexpr (Ctrl_Arg);
else
Controlling_Tag :=
Make_Selected_Component (Loc,
Prefix => Duplicate_Subexpr_Move_Checks (Ctrl_Arg),
Selector_Name => New_Reference_To (DTC_Entity (Subp), Loc));
end if;
-- Generate:
-- Subp_Ptr_Typ!(Get_Prim_Op_Address (Ctrl._Tag, pos));
if Is_Predefined_Dispatching_Operation (Subp) then
New_Call_Name :=
Unchecked_Convert_To (Subp_Ptr_Typ,
Make_DT_Access_Action (Typ,
Action => Get_Predefined_Prim_Op_Address,
Args => New_List (
-- Vptr
Unchecked_Convert_To (RTE (RE_Tag),
Controlling_Tag),
-- Position
Make_Integer_Literal (Loc, DT_Position (Subp)))));
else
New_Call_Name :=
Unchecked_Convert_To (Subp_Ptr_Typ,
Make_DT_Access_Action (Typ,
Action => Get_Prim_Op_Address,
Args => New_List (
-- Vptr
Unchecked_Convert_To (RTE (RE_Tag),
Controlling_Tag),
-- Position
Make_Integer_Literal (Loc, DT_Position (Subp)))));
end if;
if Nkind (Call_Node) = N_Function_Call then
-- Ada 2005 (AI-251): A dispatching "=" with an abstract interface
-- just requires the comparison of the tags.
if Ekind (Etype (Ctrl_Arg)) = E_Class_Wide_Type
and then Is_Interface (Etype (Ctrl_Arg))
and then Subp = Eq_Prim_Op
then
Param := First_Actual (Call_Node);
New_Call :=
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => New_Value (Param),
Selector_Name =>
New_Reference_To (First_Tag_Component (Typ), Loc)),
Right_Opnd =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (Typ,
New_Value (Next_Actual (Param))),
Selector_Name =>
New_Reference_To (First_Tag_Component (Typ), Loc)));
else
New_Call :=
Make_Function_Call (Loc,
Name => New_Call_Name,
Parameter_Associations => New_Params);
-- If this is a dispatching "=", we must first compare the tags so
-- we generate: x.tag = y.tag and then x = y
if Subp = Eq_Prim_Op then
Param := First_Actual (Call_Node);
New_Call :=
Make_And_Then (Loc,
Left_Opnd =>
Make_Op_Eq (Loc,
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => New_Value (Param),
Selector_Name =>
New_Reference_To (First_Tag_Component (Typ),
Loc)),
Right_Opnd =>
Make_Selected_Component (Loc,
Prefix =>
Unchecked_Convert_To (Typ,
New_Value (Next_Actual (Param))),
Selector_Name =>
New_Reference_To (First_Tag_Component (Typ),
Loc))),
Right_Opnd => New_Call);
end if;
end if;
else
New_Call :=
Make_Procedure_Call_Statement (Loc,
Name => New_Call_Name,
Parameter_Associations => New_Params);
end if;
Rewrite (Call_Node, New_Call);
Analyze_And_Resolve (Call_Node, Call_Typ);
end Expand_Dispatching_Call;
---------------------------------
-- Expand_Interface_Conversion --
---------------------------------
procedure Expand_Interface_Conversion
(N : Node_Id;
Is_Static : Boolean := True)
is
Loc : constant Source_Ptr := Sloc (N);
Operand : constant Node_Id := Expression (N);
Operand_Typ : Entity_Id := Etype (Operand);
Iface_Typ : Entity_Id := Etype (N);
Iface_Tag : Entity_Id;
Fent : Entity_Id;
Func : Node_Id;
P : Node_Id;
Null_Op_Nod : Node_Id;
begin
pragma Assert (Nkind (Operand) /= N_Attribute_Reference);
-- Ada 2005 (AI-345): Handle task interfaces
if Ekind (Operand_Typ) = E_Task_Type
or else Ekind (Operand_Typ) = E_Protected_Type
then
Operand_Typ := Corresponding_Record_Type (Operand_Typ);
end if;
-- Handle access types to interfaces
if Is_Access_Type (Iface_Typ) then
Iface_Typ := Etype (Directly_Designated_Type (Iface_Typ));
end if;
-- Handle class-wide interface types. This conversion can appear
-- explicitly in the source code. Example: I'Class (Obj)
if Is_Class_Wide_Type (Iface_Typ) then
Iface_Typ := Etype (Iface_Typ);
end if;
pragma Assert (not Is_Class_Wide_Type (Iface_Typ)
and then Is_Interface (Iface_Typ));
if not Is_Static then
-- Give error if configurable run time and Displace not available
if not RTE_Available (RE_Displace) then
Error_Msg_CRT ("abstract interface types", N);
return;
end if;
Rewrite (N,
Make_Function_Call (Loc,
Name => New_Reference_To (RTE (RE_Displace), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => Relocate_Node (Expression (N)),
Attribute_Name => Name_Address),
New_Occurrence_Of
(Node (First_Elmt (Access_Disp_Table (Iface_Typ))),
Loc))));
Analyze (N);
-- Change the type of the data returned by IW_Convert to
-- indicate that this is a dispatching call.
declare
New_Itype : Entity_Id;
begin
New_Itype := Create_Itype (E_Anonymous_Access_Type, N);
Set_Etype (New_Itype, New_Itype);
Init_Size_Align (New_Itype);
Set_Directly_Designated_Type (New_Itype,
Class_Wide_Type (Iface_Typ));
Rewrite (N, Make_Explicit_Dereference (Loc,
Unchecked_Convert_To (New_Itype,
Relocate_Node (N))));
Analyze (N);
end;
return;
end if;
Iface_Tag := Find_Interface_Tag (Operand_Typ, Iface_Typ);
pragma Assert (Iface_Tag /= Empty);
-- Keep separate access types to interfaces because one internal
-- function is used to handle the null value (see following comment)
if not Is_Access_Type (Etype (N)) then
Rewrite (N,
Unchecked_Convert_To (Etype (N),
Make_Selected_Component (Loc,
Prefix => Relocate_Node (Expression (N)),
Selector_Name =>
New_Occurrence_Of (Iface_Tag, Loc))));
else
-- Build internal function to handle the case in which the
-- actual is null. If the actual is null returns null because
-- no displacement is required; otherwise performs a type
-- conversion that will be expanded in the code that returns
-- the value of the displaced actual. That is:
-- function Func (O : Operand_Typ) return Iface_Typ is
-- begin
-- if O = null then
-- return null;
-- else
-- return Iface_Typ!(O);
-- end if;
-- end Func;
Fent :=
Make_Defining_Identifier (Loc, New_Internal_Name ('F'));
-- Decorate the "null" in the if-statement condition
Null_Op_Nod := Make_Null (Loc);
Set_Etype (Null_Op_Nod, Etype (Operand));
Set_Analyzed (Null_Op_Nod);
Func :=
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => Fent,
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uO),
Parameter_Type =>
New_Reference_To (Etype (Operand), Loc))),
Result_Definition =>
New_Reference_To (Etype (N), Loc)),
Declarations => Empty_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (
Make_If_Statement (Loc,
Condition =>
Make_Op_Eq (Loc,
Left_Opnd => Make_Identifier (Loc, Name_uO),
Right_Opnd => Null_Op_Nod),
Then_Statements => New_List (
Make_Return_Statement (Loc,
Make_Null (Loc))),
Else_Statements => New_List (
Make_Return_Statement (Loc,
Unchecked_Convert_To (Etype (N),
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uO),
Selector_Name =>
New_Occurrence_Of (Iface_Tag, Loc)),
Attribute_Name => Name_Address))))))));
-- Insert the new declaration in the nearest enclosing scope
-- that has declarations.
P := N;
while not Has_Declarations (Parent (P)) loop
P := Parent (P);
end loop;
if Is_List_Member (P) then
Insert_Before (P, Func);
elsif Nkind (Parent (P)) = N_Package_Specification then
Append_To (Visible_Declarations (Parent (P)), Func);
else
Append_To (Declarations (Parent (P)), Func);
end if;
Analyze (Func);
Rewrite (N,
Make_Function_Call (Loc,
Name => New_Reference_To (Fent, Loc),
Parameter_Associations => New_List (
Relocate_Node (Expression (N)))));
end if;
Analyze (N);
end Expand_Interface_Conversion;
------------------------------
-- Expand_Interface_Actuals --
------------------------------
procedure Expand_Interface_Actuals (Call_Node : Node_Id) is
Loc : constant Source_Ptr := Sloc (Call_Node);
Actual : Node_Id;
Actual_Dup : Node_Id;
Actual_Typ : Entity_Id;
Anon : Entity_Id;
Conversion : Node_Id;
Formal : Entity_Id;
Formal_Typ : Entity_Id;
Subp : Entity_Id;
Nam : Name_Id;
Formal_DDT : Entity_Id;
Actual_DDT : Entity_Id;
begin
-- This subprogram is called directly from the semantics, so we need a
-- check to see whether expansion is active before proceeding.
if not Expander_Active then
return;
end if;
-- Call using access to subprogram with explicit dereference
if Nkind (Name (Call_Node)) = N_Explicit_Dereference then
Subp := Etype (Name (Call_Node));
-- Normal case
else
Subp := Entity (Name (Call_Node));
end if;
Formal := First_Formal (Subp);
Actual := First_Actual (Call_Node);
while Present (Formal) loop
-- Ada 2005 (AI-251): Conversion to interface to force "this"
-- displacement.
Formal_Typ := Etype (Etype (Formal));
if Ekind (Formal_Typ) = E_Record_Type_With_Private then
Formal_Typ := Full_View (Formal_Typ);
end if;
if Is_Access_Type (Formal_Typ) then
Formal_DDT := Directly_Designated_Type (Formal_Typ);
end if;
Actual_Typ := Etype (Actual);
if Is_Access_Type (Actual_Typ) then
Actual_DDT := Directly_Designated_Type (Actual_Typ);
end if;
if Is_Interface (Formal_Typ) then
-- No need to displace the pointer if the type of the actual
-- is class-wide of the formal-type interface; in this case the
-- displacement of the pointer was already done at the point of
-- the call to the enclosing subprogram. This case corresponds
-- with the call to P (Obj) in the following example:
-- type I is interface;
-- procedure P (X : I) is abstract;
-- procedure General_Op (Obj : I'Class) is
-- begin
-- P (Obj);
-- end General_Op;
if Is_Class_Wide_Type (Actual_Typ)
and then Etype (Actual_Typ) = Formal_Typ
then
null;
-- No need to displace the pointer if the type of the actual is a
-- derivation of the formal-type interface because in this case
-- the interface primitives are located in the primary dispatch
-- table.
elsif Is_Ancestor (Formal_Typ, Actual_Typ) then
null;
else
Conversion := Convert_To (Formal_Typ, Relocate_Node (Actual));
Rewrite (Actual, Conversion);
Analyze_And_Resolve (Actual, Formal_Typ);
end if;
-- Anonymous access type
elsif Is_Access_Type (Formal_Typ)
and then Is_Interface (Etype (Formal_DDT))
and then Interface_Present_In_Ancestor
(Typ => Actual_DDT,
Iface => Etype (Formal_DDT))
then
if Nkind (Actual) = N_Attribute_Reference
and then
(Attribute_Name (Actual) = Name_Access
or else Attribute_Name (Actual) = Name_Unchecked_Access)
then
Nam := Attribute_Name (Actual);
Conversion := Convert_To (Etype (Formal_DDT), Prefix (Actual));
Rewrite (Actual, Conversion);
Analyze_And_Resolve (Actual, Etype (Formal_DDT));
Rewrite (Actual,
Unchecked_Convert_To (Formal_Typ,
Make_Attribute_Reference (Loc,
Prefix => Relocate_Node (Actual),
Attribute_Name => Nam)));
Analyze_And_Resolve (Actual, Formal_Typ);
-- No need to displace the pointer if the actual is a class-wide
-- type of the formal-type interface because in this case the
-- displacement of the pointer was already done at the point of
-- the call to the enclosing subprogram (this case is similar
-- to the example described above for the non access-type case)
elsif Is_Class_Wide_Type (Actual_DDT)
and then Etype (Actual_DDT) = Formal_DDT
then
null;
-- No need to displace the pointer if the type of the actual is a
-- derivation of the interface (because in this case the interface
-- primitives are located in the primary dispatch table)
elsif Is_Ancestor (Formal_DDT, Actual_DDT) then
null;
else
Actual_Dup := Relocate_Node (Actual);
if From_With_Type (Actual_Typ) then
-- If the type of the actual parameter comes from a limited
-- with-clause and the non-limited view is already available
-- we replace the anonymous access type by a duplicate decla
-- ration whose designated type is the non-limited view
if Ekind (Actual_DDT) = E_Incomplete_Type
and then Present (Non_Limited_View (Actual_DDT))
then
Anon := New_Copy (Actual_Typ);
if Is_Itype (Anon) then
Set_Scope (Anon, Current_Scope);
end if;
Set_Directly_Designated_Type (Anon,
Non_Limited_View (Actual_DDT));
Set_Etype (Actual_Dup, Anon);
elsif Is_Class_Wide_Type (Actual_DDT)
and then Ekind (Etype (Actual_DDT)) = E_Incomplete_Type
and then Present (Non_Limited_View (Etype (Actual_DDT)))
then
Anon := New_Copy (Actual_Typ);
if Is_Itype (Anon) then
Set_Scope (Anon, Current_Scope);
end if;
Set_Directly_Designated_Type (Anon,
New_Copy (Actual_DDT));
Set_Class_Wide_Type (Directly_Designated_Type (Anon),
New_Copy (Class_Wide_Type (Actual_DDT)));
Set_Etype (Directly_Designated_Type (Anon),
Non_Limited_View (Etype (Actual_DDT)));
Set_Etype (
Class_Wide_Type (Directly_Designated_Type (Anon)),
Non_Limited_View (Etype (Actual_DDT)));
Set_Etype (Actual_Dup, Anon);
end if;
end if;
Conversion := Convert_To (Formal_Typ, Actual_Dup);
Rewrite (Actual, Conversion);
Analyze_And_Resolve (Actual, Formal_Typ);
end if;
end if;
Next_Actual (Actual);
Next_Formal (Formal);
end loop;
end Expand_Interface_Actuals;
----------------------------
-- Expand_Interface_Thunk --
----------------------------
function Expand_Interface_Thunk
(N : Node_Id;
Thunk_Alias : Entity_Id;
Thunk_Id : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (N);
Actuals : constant List_Id := New_List;
Decl : constant List_Id := New_List;
Formals : constant List_Id := New_List;
Target : Entity_Id;
New_Code : Node_Id;
Formal : Node_Id;
New_Formal : Node_Id;
Decl_1 : Node_Id;
Decl_2 : Node_Id;
E : Entity_Id;
begin
-- Traverse the list of alias to find the final target
Target := Thunk_Alias;
while Present (Alias (Target)) loop
Target := Alias (Target);
end loop;
-- Duplicate the formals
Formal := First_Formal (Target);
E := First_Formal (N);
while Present (Formal) loop
New_Formal := Copy_Separate_Tree (Parent (Formal));
-- Propagate the parameter type to the copy. This is required to
-- properly handle the case in which the subprogram covering the
-- interface has been inherited:
-- Example:
-- type I is interface;
-- procedure P (X : in I) is abstract;
-- type T is tagged null record;
-- procedure P (X : T);
-- type DT is new T and I with ...
Set_Parameter_Type (New_Formal, New_Reference_To (Etype (E), Loc));
Append_To (Formals, New_Formal);
Next_Formal (Formal);
Next_Formal (E);
end loop;
-- Give message if configurable run-time and Offset_To_Top unavailable
if not RTE_Available (RE_Offset_To_Top) then
Error_Msg_CRT ("abstract interface types", N);
return Empty;
end if;
if Ekind (First_Formal (Target)) = E_In_Parameter
and then Ekind (Etype (First_Formal (Target)))
= E_Anonymous_Access_Type
then
-- Generate:
-- type T is access all <<type of the first formal>>
-- S1 := Storage_Offset!(First_formal)
-- - Offset_To_Top (First_Formal.Tag)
-- ... and the first actual of the call is generated as T!(S1)
Decl_2 :=
Make_Full_Type_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc,
New_Internal_Name ('T')),
Type_Definition =>
Make_Access_To_Object_Definition (Loc,
All_Present => True,
Null_Exclusion_Present => False,
Constant_Present => False,
Subtype_Indication =>
New_Reference_To
(Directly_Designated_Type
(Etype (First_Formal (Target))), Loc)));
Decl_1 :=
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc,
New_Internal_Name ('S')),
Constant_Present => True,
Object_Definition =>
New_Reference_To (RTE (RE_Storage_Offset), Loc),
Expression =>
Make_Op_Subtract (Loc,
Left_Opnd =>
Unchecked_Convert_To
(RTE (RE_Storage_Offset),
New_Reference_To
(Defining_Identifier (First (Formals)), Loc)),
Right_Opnd =>
Make_Function_Call (Loc,
Name => New_Reference_To (RTE (RE_Offset_To_Top), Loc),
Parameter_Associations => New_List (
Unchecked_Convert_To
(RTE (RE_Address),
New_Reference_To
(Defining_Identifier (First (Formals)), Loc))))));
Append_To (Decl, Decl_2);
Append_To (Decl, Decl_1);
-- Reference the new first actual
Append_To (Actuals,
Unchecked_Convert_To
(Defining_Identifier (Decl_2),
New_Reference_To (Defining_Identifier (Decl_1), Loc)));
else
-- Generate:
-- S1 := Storage_Offset!(First_formal'Address)
-- - Offset_To_Top (First_Formal.Tag)
-- S2 := Tag_Ptr!(S3)
Decl_1 :=
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, New_Internal_Name ('S')),
Constant_Present => True,
Object_Definition =>
New_Reference_To (RTE (RE_Storage_Offset), Loc),
Expression =>
Make_Op_Subtract (Loc,
Left_Opnd =>
Unchecked_Convert_To
(RTE (RE_Storage_Offset),
Make_Attribute_Reference (Loc,
Prefix =>
New_Reference_To
(Defining_Identifier (First (Formals)), Loc),
Attribute_Name => Name_Address)),
Right_Opnd =>
Make_Function_Call (Loc,
Name => New_Reference_To (RTE (RE_Offset_To_Top), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To
(Defining_Identifier (First (Formals)),
Loc),
Attribute_Name => Name_Address)))));
Decl_2 :=
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, New_Internal_Name ('S')),
Constant_Present => True,
Object_Definition => New_Reference_To (RTE (RE_Addr_Ptr), Loc),
Expression =>
Unchecked_Convert_To
(RTE (RE_Addr_Ptr),
New_Reference_To (Defining_Identifier (Decl_1), Loc)));
Append_To (Decl, Decl_1);
Append_To (Decl, Decl_2);
-- Reference the new first actual
Append_To (Actuals,
Unchecked_Convert_To
(Etype (First_Entity (Target)),
Make_Explicit_Dereference (Loc,
New_Reference_To (Defining_Identifier (Decl_2), Loc))));
end if;
Formal := Next (First (Formals));
while Present (Formal) loop
Append_To (Actuals,
New_Reference_To (Defining_Identifier (Formal), Loc));
Next (Formal);
end loop;
if Ekind (Target) = E_Procedure then
New_Code :=
Make_Subprogram_Body (Loc,
Specification =>
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Thunk_Id,
Parameter_Specifications => Formals),
Declarations => Decl,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Target, Loc),
Parameter_Associations => Actuals))));
else pragma Assert (Ekind (Target) = E_Function);
New_Code :=
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => Thunk_Id,
Parameter_Specifications => Formals,
Result_Definition =>
New_Copy (Result_Definition (Parent (Target)))),
Declarations => Decl,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (
Make_Return_Statement (Loc,
Make_Function_Call (Loc,
Name => New_Occurrence_Of (Target, Loc),
Parameter_Associations => Actuals)))));
end if;
Analyze (New_Code);
return New_Code;
end Expand_Interface_Thunk;
-------------------
-- Fill_DT_Entry --
-------------------
function Fill_DT_Entry
(Loc : Source_Ptr;
Prim : Entity_Id) return Node_Id
is
Typ : constant Entity_Id := Scope (DTC_Entity (Prim));
DT_Ptr : constant Entity_Id :=
Node (First_Elmt (Access_Disp_Table (Typ)));
Pos : constant Uint := DT_Position (Prim);
Tag : constant Entity_Id := First_Tag_Component (Typ);
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
if Is_Predefined_Dispatching_Operation (Prim) then
return
Make_DT_Access_Action (Typ,
Action => Set_Predefined_Prim_Op_Address,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)), -- DTptr
Make_Integer_Literal (Loc, Pos), -- Position
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (Prim, Loc),
Attribute_Name => Name_Address)));
else
pragma Assert (Pos /= Uint_0 and then Pos <= DT_Entry_Count (Tag));
return
Make_DT_Access_Action (Typ,
Action => Set_Prim_Op_Address,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)), -- DTptr
Make_Integer_Literal (Loc, Pos), -- Position
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (Prim, Loc),
Attribute_Name => Name_Address)));
end if;
end Fill_DT_Entry;
-----------------------------
-- Fill_Secondary_DT_Entry --
-----------------------------
function Fill_Secondary_DT_Entry
(Loc : Source_Ptr;
Prim : Entity_Id;
Thunk_Id : Entity_Id;
Iface_DT_Ptr : Entity_Id) return Node_Id
is
Typ : constant Entity_Id := Scope (DTC_Entity (Alias (Prim)));
Iface_Prim : constant Entity_Id := Abstract_Interface_Alias (Prim);
Pos : constant Uint := DT_Position (Iface_Prim);
Tag : constant Entity_Id :=
First_Tag_Component (Scope (DTC_Entity (Iface_Prim)));
begin
if Is_Predefined_Dispatching_Operation (Prim) then
return
Make_DT_Access_Action (Typ,
Action => Set_Predefined_Prim_Op_Address,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)), -- DTptr
Make_Integer_Literal (Loc, Pos), -- Position
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (Thunk_Id, Loc),
Attribute_Name => Name_Address)));
else
pragma Assert (Pos /= Uint_0 and then Pos <= DT_Entry_Count (Tag));
return
Make_DT_Access_Action (Typ,
Action => Set_Prim_Op_Address,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)), -- DTptr
Make_Integer_Literal (Loc, Pos), -- Position
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (Thunk_Id, Loc),
Attribute_Name => Name_Address)));
end if;
end Fill_Secondary_DT_Entry;
---------------------------
-- Get_Remotely_Callable --
---------------------------
function Get_Remotely_Callable (Obj : Node_Id) return Node_Id is
Loc : constant Source_Ptr := Sloc (Obj);
begin
return Make_DT_Access_Action
(Typ => Etype (Obj),
Action => Get_Remotely_Callable,
Args => New_List (
Make_Selected_Component (Loc,
Prefix => Obj,
Selector_Name => Make_Identifier (Loc, Name_uTag))));
end Get_Remotely_Callable;
------------------------------------------
-- Init_Predefined_Interface_Primitives --
------------------------------------------
function Init_Predefined_Interface_Primitives
(Typ : Entity_Id) return List_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
DT_Ptr : constant Node_Id :=
Node (First_Elmt (Access_Disp_Table (Typ)));
Result : constant List_Id := New_List;
AI : Elmt_Id;
begin
-- No need to inherit primitives if we have an abstract interface
-- type or a concurrent type.
if Is_Interface (Typ)
or else Is_Concurrent_Record_Type (Typ)
or else Restriction_Active (No_Dispatching_Calls)
then
return Result;
end if;
AI := Next_Elmt (First_Elmt (Access_Disp_Table (Typ)));
while Present (AI) loop
-- All the secondary tables inherit the dispatch table entries
-- associated with predefined primitives.
-- Generate:
-- Inherit_DT (T'Tag, Iface'Tag, 0);
Append_To (Result,
Make_DT_Access_Action (Typ,
Action => Inherit_DT,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 => Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Node (AI), Loc)),
Node3 => Make_Integer_Literal (Loc, Uint_0))));
Next_Elmt (AI);
end loop;
return Result;
end Init_Predefined_Interface_Primitives;
----------------------------------------
-- Make_Disp_Asynchronous_Select_Body --
----------------------------------------
function Make_Disp_Asynchronous_Select_Body
(Typ : Entity_Id) return Node_Id
is
Conc_Typ : Entity_Id := Empty;
Decls : constant List_Id := New_List;
DT_Ptr : Entity_Id;
Loc : constant Source_Ptr := Sloc (Typ);
Stmts : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- Null body is generated for interface types
if Is_Interface (Typ) then
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Asynchronous_Select_Spec (Typ),
Declarations =>
New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
New_List (Make_Null_Statement (Loc))));
end if;
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ)));
if Is_Concurrent_Record_Type (Typ) then
Conc_Typ := Corresponding_Concurrent_Type (Typ);
-- Generate:
-- I : Integer := Get_Entry_Index (tag! (<type>VP), S);
-- where I will be used to capture the entry index of the primitive
-- wrapper at position S.
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uI),
Object_Definition =>
New_Reference_To (Standard_Integer, Loc),
Expression =>
Make_DT_Access_Action (Typ,
Action =>
Get_Entry_Index,
Args =>
New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)),
Make_Identifier (Loc, Name_uS)))));
if Ekind (Conc_Typ) = E_Protected_Type then
-- Generate:
-- Protected_Entry_Call (
-- T._object'access,
-- protected_entry_index! (I),
-- P,
-- Asynchronous_Call,
-- B);
-- where T is the protected object, I is the entry index, P are
-- the wrapped parameters and B is the name of the communication
-- block.
Append_To (Stmts,
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Protected_Entry_Call), Loc),
Parameter_Associations =>
New_List (
Make_Attribute_Reference (Loc, -- T._object'access
Attribute_Name =>
Name_Unchecked_Access,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uObject))),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Protected_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Asynchronous_Call
RTE (RE_Asynchronous_Call), Loc),
Make_Identifier (Loc, Name_uB)))); -- comm block
else
pragma Assert (Ekind (Conc_Typ) = E_Task_Type);
-- Generate:
-- Protected_Entry_Call (
-- T._task_id,
-- task_entry_index! (I),
-- P,
-- Conditional_Call,
-- F);
-- where T is the task object, I is the entry index, P are the
-- wrapped parameters and F is the status flag.
Append_To (Stmts,
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Task_Entry_Call), Loc),
Parameter_Associations =>
New_List (
Make_Selected_Component (Loc, -- T._task_id
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Asynchronous_Call
RTE (RE_Asynchronous_Call), Loc),
Make_Identifier (Loc, Name_uF)))); -- status flag
end if;
end if;
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Asynchronous_Select_Spec (Typ),
Declarations =>
Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc, Stmts));
end Make_Disp_Asynchronous_Select_Body;
----------------------------------------
-- Make_Disp_Asynchronous_Select_Spec --
----------------------------------------
function Make_Disp_Asynchronous_Select_Spec
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Def_Id : constant Node_Id :=
Make_Defining_Identifier (Loc,
Name_uDisp_Asynchronous_Select);
Params : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- "T" - Object parameter
-- "S" - Primitive operation slot
-- "P" - Wrapped parameters
-- "B" - Communication block
-- "F" - Status flag
SEU.Build_T (Loc, Typ, Params);
SEU.Build_S (Loc, Params);
SEU.Build_P (Loc, Params);
SEU.Build_B (Loc, Params);
SEU.Build_F (Loc, Params);
Set_Is_Internal (Def_Id);
return
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Def_Id,
Parameter_Specifications => Params);
end Make_Disp_Asynchronous_Select_Spec;
---------------------------------------
-- Make_Disp_Conditional_Select_Body --
---------------------------------------
function Make_Disp_Conditional_Select_Body
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Blk_Nam : Entity_Id;
Conc_Typ : Entity_Id := Empty;
Decls : constant List_Id := New_List;
DT_Ptr : Entity_Id;
Stmts : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- Null body is generated for interface types
if Is_Interface (Typ) then
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Conditional_Select_Spec (Typ),
Declarations =>
No_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
New_List (Make_Null_Statement (Loc))));
end if;
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ)));
if Is_Concurrent_Record_Type (Typ) then
Conc_Typ := Corresponding_Concurrent_Type (Typ);
-- Generate:
-- I : Integer;
-- where I will be used to capture the entry index of the primitive
-- wrapper at position S.
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uI),
Object_Definition =>
New_Reference_To (Standard_Integer, Loc)));
-- Generate:
-- C := Get_Prim_Op_Kind (tag! (<type>VP), S);
-- if C = POK_Procedure
-- or else C = POK_Protected_Procedure
-- or else C = POK_Task_Procedure;
-- then
-- F := True;
-- return;
-- end if;
SEU.Build_Common_Dispatching_Select_Statements
(Loc, Typ, DT_Ptr, Stmts);
-- Generate:
-- Bnn : Communication_Block;
-- where Bnn is the name of the communication block used in
-- the call to Protected_Entry_Call.
Blk_Nam := Make_Defining_Identifier (Loc, New_Internal_Name ('B'));
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier =>
Blk_Nam,
Object_Definition =>
New_Reference_To (RTE (RE_Communication_Block), Loc)));
-- Generate:
-- I := Get_Entry_Index (tag! (<type>VP), S);
-- I is the entry index and S is the dispatch table slot
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uI),
Expression =>
Make_DT_Access_Action (Typ,
Action =>
Get_Entry_Index,
Args =>
New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)),
Make_Identifier (Loc, Name_uS)))));
if Ekind (Conc_Typ) = E_Protected_Type then
-- Generate:
-- Protected_Entry_Call (
-- T._object'access,
-- protected_entry_index! (I),
-- P,
-- Conditional_Call,
-- Bnn);
-- where T is the protected object, I is the entry index, P are
-- the wrapped parameters and Bnn is the name of the communication
-- block.
Append_To (Stmts,
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Protected_Entry_Call), Loc),
Parameter_Associations =>
New_List (
Make_Attribute_Reference (Loc, -- T._object'access
Attribute_Name =>
Name_Unchecked_Access,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uObject))),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Protected_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Conditional_Call
RTE (RE_Conditional_Call), Loc),
New_Reference_To ( -- Bnn
Blk_Nam, Loc))));
-- Generate:
-- F := not Cancelled (Bnn);
-- where F is the success flag. The status of Cancelled is negated
-- in order to match the behaviour of the version for task types.
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uF),
Expression =>
Make_Op_Not (Loc,
Right_Opnd =>
Make_Function_Call (Loc,
Name =>
New_Reference_To (RTE (RE_Cancelled), Loc),
Parameter_Associations =>
New_List (
New_Reference_To (Blk_Nam, Loc))))));
else
pragma Assert (Ekind (Conc_Typ) = E_Task_Type);
-- Generate:
-- Protected_Entry_Call (
-- T._task_id,
-- task_entry_index! (I),
-- P,
-- Conditional_Call,
-- F);
-- where T is the task object, I is the entry index, P are the
-- wrapped parameters and F is the status flag.
Append_To (Stmts,
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Task_Entry_Call), Loc),
Parameter_Associations =>
New_List (
Make_Selected_Component (Loc, -- T._task_id
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
New_Reference_To ( -- Conditional_Call
RTE (RE_Conditional_Call), Loc),
Make_Identifier (Loc, Name_uF)))); -- status flag
end if;
end if;
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Conditional_Select_Spec (Typ),
Declarations =>
Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc, Stmts));
end Make_Disp_Conditional_Select_Body;
---------------------------------------
-- Make_Disp_Conditional_Select_Spec --
---------------------------------------
function Make_Disp_Conditional_Select_Spec
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Def_Id : constant Node_Id :=
Make_Defining_Identifier (Loc,
Name_uDisp_Conditional_Select);
Params : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- "T" - Object parameter
-- "S" - Primitive operation slot
-- "P" - Wrapped parameters
-- "C" - Call kind
-- "F" - Status flag
SEU.Build_T (Loc, Typ, Params);
SEU.Build_S (Loc, Params);
SEU.Build_P (Loc, Params);
SEU.Build_C (Loc, Params);
SEU.Build_F (Loc, Params);
Set_Is_Internal (Def_Id);
return
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Def_Id,
Parameter_Specifications => Params);
end Make_Disp_Conditional_Select_Spec;
-------------------------------------
-- Make_Disp_Get_Prim_Op_Kind_Body --
-------------------------------------
function Make_Disp_Get_Prim_Op_Kind_Body
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
DT_Ptr : Entity_Id;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
if Is_Interface (Typ) then
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Get_Prim_Op_Kind_Spec (Typ),
Declarations =>
New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
New_List (Make_Null_Statement (Loc))));
end if;
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ)));
-- Generate:
-- C := get_prim_op_kind (tag! (<type>VP), S);
-- where C is the out parameter capturing the call kind and S is the
-- dispatch table slot number.
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Get_Prim_Op_Kind_Spec (Typ),
Declarations =>
New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
New_List (
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uC),
Expression =>
Make_DT_Access_Action (Typ,
Action =>
Get_Prim_Op_Kind,
Args =>
New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)),
Make_Identifier (Loc, Name_uS)))))));
end Make_Disp_Get_Prim_Op_Kind_Body;
-------------------------------------
-- Make_Disp_Get_Prim_Op_Kind_Spec --
-------------------------------------
function Make_Disp_Get_Prim_Op_Kind_Spec
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Def_Id : constant Node_Id :=
Make_Defining_Identifier (Loc,
Name_uDisp_Get_Prim_Op_Kind);
Params : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- "T" - Object parameter
-- "S" - Primitive operation slot
-- "C" - Call kind
SEU.Build_T (Loc, Typ, Params);
SEU.Build_S (Loc, Params);
SEU.Build_C (Loc, Params);
Set_Is_Internal (Def_Id);
return
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Def_Id,
Parameter_Specifications => Params);
end Make_Disp_Get_Prim_Op_Kind_Spec;
--------------------------------
-- Make_Disp_Get_Task_Id_Body --
--------------------------------
function Make_Disp_Get_Task_Id_Body
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Ret : Node_Id;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
if Is_Concurrent_Record_Type (Typ)
and then Ekind (Corresponding_Concurrent_Type (Typ)) = E_Task_Type
then
Ret :=
Make_Return_Statement (Loc,
Expression =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)));
-- A null body is constructed for non-task types
else
Ret :=
Make_Return_Statement (Loc,
Expression =>
New_Reference_To (RTE (RO_ST_Null_Task), Loc));
end if;
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Get_Task_Id_Spec (Typ),
Declarations =>
New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
New_List (Ret)));
end Make_Disp_Get_Task_Id_Body;
--------------------------------
-- Make_Disp_Get_Task_Id_Spec --
--------------------------------
function Make_Disp_Get_Task_Id_Spec
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Def_Id : constant Node_Id :=
Make_Defining_Identifier (Loc,
Name_uDisp_Get_Task_Id);
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
Set_Is_Internal (Def_Id);
return
Make_Function_Specification (Loc,
Defining_Unit_Name => Def_Id,
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uT),
Parameter_Type =>
New_Reference_To (Typ, Loc))),
Result_Definition =>
New_Reference_To (RTE (RO_ST_Task_Id), Loc));
end Make_Disp_Get_Task_Id_Spec;
---------------------------------
-- Make_Disp_Timed_Select_Body --
---------------------------------
function Make_Disp_Timed_Select_Body
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Conc_Typ : Entity_Id := Empty;
Decls : constant List_Id := New_List;
DT_Ptr : Entity_Id;
Stmts : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- Null body is generated for interface types
if Is_Interface (Typ) then
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Timed_Select_Spec (Typ),
Declarations =>
New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
New_List (Make_Null_Statement (Loc))));
end if;
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ)));
if Is_Concurrent_Record_Type (Typ) then
Conc_Typ := Corresponding_Concurrent_Type (Typ);
-- Generate:
-- I : Integer;
-- where I will be used to capture the entry index of the primitive
-- wrapper at position S.
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uI),
Object_Definition =>
New_Reference_To (Standard_Integer, Loc)));
-- Generate:
-- C := Get_Prim_Op_Kind (tag! (<type>VP), S);
-- if C = POK_Procedure
-- or else C = POK_Protected_Procedure
-- or else C = POK_Task_Procedure;
-- then
-- F := True;
-- return;
-- end if;
SEU.Build_Common_Dispatching_Select_Statements
(Loc, Typ, DT_Ptr, Stmts);
-- Generate:
-- I := Get_Entry_Index (tag! (<type>VP), S);
-- I is the entry index and S is the dispatch table slot
Append_To (Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Identifier (Loc, Name_uI),
Expression =>
Make_DT_Access_Action (Typ,
Action =>
Get_Entry_Index,
Args =>
New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (DT_Ptr, Loc)),
Make_Identifier (Loc, Name_uS)))));
if Ekind (Conc_Typ) = E_Protected_Type then
-- Generate:
-- Timed_Protected_Entry_Call (
-- T._object'access,
-- protected_entry_index! (I),
-- P,
-- D,
-- M,
-- F);
-- where T is the protected object, I is the entry index, P are
-- the wrapped parameters, D is the delay amount, M is the delay
-- mode and F is the status flag.
Append_To (Stmts,
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Timed_Protected_Entry_Call), Loc),
Parameter_Associations =>
New_List (
Make_Attribute_Reference (Loc, -- T._object'access
Attribute_Name =>
Name_Unchecked_Access,
Prefix =>
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uObject))),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Protected_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
Make_Identifier (Loc, Name_uD), -- delay
Make_Identifier (Loc, Name_uM), -- delay mode
Make_Identifier (Loc, Name_uF)))); -- status flag
else
pragma Assert (Ekind (Conc_Typ) = E_Task_Type);
-- Generate:
-- Timed_Task_Entry_Call (
-- T._task_id,
-- task_entry_index! (I),
-- P,
-- D,
-- M,
-- F);
-- where T is the task object, I is the entry index, P are the
-- wrapped parameters, D is the delay amount, M is the delay
-- mode and F is the status flag.
Append_To (Stmts,
Make_Procedure_Call_Statement (Loc,
Name =>
New_Reference_To (RTE (RE_Timed_Task_Entry_Call), Loc),
Parameter_Associations =>
New_List (
Make_Selected_Component (Loc, -- T._task_id
Prefix =>
Make_Identifier (Loc, Name_uT),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Make_Unchecked_Type_Conversion (Loc, -- entry index
Subtype_Mark =>
New_Reference_To (RTE (RE_Task_Entry_Index), Loc),
Expression =>
Make_Identifier (Loc, Name_uI)),
Make_Identifier (Loc, Name_uP), -- parameter block
Make_Identifier (Loc, Name_uD), -- delay
Make_Identifier (Loc, Name_uM), -- delay mode
Make_Identifier (Loc, Name_uF)))); -- status flag
end if;
end if;
return
Make_Subprogram_Body (Loc,
Specification =>
Make_Disp_Timed_Select_Spec (Typ),
Declarations =>
Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc, Stmts));
end Make_Disp_Timed_Select_Body;
---------------------------------
-- Make_Disp_Timed_Select_Spec --
---------------------------------
function Make_Disp_Timed_Select_Spec
(Typ : Entity_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (Typ);
Def_Id : constant Node_Id :=
Make_Defining_Identifier (Loc,
Name_uDisp_Timed_Select);
Params : constant List_Id := New_List;
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
-- "T" - Object parameter
-- "S" - Primitive operation slot
-- "P" - Wrapped parameters
-- "D" - Delay
-- "M" - Delay Mode
-- "C" - Call kind
-- "F" - Status flag
SEU.Build_T (Loc, Typ, Params);
SEU.Build_S (Loc, Params);
SEU.Build_P (Loc, Params);
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uD),
Parameter_Type =>
New_Reference_To (Standard_Duration, Loc)));
Append_To (Params,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uM),
Parameter_Type =>
New_Reference_To (Standard_Integer, Loc)));
SEU.Build_C (Loc, Params);
SEU.Build_F (Loc, Params);
Set_Is_Internal (Def_Id);
return
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Def_Id,
Parameter_Specifications => Params);
end Make_Disp_Timed_Select_Spec;
-------------
-- Make_DT --
-------------
function Make_DT (Typ : Entity_Id) return List_Id is
Loc : constant Source_Ptr := Sloc (Typ);
Result : constant List_Id := New_List;
Elab_Code : constant List_Id := New_List;
Tname : constant Name_Id := Chars (Typ);
Name_DT : constant Name_Id := New_External_Name (Tname, 'T');
Name_DT_Ptr : constant Name_Id := New_External_Name (Tname, 'P');
Name_SSD : constant Name_Id := New_External_Name (Tname, 'S');
Name_TSD : constant Name_Id := New_External_Name (Tname, 'B');
Name_Exname : constant Name_Id := New_External_Name (Tname, 'E');
Name_No_Reg : constant Name_Id := New_External_Name (Tname, 'F');
Name_ITable : Name_Id;
DT : constant Node_Id := Make_Defining_Identifier (Loc, Name_DT);
DT_Ptr : constant Node_Id := Make_Defining_Identifier (Loc, Name_DT_Ptr);
SSD : constant Node_Id := Make_Defining_Identifier (Loc, Name_SSD);
TSD : constant Node_Id := Make_Defining_Identifier (Loc, Name_TSD);
Exname : constant Node_Id := Make_Defining_Identifier (Loc, Name_Exname);
No_Reg : constant Node_Id := Make_Defining_Identifier (Loc, Name_No_Reg);
ITable : Node_Id;
Generalized_Tag : constant Entity_Id := RTE (RE_Tag);
AI : Elmt_Id;
I_Depth : Int;
Nb_Prim : Int;
Num_Ifaces : Int;
Old_Tag1 : Node_Id;
Old_Tag2 : Node_Id;
Parent_Num_Ifaces : Int;
Size_Expr_Node : Node_Id;
TSD_Num_Entries : Int;
Ancestor_Copy : Entity_Id;
Empty_DT : Boolean := False;
Typ_Copy : Entity_Id;
begin
if not RTE_Available (RE_Tag) then
Error_Msg_CRT ("tagged types", Typ);
return New_List;
end if;
-- Calculate the size of the DT and the TSD
if Is_Interface (Typ) then
-- Abstract interfaces need neither the DT nor the ancestors table.
-- We reserve a single entry for its DT because at run-time the
-- pointer to this dummy DT will be used as the tag of this abstract
-- interface type.
Empty_DT := True;
Nb_Prim := 1;
TSD_Num_Entries := 0;
Num_Ifaces := 0;
else
-- Count the number of interfaces implemented by the ancestors
Parent_Num_Ifaces := 0;
Num_Ifaces := 0;
if Typ /= Etype (Typ) then
Ancestor_Copy := New_Copy (Etype (Typ));
Set_Parent (Ancestor_Copy, Parent (Etype (Typ)));
Set_Abstract_Interfaces (Ancestor_Copy, New_Elmt_List);
Collect_All_Interfaces (Ancestor_Copy);
AI := First_Elmt (Abstract_Interfaces (Ancestor_Copy));
while Present (AI) loop
Parent_Num_Ifaces := Parent_Num_Ifaces + 1;
Next_Elmt (AI);
end loop;
end if;
-- Count the number of additional interfaces implemented by Typ
Typ_Copy := New_Copy (Typ);
Set_Parent (Typ_Copy, Parent (Typ));
Set_Abstract_Interfaces (Typ_Copy, New_Elmt_List);
Collect_All_Interfaces (Typ_Copy);
AI := First_Elmt (Abstract_Interfaces (Typ_Copy));
while Present (AI) loop
Num_Ifaces := Num_Ifaces + 1;
Next_Elmt (AI);
end loop;
-- Count ancestors to compute the inheritance depth. For private
-- extensions, always go to the full view in order to compute the
-- real inheritance depth.
declare
Parent_Type : Entity_Id := Typ;
P : Entity_Id;
begin
I_Depth := 0;
loop
P := Etype (Parent_Type);
if Is_Private_Type (P) then
P := Full_View (Base_Type (P));
end if;
exit when P = Parent_Type;
I_Depth := I_Depth + 1;
Parent_Type := P;
end loop;
end;
TSD_Num_Entries := I_Depth + 1;
Nb_Prim := UI_To_Int (DT_Entry_Count (First_Tag_Component (Typ)));
-- If the number of primitives of Typ is 0 (or we are compiling with
-- the No_Dispatching_Calls restriction) we reserve a dummy single
-- entry for its DT because at run-time the pointer to this dummy DT
-- will be used as the tag of this tagged type.
if Nb_Prim = 0 or else Restriction_Active (No_Dispatching_Calls) then
Empty_DT := True;
Nb_Prim := 1;
end if;
end if;
-- Dispatch table and related entities are allocated statically
Set_Ekind (DT, E_Variable);
Set_Is_Statically_Allocated (DT);
Set_Ekind (DT_Ptr, E_Variable);
Set_Is_Statically_Allocated (DT_Ptr);
if not Is_Interface (Typ)
and then Num_Ifaces > 0
then
Name_ITable := New_External_Name (Tname, 'I');
ITable := Make_Defining_Identifier (Loc, Name_ITable);
Set_Ekind (ITable, E_Variable);
Set_Is_Statically_Allocated (ITable);
end if;
Set_Ekind (SSD, E_Variable);
Set_Is_Statically_Allocated (SSD);
Set_Ekind (TSD, E_Variable);
Set_Is_Statically_Allocated (TSD);
Set_Ekind (Exname, E_Variable);
Set_Is_Statically_Allocated (Exname);
Set_Ekind (No_Reg, E_Variable);
Set_Is_Statically_Allocated (No_Reg);
-- Generate code to create the storage for the Dispatch_Table object:
-- DT : Storage_Array (1..DT_Prologue_Size+nb_prim*DT_Entry_Size);
-- for DT'Alignment use Address'Alignment
Size_Expr_Node :=
Make_Op_Add (Loc,
Left_Opnd => Make_DT_Access_Action (Typ, DT_Prologue_Size, No_List),
Right_Opnd =>
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_DT_Access_Action (Typ, DT_Entry_Size, No_List),
Right_Opnd =>
Make_Integer_Literal (Loc, Nb_Prim)));
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => DT,
Aliased_Present => True,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To
(RTE (RE_Storage_Array), Loc),
Constraint => Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Range (Loc,
Low_Bound => Make_Integer_Literal (Loc, 1),
High_Bound => Size_Expr_Node))))));
Append_To (Result,
Make_Attribute_Definition_Clause (Loc,
Name => New_Reference_To (DT, Loc),
Chars => Name_Alignment,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (RTE (RE_Integer_Address), Loc),
Attribute_Name => Name_Alignment)));
-- Generate code to create the pointer to the dispatch table
-- DT_Ptr : Tag := Tag!(DT'Address);
-- According to the C++ ABI, the base of the vtable is located after a
-- prologue containing Offset_To_Top, and Typeinfo_Ptr. Hence, we move
-- down the pointer to the real base of the vtable
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => DT_Ptr,
Constant_Present => True,
Object_Definition => New_Reference_To (Generalized_Tag, Loc),
Expression =>
Unchecked_Convert_To (Generalized_Tag,
Make_Op_Add (Loc,
Left_Opnd =>
Unchecked_Convert_To (RTE (RE_Storage_Offset),
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (DT, Loc),
Attribute_Name => Name_Address)),
Right_Opnd =>
Make_DT_Access_Action (Typ,
DT_Prologue_Size, No_List)))));
-- Generate code to define the boolean that controls registration, in
-- order to avoid multiple registrations for tagged types defined in
-- multiple-called scopes.
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => No_Reg,
Object_Definition => New_Reference_To (Standard_Boolean, Loc),
Expression => New_Reference_To (Standard_True, Loc)));
-- Set Access_Disp_Table field to be the dispatch table pointer
if No (Access_Disp_Table (Typ)) then
Set_Access_Disp_Table (Typ, New_Elmt_List);
end if;
Prepend_Elmt (DT_Ptr, Access_Disp_Table (Typ));
-- Generate code to create the storage for the type specific data object
-- with enough space to store the tags of the ancestors plus the tags
-- of all the implemented interfaces (as described in a-tags.adb).
-- TSD: Storage_Array
-- (1..TSD_Prologue_Size+TSD_Num_Entries*TSD_Entry_Size);
-- for TSD'Alignment use Address'Alignment
Size_Expr_Node :=
Make_Op_Add (Loc,
Left_Opnd =>
Make_DT_Access_Action (Typ, TSD_Prologue_Size, No_List),
Right_Opnd =>
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_DT_Access_Action (Typ, TSD_Entry_Size, No_List),
Right_Opnd =>
Make_Integer_Literal (Loc, TSD_Num_Entries)));
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => TSD,
Aliased_Present => True,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To (RTE (RE_Storage_Array), Loc),
Constraint => Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Range (Loc,
Low_Bound => Make_Integer_Literal (Loc, 1),
High_Bound => Size_Expr_Node))))));
Append_To (Result,
Make_Attribute_Definition_Clause (Loc,
Name => New_Reference_To (TSD, Loc),
Chars => Name_Alignment,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (RTE (RE_Integer_Address), Loc),
Attribute_Name => Name_Alignment)));
-- Generate:
-- Set_Signature (DT_Ptr, Value);
if Is_Interface (Typ) then
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Signature,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
New_Reference_To (RTE (RE_Abstract_Interface), Loc))));
elsif RTE_Available (RE_Set_Signature) then
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Signature,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
New_Reference_To (RTE (RE_Primary_DT), Loc))));
end if;
-- Generate code to put the Address of the TSD in the dispatch table
-- Set_TSD (DT_Ptr, TSD);
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_TSD,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (TSD, Loc),
Attribute_Name => Name_Address))));
-- Set the pointer to the Interfaces_Table (if any). Otherwise the
-- corresponding access component is set to null.
if Is_Interface (Typ) then
null;
elsif Num_Ifaces = 0 then
if RTE_Available (RE_Set_Interface_Table) then
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Interface_Table,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
New_Reference_To (RTE (RE_Null_Address), Loc)))); -- null
end if;
-- Generate the Interface_Table object and set the access
-- component if the TSD to it.
elsif RTE_Available (RE_Set_Interface_Table) then
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => ITable,
Aliased_Present => True,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To
(RTE (RE_Interface_Data), Loc),
Constraint => Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Integer_Literal (Loc,
Num_Ifaces))))));
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Interface_Table,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (ITable, Loc),
Attribute_Name => Name_Address))));
end if;
-- Generate:
-- Set_Num_Prim_Ops (T'Tag, Nb_Prim)
if RTE_Available (RE_Set_Num_Prim_Ops) then
if not Is_Interface (Typ) then
if Empty_DT then
Append_To (Elab_Code,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Set_Num_Prim_Ops), Loc),
Parameter_Associations => New_List (
New_Reference_To (DT_Ptr, Loc),
Make_Integer_Literal (Loc, Uint_0))));
else
Append_To (Elab_Code,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Set_Num_Prim_Ops), Loc),
Parameter_Associations => New_List (
New_Reference_To (DT_Ptr, Loc),
Make_Integer_Literal (Loc, Nb_Prim))));
end if;
end if;
if Ada_Version >= Ada_05
and then not Is_Interface (Typ)
and then not Is_Abstract (Typ)
and then not Is_Controlled (Typ)
and then not Restriction_Active (No_Dispatching_Calls)
then
-- Generate:
-- Set_Type_Kind (T'Tag, Type_Kind (Typ));
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Tagged_Kind,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
Tagged_Kind (Typ)))); -- Value
-- Generate the Select Specific Data table for synchronized
-- types that implement a synchronized interface. The size
-- of the table is constrained by the number of non-predefined
-- primitive operations.
if not Empty_DT
and then Is_Concurrent_Record_Type (Typ)
and then Implements_Interface (
Typ => Typ,
Kind => Any_Limited_Interface,
Check_Parent => True)
then
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => SSD,
Aliased_Present => True,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To (
RTE (RE_Select_Specific_Data), Loc),
Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Integer_Literal (Loc, Nb_Prim))))));
-- Set the pointer to the Select Specific Data table in the TSD
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_SSD,
Args => New_List (
New_Reference_To (DT_Ptr, Loc), -- DTptr
Make_Attribute_Reference (Loc, -- Value
Prefix => New_Reference_To (SSD, Loc),
Attribute_Name => Name_Address))));
end if;
end if;
end if;
-- Generate: Exname : constant String := full_qualified_name (typ);
-- The type itself may be an anonymous parent type, so use the first
-- subtype to have a user-recognizable name.
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => Exname,
Constant_Present => True,
Object_Definition => New_Reference_To (Standard_String, Loc),
Expression =>
Make_String_Literal (Loc,
Full_Qualified_Name (First_Subtype (Typ)))));
-- Generate: Set_Expanded_Name (DT_Ptr, exname'Address);
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Expanded_Name,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 =>
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (Exname, Loc),
Attribute_Name => Name_Address))));
if not Is_Interface (Typ) then
-- Generate: Set_Access_Level (DT_Ptr, <type's accessibility level>);
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Access_Level,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 => Make_Integer_Literal (Loc, Type_Access_Level (Typ)))));
end if;
if Typ = Etype (Typ)
or else Is_CPP_Class (Etype (Typ))
or else Is_Interface (Typ)
then
Old_Tag1 :=
Unchecked_Convert_To (Generalized_Tag,
Make_Integer_Literal (Loc, 0));
Old_Tag2 :=
Unchecked_Convert_To (Generalized_Tag,
Make_Integer_Literal (Loc, 0));
else
Old_Tag1 :=
New_Reference_To
(Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc);
Old_Tag2 :=
New_Reference_To
(Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc);
end if;
if Typ /= Etype (Typ)
and then not Is_Interface (Typ)
and then not Restriction_Active (No_Dispatching_Calls)
then
-- Generate: Inherit_DT (parent'tag, DT_Ptr, nb_prim of parent);
if not Is_Interface (Etype (Typ)) then
if Restriction_Active (No_Dispatching_Calls) then
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Inherit_DT,
Args => New_List (
Node1 => Old_Tag1,
Node2 => New_Reference_To (DT_Ptr, Loc),
Node3 => Make_Integer_Literal (Loc, Uint_0))));
else
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Inherit_DT,
Args => New_List (
Node1 => Old_Tag1,
Node2 => New_Reference_To (DT_Ptr, Loc),
Node3 => Make_Integer_Literal (Loc,
DT_Entry_Count
(First_Tag_Component (Etype (Typ)))))));
end if;
end if;
-- Inherit the secondary dispatch tables of the ancestor
if not Restriction_Active (No_Dispatching_Calls)
and then not Is_CPP_Class (Etype (Typ))
then
declare
Sec_DT_Ancestor : Elmt_Id :=
Next_Elmt
(First_Elmt
(Access_Disp_Table (Etype (Typ))));
Sec_DT_Typ : Elmt_Id :=
Next_Elmt
(First_Elmt
(Access_Disp_Table (Typ)));
procedure Copy_Secondary_DTs (Typ : Entity_Id);
-- Local procedure required to climb through the ancestors and
-- copy the contents of all their secondary dispatch tables.
------------------------
-- Copy_Secondary_DTs --
------------------------
procedure Copy_Secondary_DTs (Typ : Entity_Id) is
E : Entity_Id;
Iface : Elmt_Id;
begin
-- Climb to the ancestor (if any) handling private types
if Present (Full_View (Etype (Typ))) then
if Full_View (Etype (Typ)) /= Typ then
Copy_Secondary_DTs (Full_View (Etype (Typ)));
end if;
elsif Etype (Typ) /= Typ then
Copy_Secondary_DTs (Etype (Typ));
end if;
if Present (Abstract_Interfaces (Typ))
and then not Is_Empty_Elmt_List
(Abstract_Interfaces (Typ))
then
Iface := First_Elmt (Abstract_Interfaces (Typ));
E := First_Entity (Typ);
while Present (E)
and then Present (Node (Sec_DT_Ancestor))
loop
if Is_Tag (E) and then Chars (E) /= Name_uTag then
if not Is_Interface (Etype (Typ)) then
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Inherit_DT,
Args => New_List (
Node1 => Unchecked_Convert_To
(RTE (RE_Tag),
New_Reference_To
(Node (Sec_DT_Ancestor),
Loc)),
Node2 => Unchecked_Convert_To
(RTE (RE_Tag),
New_Reference_To
(Node (Sec_DT_Typ), Loc)),
Node3 => Make_Integer_Literal (Loc,
DT_Entry_Count (E)))));
end if;
Next_Elmt (Sec_DT_Ancestor);
Next_Elmt (Sec_DT_Typ);
Next_Elmt (Iface);
end if;
Next_Entity (E);
end loop;
end if;
end Copy_Secondary_DTs;
begin
if Present (Node (Sec_DT_Ancestor)) then
-- Handle private types
if Present (Full_View (Typ)) then
Copy_Secondary_DTs (Full_View (Typ));
else
Copy_Secondary_DTs (Typ);
end if;
end if;
end;
end if;
end if;
-- Generate:
-- Inherit_TSD (parent'tag, DT_Ptr);
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Inherit_TSD,
Args => New_List (
Node1 => Old_Tag2,
Node2 => New_Reference_To (DT_Ptr, Loc))));
if not Is_Interface (Typ) then
-- For types with no controlled components, generate:
-- Set_RC_Offset (DT_Ptr, 0);
-- For simple types with controlled components, generate:
-- Set_RC_Offset (DT_Ptr, type._record_controller'position);
-- For complex types with controlled components where the position
-- of the record controller is not statically computable, if there
-- are controlled components at this level, generate:
-- Set_RC_Offset (DT_Ptr, -1);
-- to indicate that the _controller field is right after the _parent
-- Or if there are no controlled components at this level, generate:
-- Set_RC_Offset (DT_Ptr, -2);
-- to indicate that we need to get the position from the parent.
declare
Position : Node_Id;
begin
if not Has_Controlled_Component (Typ) then
Position := Make_Integer_Literal (Loc, 0);
elsif Etype (Typ) /= Typ
and then Has_Discriminants (Etype (Typ))
then
if Has_New_Controlled_Component (Typ) then
Position := Make_Integer_Literal (Loc, -1);
else
Position := Make_Integer_Literal (Loc, -2);
end if;
else
Position :=
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => New_Reference_To (Typ, Loc),
Selector_Name =>
New_Reference_To (Controller_Component (Typ), Loc)),
Attribute_Name => Name_Position);
-- This is not proper Ada code to use the attribute 'Position
-- on something else than an object but this is supported by
-- the back end (see comment on the Bit_Component attribute in
-- sem_attr). So we avoid semantic checking here.
-- Is this documented in sinfo.ads??? it should be!
Set_Analyzed (Position);
Set_Etype (Prefix (Position), RTE (RE_Record_Controller));
Set_Etype (Prefix (Prefix (Position)), Typ);
Set_Etype (Selector_Name (Prefix (Position)),
RTE (RE_Record_Controller));
Set_Etype (Position, RTE (RE_Storage_Offset));
end if;
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_RC_Offset,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 => Position)));
end;
-- Generate: Set_Remotely_Callable (DT_Ptr, Status); where Status is
-- described in E.4 (18)
declare
Status : Entity_Id;
begin
Status :=
Boolean_Literals
(Is_Pure (Typ)
or else Is_Shared_Passive (Typ)
or else
((Is_Remote_Types (Typ)
or else Is_Remote_Call_Interface (Typ))
and then Original_View_In_Visible_Part (Typ))
or else not Comes_From_Source (Typ));
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_Remotely_Callable,
Args => New_List (
New_Occurrence_Of (DT_Ptr, Loc),
New_Occurrence_Of (Status, Loc))));
end;
if RTE_Available (RE_Set_Offset_To_Top) then
-- Generate:
-- Set_Offset_To_Top (0, DT_Ptr, True, 0, null);
Append_To (Elab_Code,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Set_Offset_To_Top), Loc),
Parameter_Associations => New_List (
New_Reference_To (RTE (RE_Null_Address), Loc),
New_Reference_To (DT_Ptr, Loc),
New_Occurrence_Of (Standard_True, Loc),
Make_Integer_Literal (Loc, Uint_0),
New_Reference_To (RTE (RE_Null_Address), Loc))));
end if;
end if;
-- Generate: Set_External_Tag (DT_Ptr, exname'Address);
-- Should be the external name not the qualified name???
if not Has_External_Tag_Rep_Clause (Typ) then
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Set_External_Tag,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 =>
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (Exname, Loc),
Attribute_Name => Name_Address))));
-- Generate code to register the Tag in the External_Tag hash
-- table for the pure Ada type only.
-- Register_Tag (Dt_Ptr);
-- Skip this if routine not available, or in No_Run_Time mode
-- or Typ is an abstract interface type (because the table to
-- register it is not available in the abstract type but in
-- types implementing this interface)
if not No_Run_Time_Mode
and then RTE_Available (RE_Register_Tag)
and then Is_RTE (Generalized_Tag, RE_Tag)
and then not Is_Interface (Typ)
then
Append_To (Elab_Code,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Register_Tag), Loc),
Parameter_Associations =>
New_List (New_Reference_To (DT_Ptr, Loc))));
end if;
end if;
-- Generate:
-- if No_Reg then
-- <elab_code>
-- No_Reg := False;
-- end if;
Append_To (Elab_Code,
Make_Assignment_Statement (Loc,
Name => New_Reference_To (No_Reg, Loc),
Expression => New_Reference_To (Standard_False, Loc)));
Append_To (Result,
Make_Implicit_If_Statement (Typ,
Condition => New_Reference_To (No_Reg, Loc),
Then_Statements => Elab_Code));
-- Ada 2005 (AI-251): Register the tag of the interfaces into
-- the table of implemented interfaces.
if not Is_Interface (Typ)
and then Num_Ifaces > 0
then
declare
Position : Int;
begin
-- If the parent is an interface we must generate code to register
-- all its interfaces; otherwise this code is not needed because
-- Inherit_TSD has already inherited such interfaces.
if Is_Interface (Etype (Typ)) then
Position := 1;
AI := First_Elmt (Abstract_Interfaces (Ancestor_Copy));
while Present (AI) loop
-- Generate:
-- Register_Interface (DT_Ptr, Interface'Tag);
Append_To (Result,
Make_DT_Access_Action (Typ,
Action => Register_Interface_Tag,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 => New_Reference_To
(Node
(First_Elmt
(Access_Disp_Table (Node (AI)))),
Loc),
Node3 => Make_Integer_Literal (Loc, Position))));
Position := Position + 1;
Next_Elmt (AI);
end loop;
end if;
-- Register the interfaces that are not implemented by the
-- ancestor
if Present (Abstract_Interfaces (Typ_Copy)) then
AI := First_Elmt (Abstract_Interfaces (Typ_Copy));
-- Skip the interfaces implemented by the ancestor
for Count in 1 .. Parent_Num_Ifaces loop
Next_Elmt (AI);
end loop;
-- Register the additional interfaces
Position := Parent_Num_Ifaces + 1;
while Present (AI) loop
-- Generate:
-- Register_Interface (DT_Ptr, Interface'Tag);
Append_To (Result,
Make_DT_Access_Action (Typ,
Action => Register_Interface_Tag,
Args => New_List (
Node1 => New_Reference_To (DT_Ptr, Loc),
Node2 => New_Reference_To
(Node
(First_Elmt
(Access_Disp_Table (Node (AI)))),
Loc),
Node3 => Make_Integer_Literal (Loc, Position))));
Position := Position + 1;
Next_Elmt (AI);
end loop;
end if;
pragma Assert (Position = Num_Ifaces + 1);
end;
end if;
return Result;
end Make_DT;
---------------------------
-- Make_DT_Access_Action --
---------------------------
function Make_DT_Access_Action
(Typ : Entity_Id;
Action : DT_Access_Action;
Args : List_Id) return Node_Id
is
Action_Name : constant Entity_Id := RTE (Ada_Actions (Action));
Loc : Source_Ptr;
begin
if No (Args) then
-- This is a constant
return New_Reference_To (Action_Name, Sloc (Typ));
end if;
pragma Assert (List_Length (Args) = Action_Nb_Arg (Action));
Loc := Sloc (First (Args));
if Action_Is_Proc (Action) then
return
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (Action_Name, Loc),
Parameter_Associations => Args);
else
return
Make_Function_Call (Loc,
Name => New_Reference_To (Action_Name, Loc),
Parameter_Associations => Args);
end if;
end Make_DT_Access_Action;
-----------------------
-- Make_Secondary_DT --
-----------------------
procedure Make_Secondary_DT
(Typ : Entity_Id;
Ancestor_Typ : Entity_Id;
Suffix_Index : Int;
Iface : Entity_Id;
AI_Tag : Entity_Id;
Acc_Disp_Tables : in out Elist_Id;
Result : out List_Id)
is
Loc : constant Source_Ptr := Sloc (AI_Tag);
Generalized_Tag : constant Entity_Id := RTE (RE_Interface_Tag);
Name_DT : constant Name_Id := New_Internal_Name ('T');
Empty_DT : Boolean := False;
Iface_DT : Node_Id;
Iface_DT_Ptr : Node_Id;
Name_DT_Ptr : Name_Id;
Nb_Prim : Int;
OSD : Entity_Id;
Size_Expr_Node : Node_Id;
Tname : Name_Id;
begin
Result := New_List;
-- Generate a unique external name associated with the secondary
-- dispatch table. This external name will be used to declare an
-- access to this secondary dispatch table, value that will be used
-- for the elaboration of Typ's objects and also for the elaboration
-- of objects of any derivation of Typ that do not override any
-- primitive operation of Typ.
Get_Secondary_DT_External_Name (Typ, Ancestor_Typ, Suffix_Index);
Tname := Name_Find;
Name_DT_Ptr := New_External_Name (Tname, "P");
Iface_DT := Make_Defining_Identifier (Loc, Name_DT);
Iface_DT_Ptr := Make_Defining_Identifier (Loc, Name_DT_Ptr);
-- Dispatch table and related entities are allocated statically
Set_Ekind (Iface_DT, E_Variable);
Set_Is_Statically_Allocated (Iface_DT);
Set_Ekind (Iface_DT_Ptr, E_Variable);
Set_Is_Statically_Allocated (Iface_DT_Ptr);
-- Generate code to create the storage for the Dispatch_Table object.
-- If the number of primitives of Typ is 0 we reserve a dummy single
-- entry for its DT because at run-time the pointer to this dummy entry
-- will be used as the tag.
Nb_Prim := UI_To_Int (DT_Entry_Count (AI_Tag));
if Nb_Prim = 0 then
Empty_DT := True;
Nb_Prim := 1;
end if;
-- DT : Storage_Array (1..DT_Prologue_Size+nb_prim*DT_Entry_Size);
-- for DT'Alignment use Address'Alignment
Size_Expr_Node :=
Make_Op_Add (Loc,
Left_Opnd => Make_DT_Access_Action (Etype (AI_Tag),
DT_Prologue_Size,
No_List),
Right_Opnd =>
Make_Op_Multiply (Loc,
Left_Opnd =>
Make_DT_Access_Action (Etype (AI_Tag),
DT_Entry_Size,
No_List),
Right_Opnd =>
Make_Integer_Literal (Loc, Nb_Prim)));
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => Iface_DT,
Aliased_Present => True,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To (RTE (RE_Storage_Array), Loc),
Constraint => Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Range (Loc,
Low_Bound => Make_Integer_Literal (Loc, 1),
High_Bound => Size_Expr_Node))))));
Append_To (Result,
Make_Attribute_Definition_Clause (Loc,
Name => New_Reference_To (Iface_DT, Loc),
Chars => Name_Alignment,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (RTE (RE_Integer_Address), Loc),
Attribute_Name => Name_Alignment)));
-- Generate code to create the pointer to the dispatch table
-- Iface_DT_Ptr : Tag := Tag!(DT'Address);
-- According to the C++ ABI, the base of the vtable is located
-- after the following prologue: Offset_To_Top, and Typeinfo_Ptr.
-- Hence, move the pointer down to the real base of the vtable.
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => Iface_DT_Ptr,
Constant_Present => True,
Object_Definition => New_Reference_To (Generalized_Tag, Loc),
Expression =>
Unchecked_Convert_To (Generalized_Tag,
Make_Op_Add (Loc,
Left_Opnd =>
Unchecked_Convert_To (RTE (RE_Storage_Offset),
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (Iface_DT, Loc),
Attribute_Name => Name_Address)),
Right_Opnd =>
Make_DT_Access_Action (Etype (AI_Tag),
DT_Prologue_Size, No_List)))));
-- Note: Offset_To_Top will be initialized by the init subprogram
-- Set Access_Disp_Table field to be the dispatch table pointer
if not (Present (Acc_Disp_Tables)) then
Acc_Disp_Tables := New_Elmt_List;
end if;
Append_Elmt (Iface_DT_Ptr, Acc_Disp_Tables);
-- Step 1: Generate an Object Specific Data (OSD) table
OSD := Make_Defining_Identifier (Loc, New_Internal_Name ('I'));
-- Nothing to do if configurable run time does not support the
-- Object_Specific_Data entity.
if not RTE_Available (RE_Object_Specific_Data) then
Error_Msg_CRT ("abstract interface types", Typ);
return;
end if;
-- Generate:
-- OSD : Ada.Tags.Object_Specific_Data (Nb_Prims);
-- where the constraint is used to allocate space for the
-- non-predefined primitive operations only.
Append_To (Result,
Make_Object_Declaration (Loc,
Defining_Identifier => OSD,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To (
RTE (RE_Object_Specific_Data), Loc),
Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
Make_Integer_Literal (Loc, Nb_Prim))))));
Append_To (Result,
Make_DT_Access_Action (Typ,
Action => Set_Signature,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)),
New_Reference_To (RTE (RE_Secondary_DT), Loc))));
-- Generate:
-- Ada.Tags.Set_OSD (Iface_DT_Ptr, OSD);
Append_To (Result,
Make_DT_Access_Action (Typ,
Action => Set_OSD,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)),
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (OSD, Loc),
Attribute_Name => Name_Address))));
-- Generate:
-- Set_Num_Prim_Ops (T'Tag, Nb_Prim)
if RTE_Available (RE_Set_Num_Prim_Ops) then
if Empty_DT then
Append_To (Result,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Set_Num_Prim_Ops), Loc),
Parameter_Associations => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)),
Make_Integer_Literal (Loc, Uint_0))));
else
Append_To (Result,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Set_Num_Prim_Ops), Loc),
Parameter_Associations => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)),
Make_Integer_Literal (Loc, Nb_Prim))));
end if;
end if;
if Ada_Version >= Ada_05
and then not Is_Interface (Typ)
and then not Is_Abstract (Typ)
and then not Is_Controlled (Typ)
and then RTE_Available (RE_Set_Tagged_Kind)
and then not Restriction_Active (No_Dispatching_Calls)
then
-- Generate:
-- Set_Tagged_Kind (Iface'Tag, Tagged_Kind (Iface));
Append_To (Result,
Make_DT_Access_Action (Typ,
Action => Set_Tagged_Kind,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag), -- DTptr
New_Reference_To (Iface_DT_Ptr, Loc)),
Tagged_Kind (Typ)))); -- Value
if not Empty_DT
and then Is_Concurrent_Record_Type (Typ)
and then Implements_Interface (
Typ => Typ,
Kind => Any_Limited_Interface,
Check_Parent => True)
then
declare
Prim : Entity_Id;
Prim_Alias : Entity_Id;
Prim_Elmt : Elmt_Id;
begin
-- Step 2: Populate the OSD table
Prim_Alias := Empty;
Prim_Elmt := First_Elmt (Primitive_Operations (Typ));
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
if Present (Abstract_Interface_Alias (Prim)) then
Prim_Alias := Abstract_Interface_Alias (Prim);
end if;
if Present (Prim_Alias)
and then Present (First_Entity (Prim_Alias))
and then Etype (First_Entity (Prim_Alias)) = Iface
then
-- Generate:
-- Ada.Tags.Set_Offset_Index (Tag (Iface_DT_Ptr),
-- Secondary_DT_Pos, Primary_DT_pos);
Append_To (Result,
Make_DT_Access_Action (Iface,
Action => Set_Offset_Index,
Args => New_List (
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To (Iface_DT_Ptr, Loc)),
Make_Integer_Literal (Loc,
DT_Position (Prim_Alias)),
Make_Integer_Literal (Loc,
DT_Position (Prim)))));
Prim_Alias := Empty;
end if;
Next_Elmt (Prim_Elmt);
end loop;
end;
end if;
end if;
end Make_Secondary_DT;
-------------------------------------
-- Make_Select_Specific_Data_Table --
-------------------------------------
function Make_Select_Specific_Data_Table
(Typ : Entity_Id) return List_Id
is
Assignments : constant List_Id := New_List;
Loc : constant Source_Ptr := Sloc (Typ);
Conc_Typ : Entity_Id;
Decls : List_Id;
DT_Ptr : Entity_Id;
Prim : Entity_Id;
Prim_Als : Entity_Id;
Prim_Elmt : Elmt_Id;
Prim_Pos : Uint;
Nb_Prim : Int := 0;
type Examined_Array is array (Int range <>) of Boolean;
function Find_Entry_Index (E : Entity_Id) return Uint;
-- Given an entry, find its index in the visible declarations of the
-- corresponding concurrent type of Typ.
----------------------
-- Find_Entry_Index --
----------------------
function Find_Entry_Index (E : Entity_Id) return Uint is
Index : Uint := Uint_1;
Subp_Decl : Entity_Id;
begin
if Present (Decls)
and then not Is_Empty_List (Decls)
then
Subp_Decl := First (Decls);
while Present (Subp_Decl) loop
if Nkind (Subp_Decl) = N_Entry_Declaration then
if Defining_Identifier (Subp_Decl) = E then
return Index;
end if;
Index := Index + 1;
end if;
Next (Subp_Decl);
end loop;
end if;
return Uint_0;
end Find_Entry_Index;
-- Start of processing for Make_Select_Specific_Data_Table
begin
pragma Assert (not Restriction_Active (No_Dispatching_Calls));
DT_Ptr := Node (First_Elmt (Access_Disp_Table (Typ)));
if Present (Corresponding_Concurrent_Type (Typ)) then
Conc_Typ := Corresponding_Concurrent_Type (Typ);
if Ekind (Conc_Typ) = E_Protected_Type then
Decls := Visible_Declarations (Protected_Definition (
Parent (Conc_Typ)));
else
pragma Assert (Ekind (Conc_Typ) = E_Task_Type);
Decls := Visible_Declarations (Task_Definition (
Parent (Conc_Typ)));
end if;
end if;
-- Count the non-predefined primitive operations
Prim_Elmt := First_Elmt (Primitive_Operations (Typ));
while Present (Prim_Elmt) loop
if not Is_Predefined_Dispatching_Operation (Node (Prim_Elmt)) then
Nb_Prim := Nb_Prim + 1;
end if;
Next_Elmt (Prim_Elmt);
end loop;
declare
Examined : Examined_Array (1 .. Nb_Prim) := (others => False);
begin
Prim_Elmt := First_Elmt (Primitive_Operations (Typ));
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
Prim_Pos := DT_Position (Prim);
if not Is_Predefined_Dispatching_Operation (Prim) then
pragma Assert (UI_To_Int (Prim_Pos) <= Nb_Prim);
if Examined (UI_To_Int (Prim_Pos)) then
goto Continue;
else
Examined (UI_To_Int (Prim_Pos)) := True;
end if;
-- The current primitive overrides an interface-level
-- subprogram
if Present (Abstract_Interface_Alias (Prim)) then
-- Set the primitive operation kind regardless of subprogram
-- type. Generate:
-- Ada.Tags.Set_Prim_Op_Kind (DT_Ptr, <position>, <kind>);
Append_To (Assignments,
Make_DT_Access_Action (Typ,
Action =>
Set_Prim_Op_Kind,
Args =>
New_List (
New_Reference_To (DT_Ptr, Loc),
Make_Integer_Literal (Loc, Prim_Pos),
Prim_Op_Kind (Prim, Typ))));
-- Retrieve the root of the alias chain if one is present
if Present (Alias (Prim)) then
Prim_Als := Prim;
while Present (Alias (Prim_Als)) loop
Prim_Als := Alias (Prim_Als);
end loop;
else
Prim_Als := Empty;
end if;
-- In the case of an entry wrapper, set the entry index
if Ekind (Prim) = E_Procedure
and then Present (Prim_Als)
and then Is_Primitive_Wrapper (Prim_Als)
and then Ekind (Wrapped_Entity (Prim_Als)) = E_Entry
then
-- Generate:
-- Ada.Tags.Set_Entry_Index
-- (DT_Ptr, <position>, <index>);
Append_To (Assignments,
Make_DT_Access_Action (Typ,
Action =>
Set_Entry_Index,
Args =>
New_List (
New_Reference_To (DT_Ptr, Loc),
Make_Integer_Literal (Loc, Prim_Pos),
Make_Integer_Literal (Loc,
Find_Entry_Index
(Wrapped_Entity (Prim_Als))))));
end if;
end if;
end if;
<<Continue>>
Next_Elmt (Prim_Elmt);
end loop;
end;
return Assignments;
end Make_Select_Specific_Data_Table;
-----------------------------------
-- Original_View_In_Visible_Part --
-----------------------------------
function Original_View_In_Visible_Part (Typ : Entity_Id) return Boolean is
Scop : constant Entity_Id := Scope (Typ);
begin
-- The scope must be a package
if Ekind (Scop) /= E_Package
and then Ekind (Scop) /= E_Generic_Package
then
return False;
end if;
-- A type with a private declaration has a private view declared in
-- the visible part.
if Has_Private_Declaration (Typ) then
return True;
end if;
return List_Containing (Parent (Typ)) =
Visible_Declarations (Specification (Unit_Declaration_Node (Scop)));
end Original_View_In_Visible_Part;
------------------
-- Prim_Op_Kind --
------------------
function Prim_Op_Kind
(Prim : Entity_Id;
Typ : Entity_Id) return Node_Id
is
Full_Typ : Entity_Id := Typ;
Loc : constant Source_Ptr := Sloc (Prim);
Prim_Op : Entity_Id;
begin
-- Retrieve the original primitive operation
Prim_Op := Prim;
while Present (Alias (Prim_Op)) loop
Prim_Op := Alias (Prim_Op);
end loop;
if Ekind (Typ) = E_Record_Type
and then Present (Corresponding_Concurrent_Type (Typ))
then
Full_Typ := Corresponding_Concurrent_Type (Typ);
end if;
if Ekind (Prim_Op) = E_Function then
-- Protected function
if Ekind (Full_Typ) = E_Protected_Type then
return New_Reference_To (RTE (RE_POK_Protected_Function), Loc);
-- Task function
elsif Ekind (Full_Typ) = E_Task_Type then
return New_Reference_To (RTE (RE_POK_Task_Function), Loc);
-- Regular function
else
return New_Reference_To (RTE (RE_POK_Function), Loc);
end if;
else
pragma Assert (Ekind (Prim_Op) = E_Procedure);
if Ekind (Full_Typ) = E_Protected_Type then
-- Protected entry
if Is_Primitive_Wrapper (Prim_Op)
and then Ekind (Wrapped_Entity (Prim_Op)) = E_Entry
then
return New_Reference_To (RTE (RE_POK_Protected_Entry), Loc);
-- Protected procedure
else
return New_Reference_To (RTE (RE_POK_Protected_Procedure), Loc);
end if;
elsif Ekind (Full_Typ) = E_Task_Type then
-- Task entry
if Is_Primitive_Wrapper (Prim_Op)
and then Ekind (Wrapped_Entity (Prim_Op)) = E_Entry
then
return New_Reference_To (RTE (RE_POK_Task_Entry), Loc);
-- Task "procedure". These are the internally Expander-generated
-- procedures (task body for instance).
else
return New_Reference_To (RTE (RE_POK_Task_Procedure), Loc);
end if;
-- Regular procedure
else
return New_Reference_To (RTE (RE_POK_Procedure), Loc);
end if;
end if;
end Prim_Op_Kind;
-------------------------
-- Set_All_DT_Position --
-------------------------
procedure Set_All_DT_Position (Typ : Entity_Id) is
Parent_Typ : constant Entity_Id := Etype (Typ);
Root_Typ : constant Entity_Id := Root_Type (Typ);
First_Prim : constant Elmt_Id := First_Elmt (Primitive_Operations (Typ));
The_Tag : constant Entity_Id := First_Tag_Component (Typ);
Adjusted : Boolean := False;
Finalized : Boolean := False;
Count_Prim : Int;
DT_Length : Int;
Nb_Prim : Int;
Parent_EC : Int;
Prim : Entity_Id;
Prim_Elmt : Elmt_Id;
procedure Validate_Position (Prim : Entity_Id);
-- Check that the position assignated to Prim is completely safe
-- (it has not been assigned to a previously defined primitive
-- operation of Typ)
-----------------------
-- Validate_Position --
-----------------------
procedure Validate_Position (Prim : Entity_Id) is
Prim_Elmt : Elmt_Id;
begin
Prim_Elmt := First_Elmt (Primitive_Operations (Typ));
while Present (Prim_Elmt)
and then Node (Prim_Elmt) /= Prim
loop
-- Primitive operations covering abstract interfaces are
-- allocated later
if Present (Abstract_Interface_Alias (Node (Prim_Elmt))) then
null;
-- Predefined dispatching operations are completely safe. They
-- are allocated at fixed positions in a separate table.
elsif Is_Predefined_Dispatching_Operation (Node (Prim_Elmt)) then
null;
-- Aliased subprograms are safe
elsif Present (Alias (Prim)) then
null;
elsif DT_Position (Node (Prim_Elmt)) = DT_Position (Prim) then
-- Handle aliased subprograms
declare
Op_1 : Entity_Id;
Op_2 : Entity_Id;
begin
Op_1 := Node (Prim_Elmt);
loop
if Present (Overridden_Operation (Op_1)) then
Op_1 := Overridden_Operation (Op_1);
elsif Present (Alias (Op_1)) then
Op_1 := Alias (Op_1);
else
exit;
end if;
end loop;
Op_2 := Prim;
loop
if Present (Overridden_Operation (Op_2)) then
Op_2 := Overridden_Operation (Op_2);
elsif Present (Alias (Op_2)) then
Op_2 := Alias (Op_2);
else
exit;
end if;
end loop;
if Op_1 /= Op_2 then
raise Program_Error;
end if;
end;
end if;
Next_Elmt (Prim_Elmt);
end loop;
end Validate_Position;
-- Start of processing for Set_All_DT_Position
begin
-- Get Entry_Count of the parent
if Parent_Typ /= Typ
and then DT_Entry_Count (First_Tag_Component (Parent_Typ)) /= No_Uint
then
Parent_EC := UI_To_Int (DT_Entry_Count
(First_Tag_Component (Parent_Typ)));
else
Parent_EC := 0;
end if;
-- C++ Case, check that pragma CPP_Class, CPP_Virtual and CPP_Vtable
-- give a coherent set of information
if Is_CPP_Class (Root_Typ) then
-- Compute the number of primitive operations in the main Vtable
-- Set their position:
-- - where it was set if overriden or inherited
-- - after the end of the parent vtable otherwise
Prim_Elmt := First_Prim;
Nb_Prim := 0;
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
if not Is_CPP_Class (Typ) then
Set_DTC_Entity (Prim, The_Tag);
elsif Present (Alias (Prim)) then
Set_DTC_Entity (Prim, DTC_Entity (Alias (Prim)));
Set_DT_Position (Prim, DT_Position (Alias (Prim)));
elsif No (DTC_Entity (Prim)) and then Is_CPP_Class (Typ) then
Error_Msg_NE ("is a primitive operation of&," &
" pragma Cpp_Virtual required", Prim, Typ);
end if;
if DTC_Entity (Prim) = The_Tag then
-- Get the slot from the parent subprogram if any
declare
H : Entity_Id;
begin
H := Homonym (Prim);
while Present (H) loop
if Present (DTC_Entity (H))
and then Root_Type (Scope (DTC_Entity (H))) = Root_Typ
then
Set_DT_Position (Prim, DT_Position (H));
exit;
end if;
H := Homonym (H);
end loop;
end;
-- Otherwise take the canonical slot after the end of the
-- parent Vtable
if DT_Position (Prim) = No_Uint then
Nb_Prim := Nb_Prim + 1;
Set_DT_Position (Prim, UI_From_Int (Parent_EC + Nb_Prim));
elsif UI_To_Int (DT_Position (Prim)) > Parent_EC then
Nb_Prim := Nb_Prim + 1;
end if;
end if;
Next_Elmt (Prim_Elmt);
end loop;
-- Check that the declared size of the Vtable is bigger or equal
-- than the number of primitive operations (if bigger it means that
-- some of the c++ virtual functions were not imported, that is
-- allowed).
if DT_Entry_Count (The_Tag) = No_Uint
or else not Is_CPP_Class (Typ)
then
Set_DT_Entry_Count (The_Tag, UI_From_Int (Parent_EC + Nb_Prim));
elsif UI_To_Int (DT_Entry_Count (The_Tag)) < Parent_EC + Nb_Prim then
Error_Msg_N ("not enough room in the Vtable for all virtual"
& " functions", The_Tag);
end if;
-- Check that Positions are not duplicate nor outside the range of
-- the Vtable.
declare
Size : constant Int := UI_To_Int (DT_Entry_Count (The_Tag));
Pos : Int;
Prim_Pos_Table : array (1 .. Size) of Entity_Id :=
(others => Empty);
begin
Prim_Elmt := First_Prim;
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
if DTC_Entity (Prim) = The_Tag then
Pos := UI_To_Int (DT_Position (Prim));
if Pos not in Prim_Pos_Table'Range then
Error_Msg_N
("position not in range of virtual table", Prim);
elsif Present (Prim_Pos_Table (Pos)) then
Error_Msg_NE ("cannot be at the same position in the"
& " vtable than&", Prim, Prim_Pos_Table (Pos));
else
Prim_Pos_Table (Pos) := Prim;
end if;
end if;
Next_Elmt (Prim_Elmt);
end loop;
end;
-- Generate listing showing the contents of the dispatch tables
if Debug_Flag_ZZ then
Write_DT (Typ);
end if;
-- For regular Ada tagged types, just set the DT_Position for
-- each primitive operation. Perform some sanity checks to avoid
-- to build completely inconsistant dispatch tables.
-- Note that the _Size primitive is always set at position 1 in order
-- to comply with the needs of Ada.Tags.Parent_Size (see documentation
-- in Ada.Tags).
else
-- First stage: Set the DTC entity of all the primitive operations
-- This is required to properly read the DT_Position attribute in
-- the latter stages.
Prim_Elmt := First_Prim;
Count_Prim := 0;
while Present (Prim_Elmt) loop
Count_Prim := Count_Prim + 1;
Prim := Node (Prim_Elmt);
-- Ada 2005 (AI-251)
if Present (Abstract_Interface_Alias (Prim))
and then Is_Interface (Scope (DTC_Entity
(Abstract_Interface_Alias (Prim))))
then
Set_DTC_Entity (Prim,
Find_Interface_Tag
(T => Typ,
Iface => Scope (DTC_Entity
(Abstract_Interface_Alias (Prim)))));
else
Set_DTC_Entity (Prim, The_Tag);
end if;
-- Clear any previous value of the DT_Position attribute. In this
-- way we ensure that the final position of all the primitives is
-- stablished by the following stages of this algorithm.
Set_DT_Position (Prim, No_Uint);
Next_Elmt (Prim_Elmt);
end loop;
declare
Fixed_Prim : array (Int range 0 .. Parent_EC + Count_Prim)
of Boolean := (others => False);
E : Entity_Id;
begin
-- Second stage: Register fixed entries
Nb_Prim := 0;
Prim_Elmt := First_Prim;
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
-- Predefined primitives have a separate table and all its
-- entries are at predefined fixed positions
if Is_Predefined_Dispatching_Operation (Prim) then
Set_DT_Position (Prim, Default_Prim_Op_Position (Prim));
-- Overriding interface primitives of an ancestor
elsif DT_Position (Prim) = No_Uint
and then Present (Abstract_Interface_Alias (Prim))
and then Present (DTC_Entity
(Abstract_Interface_Alias (Prim)))
and then DT_Position (Abstract_Interface_Alias (Prim))
/= No_Uint
and then Is_Inherited_Operation (Prim)
and then Is_Ancestor (Scope
(DTC_Entity
(Abstract_Interface_Alias (Prim))),
Typ)
then
Set_DT_Position (Prim,
DT_Position (Abstract_Interface_Alias (Prim)));
Set_DT_Position (Alias (Prim),
DT_Position (Abstract_Interface_Alias (Prim)));
Fixed_Prim (UI_To_Int (DT_Position (Prim))) := True;
-- Overriding primitives must use the same entry as the
-- overriden primitive
elsif DT_Position (Prim) = No_Uint
and then Present (Alias (Prim))
and then Present (DTC_Entity (Alias (Prim)))
and then DT_Position (Alias (Prim)) /= No_Uint
and then Is_Inherited_Operation (Prim)
and then Is_Ancestor (Scope (DTC_Entity (Alias (Prim))), Typ)
then
E := Alias (Prim);
while not (Present (DTC_Entity (E))
or else DT_Position (E) = No_Uint)
and then Present (Alias (E))
loop
E := Alias (E);
end loop;
pragma Assert (Present (DTC_Entity (E))
and then
DT_Position (E) /= No_Uint);
Set_DT_Position (Prim, DT_Position (E));
Fixed_Prim (UI_To_Int (DT_Position (E))) := True;
-- If this is not the last element in the chain continue
-- traversing the chain. This is required to properly
-- handling renamed primitives
while Present (Alias (E)) loop
E := Alias (E);
Fixed_Prim (UI_To_Int (DT_Position (E))) := True;
end loop;
end if;
Next_Elmt (Prim_Elmt);
end loop;
-- Third stage: Fix the position of all the new primitives
-- Entries associated with primitives covering interfaces
-- are handled in a latter round.
Prim_Elmt := First_Prim;
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
-- Skip primitives previously set entries
if Is_Predefined_Dispatching_Operation (Prim) then
null;
elsif DT_Position (Prim) /= No_Uint then
null;
elsif Etype (DTC_Entity (Prim)) /= RTE (RE_Tag) then
null;
-- Primitives covering interface primitives are
-- handled later
elsif Present (Abstract_Interface_Alias (Prim)) then
null;
else
-- Take the next available position in the DT
loop
Nb_Prim := Nb_Prim + 1;
exit when not Fixed_Prim (Nb_Prim);
end loop;
Set_DT_Position (Prim, UI_From_Int (Nb_Prim));
Fixed_Prim (Nb_Prim) := True;
end if;
Next_Elmt (Prim_Elmt);
end loop;
end;
-- Fourth stage: Complete the decoration of primitives covering
-- interfaces (that is, propagate the DT_Position attribute
-- from the aliased primitive)
Prim_Elmt := First_Prim;
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
if DT_Position (Prim) = No_Uint
and then Present (Abstract_Interface_Alias (Prim))
then
-- Check if this entry will be placed in the primary DT
if Etype (DTC_Entity (Abstract_Interface_Alias (Prim)))
= RTE (RE_Tag)
then
pragma Assert (DT_Position (Alias (Prim)) /= No_Uint);
Set_DT_Position (Prim, DT_Position (Alias (Prim)));
-- Otherwise it will be placed in the secondary DT
else
pragma Assert
(DT_Position (Abstract_Interface_Alias (Prim)) /= No_Uint);
Set_DT_Position (Prim,
DT_Position (Abstract_Interface_Alias (Prim)));
end if;
end if;
Next_Elmt (Prim_Elmt);
end loop;
-- Generate listing showing the contents of the dispatch tables.
-- This action is done before some further static checks because
-- in case of critical errors caused by a wrong dispatch table
-- we need to see the contents of such table.
if Debug_Flag_ZZ then
Write_DT (Typ);
end if;
-- Final stage: Ensure that the table is correct plus some further
-- verifications concerning the primitives.
Prim_Elmt := First_Prim;
DT_Length := 0;
while Present (Prim_Elmt) loop
Prim := Node (Prim_Elmt);
-- At this point all the primitives MUST have a position
-- in the dispatch table
if DT_Position (Prim) = No_Uint then
raise Program_Error;
end if;
-- Calculate real size of the dispatch table
if not Is_Predefined_Dispatching_Operation (Prim)
and then UI_To_Int (DT_Position (Prim)) > DT_Length
then
DT_Length := UI_To_Int (DT_Position (Prim));
end if;
-- Ensure that the asignated position to non-predefined
-- dispatching operations in the dispatch table is correct.
if not Is_Predefined_Dispatching_Operation (Prim) then
Validate_Position (Prim);
end if;
if Chars (Prim) = Name_Finalize then
Finalized := True;
end if;
if Chars (Prim) = Name_Adjust then
Adjusted := True;
end if;
-- An abstract operation cannot be declared in the private part
-- for a visible abstract type, because it could never be over-
-- ridden. For explicit declarations this is checked at the
-- point of declaration, but for inherited operations it must
-- be done when building the dispatch table. Input is excluded
-- because
if Is_Abstract (Typ)
and then Is_Abstract (Prim)
and then Present (Alias (Prim))
and then Is_Derived_Type (Typ)
and then In_Private_Part (Current_Scope)
and then
List_Containing (Parent (Prim)) =
Private_Declarations
(Specification (Unit_Declaration_Node (Current_Scope)))
and then Original_View_In_Visible_Part (Typ)
then
-- We exclude Input and Output stream operations because
-- Limited_Controlled inherits useless Input and Output
-- stream operations from Root_Controlled, which can
-- never be overridden.
if not Is_TSS (Prim, TSS_Stream_Input)
and then
not Is_TSS (Prim, TSS_Stream_Output)
then
Error_Msg_NE
("abstract inherited private operation&" &
" must be overridden ('R'M 3.9.3(10))",
Parent (Typ), Prim);
end if;
end if;
Next_Elmt (Prim_Elmt);
end loop;
-- Additional check
if Is_Controlled (Typ) then
if not Finalized then
Error_Msg_N
("controlled type has no explicit Finalize method?", Typ);
elsif not Adjusted then
Error_Msg_N
("controlled type has no explicit Adjust method?", Typ);
end if;
end if;
-- Set the final size of the Dispatch Table
Set_DT_Entry_Count (The_Tag, UI_From_Int (DT_Length));
-- The derived type must have at least as many components as its
-- parent (for root types, the Etype points back to itself
-- and the test should not fail)
-- This test fails compiling the partial view of a tagged type
-- derived from an interface which defines the overriding subprogram
-- in the private part. This needs further investigation???
if not Has_Private_Declaration (Typ) then
pragma Assert (
DT_Entry_Count (The_Tag) >=
DT_Entry_Count (First_Tag_Component (Parent_Typ)));
null;
end if;
end if;
end Set_All_DT_Position;
-----------------------------
-- Set_Default_Constructor --
-----------------------------
procedure Set_Default_Constructor (Typ : Entity_Id) is
Loc : Source_Ptr;
Init : Entity_Id;
Param : Entity_Id;
E : Entity_Id;
begin
-- Look for the default constructor entity. For now only the
-- default constructor has the flag Is_Constructor.
E := Next_Entity (Typ);
while Present (E)
and then (Ekind (E) /= E_Function or else not Is_Constructor (E))
loop
Next_Entity (E);
end loop;
-- Create the init procedure
if Present (E) then
Loc := Sloc (E);
Init := Make_Defining_Identifier (Loc, Make_Init_Proc_Name (Typ));
Param := Make_Defining_Identifier (Loc, Name_X);
Discard_Node (
Make_Subprogram_Declaration (Loc,
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Init,
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Param,
Parameter_Type => New_Reference_To (Typ, Loc))))));
Set_Init_Proc (Typ, Init);
Set_Is_Imported (Init);
Set_Interface_Name (Init, Interface_Name (E));
Set_Convention (Init, Convention_C);
Set_Is_Public (Init);
Set_Has_Completion (Init);
-- If there are no constructors, mark the type as abstract since we
-- won't be able to declare objects of that type.
else
Set_Is_Abstract (Typ);
end if;
end Set_Default_Constructor;
-----------------
-- Tagged_Kind --
-----------------
function Tagged_Kind (T : Entity_Id) return Node_Id is
Conc_Typ : Entity_Id;
Loc : constant Source_Ptr := Sloc (T);
begin
pragma Assert
(Is_Tagged_Type (T) and then RTE_Available (RE_Tagged_Kind));
-- Abstract kinds
if Is_Abstract (T) then
if Is_Limited_Record (T) then
return New_Reference_To (RTE (RE_TK_Abstract_Limited_Tagged), Loc);
else
return New_Reference_To (RTE (RE_TK_Abstract_Tagged), Loc);
end if;
-- Concurrent kinds
elsif Is_Concurrent_Record_Type (T) then
Conc_Typ := Corresponding_Concurrent_Type (T);
if Ekind (Conc_Typ) = E_Protected_Type then
return New_Reference_To (RTE (RE_TK_Protected), Loc);
else
pragma Assert (Ekind (Conc_Typ) = E_Task_Type);
return New_Reference_To (RTE (RE_TK_Task), Loc);
end if;
-- Regular tagged kinds
else
if Is_Limited_Record (T) then
return New_Reference_To (RTE (RE_TK_Limited_Tagged), Loc);
else
return New_Reference_To (RTE (RE_TK_Tagged), Loc);
end if;
end if;
end Tagged_Kind;
--------------
-- Write_DT --
--------------
procedure Write_DT (Typ : Entity_Id) is
Elmt : Elmt_Id;
Prim : Node_Id;
begin
-- Protect this procedure against wrong usage. Required because it will
-- be used directly from GDB
-- LLVM local
if not (Typ <= Last_Node_Id)
or else not Is_Tagged_Type (Typ)
then
Write_Str ("wrong usage: Write_DT must be used with tagged types");
Write_Eol;
return;
end if;
Write_Int (Int (Typ));
Write_Str (": ");
Write_Name (Chars (Typ));
if Is_Interface (Typ) then
Write_Str (" is interface");
end if;
Write_Eol;
Elmt := First_Elmt (Primitive_Operations (Typ));
while Present (Elmt) loop
Prim := Node (Elmt);
Write_Str (" - ");
-- Indicate if this primitive will be allocated in the primary
-- dispatch table or in a secondary dispatch table associated
-- with an abstract interface type
if Present (DTC_Entity (Prim)) then
if Etype (DTC_Entity (Prim)) = RTE (RE_Tag) then
Write_Str ("[P] ");
else
Write_Str ("[s] ");
end if;
end if;
-- Output the node of this primitive operation and its name
Write_Int (Int (Prim));
Write_Str (": ");
if Is_Predefined_Dispatching_Operation (Prim) then
Write_Str ("(predefined) ");
end if;
Write_Name (Chars (Prim));
-- Indicate if this primitive has an aliased primitive
if Present (Alias (Prim)) then
Write_Str (" (alias = ");
Write_Int (Int (Alias (Prim)));
-- If the DTC_Entity attribute is already set we can also output
-- the name of the interface covered by this primitive (if any)
if Present (DTC_Entity (Alias (Prim)))
and then Is_Interface (Scope (DTC_Entity (Alias (Prim))))
then
Write_Str (" from interface ");
Write_Name (Chars (Scope (DTC_Entity (Alias (Prim)))));
end if;
if Present (Abstract_Interface_Alias (Prim)) then
Write_Str (", AI_Alias of ");
Write_Name (Chars (Scope (DTC_Entity
(Abstract_Interface_Alias (Prim)))));
Write_Char (':');
Write_Int (Int (Abstract_Interface_Alias (Prim)));
end if;
Write_Str (")");
end if;
-- Display the final position of this primitive in its associated
-- (primary or secondary) dispatch table
if Present (DTC_Entity (Prim))
and then DT_Position (Prim) /= No_Uint
then
Write_Str (" at #");
Write_Int (UI_To_Int (DT_Position (Prim)));
end if;
if Is_Abstract (Prim) then
Write_Str (" is abstract;");
end if;
Write_Eol;
Next_Elmt (Elmt);
end loop;
end Write_DT;
end Exp_Disp;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.DC;
with AMF.UML;
with AMF.UMLDI;
with Matreshka.Internals.Strings;
package AMF.Internals.Tables.UML_Attributes is
function Internal_Get_URI
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_URI
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Model => Package::URI
-- Package => Package::URI
-- Profile => Package::URI
function Internal_Get_Abstraction
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Abstraction
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ComponentRealization => ComponentRealization::abstraction
function Internal_Get_Action
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Action
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionExecutionSpecification => ActionExecutionSpecification::action
function Internal_Get_Action
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Interaction => Interaction::action
function Internal_Get_Activity
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Activity
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AcceptCallAction => ActivityNode::activity
-- AcceptEventAction => ActivityNode::activity
-- ActionInputPin => ActivityNode::activity
-- ActivityFinalNode => ActivityNode::activity
-- ActivityParameterNode => ActivityNode::activity
-- AddStructuralFeatureValueAction => ActivityNode::activity
-- AddVariableValueAction => ActivityNode::activity
-- BroadcastSignalAction => ActivityNode::activity
-- CallBehaviorAction => ActivityNode::activity
-- CallOperationAction => ActivityNode::activity
-- CentralBufferNode => ActivityNode::activity
-- ClearAssociationAction => ActivityNode::activity
-- ClearStructuralFeatureAction => ActivityNode::activity
-- ClearVariableAction => ActivityNode::activity
-- ConditionalNode => ActivityNode::activity
-- ControlFlow => ActivityEdge::activity
-- CreateLinkAction => ActivityNode::activity
-- CreateLinkObjectAction => ActivityNode::activity
-- CreateObjectAction => ActivityNode::activity
-- DataStoreNode => ActivityNode::activity
-- DecisionNode => ActivityNode::activity
-- DestroyLinkAction => ActivityNode::activity
-- DestroyObjectAction => ActivityNode::activity
-- ExpansionNode => ActivityNode::activity
-- ExpansionRegion => ActivityNode::activity
-- FlowFinalNode => ActivityNode::activity
-- ForkNode => ActivityNode::activity
-- InitialNode => ActivityNode::activity
-- InputPin => ActivityNode::activity
-- JoinNode => ActivityNode::activity
-- LoopNode => ActivityNode::activity
-- MergeNode => ActivityNode::activity
-- ObjectFlow => ActivityEdge::activity
-- OpaqueAction => ActivityNode::activity
-- OutputPin => ActivityNode::activity
-- RaiseExceptionAction => ActivityNode::activity
-- ReadExtentAction => ActivityNode::activity
-- ReadIsClassifiedObjectAction => ActivityNode::activity
-- ReadLinkAction => ActivityNode::activity
-- ReadLinkObjectEndAction => ActivityNode::activity
-- ReadLinkObjectEndQualifierAction => ActivityNode::activity
-- ReadSelfAction => ActivityNode::activity
-- ReadStructuralFeatureAction => ActivityNode::activity
-- ReadVariableAction => ActivityNode::activity
-- ReclassifyObjectAction => ActivityNode::activity
-- ReduceAction => ActivityNode::activity
-- RemoveStructuralFeatureValueAction => ActivityNode::activity
-- RemoveVariableValueAction => ActivityNode::activity
-- ReplyAction => ActivityNode::activity
-- SendObjectAction => ActivityNode::activity
-- SendSignalAction => ActivityNode::activity
-- SequenceNode => ActivityNode::activity
-- StartClassifierBehaviorAction => ActivityNode::activity
-- StartObjectBehaviorAction => ActivityNode::activity
-- StructuredActivityNode => ActivityNode::activity
-- TestIdentityAction => ActivityNode::activity
-- UnmarshallAction => ActivityNode::activity
-- ValuePin => ActivityNode::activity
-- ValueSpecificationAction => ActivityNode::activity
function Internal_Get_Activity_Scope
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Activity_Scope
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Variable => Variable::activityScope
function Internal_Get_Actual
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Actual
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TemplateParameterSubstitution => TemplateParameterSubstitution::actual
function Internal_Get_Actual_Gate
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InteractionUse => InteractionUse::actualGate
-- PartDecomposition => InteractionUse::actualGate
function Internal_Get_Addition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Addition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Include => Include::addition
function Internal_Get_After
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_After
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- GeneralOrdering => GeneralOrdering::after
function Internal_Get_Aggregation
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Aggregation_Kind;
procedure Internal_Set_Aggregation
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Aggregation_Kind);
-- ExtensionEnd => Property::aggregation
-- Port => Property::aggregation
-- Property => Property::aggregation
function Internal_Get_Alias
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Alias
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- ElementImport => ElementImport::alias
function Internal_Get_Allow_Substitutable
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Allow_Substitutable
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ClassifierTemplateParameter => ClassifierTemplateParameter::allowSubstitutable
function Internal_Get_Annotated_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Comment => Comment::annotatedElement
function Internal_Get_Applied_Profile
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Applied_Profile
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProfileApplication => ProfileApplication::appliedProfile
function Internal_Get_Applying_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Applying_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProfileApplication => ProfileApplication::applyingPackage
function Internal_Get_Argument
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- BroadcastSignalAction => InvocationAction::argument
-- CallBehaviorAction => InvocationAction::argument
-- CallOperationAction => InvocationAction::argument
-- InteractionUse => InteractionUse::argument
-- Message => Message::argument
-- PartDecomposition => InteractionUse::argument
-- SendObjectAction => InvocationAction::argument
-- SendSignalAction => InvocationAction::argument
-- StartObjectBehaviorAction => InvocationAction::argument
function Internal_Get_Association
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Association
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ClearAssociationAction => ClearAssociationAction::association
-- ExtensionEnd => Property::association
-- Port => Property::association
-- Property => Property::association
function Internal_Get_Association_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Association_End
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::associationEnd
-- Port => Property::associationEnd
-- Property => Property::associationEnd
function Internal_Get_Attribute
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::attribute
-- Actor => Classifier::attribute
-- Artifact => Classifier::attribute
-- Association => Classifier::attribute
-- AssociationClass => Classifier::attribute
-- Class => Classifier::attribute
-- Collaboration => Classifier::attribute
-- CommunicationPath => Classifier::attribute
-- Component => Classifier::attribute
-- DataType => Classifier::attribute
-- DeploymentSpecification => Classifier::attribute
-- Device => Classifier::attribute
-- Enumeration => Classifier::attribute
-- ExecutionEnvironment => Classifier::attribute
-- Extension => Classifier::attribute
-- FunctionBehavior => Classifier::attribute
-- InformationItem => Classifier::attribute
-- Interaction => Classifier::attribute
-- Interface => Classifier::attribute
-- Node => Classifier::attribute
-- OpaqueBehavior => Classifier::attribute
-- PrimitiveType => Classifier::attribute
-- ProtocolStateMachine => Classifier::attribute
-- Signal => Classifier::attribute
-- StateMachine => Classifier::attribute
-- Stereotype => Classifier::attribute
-- UseCase => Classifier::attribute
function Internal_Get_Base_Abstraction
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Abstraction
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Derive => Derive::base_Abstraction
-- Refine => Refine::base_Abstraction
-- Trace => Trace::base_Abstraction
function Internal_Get_Base_Artifact
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Artifact
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Document => Document::base_Artifact
-- Executable => Executable::base_Artifact
-- Library => File::base_Artifact
-- Script => File::base_Artifact
-- Source => File::base_Artifact
function Internal_Get_Base_Behavioral_Feature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Behavioral_Feature
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Create => Create::base_BehavioralFeature
-- Destroy => Destroy::base_BehavioralFeature
function Internal_Get_Base_Class
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Class
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Auxiliary => Auxiliary::base_Class
-- Focus => Focus::base_Class
-- ImplementationClass => ImplementationClass::base_Class
-- Metaclass => Metaclass::base_Class
-- Type => Type::base_Class
-- Utility => Utility::base_Class
function Internal_Get_Base_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Classifier
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Realization => Realization::base_Classifier
-- Specification => Specification::base_Classifier
function Internal_Get_Base_Component
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Component
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Entity => Entity::base_Component
-- Implement => Implement::base_Component
-- Process => Process::base_Component
-- Service => Service::base_Component
-- Subsystem => Subsystem::base_Component
-- BuildComponent => BuildComponent::base_Component
function Internal_Get_Base_Model
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Model
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Metamodel => Metamodel::base_Model
-- SystemModel => SystemModel::base_Model
function Internal_Get_Base_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Framework => Framework::base_Package
-- ModelLibrary => ModelLibrary::base_Package
function Internal_Get_Base_Usage
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Base_Usage
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Call => Call::base_Usage
-- Create => Create::base_Usage
-- Instantiate => Instantiate::base_Usage
-- Responsibility => Responsibility::base_Usage
-- Send => Send::base_Usage
function Internal_Get_Before
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Before
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- GeneralOrdering => GeneralOrdering::before
function Internal_Get_Behavior
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Behavior
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- BehaviorExecutionSpecification => BehaviorExecutionSpecification::behavior
-- CallBehaviorAction => CallBehaviorAction::behavior
-- OpaqueExpression => OpaqueExpression::behavior
function Internal_Get_Body
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Clause => Clause::body
function Internal_Get_Body
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Body
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Comment => Comment::body
function Internal_Get_Body
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_String;
-- FunctionBehavior => OpaqueBehavior::body
-- OpaqueAction => OpaqueAction::body
-- OpaqueBehavior => OpaqueBehavior::body
-- OpaqueExpression => OpaqueExpression::body
function Internal_Get_Body_Condition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Body_Condition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Operation => Operation::bodyCondition
function Internal_Get_Body_Output
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Clause => Clause::bodyOutput
-- LoopNode => LoopNode::bodyOutput
function Internal_Get_Body_Part
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- LoopNode => LoopNode::bodyPart
function Internal_Get_Bound_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Bound_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TemplateBinding => TemplateBinding::boundElement
function Internal_Get_Bounds
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Optional_DC_Bounds;
procedure Internal_Set_Bounds
(Self : AMF.Internals.AMF_Element;
To : AMF.DC.Optional_DC_Bounds);
-- UMLActivityDiagram => Shape::bounds
-- UMLAssociationEndLabel => Shape::bounds
-- UMLAssociationOrConnectorOrLinkShape => Shape::bounds
-- UMLClassDiagram => Shape::bounds
-- UMLClassifierShape => Shape::bounds
-- UMLCompartmentableShape => Shape::bounds
-- UMLComponentDiagram => Shape::bounds
-- UMLCompositeStructureDiagram => Shape::bounds
-- UMLDeploymentDiagram => Shape::bounds
-- UMLInteractionDiagram => Shape::bounds
-- UMLInteractionTableLabel => Shape::bounds
-- UMLKeywordLabel => Shape::bounds
-- UMLLabel => Shape::bounds
-- UMLMultiplicityLabel => Shape::bounds
-- UMLNameLabel => Shape::bounds
-- UMLObjectDiagram => Shape::bounds
-- UMLPackageDiagram => Shape::bounds
-- UMLProfileDiagram => Shape::bounds
-- UMLRedefinesLabel => Shape::bounds
-- UMLShape => Shape::bounds
-- UMLStateMachineDiagram => Shape::bounds
-- UMLStateShape => Shape::bounds
-- UMLStereotypePropertyValueLabel => Shape::bounds
-- UMLTypedElementLabel => Shape::bounds
-- UMLUseCaseDiagram => Shape::bounds
function Internal_Get_Cfragment_Gate
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- CombinedFragment => CombinedFragment::cfragmentGate
-- ConsiderIgnoreFragment => CombinedFragment::cfragmentGate
function Internal_Get_Change_Expression
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Change_Expression
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ChangeEvent => ChangeEvent::changeExpression
function Internal_Get_Class
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Class
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::class
-- Operation => Operation::class
-- Port => Property::class
-- Property => Property::class
function Internal_Get_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Classifier
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- CreateObjectAction => CreateObjectAction::classifier
-- EnumerationLiteral => EnumerationLiteral::classifier
-- ReadExtentAction => ReadExtentAction::classifier
-- ReadIsClassifiedObjectAction => ReadIsClassifiedObjectAction::classifier
-- RedefinableTemplateSignature => RedefinableTemplateSignature::classifier
function Internal_Get_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- EnumerationLiteral => InstanceSpecification::classifier
-- InstanceSpecification => InstanceSpecification::classifier
function Internal_Get_Classifier_Behavior
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Classifier_Behavior
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Activity => BehavioredClassifier::classifierBehavior
-- Actor => BehavioredClassifier::classifierBehavior
-- AssociationClass => BehavioredClassifier::classifierBehavior
-- Class => BehavioredClassifier::classifierBehavior
-- Collaboration => BehavioredClassifier::classifierBehavior
-- Component => BehavioredClassifier::classifierBehavior
-- Device => BehavioredClassifier::classifierBehavior
-- ExecutionEnvironment => BehavioredClassifier::classifierBehavior
-- FunctionBehavior => BehavioredClassifier::classifierBehavior
-- Interaction => BehavioredClassifier::classifierBehavior
-- Node => BehavioredClassifier::classifierBehavior
-- OpaqueBehavior => BehavioredClassifier::classifierBehavior
-- ProtocolStateMachine => BehavioredClassifier::classifierBehavior
-- StateMachine => BehavioredClassifier::classifierBehavior
-- Stereotype => BehavioredClassifier::classifierBehavior
-- UseCase => BehavioredClassifier::classifierBehavior
function Internal_Get_Clause
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ConditionalNode => ConditionalNode::clause
function Internal_Get_Client
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => Dependency::client
-- ComponentRealization => Dependency::client
-- Dependency => Dependency::client
-- Deployment => Dependency::client
-- InterfaceRealization => Dependency::client
-- Manifestation => Dependency::client
-- Realization => Dependency::client
-- Substitution => Dependency::client
-- Usage => Dependency::client
function Internal_Get_Client_Dependency
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => NamedElement::clientDependency
-- AcceptCallAction => NamedElement::clientDependency
-- AcceptEventAction => NamedElement::clientDependency
-- ActionExecutionSpecification => NamedElement::clientDependency
-- ActionInputPin => NamedElement::clientDependency
-- Activity => NamedElement::clientDependency
-- ActivityFinalNode => NamedElement::clientDependency
-- ActivityParameterNode => NamedElement::clientDependency
-- ActivityPartition => NamedElement::clientDependency
-- Actor => NamedElement::clientDependency
-- AddStructuralFeatureValueAction => NamedElement::clientDependency
-- AddVariableValueAction => NamedElement::clientDependency
-- AnyReceiveEvent => NamedElement::clientDependency
-- Artifact => NamedElement::clientDependency
-- Association => NamedElement::clientDependency
-- AssociationClass => NamedElement::clientDependency
-- BehaviorExecutionSpecification => NamedElement::clientDependency
-- BroadcastSignalAction => NamedElement::clientDependency
-- CallBehaviorAction => NamedElement::clientDependency
-- CallEvent => NamedElement::clientDependency
-- CallOperationAction => NamedElement::clientDependency
-- CentralBufferNode => NamedElement::clientDependency
-- ChangeEvent => NamedElement::clientDependency
-- Class => NamedElement::clientDependency
-- ClearAssociationAction => NamedElement::clientDependency
-- ClearStructuralFeatureAction => NamedElement::clientDependency
-- ClearVariableAction => NamedElement::clientDependency
-- Collaboration => NamedElement::clientDependency
-- CollaborationUse => NamedElement::clientDependency
-- CombinedFragment => NamedElement::clientDependency
-- CommunicationPath => NamedElement::clientDependency
-- Component => NamedElement::clientDependency
-- ComponentRealization => NamedElement::clientDependency
-- ConditionalNode => NamedElement::clientDependency
-- ConnectionPointReference => NamedElement::clientDependency
-- Connector => NamedElement::clientDependency
-- ConsiderIgnoreFragment => NamedElement::clientDependency
-- Constraint => NamedElement::clientDependency
-- Continuation => NamedElement::clientDependency
-- ControlFlow => NamedElement::clientDependency
-- CreateLinkAction => NamedElement::clientDependency
-- CreateLinkObjectAction => NamedElement::clientDependency
-- CreateObjectAction => NamedElement::clientDependency
-- UMLActivityDiagram => NamedElement::clientDependency
-- UMLClassDiagram => NamedElement::clientDependency
-- UMLComponentDiagram => NamedElement::clientDependency
-- UMLCompositeStructureDiagram => NamedElement::clientDependency
-- UMLDeploymentDiagram => NamedElement::clientDependency
-- UMLInteractionDiagram => NamedElement::clientDependency
-- UMLObjectDiagram => NamedElement::clientDependency
-- UMLPackageDiagram => NamedElement::clientDependency
-- UMLProfileDiagram => NamedElement::clientDependency
-- UMLStateMachineDiagram => NamedElement::clientDependency
-- UMLStyle => NamedElement::clientDependency
-- UMLUseCaseDiagram => NamedElement::clientDependency
-- DataStoreNode => NamedElement::clientDependency
-- DataType => NamedElement::clientDependency
-- DecisionNode => NamedElement::clientDependency
-- Dependency => NamedElement::clientDependency
-- Deployment => NamedElement::clientDependency
-- DeploymentSpecification => NamedElement::clientDependency
-- DestroyLinkAction => NamedElement::clientDependency
-- DestroyObjectAction => NamedElement::clientDependency
-- DestructionOccurrenceSpecification => NamedElement::clientDependency
-- Device => NamedElement::clientDependency
-- Duration => NamedElement::clientDependency
-- DurationConstraint => NamedElement::clientDependency
-- DurationInterval => NamedElement::clientDependency
-- DurationObservation => NamedElement::clientDependency
-- Enumeration => NamedElement::clientDependency
-- EnumerationLiteral => NamedElement::clientDependency
-- ExecutionEnvironment => NamedElement::clientDependency
-- ExecutionOccurrenceSpecification => NamedElement::clientDependency
-- ExpansionNode => NamedElement::clientDependency
-- ExpansionRegion => NamedElement::clientDependency
-- Expression => NamedElement::clientDependency
-- Extend => NamedElement::clientDependency
-- Extension => NamedElement::clientDependency
-- ExtensionEnd => NamedElement::clientDependency
-- ExtensionPoint => NamedElement::clientDependency
-- FinalState => NamedElement::clientDependency
-- FlowFinalNode => NamedElement::clientDependency
-- ForkNode => NamedElement::clientDependency
-- FunctionBehavior => NamedElement::clientDependency
-- Gate => NamedElement::clientDependency
-- GeneralOrdering => NamedElement::clientDependency
-- GeneralizationSet => NamedElement::clientDependency
-- Include => NamedElement::clientDependency
-- InformationFlow => NamedElement::clientDependency
-- InformationItem => NamedElement::clientDependency
-- InitialNode => NamedElement::clientDependency
-- InputPin => NamedElement::clientDependency
-- InstanceSpecification => NamedElement::clientDependency
-- InstanceValue => NamedElement::clientDependency
-- Interaction => NamedElement::clientDependency
-- InteractionConstraint => NamedElement::clientDependency
-- InteractionOperand => NamedElement::clientDependency
-- InteractionUse => NamedElement::clientDependency
-- Interface => NamedElement::clientDependency
-- InterfaceRealization => NamedElement::clientDependency
-- InterruptibleActivityRegion => NamedElement::clientDependency
-- Interval => NamedElement::clientDependency
-- IntervalConstraint => NamedElement::clientDependency
-- JoinNode => NamedElement::clientDependency
-- Lifeline => NamedElement::clientDependency
-- LiteralBoolean => NamedElement::clientDependency
-- LiteralInteger => NamedElement::clientDependency
-- LiteralNull => NamedElement::clientDependency
-- LiteralReal => NamedElement::clientDependency
-- LiteralString => NamedElement::clientDependency
-- LiteralUnlimitedNatural => NamedElement::clientDependency
-- LoopNode => NamedElement::clientDependency
-- Manifestation => NamedElement::clientDependency
-- MergeNode => NamedElement::clientDependency
-- Message => NamedElement::clientDependency
-- MessageOccurrenceSpecification => NamedElement::clientDependency
-- Model => NamedElement::clientDependency
-- Node => NamedElement::clientDependency
-- ObjectFlow => NamedElement::clientDependency
-- OccurrenceSpecification => NamedElement::clientDependency
-- OpaqueAction => NamedElement::clientDependency
-- OpaqueBehavior => NamedElement::clientDependency
-- OpaqueExpression => NamedElement::clientDependency
-- Operation => NamedElement::clientDependency
-- OutputPin => NamedElement::clientDependency
-- Package => NamedElement::clientDependency
-- Parameter => NamedElement::clientDependency
-- ParameterSet => NamedElement::clientDependency
-- PartDecomposition => NamedElement::clientDependency
-- Port => NamedElement::clientDependency
-- PrimitiveType => NamedElement::clientDependency
-- Profile => NamedElement::clientDependency
-- Property => NamedElement::clientDependency
-- ProtocolStateMachine => NamedElement::clientDependency
-- ProtocolTransition => NamedElement::clientDependency
-- Pseudostate => NamedElement::clientDependency
-- RaiseExceptionAction => NamedElement::clientDependency
-- ReadExtentAction => NamedElement::clientDependency
-- ReadIsClassifiedObjectAction => NamedElement::clientDependency
-- ReadLinkAction => NamedElement::clientDependency
-- ReadLinkObjectEndAction => NamedElement::clientDependency
-- ReadLinkObjectEndQualifierAction => NamedElement::clientDependency
-- ReadSelfAction => NamedElement::clientDependency
-- ReadStructuralFeatureAction => NamedElement::clientDependency
-- ReadVariableAction => NamedElement::clientDependency
-- Realization => NamedElement::clientDependency
-- Reception => NamedElement::clientDependency
-- ReclassifyObjectAction => NamedElement::clientDependency
-- RedefinableTemplateSignature => NamedElement::clientDependency
-- ReduceAction => NamedElement::clientDependency
-- Region => NamedElement::clientDependency
-- RemoveStructuralFeatureValueAction => NamedElement::clientDependency
-- RemoveVariableValueAction => NamedElement::clientDependency
-- ReplyAction => NamedElement::clientDependency
-- SendObjectAction => NamedElement::clientDependency
-- SendSignalAction => NamedElement::clientDependency
-- SequenceNode => NamedElement::clientDependency
-- Signal => NamedElement::clientDependency
-- SignalEvent => NamedElement::clientDependency
-- StartClassifierBehaviorAction => NamedElement::clientDependency
-- StartObjectBehaviorAction => NamedElement::clientDependency
-- State => NamedElement::clientDependency
-- StateInvariant => NamedElement::clientDependency
-- StateMachine => NamedElement::clientDependency
-- Stereotype => NamedElement::clientDependency
-- StringExpression => NamedElement::clientDependency
-- StructuredActivityNode => NamedElement::clientDependency
-- Substitution => NamedElement::clientDependency
-- TestIdentityAction => NamedElement::clientDependency
-- TimeConstraint => NamedElement::clientDependency
-- TimeEvent => NamedElement::clientDependency
-- TimeExpression => NamedElement::clientDependency
-- TimeInterval => NamedElement::clientDependency
-- TimeObservation => NamedElement::clientDependency
-- Transition => NamedElement::clientDependency
-- Trigger => NamedElement::clientDependency
-- UnmarshallAction => NamedElement::clientDependency
-- Usage => NamedElement::clientDependency
-- UseCase => NamedElement::clientDependency
-- ValuePin => NamedElement::clientDependency
-- ValueSpecificationAction => NamedElement::clientDependency
-- Variable => NamedElement::clientDependency
function Internal_Get_Collaboration_Role
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Collaboration => Collaboration::collaborationRole
function Internal_Get_Collaboration_Use
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::collaborationUse
-- Actor => Classifier::collaborationUse
-- Artifact => Classifier::collaborationUse
-- Association => Classifier::collaborationUse
-- AssociationClass => Classifier::collaborationUse
-- Class => Classifier::collaborationUse
-- Collaboration => Classifier::collaborationUse
-- CommunicationPath => Classifier::collaborationUse
-- Component => Classifier::collaborationUse
-- DataType => Classifier::collaborationUse
-- DeploymentSpecification => Classifier::collaborationUse
-- Device => Classifier::collaborationUse
-- Enumeration => Classifier::collaborationUse
-- ExecutionEnvironment => Classifier::collaborationUse
-- Extension => Classifier::collaborationUse
-- FunctionBehavior => Classifier::collaborationUse
-- InformationItem => Classifier::collaborationUse
-- Interaction => Classifier::collaborationUse
-- Interface => Classifier::collaborationUse
-- Node => Classifier::collaborationUse
-- OpaqueBehavior => Classifier::collaborationUse
-- PrimitiveType => Classifier::collaborationUse
-- ProtocolStateMachine => Classifier::collaborationUse
-- Signal => Classifier::collaborationUse
-- StateMachine => Classifier::collaborationUse
-- Stereotype => Classifier::collaborationUse
-- UseCase => Classifier::collaborationUse
function Internal_Get_Collection
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Collection
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ReduceAction => ReduceAction::collection
function Internal_Get_Compartment
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UMLClassifierShape => UMLCompartmentableShape::compartment
-- UMLCompartmentableShape => UMLCompartmentableShape::compartment
-- UMLStateShape => UMLCompartmentableShape::compartment
function Internal_Get_Computation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Computation
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Derive => Derive::computation
function Internal_Get_Concurrency
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Call_Concurrency_Kind;
procedure Internal_Set_Concurrency
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Call_Concurrency_Kind);
-- Operation => BehavioralFeature::concurrency
-- Reception => BehavioralFeature::concurrency
function Internal_Get_Condition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Condition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Extend => Extend::condition
function Internal_Get_Condition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ParameterSet => ParameterSet::condition
function Internal_Get_Configuration
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Deployment => Deployment::configuration
function Internal_Get_Conformance
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ProtocolStateMachine => ProtocolStateMachine::conformance
function Internal_Get_Connection
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- FinalState => State::connection
-- State => State::connection
function Internal_Get_Connection_Point
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- FinalState => State::connectionPoint
-- ProtocolStateMachine => StateMachine::connectionPoint
-- State => State::connectionPoint
-- StateMachine => StateMachine::connectionPoint
function Internal_Get_Connector
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Connector
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Message => Message::connector
function Internal_Get_Constrained_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Constraint => Constraint::constrainedElement
-- DurationConstraint => Constraint::constrainedElement
-- InteractionConstraint => Constraint::constrainedElement
-- IntervalConstraint => Constraint::constrainedElement
-- TimeConstraint => Constraint::constrainedElement
function Internal_Get_Constraining_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ClassifierTemplateParameter => ClassifierTemplateParameter::constrainingClassifier
function Internal_Get_Contained_Edge
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActivityPartition => ActivityGroup::containedEdge
-- ConditionalNode => ActivityGroup::containedEdge
-- ExpansionRegion => ActivityGroup::containedEdge
-- InterruptibleActivityRegion => ActivityGroup::containedEdge
-- LoopNode => ActivityGroup::containedEdge
-- SequenceNode => ActivityGroup::containedEdge
-- StructuredActivityNode => ActivityGroup::containedEdge
function Internal_Get_Contained_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActivityPartition => ActivityGroup::containedNode
-- ConditionalNode => ActivityGroup::containedNode
-- ExpansionRegion => ActivityGroup::containedNode
-- InterruptibleActivityRegion => ActivityGroup::containedNode
-- LoopNode => ActivityGroup::containedNode
-- SequenceNode => ActivityGroup::containedNode
-- StructuredActivityNode => ActivityGroup::containedNode
function Internal_Get_Container
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Container
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ConnectionPointReference => Vertex::container
-- FinalState => Vertex::container
-- ProtocolTransition => Transition::container
-- Pseudostate => Vertex::container
-- State => Vertex::container
-- Transition => Transition::container
function Internal_Get_Content
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Content
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Image => Image::content
function Internal_Get_Context
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- AcceptCallAction => Action::context
-- AcceptEventAction => Action::context
-- Activity => Behavior::context
-- AddStructuralFeatureValueAction => Action::context
-- AddVariableValueAction => Action::context
-- BroadcastSignalAction => Action::context
-- CallBehaviorAction => Action::context
-- CallOperationAction => Action::context
-- ClearAssociationAction => Action::context
-- ClearStructuralFeatureAction => Action::context
-- ClearVariableAction => Action::context
-- ConditionalNode => Action::context
-- Constraint => Constraint::context
-- CreateLinkAction => Action::context
-- CreateLinkObjectAction => Action::context
-- CreateObjectAction => Action::context
-- DestroyLinkAction => Action::context
-- DestroyObjectAction => Action::context
-- DurationConstraint => Constraint::context
-- ExpansionRegion => Action::context
-- FunctionBehavior => Behavior::context
-- Interaction => Behavior::context
-- InteractionConstraint => Constraint::context
-- IntervalConstraint => Constraint::context
-- LoopNode => Action::context
-- OpaqueAction => Action::context
-- OpaqueBehavior => Behavior::context
-- ProtocolStateMachine => Behavior::context
-- RaiseExceptionAction => Action::context
-- ReadExtentAction => Action::context
-- ReadIsClassifiedObjectAction => Action::context
-- ReadLinkAction => Action::context
-- ReadLinkObjectEndAction => Action::context
-- ReadLinkObjectEndQualifierAction => Action::context
-- ReadSelfAction => Action::context
-- ReadStructuralFeatureAction => Action::context
-- ReadVariableAction => Action::context
-- ReclassifyObjectAction => Action::context
-- ReduceAction => Action::context
-- RemoveStructuralFeatureValueAction => Action::context
-- RemoveVariableValueAction => Action::context
-- ReplyAction => Action::context
-- SendObjectAction => Action::context
-- SendSignalAction => Action::context
-- SequenceNode => Action::context
-- StartClassifierBehaviorAction => Action::context
-- StartObjectBehaviorAction => Action::context
-- StateMachine => Behavior::context
-- StructuredActivityNode => Action::context
-- TestIdentityAction => Action::context
-- TimeConstraint => Constraint::context
-- UnmarshallAction => Action::context
-- ValueSpecificationAction => Action::context
function Internal_Get_Contract
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Connector => Connector::contract
function Internal_Get_Contract
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Contract
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InterfaceRealization => InterfaceRealization::contract
-- Substitution => Substitution::contract
function Internal_Get_Conveyed
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationFlow => InformationFlow::conveyed
function Internal_Get_Covered
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActionExecutionSpecification => InteractionFragment::covered
-- BehaviorExecutionSpecification => InteractionFragment::covered
-- CombinedFragment => InteractionFragment::covered
-- ConsiderIgnoreFragment => InteractionFragment::covered
-- Continuation => InteractionFragment::covered
-- DestructionOccurrenceSpecification => InteractionFragment::covered
-- ExecutionOccurrenceSpecification => InteractionFragment::covered
-- Interaction => InteractionFragment::covered
-- InteractionOperand => InteractionFragment::covered
-- InteractionUse => InteractionFragment::covered
-- MessageOccurrenceSpecification => InteractionFragment::covered
-- OccurrenceSpecification => InteractionFragment::covered
-- PartDecomposition => InteractionFragment::covered
-- StateInvariant => InteractionFragment::covered
function Internal_Get_Covered
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Covered
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DestructionOccurrenceSpecification => OccurrenceSpecification::covered
-- ExecutionOccurrenceSpecification => OccurrenceSpecification::covered
-- MessageOccurrenceSpecification => OccurrenceSpecification::covered
-- OccurrenceSpecification => OccurrenceSpecification::covered
-- StateInvariant => StateInvariant::covered
function Internal_Get_Covered_By
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Lifeline => Lifeline::coveredBy
function Internal_Get_Datatype
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Datatype
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::datatype
-- Operation => Operation::datatype
-- Port => Property::datatype
-- Property => Property::datatype
function Internal_Get_Decider
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Decider
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Clause => Clause::decider
-- LoopNode => LoopNode::decider
function Internal_Get_Decision_Input
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Decision_Input
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DecisionNode => DecisionNode::decisionInput
function Internal_Get_Decision_Input_Flow
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Decision_Input_Flow
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DecisionNode => DecisionNode::decisionInputFlow
function Internal_Get_Decomposed_As
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Decomposed_As
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Lifeline => Lifeline::decomposedAs
function Internal_Get_Default
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Default
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- ExtensionEnd => Property::default
-- Parameter => Parameter::default
-- Port => Property::default
-- Property => Property::default
function Internal_Get_Default
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Default
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ClassifierTemplateParameter => TemplateParameter::default
-- ConnectableElementTemplateParameter => TemplateParameter::default
-- OperationTemplateParameter => TemplateParameter::default
-- TemplateParameter => TemplateParameter::default
function Internal_Get_Default_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Default_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::defaultValue
-- Parameter => Parameter::defaultValue
-- Port => Property::defaultValue
-- Property => Property::defaultValue
function Internal_Get_Deferrable_Trigger
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- FinalState => State::deferrableTrigger
-- State => State::deferrableTrigger
function Internal_Get_Defining_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- ConnectorEnd => ConnectorEnd::definingEnd
function Internal_Get_Defining_Feature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Defining_Feature
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Slot => Slot::definingFeature
function Internal_Get_Deployed_Artifact
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Deployment => Deployment::deployedArtifact
function Internal_Get_Deployed_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Device => DeploymentTarget::deployedElement
-- EnumerationLiteral => DeploymentTarget::deployedElement
-- ExecutionEnvironment => DeploymentTarget::deployedElement
-- ExtensionEnd => DeploymentTarget::deployedElement
-- InstanceSpecification => DeploymentTarget::deployedElement
-- Node => DeploymentTarget::deployedElement
-- Port => DeploymentTarget::deployedElement
-- Property => DeploymentTarget::deployedElement
function Internal_Get_Deployment
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Deployment
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DeploymentSpecification => DeploymentSpecification::deployment
function Internal_Get_Deployment
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Device => DeploymentTarget::deployment
-- EnumerationLiteral => DeploymentTarget::deployment
-- ExecutionEnvironment => DeploymentTarget::deployment
-- ExtensionEnd => DeploymentTarget::deployment
-- InstanceSpecification => DeploymentTarget::deployment
-- Node => DeploymentTarget::deployment
-- Port => DeploymentTarget::deployment
-- Property => DeploymentTarget::deployment
function Internal_Get_Deployment_Location
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Deployment_Location
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- DeploymentSpecification => DeploymentSpecification::deploymentLocation
function Internal_Get_Destroy_At
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Destroy_At
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- LinkEndDestructionData => LinkEndDestructionData::destroyAt
function Internal_Get_Direction
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Parameter_Direction_Kind;
procedure Internal_Set_Direction
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Parameter_Direction_Kind);
-- Parameter => Parameter::direction
function Internal_Get_Do_Activity
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Do_Activity
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- FinalState => State::doActivity
-- State => State::doActivity
function Internal_Get_Documentation
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Documentation
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- UMLActivityDiagram => Diagram::documentation
-- UMLClassDiagram => Diagram::documentation
-- UMLComponentDiagram => Diagram::documentation
-- UMLCompositeStructureDiagram => Diagram::documentation
-- UMLDeploymentDiagram => Diagram::documentation
-- UMLInteractionDiagram => Diagram::documentation
-- UMLObjectDiagram => Diagram::documentation
-- UMLPackageDiagram => Diagram::documentation
-- UMLProfileDiagram => Diagram::documentation
-- UMLStateMachineDiagram => Diagram::documentation
-- UMLUseCaseDiagram => Diagram::documentation
function Internal_Get_Edge
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Activity::edge
-- ActivityPartition => ActivityPartition::edge
-- ConditionalNode => StructuredActivityNode::edge
-- ExpansionRegion => StructuredActivityNode::edge
-- LoopNode => StructuredActivityNode::edge
-- SequenceNode => StructuredActivityNode::edge
-- StructuredActivityNode => StructuredActivityNode::edge
function Internal_Get_Effect
(Self : AMF.Internals.AMF_Element)
return AMF.UML.Optional_UML_Parameter_Effect_Kind;
procedure Internal_Set_Effect
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.Optional_UML_Parameter_Effect_Kind);
-- Parameter => Parameter::effect
function Internal_Get_Effect
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Effect
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProtocolTransition => Transition::effect
-- Transition => Transition::effect
function Internal_Get_Element_Import
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Namespace::elementImport
-- Actor => Namespace::elementImport
-- Artifact => Namespace::elementImport
-- Association => Namespace::elementImport
-- AssociationClass => Namespace::elementImport
-- Class => Namespace::elementImport
-- Collaboration => Namespace::elementImport
-- CommunicationPath => Namespace::elementImport
-- Component => Namespace::elementImport
-- ConditionalNode => Namespace::elementImport
-- DataType => Namespace::elementImport
-- DeploymentSpecification => Namespace::elementImport
-- Device => Namespace::elementImport
-- Enumeration => Namespace::elementImport
-- ExecutionEnvironment => Namespace::elementImport
-- ExpansionRegion => Namespace::elementImport
-- Extension => Namespace::elementImport
-- FinalState => Namespace::elementImport
-- FunctionBehavior => Namespace::elementImport
-- InformationItem => Namespace::elementImport
-- Interaction => Namespace::elementImport
-- InteractionOperand => Namespace::elementImport
-- Interface => Namespace::elementImport
-- LoopNode => Namespace::elementImport
-- Model => Namespace::elementImport
-- Node => Namespace::elementImport
-- OpaqueBehavior => Namespace::elementImport
-- Operation => Namespace::elementImport
-- Package => Namespace::elementImport
-- PrimitiveType => Namespace::elementImport
-- Profile => Namespace::elementImport
-- ProtocolStateMachine => Namespace::elementImport
-- ProtocolTransition => Namespace::elementImport
-- Reception => Namespace::elementImport
-- Region => Namespace::elementImport
-- SequenceNode => Namespace::elementImport
-- Signal => Namespace::elementImport
-- State => Namespace::elementImport
-- StateMachine => Namespace::elementImport
-- Stereotype => Namespace::elementImport
-- StructuredActivityNode => Namespace::elementImport
-- Transition => Namespace::elementImport
-- UseCase => Namespace::elementImport
function Internal_Get_Element_In_Compartment
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UMLCompartment => UMLCompartment::elementInCompartment
function Internal_Get_Enclosing_Interaction
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Enclosing_Interaction
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionExecutionSpecification => InteractionFragment::enclosingInteraction
-- BehaviorExecutionSpecification => InteractionFragment::enclosingInteraction
-- CombinedFragment => InteractionFragment::enclosingInteraction
-- ConsiderIgnoreFragment => InteractionFragment::enclosingInteraction
-- Continuation => InteractionFragment::enclosingInteraction
-- DestructionOccurrenceSpecification => InteractionFragment::enclosingInteraction
-- ExecutionOccurrenceSpecification => InteractionFragment::enclosingInteraction
-- Interaction => InteractionFragment::enclosingInteraction
-- InteractionOperand => InteractionFragment::enclosingInteraction
-- InteractionUse => InteractionFragment::enclosingInteraction
-- MessageOccurrenceSpecification => InteractionFragment::enclosingInteraction
-- OccurrenceSpecification => InteractionFragment::enclosingInteraction
-- PartDecomposition => InteractionFragment::enclosingInteraction
-- StateInvariant => InteractionFragment::enclosingInteraction
function Internal_Get_Enclosing_Operand
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Enclosing_Operand
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionExecutionSpecification => InteractionFragment::enclosingOperand
-- BehaviorExecutionSpecification => InteractionFragment::enclosingOperand
-- CombinedFragment => InteractionFragment::enclosingOperand
-- ConsiderIgnoreFragment => InteractionFragment::enclosingOperand
-- Continuation => InteractionFragment::enclosingOperand
-- DestructionOccurrenceSpecification => InteractionFragment::enclosingOperand
-- ExecutionOccurrenceSpecification => InteractionFragment::enclosingOperand
-- Interaction => InteractionFragment::enclosingOperand
-- InteractionOperand => InteractionFragment::enclosingOperand
-- InteractionUse => InteractionFragment::enclosingOperand
-- MessageOccurrenceSpecification => InteractionFragment::enclosingOperand
-- OccurrenceSpecification => InteractionFragment::enclosingOperand
-- PartDecomposition => InteractionFragment::enclosingOperand
-- StateInvariant => InteractionFragment::enclosingOperand
function Internal_Get_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Connector => Connector::end
-- ExtensionEnd => ConnectableElement::end
-- Parameter => ConnectableElement::end
-- Port => ConnectableElement::end
-- Property => ConnectableElement::end
-- Variable => ConnectableElement::end
function Internal_Get_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_End
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- LinkEndCreationData => LinkEndData::end
-- LinkEndData => LinkEndData::end
-- LinkEndDestructionData => LinkEndData::end
-- ReadLinkObjectEndAction => ReadLinkObjectEndAction::end
function Internal_Get_End_Data
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- CreateLinkAction => CreateLinkAction::endData
-- CreateLinkObjectAction => CreateLinkAction::endData
-- DestroyLinkAction => DestroyLinkAction::endData
-- ReadLinkAction => LinkAction::endData
function Internal_Get_End_Type
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Association => Association::endType
-- AssociationClass => Association::endType
-- CommunicationPath => Association::endType
-- Extension => Association::endType
function Internal_Get_Entry
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ConnectionPointReference => ConnectionPointReference::entry
function Internal_Get_Entry
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Entry
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- FinalState => State::entry
-- State => State::entry
function Internal_Get_Enumeration
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Enumeration
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- EnumerationLiteral => EnumerationLiteral::enumeration
function Internal_Get_Event
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- DurationObservation => DurationObservation::event
function Internal_Get_Event
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Event
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TimeObservation => TimeObservation::event
-- Trigger => Trigger::event
function Internal_Get_Exception
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Exception
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- RaiseExceptionAction => RaiseExceptionAction::exception
function Internal_Get_Exception_Input
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Exception_Input
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExceptionHandler => ExceptionHandler::exceptionInput
function Internal_Get_Exception_Type
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ExceptionHandler => ExceptionHandler::exceptionType
function Internal_Get_Executable_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- SequenceNode => SequenceNode::executableNode
function Internal_Get_Execution
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Execution
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExecutionOccurrenceSpecification => ExecutionOccurrenceSpecification::execution
function Internal_Get_Execution_Location
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Execution_Location
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- DeploymentSpecification => DeploymentSpecification::executionLocation
function Internal_Get_Exit
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ConnectionPointReference => ConnectionPointReference::exit
function Internal_Get_Exit
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Exit
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- FinalState => State::exit
-- State => State::exit
function Internal_Get_Expr
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Expr
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Duration => Duration::expr
-- TimeExpression => TimeExpression::expr
function Internal_Get_Extend
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UseCase => UseCase::extend
function Internal_Get_Extended_Case
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Extended_Case
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Extend => Extend::extendedCase
function Internal_Get_Extended_Region
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Extended_Region
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Region => Region::extendedRegion
function Internal_Get_Extended_Signature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- RedefinableTemplateSignature => RedefinableTemplateSignature::extendedSignature
function Internal_Get_Extended_State_Machine
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ProtocolStateMachine => StateMachine::extendedStateMachine
-- StateMachine => StateMachine::extendedStateMachine
function Internal_Get_Extension
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Class::extension
-- AssociationClass => Class::extension
-- Class => Class::extension
-- Component => Class::extension
-- Device => Class::extension
-- ExecutionEnvironment => Class::extension
-- FunctionBehavior => Class::extension
-- Interaction => Class::extension
-- Node => Class::extension
-- OpaqueBehavior => Class::extension
-- ProtocolStateMachine => Class::extension
-- StateMachine => Class::extension
-- Stereotype => Class::extension
function Internal_Get_Extension
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Extension
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Extend => Extend::extension
function Internal_Get_Extension_Location
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Extend => Extend::extensionLocation
function Internal_Get_Extension_Point
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UseCase => UseCase::extensionPoint
function Internal_Get_Feature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::feature
-- Actor => Classifier::feature
-- Artifact => Classifier::feature
-- Association => Classifier::feature
-- AssociationClass => Classifier::feature
-- Class => Classifier::feature
-- Collaboration => Classifier::feature
-- CommunicationPath => Classifier::feature
-- Component => Classifier::feature
-- DataType => Classifier::feature
-- DeploymentSpecification => Classifier::feature
-- Device => Classifier::feature
-- Enumeration => Classifier::feature
-- ExecutionEnvironment => Classifier::feature
-- Extension => Classifier::feature
-- FunctionBehavior => Classifier::feature
-- InformationItem => Classifier::feature
-- Interaction => Classifier::feature
-- Interface => Classifier::feature
-- Node => Classifier::feature
-- OpaqueBehavior => Classifier::feature
-- PrimitiveType => Classifier::feature
-- ProtocolStateMachine => Classifier::feature
-- Signal => Classifier::feature
-- StateMachine => Classifier::feature
-- Stereotype => Classifier::feature
-- UseCase => Classifier::feature
function Internal_Get_Featuring_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Connector => Feature::featuringClassifier
-- ExtensionEnd => Feature::featuringClassifier
-- Operation => Feature::featuringClassifier
-- Port => Feature::featuringClassifier
-- Property => Feature::featuringClassifier
-- Reception => Feature::featuringClassifier
function Internal_Get_File_Name
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_File_Name
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Artifact => Artifact::fileName
-- DeploymentSpecification => Artifact::fileName
function Internal_Get_Finish
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Finish
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionExecutionSpecification => ExecutionSpecification::finish
-- BehaviorExecutionSpecification => ExecutionSpecification::finish
function Internal_Get_First
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_First
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TestIdentityAction => TestIdentityAction::first
function Internal_Get_First_Event
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Boolean;
-- DurationConstraint => DurationConstraint::firstEvent
-- DurationObservation => DurationObservation::firstEvent
function Internal_Get_First_Event
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Boolean;
procedure Internal_Set_First_Event
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Boolean);
-- TimeConstraint => TimeConstraint::firstEvent
function Internal_Get_First_Event
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_First_Event
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- TimeObservation => TimeObservation::firstEvent
function Internal_Get_Font_Name
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Font_Name
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- UMLStyle => UMLStyle::fontName
function Internal_Get_Font_Size
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Real;
procedure Internal_Set_Font_Size
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Real);
-- UMLStyle => UMLStyle::fontSize
function Internal_Get_Formal
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Formal
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TemplateParameterSubstitution => TemplateParameterSubstitution::formal
function Internal_Get_Formal_Gate
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Interaction => Interaction::formalGate
function Internal_Get_Format
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Format
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Image => Image::format
function Internal_Get_Fragment
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Interaction => Interaction::fragment
-- InteractionOperand => InteractionOperand::fragment
function Internal_Get_From_Action
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_From_Action
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionInputPin => ActionInputPin::fromAction
function Internal_Get_General
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::general
-- Actor => Classifier::general
-- Artifact => Classifier::general
-- Association => Classifier::general
-- AssociationClass => Classifier::general
-- Class => Classifier::general
-- Collaboration => Classifier::general
-- CommunicationPath => Classifier::general
-- Component => Classifier::general
-- DataType => Classifier::general
-- DeploymentSpecification => Classifier::general
-- Device => Classifier::general
-- Enumeration => Classifier::general
-- ExecutionEnvironment => Classifier::general
-- Extension => Classifier::general
-- FunctionBehavior => Classifier::general
-- InformationItem => Classifier::general
-- Interaction => Classifier::general
-- Interface => Classifier::general
-- Node => Classifier::general
-- OpaqueBehavior => Classifier::general
-- PrimitiveType => Classifier::general
-- ProtocolStateMachine => Classifier::general
-- Signal => Classifier::general
-- StateMachine => Classifier::general
-- Stereotype => Classifier::general
-- UseCase => Classifier::general
function Internal_Get_General
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_General
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Generalization => Generalization::general
function Internal_Get_General_Machine
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_General_Machine
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProtocolConformance => ProtocolConformance::generalMachine
function Internal_Get_General_Ordering
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActionExecutionSpecification => InteractionFragment::generalOrdering
-- BehaviorExecutionSpecification => InteractionFragment::generalOrdering
-- CombinedFragment => InteractionFragment::generalOrdering
-- ConsiderIgnoreFragment => InteractionFragment::generalOrdering
-- Continuation => InteractionFragment::generalOrdering
-- DestructionOccurrenceSpecification => InteractionFragment::generalOrdering
-- ExecutionOccurrenceSpecification => InteractionFragment::generalOrdering
-- Interaction => InteractionFragment::generalOrdering
-- InteractionOperand => InteractionFragment::generalOrdering
-- InteractionUse => InteractionFragment::generalOrdering
-- MessageOccurrenceSpecification => InteractionFragment::generalOrdering
-- OccurrenceSpecification => InteractionFragment::generalOrdering
-- PartDecomposition => InteractionFragment::generalOrdering
-- StateInvariant => InteractionFragment::generalOrdering
function Internal_Get_Generalization
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::generalization
-- Actor => Classifier::generalization
-- Artifact => Classifier::generalization
-- Association => Classifier::generalization
-- AssociationClass => Classifier::generalization
-- Class => Classifier::generalization
-- Collaboration => Classifier::generalization
-- CommunicationPath => Classifier::generalization
-- Component => Classifier::generalization
-- DataType => Classifier::generalization
-- DeploymentSpecification => Classifier::generalization
-- Device => Classifier::generalization
-- Enumeration => Classifier::generalization
-- ExecutionEnvironment => Classifier::generalization
-- Extension => Classifier::generalization
-- FunctionBehavior => Classifier::generalization
-- GeneralizationSet => GeneralizationSet::generalization
-- InformationItem => Classifier::generalization
-- Interaction => Classifier::generalization
-- Interface => Classifier::generalization
-- Node => Classifier::generalization
-- OpaqueBehavior => Classifier::generalization
-- PrimitiveType => Classifier::generalization
-- ProtocolStateMachine => Classifier::generalization
-- Signal => Classifier::generalization
-- StateMachine => Classifier::generalization
-- Stereotype => Classifier::generalization
-- UseCase => Classifier::generalization
function Internal_Get_Generalization_Set
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Generalization => Generalization::generalizationSet
function Internal_Get_Group
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Activity::group
function Internal_Get_Guard
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Guard
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ControlFlow => ActivityEdge::guard
-- InteractionOperand => InteractionOperand::guard
-- ObjectFlow => ActivityEdge::guard
-- ProtocolTransition => Transition::guard
-- Transition => Transition::guard
function Internal_Get_Handler
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ExecutableNode::handler
-- AcceptEventAction => ExecutableNode::handler
-- AddStructuralFeatureValueAction => ExecutableNode::handler
-- AddVariableValueAction => ExecutableNode::handler
-- BroadcastSignalAction => ExecutableNode::handler
-- CallBehaviorAction => ExecutableNode::handler
-- CallOperationAction => ExecutableNode::handler
-- ClearAssociationAction => ExecutableNode::handler
-- ClearStructuralFeatureAction => ExecutableNode::handler
-- ClearVariableAction => ExecutableNode::handler
-- ConditionalNode => ExecutableNode::handler
-- CreateLinkAction => ExecutableNode::handler
-- CreateLinkObjectAction => ExecutableNode::handler
-- CreateObjectAction => ExecutableNode::handler
-- DestroyLinkAction => ExecutableNode::handler
-- DestroyObjectAction => ExecutableNode::handler
-- ExpansionRegion => ExecutableNode::handler
-- LoopNode => ExecutableNode::handler
-- OpaqueAction => ExecutableNode::handler
-- RaiseExceptionAction => ExecutableNode::handler
-- ReadExtentAction => ExecutableNode::handler
-- ReadIsClassifiedObjectAction => ExecutableNode::handler
-- ReadLinkAction => ExecutableNode::handler
-- ReadLinkObjectEndAction => ExecutableNode::handler
-- ReadLinkObjectEndQualifierAction => ExecutableNode::handler
-- ReadSelfAction => ExecutableNode::handler
-- ReadStructuralFeatureAction => ExecutableNode::handler
-- ReadVariableAction => ExecutableNode::handler
-- ReclassifyObjectAction => ExecutableNode::handler
-- ReduceAction => ExecutableNode::handler
-- RemoveStructuralFeatureValueAction => ExecutableNode::handler
-- RemoveVariableValueAction => ExecutableNode::handler
-- ReplyAction => ExecutableNode::handler
-- SendObjectAction => ExecutableNode::handler
-- SendSignalAction => ExecutableNode::handler
-- SequenceNode => ExecutableNode::handler
-- StartClassifierBehaviorAction => ExecutableNode::handler
-- StartObjectBehaviorAction => ExecutableNode::handler
-- StructuredActivityNode => ExecutableNode::handler
-- TestIdentityAction => ExecutableNode::handler
-- UnmarshallAction => ExecutableNode::handler
-- ValueSpecificationAction => ExecutableNode::handler
function Internal_Get_Handler_Body
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Handler_Body
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExceptionHandler => ExceptionHandler::handlerBody
function Internal_Get_Heading
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Heading
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLActivityDiagram => UMLDiagram::heading
-- UMLClassDiagram => UMLDiagram::heading
-- UMLComponentDiagram => UMLDiagram::heading
-- UMLCompositeStructureDiagram => UMLDiagram::heading
-- UMLDeploymentDiagram => UMLDiagram::heading
-- UMLInteractionDiagram => UMLDiagram::heading
-- UMLObjectDiagram => UMLDiagram::heading
-- UMLPackageDiagram => UMLDiagram::heading
-- UMLProfileDiagram => UMLDiagram::heading
-- UMLStateMachineDiagram => UMLDiagram::heading
-- UMLUseCaseDiagram => UMLDiagram::heading
function Internal_Get_Icon
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Stereotype => Stereotype::icon
function Internal_Get_Implementing_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Implementing_Classifier
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InterfaceRealization => InterfaceRealization::implementingClassifier
function Internal_Get_Imported_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Imported_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ElementImport => ElementImport::importedElement
function Internal_Get_Imported_Member
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Namespace::importedMember
-- Actor => Namespace::importedMember
-- Artifact => Namespace::importedMember
-- Association => Namespace::importedMember
-- AssociationClass => Namespace::importedMember
-- Class => Namespace::importedMember
-- Collaboration => Namespace::importedMember
-- CommunicationPath => Namespace::importedMember
-- Component => Namespace::importedMember
-- ConditionalNode => Namespace::importedMember
-- DataType => Namespace::importedMember
-- DeploymentSpecification => Namespace::importedMember
-- Device => Namespace::importedMember
-- Enumeration => Namespace::importedMember
-- ExecutionEnvironment => Namespace::importedMember
-- ExpansionRegion => Namespace::importedMember
-- Extension => Namespace::importedMember
-- FinalState => Namespace::importedMember
-- FunctionBehavior => Namespace::importedMember
-- InformationItem => Namespace::importedMember
-- Interaction => Namespace::importedMember
-- InteractionOperand => Namespace::importedMember
-- Interface => Namespace::importedMember
-- LoopNode => Namespace::importedMember
-- Model => Namespace::importedMember
-- Node => Namespace::importedMember
-- OpaqueBehavior => Namespace::importedMember
-- Operation => Namespace::importedMember
-- Package => Namespace::importedMember
-- PrimitiveType => Namespace::importedMember
-- Profile => Namespace::importedMember
-- ProtocolStateMachine => Namespace::importedMember
-- ProtocolTransition => Namespace::importedMember
-- Reception => Namespace::importedMember
-- Region => Namespace::importedMember
-- SequenceNode => Namespace::importedMember
-- Signal => Namespace::importedMember
-- State => Namespace::importedMember
-- StateMachine => Namespace::importedMember
-- Stereotype => Namespace::importedMember
-- StructuredActivityNode => Namespace::importedMember
-- Transition => Namespace::importedMember
-- UseCase => Namespace::importedMember
function Internal_Get_Imported_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Imported_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- PackageImport => PackageImport::importedPackage
function Internal_Get_Importing_Namespace
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Importing_Namespace
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ElementImport => ElementImport::importingNamespace
-- PackageImport => PackageImport::importingNamespace
function Internal_Get_In_Activity
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_In_Activity
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActivityPartition => ActivityGroup::inActivity
-- ConditionalNode => ActivityGroup::inActivity
-- ExpansionRegion => ActivityGroup::inActivity
-- InterruptibleActivityRegion => ActivityGroup::inActivity
-- LoopNode => ActivityGroup::inActivity
-- SequenceNode => ActivityGroup::inActivity
-- StructuredActivityNode => ActivityGroup::inActivity
function Internal_Get_In_Group
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ActivityNode::inGroup
-- AcceptEventAction => ActivityNode::inGroup
-- ActionInputPin => ActivityNode::inGroup
-- ActivityFinalNode => ActivityNode::inGroup
-- ActivityParameterNode => ActivityNode::inGroup
-- AddStructuralFeatureValueAction => ActivityNode::inGroup
-- AddVariableValueAction => ActivityNode::inGroup
-- BroadcastSignalAction => ActivityNode::inGroup
-- CallBehaviorAction => ActivityNode::inGroup
-- CallOperationAction => ActivityNode::inGroup
-- CentralBufferNode => ActivityNode::inGroup
-- ClearAssociationAction => ActivityNode::inGroup
-- ClearStructuralFeatureAction => ActivityNode::inGroup
-- ClearVariableAction => ActivityNode::inGroup
-- ConditionalNode => ActivityNode::inGroup
-- ControlFlow => ActivityEdge::inGroup
-- CreateLinkAction => ActivityNode::inGroup
-- CreateLinkObjectAction => ActivityNode::inGroup
-- CreateObjectAction => ActivityNode::inGroup
-- DataStoreNode => ActivityNode::inGroup
-- DecisionNode => ActivityNode::inGroup
-- DestroyLinkAction => ActivityNode::inGroup
-- DestroyObjectAction => ActivityNode::inGroup
-- ExpansionNode => ActivityNode::inGroup
-- ExpansionRegion => ActivityNode::inGroup
-- FlowFinalNode => ActivityNode::inGroup
-- ForkNode => ActivityNode::inGroup
-- InitialNode => ActivityNode::inGroup
-- InputPin => ActivityNode::inGroup
-- JoinNode => ActivityNode::inGroup
-- LoopNode => ActivityNode::inGroup
-- MergeNode => ActivityNode::inGroup
-- ObjectFlow => ActivityEdge::inGroup
-- OpaqueAction => ActivityNode::inGroup
-- OutputPin => ActivityNode::inGroup
-- RaiseExceptionAction => ActivityNode::inGroup
-- ReadExtentAction => ActivityNode::inGroup
-- ReadIsClassifiedObjectAction => ActivityNode::inGroup
-- ReadLinkAction => ActivityNode::inGroup
-- ReadLinkObjectEndAction => ActivityNode::inGroup
-- ReadLinkObjectEndQualifierAction => ActivityNode::inGroup
-- ReadSelfAction => ActivityNode::inGroup
-- ReadStructuralFeatureAction => ActivityNode::inGroup
-- ReadVariableAction => ActivityNode::inGroup
-- ReclassifyObjectAction => ActivityNode::inGroup
-- ReduceAction => ActivityNode::inGroup
-- RemoveStructuralFeatureValueAction => ActivityNode::inGroup
-- RemoveVariableValueAction => ActivityNode::inGroup
-- ReplyAction => ActivityNode::inGroup
-- SendObjectAction => ActivityNode::inGroup
-- SendSignalAction => ActivityNode::inGroup
-- SequenceNode => ActivityNode::inGroup
-- StartClassifierBehaviorAction => ActivityNode::inGroup
-- StartObjectBehaviorAction => ActivityNode::inGroup
-- StructuredActivityNode => ActivityNode::inGroup
-- TestIdentityAction => ActivityNode::inGroup
-- UnmarshallAction => ActivityNode::inGroup
-- ValuePin => ActivityNode::inGroup
-- ValueSpecificationAction => ActivityNode::inGroup
function Internal_Get_In_Interruptible_Region
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ActivityNode::inInterruptibleRegion
-- AcceptEventAction => ActivityNode::inInterruptibleRegion
-- ActionInputPin => ActivityNode::inInterruptibleRegion
-- ActivityFinalNode => ActivityNode::inInterruptibleRegion
-- ActivityParameterNode => ActivityNode::inInterruptibleRegion
-- AddStructuralFeatureValueAction => ActivityNode::inInterruptibleRegion
-- AddVariableValueAction => ActivityNode::inInterruptibleRegion
-- BroadcastSignalAction => ActivityNode::inInterruptibleRegion
-- CallBehaviorAction => ActivityNode::inInterruptibleRegion
-- CallOperationAction => ActivityNode::inInterruptibleRegion
-- CentralBufferNode => ActivityNode::inInterruptibleRegion
-- ClearAssociationAction => ActivityNode::inInterruptibleRegion
-- ClearStructuralFeatureAction => ActivityNode::inInterruptibleRegion
-- ClearVariableAction => ActivityNode::inInterruptibleRegion
-- ConditionalNode => ActivityNode::inInterruptibleRegion
-- CreateLinkAction => ActivityNode::inInterruptibleRegion
-- CreateLinkObjectAction => ActivityNode::inInterruptibleRegion
-- CreateObjectAction => ActivityNode::inInterruptibleRegion
-- DataStoreNode => ActivityNode::inInterruptibleRegion
-- DecisionNode => ActivityNode::inInterruptibleRegion
-- DestroyLinkAction => ActivityNode::inInterruptibleRegion
-- DestroyObjectAction => ActivityNode::inInterruptibleRegion
-- ExpansionNode => ActivityNode::inInterruptibleRegion
-- ExpansionRegion => ActivityNode::inInterruptibleRegion
-- FlowFinalNode => ActivityNode::inInterruptibleRegion
-- ForkNode => ActivityNode::inInterruptibleRegion
-- InitialNode => ActivityNode::inInterruptibleRegion
-- InputPin => ActivityNode::inInterruptibleRegion
-- JoinNode => ActivityNode::inInterruptibleRegion
-- LoopNode => ActivityNode::inInterruptibleRegion
-- MergeNode => ActivityNode::inInterruptibleRegion
-- OpaqueAction => ActivityNode::inInterruptibleRegion
-- OutputPin => ActivityNode::inInterruptibleRegion
-- RaiseExceptionAction => ActivityNode::inInterruptibleRegion
-- ReadExtentAction => ActivityNode::inInterruptibleRegion
-- ReadIsClassifiedObjectAction => ActivityNode::inInterruptibleRegion
-- ReadLinkAction => ActivityNode::inInterruptibleRegion
-- ReadLinkObjectEndAction => ActivityNode::inInterruptibleRegion
-- ReadLinkObjectEndQualifierAction => ActivityNode::inInterruptibleRegion
-- ReadSelfAction => ActivityNode::inInterruptibleRegion
-- ReadStructuralFeatureAction => ActivityNode::inInterruptibleRegion
-- ReadVariableAction => ActivityNode::inInterruptibleRegion
-- ReclassifyObjectAction => ActivityNode::inInterruptibleRegion
-- ReduceAction => ActivityNode::inInterruptibleRegion
-- RemoveStructuralFeatureValueAction => ActivityNode::inInterruptibleRegion
-- RemoveVariableValueAction => ActivityNode::inInterruptibleRegion
-- ReplyAction => ActivityNode::inInterruptibleRegion
-- SendObjectAction => ActivityNode::inInterruptibleRegion
-- SendSignalAction => ActivityNode::inInterruptibleRegion
-- SequenceNode => ActivityNode::inInterruptibleRegion
-- StartClassifierBehaviorAction => ActivityNode::inInterruptibleRegion
-- StartObjectBehaviorAction => ActivityNode::inInterruptibleRegion
-- StructuredActivityNode => ActivityNode::inInterruptibleRegion
-- TestIdentityAction => ActivityNode::inInterruptibleRegion
-- UnmarshallAction => ActivityNode::inInterruptibleRegion
-- ValuePin => ActivityNode::inInterruptibleRegion
-- ValueSpecificationAction => ActivityNode::inInterruptibleRegion
function Internal_Get_In_Partition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ActivityNode::inPartition
-- AcceptEventAction => ActivityNode::inPartition
-- ActionInputPin => ActivityNode::inPartition
-- ActivityFinalNode => ActivityNode::inPartition
-- ActivityParameterNode => ActivityNode::inPartition
-- AddStructuralFeatureValueAction => ActivityNode::inPartition
-- AddVariableValueAction => ActivityNode::inPartition
-- BroadcastSignalAction => ActivityNode::inPartition
-- CallBehaviorAction => ActivityNode::inPartition
-- CallOperationAction => ActivityNode::inPartition
-- CentralBufferNode => ActivityNode::inPartition
-- ClearAssociationAction => ActivityNode::inPartition
-- ClearStructuralFeatureAction => ActivityNode::inPartition
-- ClearVariableAction => ActivityNode::inPartition
-- ConditionalNode => ActivityNode::inPartition
-- ControlFlow => ActivityEdge::inPartition
-- CreateLinkAction => ActivityNode::inPartition
-- CreateLinkObjectAction => ActivityNode::inPartition
-- CreateObjectAction => ActivityNode::inPartition
-- DataStoreNode => ActivityNode::inPartition
-- DecisionNode => ActivityNode::inPartition
-- DestroyLinkAction => ActivityNode::inPartition
-- DestroyObjectAction => ActivityNode::inPartition
-- ExpansionNode => ActivityNode::inPartition
-- ExpansionRegion => ActivityNode::inPartition
-- FlowFinalNode => ActivityNode::inPartition
-- ForkNode => ActivityNode::inPartition
-- InitialNode => ActivityNode::inPartition
-- InputPin => ActivityNode::inPartition
-- JoinNode => ActivityNode::inPartition
-- LoopNode => ActivityNode::inPartition
-- MergeNode => ActivityNode::inPartition
-- ObjectFlow => ActivityEdge::inPartition
-- OpaqueAction => ActivityNode::inPartition
-- OutputPin => ActivityNode::inPartition
-- RaiseExceptionAction => ActivityNode::inPartition
-- ReadExtentAction => ActivityNode::inPartition
-- ReadIsClassifiedObjectAction => ActivityNode::inPartition
-- ReadLinkAction => ActivityNode::inPartition
-- ReadLinkObjectEndAction => ActivityNode::inPartition
-- ReadLinkObjectEndQualifierAction => ActivityNode::inPartition
-- ReadSelfAction => ActivityNode::inPartition
-- ReadStructuralFeatureAction => ActivityNode::inPartition
-- ReadVariableAction => ActivityNode::inPartition
-- ReclassifyObjectAction => ActivityNode::inPartition
-- ReduceAction => ActivityNode::inPartition
-- RemoveStructuralFeatureValueAction => ActivityNode::inPartition
-- RemoveVariableValueAction => ActivityNode::inPartition
-- ReplyAction => ActivityNode::inPartition
-- SendObjectAction => ActivityNode::inPartition
-- SendSignalAction => ActivityNode::inPartition
-- SequenceNode => ActivityNode::inPartition
-- StartClassifierBehaviorAction => ActivityNode::inPartition
-- StartObjectBehaviorAction => ActivityNode::inPartition
-- StructuredActivityNode => ActivityNode::inPartition
-- TestIdentityAction => ActivityNode::inPartition
-- UnmarshallAction => ActivityNode::inPartition
-- ValuePin => ActivityNode::inPartition
-- ValueSpecificationAction => ActivityNode::inPartition
function Internal_Get_In_State
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActionInputPin => ObjectNode::inState
-- ActivityParameterNode => ObjectNode::inState
-- CentralBufferNode => ObjectNode::inState
-- DataStoreNode => ObjectNode::inState
-- ExpansionNode => ObjectNode::inState
-- InputPin => ObjectNode::inState
-- OutputPin => ObjectNode::inState
-- ValuePin => ObjectNode::inState
function Internal_Get_In_Structured_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_In_Structured_Node
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AcceptCallAction => ActivityNode::inStructuredNode
-- AcceptEventAction => ActivityNode::inStructuredNode
-- ActionInputPin => ActivityNode::inStructuredNode
-- ActivityFinalNode => ActivityNode::inStructuredNode
-- ActivityParameterNode => ActivityNode::inStructuredNode
-- AddStructuralFeatureValueAction => ActivityNode::inStructuredNode
-- AddVariableValueAction => ActivityNode::inStructuredNode
-- BroadcastSignalAction => ActivityNode::inStructuredNode
-- CallBehaviorAction => ActivityNode::inStructuredNode
-- CallOperationAction => ActivityNode::inStructuredNode
-- CentralBufferNode => ActivityNode::inStructuredNode
-- ClearAssociationAction => ActivityNode::inStructuredNode
-- ClearStructuralFeatureAction => ActivityNode::inStructuredNode
-- ClearVariableAction => ActivityNode::inStructuredNode
-- ConditionalNode => ActivityNode::inStructuredNode
-- ControlFlow => ActivityEdge::inStructuredNode
-- CreateLinkAction => ActivityNode::inStructuredNode
-- CreateLinkObjectAction => ActivityNode::inStructuredNode
-- CreateObjectAction => ActivityNode::inStructuredNode
-- DataStoreNode => ActivityNode::inStructuredNode
-- DecisionNode => ActivityNode::inStructuredNode
-- DestroyLinkAction => ActivityNode::inStructuredNode
-- DestroyObjectAction => ActivityNode::inStructuredNode
-- ExpansionNode => ActivityNode::inStructuredNode
-- ExpansionRegion => ActivityNode::inStructuredNode
-- FlowFinalNode => ActivityNode::inStructuredNode
-- ForkNode => ActivityNode::inStructuredNode
-- InitialNode => ActivityNode::inStructuredNode
-- InputPin => ActivityNode::inStructuredNode
-- JoinNode => ActivityNode::inStructuredNode
-- LoopNode => ActivityNode::inStructuredNode
-- MergeNode => ActivityNode::inStructuredNode
-- ObjectFlow => ActivityEdge::inStructuredNode
-- OpaqueAction => ActivityNode::inStructuredNode
-- OutputPin => ActivityNode::inStructuredNode
-- RaiseExceptionAction => ActivityNode::inStructuredNode
-- ReadExtentAction => ActivityNode::inStructuredNode
-- ReadIsClassifiedObjectAction => ActivityNode::inStructuredNode
-- ReadLinkAction => ActivityNode::inStructuredNode
-- ReadLinkObjectEndAction => ActivityNode::inStructuredNode
-- ReadLinkObjectEndQualifierAction => ActivityNode::inStructuredNode
-- ReadSelfAction => ActivityNode::inStructuredNode
-- ReadStructuralFeatureAction => ActivityNode::inStructuredNode
-- ReadVariableAction => ActivityNode::inStructuredNode
-- ReclassifyObjectAction => ActivityNode::inStructuredNode
-- ReduceAction => ActivityNode::inStructuredNode
-- RemoveStructuralFeatureValueAction => ActivityNode::inStructuredNode
-- RemoveVariableValueAction => ActivityNode::inStructuredNode
-- ReplyAction => ActivityNode::inStructuredNode
-- SendObjectAction => ActivityNode::inStructuredNode
-- SendSignalAction => ActivityNode::inStructuredNode
-- SequenceNode => ActivityNode::inStructuredNode
-- StartClassifierBehaviorAction => ActivityNode::inStructuredNode
-- StartObjectBehaviorAction => ActivityNode::inStructuredNode
-- StructuredActivityNode => ActivityNode::inStructuredNode
-- TestIdentityAction => ActivityNode::inStructuredNode
-- UnmarshallAction => ActivityNode::inStructuredNode
-- ValuePin => ActivityNode::inStructuredNode
-- ValueSpecificationAction => ActivityNode::inStructuredNode
function Internal_Get_Include
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UseCase => UseCase::include
function Internal_Get_Including_Case
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Including_Case
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Include => Include::includingCase
function Internal_Get_Incoming
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ActivityNode::incoming
-- AcceptEventAction => ActivityNode::incoming
-- ActionInputPin => ActivityNode::incoming
-- ActivityFinalNode => ActivityNode::incoming
-- ActivityParameterNode => ActivityNode::incoming
-- AddStructuralFeatureValueAction => ActivityNode::incoming
-- AddVariableValueAction => ActivityNode::incoming
-- BroadcastSignalAction => ActivityNode::incoming
-- CallBehaviorAction => ActivityNode::incoming
-- CallOperationAction => ActivityNode::incoming
-- CentralBufferNode => ActivityNode::incoming
-- ClearAssociationAction => ActivityNode::incoming
-- ClearStructuralFeatureAction => ActivityNode::incoming
-- ClearVariableAction => ActivityNode::incoming
-- ConditionalNode => ActivityNode::incoming
-- ConnectionPointReference => Vertex::incoming
-- CreateLinkAction => ActivityNode::incoming
-- CreateLinkObjectAction => ActivityNode::incoming
-- CreateObjectAction => ActivityNode::incoming
-- DataStoreNode => ActivityNode::incoming
-- DecisionNode => ActivityNode::incoming
-- DestroyLinkAction => ActivityNode::incoming
-- DestroyObjectAction => ActivityNode::incoming
-- ExpansionNode => ActivityNode::incoming
-- ExpansionRegion => ActivityNode::incoming
-- FinalState => Vertex::incoming
-- FlowFinalNode => ActivityNode::incoming
-- ForkNode => ActivityNode::incoming
-- InitialNode => ActivityNode::incoming
-- InputPin => ActivityNode::incoming
-- JoinNode => ActivityNode::incoming
-- LoopNode => ActivityNode::incoming
-- MergeNode => ActivityNode::incoming
-- OpaqueAction => ActivityNode::incoming
-- OutputPin => ActivityNode::incoming
-- Pseudostate => Vertex::incoming
-- RaiseExceptionAction => ActivityNode::incoming
-- ReadExtentAction => ActivityNode::incoming
-- ReadIsClassifiedObjectAction => ActivityNode::incoming
-- ReadLinkAction => ActivityNode::incoming
-- ReadLinkObjectEndAction => ActivityNode::incoming
-- ReadLinkObjectEndQualifierAction => ActivityNode::incoming
-- ReadSelfAction => ActivityNode::incoming
-- ReadStructuralFeatureAction => ActivityNode::incoming
-- ReadVariableAction => ActivityNode::incoming
-- ReclassifyObjectAction => ActivityNode::incoming
-- ReduceAction => ActivityNode::incoming
-- RemoveStructuralFeatureValueAction => ActivityNode::incoming
-- RemoveVariableValueAction => ActivityNode::incoming
-- ReplyAction => ActivityNode::incoming
-- SendObjectAction => ActivityNode::incoming
-- SendSignalAction => ActivityNode::incoming
-- SequenceNode => ActivityNode::incoming
-- StartClassifierBehaviorAction => ActivityNode::incoming
-- StartObjectBehaviorAction => ActivityNode::incoming
-- State => Vertex::incoming
-- StructuredActivityNode => ActivityNode::incoming
-- TestIdentityAction => ActivityNode::incoming
-- UnmarshallAction => ActivityNode::incoming
-- ValuePin => ActivityNode::incoming
-- ValueSpecificationAction => ActivityNode::incoming
function Internal_Get_Information_Source
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationFlow => InformationFlow::informationSource
function Internal_Get_Information_Target
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationFlow => InformationFlow::informationTarget
function Internal_Get_Inherited_Member
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::inheritedMember
-- Actor => Classifier::inheritedMember
-- Artifact => Classifier::inheritedMember
-- Association => Classifier::inheritedMember
-- AssociationClass => Classifier::inheritedMember
-- Class => Classifier::inheritedMember
-- Collaboration => Classifier::inheritedMember
-- CommunicationPath => Classifier::inheritedMember
-- Component => Classifier::inheritedMember
-- DataType => Classifier::inheritedMember
-- DeploymentSpecification => Classifier::inheritedMember
-- Device => Classifier::inheritedMember
-- Enumeration => Classifier::inheritedMember
-- ExecutionEnvironment => Classifier::inheritedMember
-- Extension => Classifier::inheritedMember
-- FunctionBehavior => Classifier::inheritedMember
-- InformationItem => Classifier::inheritedMember
-- Interaction => Classifier::inheritedMember
-- Interface => Classifier::inheritedMember
-- Node => Classifier::inheritedMember
-- OpaqueBehavior => Classifier::inheritedMember
-- PrimitiveType => Classifier::inheritedMember
-- ProtocolStateMachine => Classifier::inheritedMember
-- Signal => Classifier::inheritedMember
-- StateMachine => Classifier::inheritedMember
-- Stereotype => Classifier::inheritedMember
-- UseCase => Classifier::inheritedMember
function Internal_Get_Inherited_Parameter
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- RedefinableTemplateSignature => RedefinableTemplateSignature::inheritedParameter
function Internal_Get_Inherited_State_Border
(Self : AMF.Internals.AMF_Element)
return AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind;
procedure Internal_Set_Inherited_State_Border
(Self : AMF.Internals.AMF_Element;
To : AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind);
-- UMLStateMachineDiagram => UMLStateMachineDiagram::inheritedStateBorder
function Internal_Get_Input
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => Action::input
-- AcceptEventAction => Action::input
-- AddStructuralFeatureValueAction => Action::input
-- AddVariableValueAction => Action::input
-- BroadcastSignalAction => Action::input
-- CallBehaviorAction => Action::input
-- CallOperationAction => Action::input
-- ClearAssociationAction => Action::input
-- ClearStructuralFeatureAction => Action::input
-- ClearVariableAction => Action::input
-- ConditionalNode => Action::input
-- CreateLinkAction => Action::input
-- CreateLinkObjectAction => Action::input
-- CreateObjectAction => Action::input
-- DestroyLinkAction => Action::input
-- DestroyObjectAction => Action::input
-- ExpansionRegion => Action::input
-- LoopNode => Action::input
-- OpaqueAction => Action::input
-- RaiseExceptionAction => Action::input
-- ReadExtentAction => Action::input
-- ReadIsClassifiedObjectAction => Action::input
-- ReadLinkAction => Action::input
-- ReadLinkObjectEndAction => Action::input
-- ReadLinkObjectEndQualifierAction => Action::input
-- ReadSelfAction => Action::input
-- ReadStructuralFeatureAction => Action::input
-- ReadVariableAction => Action::input
-- ReclassifyObjectAction => Action::input
-- ReduceAction => Action::input
-- RemoveStructuralFeatureValueAction => Action::input
-- RemoveVariableValueAction => Action::input
-- ReplyAction => Action::input
-- SendObjectAction => Action::input
-- SendSignalAction => Action::input
-- SequenceNode => Action::input
-- StartClassifierBehaviorAction => Action::input
-- StartObjectBehaviorAction => Action::input
-- StructuredActivityNode => Action::input
-- TestIdentityAction => Action::input
-- UnmarshallAction => Action::input
-- ValueSpecificationAction => Action::input
function Internal_Get_Input_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ExpansionRegion => ExpansionRegion::inputElement
function Internal_Get_Input_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- CreateLinkAction => LinkAction::inputValue
-- CreateLinkObjectAction => LinkAction::inputValue
-- DestroyLinkAction => LinkAction::inputValue
-- OpaqueAction => OpaqueAction::inputValue
-- ReadLinkAction => LinkAction::inputValue
function Internal_Get_Insert_At
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Insert_At
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AddStructuralFeatureValueAction => AddStructuralFeatureValueAction::insertAt
-- AddVariableValueAction => AddVariableValueAction::insertAt
-- LinkEndCreationData => LinkEndCreationData::insertAt
function Internal_Get_Instance
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Instance
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InstanceValue => InstanceValue::instance
function Internal_Get_Interaction
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Interaction
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Lifeline => Lifeline::interaction
-- Message => Message::interaction
function Internal_Get_Interaction_Operator
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Interaction_Operator_Kind;
procedure Internal_Set_Interaction_Operator
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Interaction_Operator_Kind);
-- CombinedFragment => CombinedFragment::interactionOperator
-- ConsiderIgnoreFragment => CombinedFragment::interactionOperator
function Internal_Get_Interface
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Interface
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::interface
-- Operation => Operation::interface
-- Port => Property::interface
-- Property => Property::interface
function Internal_Get_Interface_Realization
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => BehavioredClassifier::interfaceRealization
-- Actor => BehavioredClassifier::interfaceRealization
-- AssociationClass => BehavioredClassifier::interfaceRealization
-- Class => BehavioredClassifier::interfaceRealization
-- Collaboration => BehavioredClassifier::interfaceRealization
-- Component => BehavioredClassifier::interfaceRealization
-- Device => BehavioredClassifier::interfaceRealization
-- ExecutionEnvironment => BehavioredClassifier::interfaceRealization
-- FunctionBehavior => BehavioredClassifier::interfaceRealization
-- Interaction => BehavioredClassifier::interfaceRealization
-- Node => BehavioredClassifier::interfaceRealization
-- OpaqueBehavior => BehavioredClassifier::interfaceRealization
-- ProtocolStateMachine => BehavioredClassifier::interfaceRealization
-- StateMachine => BehavioredClassifier::interfaceRealization
-- Stereotype => BehavioredClassifier::interfaceRealization
-- UseCase => BehavioredClassifier::interfaceRealization
function Internal_Get_Interrupting_Edge
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InterruptibleActivityRegion => InterruptibleActivityRegion::interruptingEdge
function Internal_Get_Interrupts
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Interrupts
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ControlFlow => ActivityEdge::interrupts
-- ObjectFlow => ActivityEdge::interrupts
function Internal_Get_Invariant
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Invariant
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- StateInvariant => StateInvariant::invariant
function Internal_Get_Is_Abstract
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Abstract
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Activity => Class::isAbstract
-- Actor => Classifier::isAbstract
-- Artifact => Classifier::isAbstract
-- Association => Classifier::isAbstract
-- AssociationClass => Class::isAbstract
-- Class => Class::isAbstract
-- Collaboration => Classifier::isAbstract
-- CommunicationPath => Classifier::isAbstract
-- Component => Class::isAbstract
-- DataType => Classifier::isAbstract
-- DeploymentSpecification => Classifier::isAbstract
-- Device => Class::isAbstract
-- Enumeration => Classifier::isAbstract
-- ExecutionEnvironment => Class::isAbstract
-- Extension => Classifier::isAbstract
-- FunctionBehavior => Class::isAbstract
-- InformationItem => Classifier::isAbstract
-- Interaction => Class::isAbstract
-- Interface => Classifier::isAbstract
-- Node => Class::isAbstract
-- OpaqueBehavior => Class::isAbstract
-- Operation => BehavioralFeature::isAbstract
-- PrimitiveType => Classifier::isAbstract
-- ProtocolStateMachine => Class::isAbstract
-- Reception => BehavioralFeature::isAbstract
-- Signal => Classifier::isAbstract
-- StateMachine => Class::isAbstract
-- Stereotype => Class::isAbstract
-- UseCase => Classifier::isAbstract
function Internal_Get_Is_Active
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Active
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Activity => Class::isActive
-- AssociationClass => Class::isActive
-- Class => Class::isActive
-- Component => Class::isActive
-- Device => Class::isActive
-- ExecutionEnvironment => Class::isActive
-- FunctionBehavior => Class::isActive
-- Interaction => Class::isActive
-- Node => Class::isActive
-- OpaqueBehavior => Class::isActive
-- ProtocolStateMachine => Class::isActive
-- StateMachine => Class::isActive
-- Stereotype => Class::isActive
function Internal_Get_Is_Activity_Frame
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Activity_Frame
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLActivityDiagram => UMLActivityDiagram::isActivityFrame
function Internal_Get_Is_Association_Dot_Shown
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Association_Dot_Shown
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLClassDiagram => UMLClassOrCompositeStructureDiagram::isAssociationDotShown
-- UMLCompositeStructureDiagram => UMLClassOrCompositeStructureDiagram::isAssociationDotShown
function Internal_Get_Is_Assured
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Assured
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ConditionalNode => ConditionalNode::isAssured
function Internal_Get_Is_Behavior
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Behavior
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Port => Port::isBehavior
function Internal_Get_Is_Collapse_State_Icon
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Collapse_State_Icon
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLStateMachineDiagram => UMLStateMachineDiagram::isCollapseStateIcon
function Internal_Get_Is_Combine_Duplicate
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Combine_Duplicate
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- JoinNode => JoinNode::isCombineDuplicate
function Internal_Get_Is_Composite
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Composite
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ExtensionEnd => Property::isComposite
-- FinalState => State::isComposite
-- Port => Property::isComposite
-- Property => Property::isComposite
-- State => State::isComposite
function Internal_Get_Is_Conjugated
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Conjugated
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Port => Port::isConjugated
function Internal_Get_Is_Control
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Control
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ActionInputPin => Pin::isControl
-- InputPin => Pin::isControl
-- OutputPin => Pin::isControl
-- ValuePin => Pin::isControl
function Internal_Get_Is_Control_Type
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Control_Type
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ActionInputPin => ObjectNode::isControlType
-- ActivityParameterNode => ObjectNode::isControlType
-- CentralBufferNode => ObjectNode::isControlType
-- DataStoreNode => ObjectNode::isControlType
-- ExpansionNode => ObjectNode::isControlType
-- InputPin => ObjectNode::isControlType
-- OutputPin => ObjectNode::isControlType
-- ValuePin => ObjectNode::isControlType
function Internal_Get_Is_Covering
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Covering
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- GeneralizationSet => GeneralizationSet::isCovering
function Internal_Get_Is_Derived
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Derived
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Association => Association::isDerived
-- AssociationClass => Association::isDerived
-- CommunicationPath => Association::isDerived
-- Extension => Association::isDerived
-- ExtensionEnd => Property::isDerived
-- Port => Property::isDerived
-- Property => Property::isDerived
function Internal_Get_Is_Derived_Union
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Derived_Union
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ExtensionEnd => Property::isDerivedUnion
-- Port => Property::isDerivedUnion
-- Property => Property::isDerivedUnion
function Internal_Get_Is_Destroy_Duplicates
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Destroy_Duplicates
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- LinkEndDestructionData => LinkEndDestructionData::isDestroyDuplicates
function Internal_Get_Is_Destroy_Links
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Destroy_Links
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- DestroyObjectAction => DestroyObjectAction::isDestroyLinks
function Internal_Get_Is_Destroy_Owned_Objects
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Destroy_Owned_Objects
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- DestroyObjectAction => DestroyObjectAction::isDestroyOwnedObjects
function Internal_Get_Is_Determinate
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Determinate
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ConditionalNode => ConditionalNode::isDeterminate
function Internal_Get_Is_Dimension
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Dimension
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ActivityPartition => ActivityPartition::isDimension
function Internal_Get_Is_Direct
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Direct
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ReadIsClassifiedObjectAction => ReadIsClassifiedObjectAction::isDirect
function Internal_Get_Is_Disjoint
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Disjoint
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- GeneralizationSet => GeneralizationSet::isDisjoint
function Internal_Get_Is_Double_Sided
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Double_Sided
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLClassifierShape => UMLClassifierShape::isDoubleSided
function Internal_Get_Is_Exception
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Exception
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Parameter => Parameter::isException
function Internal_Get_Is_External
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_External
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ActivityPartition => ActivityPartition::isExternal
function Internal_Get_Is_Final_Specialization
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Final_Specialization
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Activity => Classifier::isFinalSpecialization
-- Actor => Classifier::isFinalSpecialization
-- Artifact => Classifier::isFinalSpecialization
-- Association => Classifier::isFinalSpecialization
-- AssociationClass => Classifier::isFinalSpecialization
-- Class => Classifier::isFinalSpecialization
-- Collaboration => Classifier::isFinalSpecialization
-- CommunicationPath => Classifier::isFinalSpecialization
-- Component => Classifier::isFinalSpecialization
-- DataType => Classifier::isFinalSpecialization
-- DeploymentSpecification => Classifier::isFinalSpecialization
-- Device => Classifier::isFinalSpecialization
-- Enumeration => Classifier::isFinalSpecialization
-- ExecutionEnvironment => Classifier::isFinalSpecialization
-- Extension => Classifier::isFinalSpecialization
-- FunctionBehavior => Classifier::isFinalSpecialization
-- InformationItem => Classifier::isFinalSpecialization
-- Interaction => Classifier::isFinalSpecialization
-- Interface => Classifier::isFinalSpecialization
-- Node => Classifier::isFinalSpecialization
-- OpaqueBehavior => Classifier::isFinalSpecialization
-- PrimitiveType => Classifier::isFinalSpecialization
-- ProtocolStateMachine => Classifier::isFinalSpecialization
-- Signal => Classifier::isFinalSpecialization
-- StateMachine => Classifier::isFinalSpecialization
-- Stereotype => Classifier::isFinalSpecialization
-- UseCase => Classifier::isFinalSpecialization
function Internal_Get_Is_Frame
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Frame
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLActivityDiagram => UMLDiagram::isFrame
-- UMLClassDiagram => UMLDiagram::isFrame
-- UMLComponentDiagram => UMLDiagram::isFrame
-- UMLCompositeStructureDiagram => UMLDiagram::isFrame
-- UMLDeploymentDiagram => UMLDiagram::isFrame
-- UMLInteractionDiagram => UMLDiagram::isFrame
-- UMLObjectDiagram => UMLDiagram::isFrame
-- UMLPackageDiagram => UMLDiagram::isFrame
-- UMLProfileDiagram => UMLDiagram::isFrame
-- UMLStateMachineDiagram => UMLDiagram::isFrame
-- UMLUseCaseDiagram => UMLDiagram::isFrame
function Internal_Get_Is_ID
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_ID
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ExtensionEnd => Property::isID
-- Port => Property::isID
-- Property => Property::isID
function Internal_Get_Is_Icon
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Icon
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLActivityDiagram => UMLDiagramElement::isIcon
-- UMLAssociationEndLabel => UMLDiagramElement::isIcon
-- UMLAssociationOrConnectorOrLinkShape => UMLDiagramElement::isIcon
-- UMLClassDiagram => UMLDiagramElement::isIcon
-- UMLClassifierShape => UMLDiagramElement::isIcon
-- UMLCompartment => UMLDiagramElement::isIcon
-- UMLCompartmentableShape => UMLDiagramElement::isIcon
-- UMLComponentDiagram => UMLDiagramElement::isIcon
-- UMLCompositeStructureDiagram => UMLDiagramElement::isIcon
-- UMLDeploymentDiagram => UMLDiagramElement::isIcon
-- UMLEdge => UMLDiagramElement::isIcon
-- UMLInteractionDiagram => UMLDiagramElement::isIcon
-- UMLInteractionTableLabel => UMLDiagramElement::isIcon
-- UMLKeywordLabel => UMLDiagramElement::isIcon
-- UMLLabel => UMLDiagramElement::isIcon
-- UMLMultiplicityLabel => UMLDiagramElement::isIcon
-- UMLNameLabel => UMLDiagramElement::isIcon
-- UMLObjectDiagram => UMLDiagramElement::isIcon
-- UMLPackageDiagram => UMLDiagramElement::isIcon
-- UMLProfileDiagram => UMLDiagramElement::isIcon
-- UMLRedefinesLabel => UMLDiagramElement::isIcon
-- UMLShape => UMLDiagramElement::isIcon
-- UMLStateMachineDiagram => UMLDiagramElement::isIcon
-- UMLStateShape => UMLDiagramElement::isIcon
-- UMLStereotypePropertyValueLabel => UMLDiagramElement::isIcon
-- UMLTypedElementLabel => UMLDiagramElement::isIcon
-- UMLUseCaseDiagram => UMLDiagramElement::isIcon
function Internal_Get_Is_Indent_For_Visibility
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Indent_For_Visibility
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLClassifierShape => UMLClassifierShape::isIndentForVisibility
function Internal_Get_Is_Indirectly_Instantiated
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Indirectly_Instantiated
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Component => Component::isIndirectlyInstantiated
function Internal_Get_Is_Iso
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Iso
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLActivityDiagram => UMLDiagram::isIso
-- UMLClassDiagram => UMLDiagram::isIso
-- UMLComponentDiagram => UMLDiagram::isIso
-- UMLCompositeStructureDiagram => UMLDiagram::isIso
-- UMLDeploymentDiagram => UMLDiagram::isIso
-- UMLInteractionDiagram => UMLDiagram::isIso
-- UMLObjectDiagram => UMLDiagram::isIso
-- UMLPackageDiagram => UMLDiagram::isIso
-- UMLProfileDiagram => UMLDiagram::isIso
-- UMLStateMachineDiagram => UMLDiagram::isIso
-- UMLUseCaseDiagram => UMLDiagram::isIso
function Internal_Get_Is_Leaf
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Leaf
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- AcceptCallAction => RedefinableElement::isLeaf
-- AcceptEventAction => RedefinableElement::isLeaf
-- ActionInputPin => RedefinableElement::isLeaf
-- Activity => RedefinableElement::isLeaf
-- ActivityFinalNode => RedefinableElement::isLeaf
-- ActivityParameterNode => RedefinableElement::isLeaf
-- Actor => RedefinableElement::isLeaf
-- AddStructuralFeatureValueAction => RedefinableElement::isLeaf
-- AddVariableValueAction => RedefinableElement::isLeaf
-- Artifact => RedefinableElement::isLeaf
-- Association => RedefinableElement::isLeaf
-- AssociationClass => RedefinableElement::isLeaf
-- BroadcastSignalAction => RedefinableElement::isLeaf
-- CallBehaviorAction => RedefinableElement::isLeaf
-- CallOperationAction => RedefinableElement::isLeaf
-- CentralBufferNode => RedefinableElement::isLeaf
-- Class => RedefinableElement::isLeaf
-- ClearAssociationAction => RedefinableElement::isLeaf
-- ClearStructuralFeatureAction => RedefinableElement::isLeaf
-- ClearVariableAction => RedefinableElement::isLeaf
-- Collaboration => RedefinableElement::isLeaf
-- CommunicationPath => RedefinableElement::isLeaf
-- Component => RedefinableElement::isLeaf
-- ConditionalNode => RedefinableElement::isLeaf
-- Connector => RedefinableElement::isLeaf
-- ControlFlow => RedefinableElement::isLeaf
-- CreateLinkAction => RedefinableElement::isLeaf
-- CreateLinkObjectAction => RedefinableElement::isLeaf
-- CreateObjectAction => RedefinableElement::isLeaf
-- DataStoreNode => RedefinableElement::isLeaf
-- DataType => RedefinableElement::isLeaf
-- DecisionNode => RedefinableElement::isLeaf
-- DeploymentSpecification => RedefinableElement::isLeaf
-- DestroyLinkAction => RedefinableElement::isLeaf
-- DestroyObjectAction => RedefinableElement::isLeaf
-- Device => RedefinableElement::isLeaf
-- Enumeration => RedefinableElement::isLeaf
-- ExecutionEnvironment => RedefinableElement::isLeaf
-- ExpansionNode => RedefinableElement::isLeaf
-- ExpansionRegion => RedefinableElement::isLeaf
-- Extension => RedefinableElement::isLeaf
-- ExtensionEnd => RedefinableElement::isLeaf
-- ExtensionPoint => RedefinableElement::isLeaf
-- FinalState => RedefinableElement::isLeaf
-- FlowFinalNode => RedefinableElement::isLeaf
-- ForkNode => RedefinableElement::isLeaf
-- FunctionBehavior => RedefinableElement::isLeaf
-- InformationItem => RedefinableElement::isLeaf
-- InitialNode => RedefinableElement::isLeaf
-- InputPin => RedefinableElement::isLeaf
-- Interaction => RedefinableElement::isLeaf
-- Interface => RedefinableElement::isLeaf
-- JoinNode => RedefinableElement::isLeaf
-- LoopNode => RedefinableElement::isLeaf
-- MergeNode => RedefinableElement::isLeaf
-- Node => RedefinableElement::isLeaf
-- ObjectFlow => RedefinableElement::isLeaf
-- OpaqueAction => RedefinableElement::isLeaf
-- OpaqueBehavior => RedefinableElement::isLeaf
-- Operation => RedefinableElement::isLeaf
-- OutputPin => RedefinableElement::isLeaf
-- Port => RedefinableElement::isLeaf
-- PrimitiveType => RedefinableElement::isLeaf
-- Property => RedefinableElement::isLeaf
-- ProtocolStateMachine => RedefinableElement::isLeaf
-- ProtocolTransition => RedefinableElement::isLeaf
-- RaiseExceptionAction => RedefinableElement::isLeaf
-- ReadExtentAction => RedefinableElement::isLeaf
-- ReadIsClassifiedObjectAction => RedefinableElement::isLeaf
-- ReadLinkAction => RedefinableElement::isLeaf
-- ReadLinkObjectEndAction => RedefinableElement::isLeaf
-- ReadLinkObjectEndQualifierAction => RedefinableElement::isLeaf
-- ReadSelfAction => RedefinableElement::isLeaf
-- ReadStructuralFeatureAction => RedefinableElement::isLeaf
-- ReadVariableAction => RedefinableElement::isLeaf
-- Reception => RedefinableElement::isLeaf
-- ReclassifyObjectAction => RedefinableElement::isLeaf
-- RedefinableTemplateSignature => RedefinableElement::isLeaf
-- ReduceAction => RedefinableElement::isLeaf
-- Region => RedefinableElement::isLeaf
-- RemoveStructuralFeatureValueAction => RedefinableElement::isLeaf
-- RemoveVariableValueAction => RedefinableElement::isLeaf
-- ReplyAction => RedefinableElement::isLeaf
-- SendObjectAction => RedefinableElement::isLeaf
-- SendSignalAction => RedefinableElement::isLeaf
-- SequenceNode => RedefinableElement::isLeaf
-- Signal => RedefinableElement::isLeaf
-- StartClassifierBehaviorAction => RedefinableElement::isLeaf
-- StartObjectBehaviorAction => RedefinableElement::isLeaf
-- State => RedefinableElement::isLeaf
-- StateMachine => RedefinableElement::isLeaf
-- Stereotype => RedefinableElement::isLeaf
-- StructuredActivityNode => RedefinableElement::isLeaf
-- TestIdentityAction => RedefinableElement::isLeaf
-- Transition => RedefinableElement::isLeaf
-- UnmarshallAction => RedefinableElement::isLeaf
-- UseCase => RedefinableElement::isLeaf
-- ValuePin => RedefinableElement::isLeaf
-- ValueSpecificationAction => RedefinableElement::isLeaf
function Internal_Get_Is_Locally_Reentrant
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Locally_Reentrant
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- AcceptCallAction => Action::isLocallyReentrant
-- AcceptEventAction => Action::isLocallyReentrant
-- AddStructuralFeatureValueAction => Action::isLocallyReentrant
-- AddVariableValueAction => Action::isLocallyReentrant
-- BroadcastSignalAction => Action::isLocallyReentrant
-- CallBehaviorAction => Action::isLocallyReentrant
-- CallOperationAction => Action::isLocallyReentrant
-- ClearAssociationAction => Action::isLocallyReentrant
-- ClearStructuralFeatureAction => Action::isLocallyReentrant
-- ClearVariableAction => Action::isLocallyReentrant
-- ConditionalNode => Action::isLocallyReentrant
-- CreateLinkAction => Action::isLocallyReentrant
-- CreateLinkObjectAction => Action::isLocallyReentrant
-- CreateObjectAction => Action::isLocallyReentrant
-- DestroyLinkAction => Action::isLocallyReentrant
-- DestroyObjectAction => Action::isLocallyReentrant
-- ExpansionRegion => Action::isLocallyReentrant
-- LoopNode => Action::isLocallyReentrant
-- OpaqueAction => Action::isLocallyReentrant
-- RaiseExceptionAction => Action::isLocallyReentrant
-- ReadExtentAction => Action::isLocallyReentrant
-- ReadIsClassifiedObjectAction => Action::isLocallyReentrant
-- ReadLinkAction => Action::isLocallyReentrant
-- ReadLinkObjectEndAction => Action::isLocallyReentrant
-- ReadLinkObjectEndQualifierAction => Action::isLocallyReentrant
-- ReadSelfAction => Action::isLocallyReentrant
-- ReadStructuralFeatureAction => Action::isLocallyReentrant
-- ReadVariableAction => Action::isLocallyReentrant
-- ReclassifyObjectAction => Action::isLocallyReentrant
-- ReduceAction => Action::isLocallyReentrant
-- RemoveStructuralFeatureValueAction => Action::isLocallyReentrant
-- RemoveVariableValueAction => Action::isLocallyReentrant
-- ReplyAction => Action::isLocallyReentrant
-- SendObjectAction => Action::isLocallyReentrant
-- SendSignalAction => Action::isLocallyReentrant
-- SequenceNode => Action::isLocallyReentrant
-- StartClassifierBehaviorAction => Action::isLocallyReentrant
-- StartObjectBehaviorAction => Action::isLocallyReentrant
-- StructuredActivityNode => Action::isLocallyReentrant
-- TestIdentityAction => Action::isLocallyReentrant
-- UnmarshallAction => Action::isLocallyReentrant
-- ValueSpecificationAction => Action::isLocallyReentrant
function Internal_Get_Is_Multicast
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Multicast
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ObjectFlow => ObjectFlow::isMulticast
function Internal_Get_Is_Multireceive
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Multireceive
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ObjectFlow => ObjectFlow::isMultireceive
function Internal_Get_Is_Ordered
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Ordered
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ActionInputPin => MultiplicityElement::isOrdered
-- ConnectorEnd => MultiplicityElement::isOrdered
-- ExtensionEnd => MultiplicityElement::isOrdered
-- InputPin => MultiplicityElement::isOrdered
-- Operation => Operation::isOrdered
-- OutputPin => MultiplicityElement::isOrdered
-- Parameter => MultiplicityElement::isOrdered
-- Port => MultiplicityElement::isOrdered
-- Property => MultiplicityElement::isOrdered
-- ReduceAction => ReduceAction::isOrdered
-- ValuePin => MultiplicityElement::isOrdered
-- Variable => MultiplicityElement::isOrdered
function Internal_Get_Is_Orthogonal
(Self : AMF.Internals.AMF_Element)
return Boolean;
-- FinalState => State::isOrthogonal
-- State => State::isOrthogonal
function Internal_Get_Is_Query
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Query
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Operation => Operation::isQuery
function Internal_Get_Is_Read_Only
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Read_Only
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Activity => Activity::isReadOnly
-- ExtensionEnd => Property::isReadOnly
-- Port => Property::isReadOnly
-- Property => Property::isReadOnly
function Internal_Get_Is_Reentrant
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Reentrant
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Activity => Behavior::isReentrant
-- FunctionBehavior => Behavior::isReentrant
-- Interaction => Behavior::isReentrant
-- OpaqueBehavior => Behavior::isReentrant
-- ProtocolStateMachine => Behavior::isReentrant
-- StateMachine => Behavior::isReentrant
function Internal_Get_Is_Relative
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Relative
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- TimeEvent => TimeEvent::isRelative
function Internal_Get_Is_Remove_Duplicates
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Remove_Duplicates
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- RemoveStructuralFeatureValueAction => RemoveStructuralFeatureValueAction::isRemoveDuplicates
-- RemoveVariableValueAction => RemoveVariableValueAction::isRemoveDuplicates
function Internal_Get_Is_Replace_All
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Replace_All
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- AddStructuralFeatureValueAction => AddStructuralFeatureValueAction::isReplaceAll
-- AddVariableValueAction => AddVariableValueAction::isReplaceAll
-- LinkEndCreationData => LinkEndCreationData::isReplaceAll
-- ReclassifyObjectAction => ReclassifyObjectAction::isReplaceAll
function Internal_Get_Is_Required
(Self : AMF.Internals.AMF_Element)
return Boolean;
-- Extension => Extension::isRequired
function Internal_Get_Is_Service
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Service
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Port => Port::isService
function Internal_Get_Is_Simple
(Self : AMF.Internals.AMF_Element)
return Boolean;
-- FinalState => State::isSimple
-- State => State::isSimple
function Internal_Get_Is_Single_Execution
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Single_Execution
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Activity => Activity::isSingleExecution
function Internal_Get_Is_Static
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Static
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Connector => Feature::isStatic
-- ExtensionEnd => Feature::isStatic
-- Operation => Feature::isStatic
-- Port => Feature::isStatic
-- Property => Feature::isStatic
-- Reception => Feature::isStatic
function Internal_Get_Is_Stream
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Stream
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Parameter => Parameter::isStream
function Internal_Get_Is_Strict
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Strict
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ProfileApplication => ProfileApplication::isStrict
function Internal_Get_Is_Submachine_State
(Self : AMF.Internals.AMF_Element)
return Boolean;
-- FinalState => State::isSubmachineState
-- State => State::isSubmachineState
function Internal_Get_Is_Substitutable
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Boolean;
procedure Internal_Set_Is_Substitutable
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Boolean);
-- Generalization => Generalization::isSubstitutable
function Internal_Get_Is_Synchronous
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Synchronous
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- CallBehaviorAction => CallAction::isSynchronous
-- CallOperationAction => CallAction::isSynchronous
-- StartObjectBehaviorAction => CallAction::isSynchronous
function Internal_Get_Is_Tabbed
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Tabbed
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLStateShape => UMLStateShape::isTabbed
function Internal_Get_Is_Tested_First
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Tested_First
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- LoopNode => LoopNode::isTestedFirst
function Internal_Get_Is_Transition_Oriented
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Transition_Oriented
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- UMLStateMachineDiagram => UMLStateMachineDiagram::isTransitionOriented
function Internal_Get_Is_Unique
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Unique
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ActionInputPin => MultiplicityElement::isUnique
-- ConnectorEnd => MultiplicityElement::isUnique
-- ExtensionEnd => MultiplicityElement::isUnique
-- InputPin => MultiplicityElement::isUnique
-- Operation => Operation::isUnique
-- OutputPin => MultiplicityElement::isUnique
-- Parameter => MultiplicityElement::isUnique
-- Port => MultiplicityElement::isUnique
-- Property => MultiplicityElement::isUnique
-- ValuePin => MultiplicityElement::isUnique
-- Variable => MultiplicityElement::isUnique
function Internal_Get_Is_Unmarshall
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Is_Unmarshall
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- AcceptCallAction => AcceptEventAction::isUnmarshall
-- AcceptEventAction => AcceptEventAction::isUnmarshall
function Internal_Get_Join_Spec
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Join_Spec
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- JoinNode => JoinNode::joinSpec
function Internal_Get_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Connector_Kind;
-- Connector => Connector::kind
function Internal_Get_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Pseudostate_Kind;
procedure Internal_Set_Kind
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Pseudostate_Kind);
-- Pseudostate => Pseudostate::kind
function Internal_Get_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Transition_Kind;
procedure Internal_Set_Kind
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Transition_Kind);
-- ProtocolTransition => Transition::kind
-- Transition => Transition::kind
function Internal_Get_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UMLDI.UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind;
procedure Internal_Set_Kind
(Self : AMF.Internals.AMF_Element;
To : AMF.UMLDI.UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind);
-- UMLAssociationOrConnectorOrLinkShape => UMLAssociationOrConnectorOrLinkShape::kind
function Internal_Get_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UMLDI.UMLDI_UML_Interaction_Diagram_Kind;
procedure Internal_Set_Kind
(Self : AMF.Internals.AMF_Element;
To : AMF.UMLDI.UMLDI_UML_Interaction_Diagram_Kind);
-- UMLInteractionDiagram => UMLInteractionDiagram::kind
function Internal_Get_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UMLDI.UMLDI_UML_Interaction_Table_Label_Kind;
procedure Internal_Set_Kind
(Self : AMF.Internals.AMF_Element;
To : AMF.UMLDI.UMLDI_UML_Interaction_Table_Label_Kind);
-- UMLInteractionTableLabel => UMLInteractionTableLabel::kind
function Internal_Get_Language
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_String;
-- FunctionBehavior => OpaqueBehavior::language
-- OpaqueAction => OpaqueAction::language
-- OpaqueBehavior => OpaqueBehavior::language
-- OpaqueExpression => OpaqueExpression::language
function Internal_Get_Lifeline
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Interaction => Interaction::lifeline
function Internal_Get_Local_Postcondition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => Action::localPostcondition
-- AcceptEventAction => Action::localPostcondition
-- AddStructuralFeatureValueAction => Action::localPostcondition
-- AddVariableValueAction => Action::localPostcondition
-- BroadcastSignalAction => Action::localPostcondition
-- CallBehaviorAction => Action::localPostcondition
-- CallOperationAction => Action::localPostcondition
-- ClearAssociationAction => Action::localPostcondition
-- ClearStructuralFeatureAction => Action::localPostcondition
-- ClearVariableAction => Action::localPostcondition
-- ConditionalNode => Action::localPostcondition
-- CreateLinkAction => Action::localPostcondition
-- CreateLinkObjectAction => Action::localPostcondition
-- CreateObjectAction => Action::localPostcondition
-- DestroyLinkAction => Action::localPostcondition
-- DestroyObjectAction => Action::localPostcondition
-- ExpansionRegion => Action::localPostcondition
-- LoopNode => Action::localPostcondition
-- OpaqueAction => Action::localPostcondition
-- RaiseExceptionAction => Action::localPostcondition
-- ReadExtentAction => Action::localPostcondition
-- ReadIsClassifiedObjectAction => Action::localPostcondition
-- ReadLinkAction => Action::localPostcondition
-- ReadLinkObjectEndAction => Action::localPostcondition
-- ReadLinkObjectEndQualifierAction => Action::localPostcondition
-- ReadSelfAction => Action::localPostcondition
-- ReadStructuralFeatureAction => Action::localPostcondition
-- ReadVariableAction => Action::localPostcondition
-- ReclassifyObjectAction => Action::localPostcondition
-- ReduceAction => Action::localPostcondition
-- RemoveStructuralFeatureValueAction => Action::localPostcondition
-- RemoveVariableValueAction => Action::localPostcondition
-- ReplyAction => Action::localPostcondition
-- SendObjectAction => Action::localPostcondition
-- SendSignalAction => Action::localPostcondition
-- SequenceNode => Action::localPostcondition
-- StartClassifierBehaviorAction => Action::localPostcondition
-- StartObjectBehaviorAction => Action::localPostcondition
-- StructuredActivityNode => Action::localPostcondition
-- TestIdentityAction => Action::localPostcondition
-- UnmarshallAction => Action::localPostcondition
-- ValueSpecificationAction => Action::localPostcondition
function Internal_Get_Local_Precondition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => Action::localPrecondition
-- AcceptEventAction => Action::localPrecondition
-- AddStructuralFeatureValueAction => Action::localPrecondition
-- AddVariableValueAction => Action::localPrecondition
-- BroadcastSignalAction => Action::localPrecondition
-- CallBehaviorAction => Action::localPrecondition
-- CallOperationAction => Action::localPrecondition
-- ClearAssociationAction => Action::localPrecondition
-- ClearStructuralFeatureAction => Action::localPrecondition
-- ClearVariableAction => Action::localPrecondition
-- ConditionalNode => Action::localPrecondition
-- CreateLinkAction => Action::localPrecondition
-- CreateLinkObjectAction => Action::localPrecondition
-- CreateObjectAction => Action::localPrecondition
-- DestroyLinkAction => Action::localPrecondition
-- DestroyObjectAction => Action::localPrecondition
-- ExpansionRegion => Action::localPrecondition
-- LoopNode => Action::localPrecondition
-- OpaqueAction => Action::localPrecondition
-- RaiseExceptionAction => Action::localPrecondition
-- ReadExtentAction => Action::localPrecondition
-- ReadIsClassifiedObjectAction => Action::localPrecondition
-- ReadLinkAction => Action::localPrecondition
-- ReadLinkObjectEndAction => Action::localPrecondition
-- ReadLinkObjectEndQualifierAction => Action::localPrecondition
-- ReadSelfAction => Action::localPrecondition
-- ReadStructuralFeatureAction => Action::localPrecondition
-- ReadVariableAction => Action::localPrecondition
-- ReclassifyObjectAction => Action::localPrecondition
-- ReduceAction => Action::localPrecondition
-- RemoveStructuralFeatureValueAction => Action::localPrecondition
-- RemoveVariableValueAction => Action::localPrecondition
-- ReplyAction => Action::localPrecondition
-- SendObjectAction => Action::localPrecondition
-- SendSignalAction => Action::localPrecondition
-- SequenceNode => Action::localPrecondition
-- StartClassifierBehaviorAction => Action::localPrecondition
-- StartObjectBehaviorAction => Action::localPrecondition
-- StructuredActivityNode => Action::localPrecondition
-- TestIdentityAction => Action::localPrecondition
-- UnmarshallAction => Action::localPrecondition
-- ValueSpecificationAction => Action::localPrecondition
function Internal_Get_Local_Style
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Local_Style
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLActivityDiagram => UMLDiagramElement::localStyle
-- UMLAssociationEndLabel => UMLDiagramElement::localStyle
-- UMLAssociationOrConnectorOrLinkShape => UMLDiagramElement::localStyle
-- UMLClassDiagram => UMLDiagramElement::localStyle
-- UMLClassifierShape => UMLDiagramElement::localStyle
-- UMLCompartment => UMLDiagramElement::localStyle
-- UMLCompartmentableShape => UMLDiagramElement::localStyle
-- UMLComponentDiagram => UMLDiagramElement::localStyle
-- UMLCompositeStructureDiagram => UMLDiagramElement::localStyle
-- UMLDeploymentDiagram => UMLDiagramElement::localStyle
-- UMLEdge => UMLDiagramElement::localStyle
-- UMLInteractionDiagram => UMLDiagramElement::localStyle
-- UMLInteractionTableLabel => UMLDiagramElement::localStyle
-- UMLKeywordLabel => UMLDiagramElement::localStyle
-- UMLLabel => UMLDiagramElement::localStyle
-- UMLMultiplicityLabel => UMLDiagramElement::localStyle
-- UMLNameLabel => UMLDiagramElement::localStyle
-- UMLObjectDiagram => UMLDiagramElement::localStyle
-- UMLPackageDiagram => UMLDiagramElement::localStyle
-- UMLProfileDiagram => UMLDiagramElement::localStyle
-- UMLRedefinesLabel => UMLDiagramElement::localStyle
-- UMLShape => UMLDiagramElement::localStyle
-- UMLStateMachineDiagram => UMLDiagramElement::localStyle
-- UMLStateShape => UMLDiagramElement::localStyle
-- UMLStereotypePropertyValueLabel => UMLDiagramElement::localStyle
-- UMLTypedElementLabel => UMLDiagramElement::localStyle
-- UMLUseCaseDiagram => UMLDiagramElement::localStyle
function Internal_Get_Location
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Location
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Deployment => Deployment::location
function Internal_Get_Location
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Location
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Image => Image::location
function Internal_Get_Loop_Variable
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- LoopNode => LoopNode::loopVariable
function Internal_Get_Loop_Variable_Input
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- LoopNode => LoopNode::loopVariableInput
function Internal_Get_Lower
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Integer;
procedure Internal_Set_Lower
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Integer);
-- ActionInputPin => MultiplicityElement::lower
-- ConnectorEnd => MultiplicityElement::lower
-- ExtensionEnd => ExtensionEnd::lower
-- InputPin => MultiplicityElement::lower
-- Operation => Operation::lower
-- OutputPin => MultiplicityElement::lower
-- Parameter => MultiplicityElement::lower
-- Port => MultiplicityElement::lower
-- Property => MultiplicityElement::lower
-- ValuePin => MultiplicityElement::lower
-- Variable => MultiplicityElement::lower
function Internal_Get_Lower_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Lower_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionInputPin => MultiplicityElement::lowerValue
-- ConnectorEnd => MultiplicityElement::lowerValue
-- ExtensionEnd => MultiplicityElement::lowerValue
-- InputPin => MultiplicityElement::lowerValue
-- OutputPin => MultiplicityElement::lowerValue
-- Parameter => MultiplicityElement::lowerValue
-- Port => MultiplicityElement::lowerValue
-- Property => MultiplicityElement::lowerValue
-- ValuePin => MultiplicityElement::lowerValue
-- Variable => MultiplicityElement::lowerValue
function Internal_Get_Manifestation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Artifact => Artifact::manifestation
-- DeploymentSpecification => Artifact::manifestation
function Internal_Get_Mapping
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Mapping
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Abstraction => Abstraction::mapping
-- ComponentRealization => Abstraction::mapping
-- InterfaceRealization => Abstraction::mapping
-- Manifestation => Abstraction::mapping
-- Realization => Abstraction::mapping
-- Substitution => Abstraction::mapping
function Internal_Get_Max
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Max
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DurationInterval => DurationInterval::max
-- Interval => Interval::max
-- TimeInterval => Interval::max
function Internal_Get_Maxint
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Maxint
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InteractionConstraint => InteractionConstraint::maxint
function Internal_Get_Member
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Namespace::member
-- Actor => Namespace::member
-- Artifact => Namespace::member
-- Association => Namespace::member
-- AssociationClass => Namespace::member
-- Class => Namespace::member
-- Collaboration => Namespace::member
-- CommunicationPath => Namespace::member
-- Component => Namespace::member
-- ConditionalNode => Namespace::member
-- DataType => Namespace::member
-- DeploymentSpecification => Namespace::member
-- Device => Namespace::member
-- Enumeration => Namespace::member
-- ExecutionEnvironment => Namespace::member
-- ExpansionRegion => Namespace::member
-- Extension => Namespace::member
-- FinalState => Namespace::member
-- FunctionBehavior => Namespace::member
-- InformationItem => Namespace::member
-- Interaction => Namespace::member
-- InteractionOperand => Namespace::member
-- Interface => Namespace::member
-- LoopNode => Namespace::member
-- Model => Namespace::member
-- Node => Namespace::member
-- OpaqueBehavior => Namespace::member
-- Operation => Namespace::member
-- Package => Namespace::member
-- PrimitiveType => Namespace::member
-- Profile => Namespace::member
-- ProtocolStateMachine => Namespace::member
-- ProtocolTransition => Namespace::member
-- Reception => Namespace::member
-- Region => Namespace::member
-- SequenceNode => Namespace::member
-- Signal => Namespace::member
-- State => Namespace::member
-- StateMachine => Namespace::member
-- Stereotype => Namespace::member
-- StructuredActivityNode => Namespace::member
-- Transition => Namespace::member
-- UseCase => Namespace::member
function Internal_Get_Member_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Association => Association::memberEnd
-- AssociationClass => Association::memberEnd
-- CommunicationPath => Association::memberEnd
-- Extension => Association::memberEnd
function Internal_Get_Merged_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Merged_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- PackageMerge => PackageMerge::mergedPackage
function Internal_Get_Message
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ConsiderIgnoreFragment => ConsiderIgnoreFragment::message
-- Interaction => Interaction::message
function Internal_Get_Message
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Message
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DestructionOccurrenceSpecification => MessageEnd::message
-- Gate => MessageEnd::message
-- MessageOccurrenceSpecification => MessageEnd::message
function Internal_Get_Message_Kind
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Message_Kind;
-- Message => Message::messageKind
function Internal_Get_Message_Sort
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Message_Sort;
procedure Internal_Set_Message_Sort
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Message_Sort);
-- Message => Message::messageSort
function Internal_Get_Metaclass
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- Extension => Extension::metaclass
function Internal_Get_Metaclass_Reference
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Profile => Profile::metaclassReference
function Internal_Get_Metamodel_Reference
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Profile => Profile::metamodelReference
function Internal_Get_Method
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Operation => BehavioralFeature::method
-- Reception => BehavioralFeature::method
function Internal_Get_Min
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Min
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- DurationInterval => DurationInterval::min
-- Interval => Interval::min
-- TimeInterval => Interval::min
function Internal_Get_Minint
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Minint
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InteractionConstraint => InteractionConstraint::minint
function Internal_Get_Mode
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Expansion_Kind;
procedure Internal_Set_Mode
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Expansion_Kind);
-- ExpansionRegion => ExpansionRegion::mode
function Internal_Get_Mode_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Mode_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLNameLabel => UMLNameLabel::modeElement
function Internal_Get_Model_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Model_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLActivityDiagram => UMLActivityDiagram::modelElement
-- UMLAssociationEndLabel => UMLAssociationEndLabel::modelElement
-- UMLAssociationOrConnectorOrLinkShape => DiagramElement::modelElement
-- UMLClassDiagram => DiagramElement::modelElement
-- UMLClassifierShape => UMLClassifierShape::modelElement
-- UMLCompartment => DiagramElement::modelElement
-- UMLCompartmentableShape => DiagramElement::modelElement
-- UMLComponentDiagram => DiagramElement::modelElement
-- UMLCompositeStructureDiagram => DiagramElement::modelElement
-- UMLDeploymentDiagram => DiagramElement::modelElement
-- UMLEdge => DiagramElement::modelElement
-- UMLInteractionDiagram => UMLBehaviorDiagram::modelElement
-- UMLInteractionTableLabel => DiagramElement::modelElement
-- UMLKeywordLabel => DiagramElement::modelElement
-- UMLLabel => DiagramElement::modelElement
-- UMLMultiplicityLabel => UMLMultiplicityLabel::modelElement
-- UMLNameLabel => DiagramElement::modelElement
-- UMLObjectDiagram => DiagramElement::modelElement
-- UMLPackageDiagram => DiagramElement::modelElement
-- UMLProfileDiagram => DiagramElement::modelElement
-- UMLRedefinesLabel => UMLRedefinesLabel::modelElement
-- UMLShape => DiagramElement::modelElement
-- UMLStateMachineDiagram => UMLBehaviorDiagram::modelElement
-- UMLStateShape => DiagramElement::modelElement
-- UMLStereotypePropertyValueLabel => UMLStereotypePropertyValueLabel::modelElement
-- UMLTypedElementLabel => DiagramElement::modelElement
-- UMLUseCaseDiagram => UMLBehaviorDiagram::modelElement
function Internal_Get_Model_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UMLActivityDiagram => UMLDiagramElement::modelElement
-- UMLAssociationEndLabel => UMLDiagramElement::modelElement
-- UMLAssociationOrConnectorOrLinkShape => UMLDiagramElement::modelElement
-- UMLClassDiagram => UMLDiagramElement::modelElement
-- UMLClassifierShape => UMLDiagramElement::modelElement
-- UMLCompartment => UMLDiagramElement::modelElement
-- UMLCompartmentableShape => UMLDiagramElement::modelElement
-- UMLComponentDiagram => UMLDiagramElement::modelElement
-- UMLCompositeStructureDiagram => UMLDiagramElement::modelElement
-- UMLDeploymentDiagram => UMLDiagramElement::modelElement
-- UMLEdge => UMLDiagramElement::modelElement
-- UMLInteractionDiagram => UMLDiagramElement::modelElement
-- UMLInteractionTableLabel => UMLDiagramElement::modelElement
-- UMLKeywordLabel => UMLDiagramElement::modelElement
-- UMLLabel => UMLDiagramElement::modelElement
-- UMLMultiplicityLabel => UMLDiagramElement::modelElement
-- UMLNameLabel => UMLDiagramElement::modelElement
-- UMLObjectDiagram => UMLDiagramElement::modelElement
-- UMLPackageDiagram => UMLDiagramElement::modelElement
-- UMLProfileDiagram => UMLDiagramElement::modelElement
-- UMLRedefinesLabel => UMLDiagramElement::modelElement
-- UMLShape => UMLDiagramElement::modelElement
-- UMLStateMachineDiagram => UMLDiagramElement::modelElement
-- UMLStateShape => UMLDiagramElement::modelElement
-- UMLStereotypePropertyValueLabel => UMLDiagramElement::modelElement
-- UMLTypedElementLabel => UMLDiagramElement::modelElement
-- UMLUseCaseDiagram => UMLDiagramElement::modelElement
function Internal_Get_Must_Isolate
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Must_Isolate
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- ConditionalNode => StructuredActivityNode::mustIsolate
-- ExpansionRegion => StructuredActivityNode::mustIsolate
-- LoopNode => StructuredActivityNode::mustIsolate
-- SequenceNode => StructuredActivityNode::mustIsolate
-- StructuredActivityNode => StructuredActivityNode::mustIsolate
function Internal_Get_Name
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Name
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Abstraction => NamedElement::name
-- AcceptCallAction => NamedElement::name
-- AcceptEventAction => NamedElement::name
-- ActionExecutionSpecification => NamedElement::name
-- ActionInputPin => NamedElement::name
-- Activity => NamedElement::name
-- ActivityFinalNode => NamedElement::name
-- ActivityParameterNode => NamedElement::name
-- ActivityPartition => NamedElement::name
-- Actor => NamedElement::name
-- AddStructuralFeatureValueAction => NamedElement::name
-- AddVariableValueAction => NamedElement::name
-- AnyReceiveEvent => NamedElement::name
-- Artifact => NamedElement::name
-- Association => NamedElement::name
-- AssociationClass => NamedElement::name
-- BehaviorExecutionSpecification => NamedElement::name
-- BroadcastSignalAction => NamedElement::name
-- CallBehaviorAction => NamedElement::name
-- CallEvent => NamedElement::name
-- CallOperationAction => NamedElement::name
-- CentralBufferNode => NamedElement::name
-- ChangeEvent => NamedElement::name
-- Class => NamedElement::name
-- ClearAssociationAction => NamedElement::name
-- ClearStructuralFeatureAction => NamedElement::name
-- ClearVariableAction => NamedElement::name
-- Collaboration => NamedElement::name
-- CollaborationUse => NamedElement::name
-- CombinedFragment => NamedElement::name
-- CommunicationPath => NamedElement::name
-- Component => NamedElement::name
-- ComponentRealization => NamedElement::name
-- ConditionalNode => NamedElement::name
-- ConnectionPointReference => NamedElement::name
-- Connector => NamedElement::name
-- ConsiderIgnoreFragment => NamedElement::name
-- Constraint => NamedElement::name
-- Continuation => NamedElement::name
-- ControlFlow => NamedElement::name
-- CreateLinkAction => NamedElement::name
-- CreateLinkObjectAction => NamedElement::name
-- CreateObjectAction => NamedElement::name
-- UMLActivityDiagram => NamedElement::name
-- UMLClassDiagram => NamedElement::name
-- UMLComponentDiagram => NamedElement::name
-- UMLCompositeStructureDiagram => NamedElement::name
-- UMLDeploymentDiagram => NamedElement::name
-- UMLInteractionDiagram => NamedElement::name
-- UMLObjectDiagram => NamedElement::name
-- UMLPackageDiagram => NamedElement::name
-- UMLProfileDiagram => NamedElement::name
-- UMLStateMachineDiagram => NamedElement::name
-- UMLStyle => NamedElement::name
-- UMLUseCaseDiagram => NamedElement::name
-- DataStoreNode => NamedElement::name
-- DataType => NamedElement::name
-- DecisionNode => NamedElement::name
-- Dependency => NamedElement::name
-- Deployment => NamedElement::name
-- DeploymentSpecification => NamedElement::name
-- DestroyLinkAction => NamedElement::name
-- DestroyObjectAction => NamedElement::name
-- DestructionOccurrenceSpecification => NamedElement::name
-- Device => NamedElement::name
-- Duration => NamedElement::name
-- DurationConstraint => NamedElement::name
-- DurationInterval => NamedElement::name
-- DurationObservation => NamedElement::name
-- Enumeration => NamedElement::name
-- EnumerationLiteral => NamedElement::name
-- ExecutionEnvironment => NamedElement::name
-- ExecutionOccurrenceSpecification => NamedElement::name
-- ExpansionNode => NamedElement::name
-- ExpansionRegion => NamedElement::name
-- Expression => NamedElement::name
-- Extend => NamedElement::name
-- Extension => NamedElement::name
-- ExtensionEnd => NamedElement::name
-- ExtensionPoint => NamedElement::name
-- FinalState => NamedElement::name
-- FlowFinalNode => NamedElement::name
-- ForkNode => NamedElement::name
-- FunctionBehavior => NamedElement::name
-- Gate => NamedElement::name
-- GeneralOrdering => NamedElement::name
-- GeneralizationSet => NamedElement::name
-- Include => NamedElement::name
-- InformationFlow => NamedElement::name
-- InformationItem => NamedElement::name
-- InitialNode => NamedElement::name
-- InputPin => NamedElement::name
-- InstanceSpecification => NamedElement::name
-- InstanceValue => NamedElement::name
-- Interaction => NamedElement::name
-- InteractionConstraint => NamedElement::name
-- InteractionOperand => NamedElement::name
-- InteractionUse => NamedElement::name
-- Interface => NamedElement::name
-- InterfaceRealization => NamedElement::name
-- InterruptibleActivityRegion => NamedElement::name
-- Interval => NamedElement::name
-- IntervalConstraint => NamedElement::name
-- JoinNode => NamedElement::name
-- Lifeline => NamedElement::name
-- LiteralBoolean => NamedElement::name
-- LiteralInteger => NamedElement::name
-- LiteralNull => NamedElement::name
-- LiteralReal => NamedElement::name
-- LiteralString => NamedElement::name
-- LiteralUnlimitedNatural => NamedElement::name
-- LoopNode => NamedElement::name
-- Manifestation => NamedElement::name
-- MergeNode => NamedElement::name
-- Message => NamedElement::name
-- MessageOccurrenceSpecification => NamedElement::name
-- Model => NamedElement::name
-- Node => NamedElement::name
-- ObjectFlow => NamedElement::name
-- OccurrenceSpecification => NamedElement::name
-- OpaqueAction => NamedElement::name
-- OpaqueBehavior => NamedElement::name
-- OpaqueExpression => NamedElement::name
-- Operation => NamedElement::name
-- OutputPin => NamedElement::name
-- Package => NamedElement::name
-- Parameter => NamedElement::name
-- ParameterSet => NamedElement::name
-- PartDecomposition => NamedElement::name
-- Port => NamedElement::name
-- PrimitiveType => NamedElement::name
-- Profile => NamedElement::name
-- Property => NamedElement::name
-- ProtocolStateMachine => NamedElement::name
-- ProtocolTransition => NamedElement::name
-- Pseudostate => NamedElement::name
-- RaiseExceptionAction => NamedElement::name
-- ReadExtentAction => NamedElement::name
-- ReadIsClassifiedObjectAction => NamedElement::name
-- ReadLinkAction => NamedElement::name
-- ReadLinkObjectEndAction => NamedElement::name
-- ReadLinkObjectEndQualifierAction => NamedElement::name
-- ReadSelfAction => NamedElement::name
-- ReadStructuralFeatureAction => NamedElement::name
-- ReadVariableAction => NamedElement::name
-- Realization => NamedElement::name
-- Reception => NamedElement::name
-- ReclassifyObjectAction => NamedElement::name
-- RedefinableTemplateSignature => NamedElement::name
-- ReduceAction => NamedElement::name
-- Region => NamedElement::name
-- RemoveStructuralFeatureValueAction => NamedElement::name
-- RemoveVariableValueAction => NamedElement::name
-- ReplyAction => NamedElement::name
-- SendObjectAction => NamedElement::name
-- SendSignalAction => NamedElement::name
-- SequenceNode => NamedElement::name
-- Signal => NamedElement::name
-- SignalEvent => NamedElement::name
-- StartClassifierBehaviorAction => NamedElement::name
-- StartObjectBehaviorAction => NamedElement::name
-- State => NamedElement::name
-- StateInvariant => NamedElement::name
-- StateMachine => NamedElement::name
-- Stereotype => NamedElement::name
-- StringExpression => NamedElement::name
-- StructuredActivityNode => NamedElement::name
-- Substitution => NamedElement::name
-- TestIdentityAction => NamedElement::name
-- TimeConstraint => NamedElement::name
-- TimeEvent => NamedElement::name
-- TimeExpression => NamedElement::name
-- TimeInterval => NamedElement::name
-- TimeObservation => NamedElement::name
-- Transition => NamedElement::name
-- Trigger => NamedElement::name
-- UnmarshallAction => NamedElement::name
-- Usage => NamedElement::name
-- UseCase => NamedElement::name
-- ValuePin => NamedElement::name
-- ValueSpecificationAction => NamedElement::name
-- Variable => NamedElement::name
function Internal_Get_Name_Expression
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Name_Expression
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Abstraction => NamedElement::nameExpression
-- AcceptCallAction => NamedElement::nameExpression
-- AcceptEventAction => NamedElement::nameExpression
-- ActionExecutionSpecification => NamedElement::nameExpression
-- ActionInputPin => NamedElement::nameExpression
-- Activity => NamedElement::nameExpression
-- ActivityFinalNode => NamedElement::nameExpression
-- ActivityParameterNode => NamedElement::nameExpression
-- ActivityPartition => NamedElement::nameExpression
-- Actor => NamedElement::nameExpression
-- AddStructuralFeatureValueAction => NamedElement::nameExpression
-- AddVariableValueAction => NamedElement::nameExpression
-- AnyReceiveEvent => NamedElement::nameExpression
-- Artifact => NamedElement::nameExpression
-- Association => NamedElement::nameExpression
-- AssociationClass => NamedElement::nameExpression
-- BehaviorExecutionSpecification => NamedElement::nameExpression
-- BroadcastSignalAction => NamedElement::nameExpression
-- CallBehaviorAction => NamedElement::nameExpression
-- CallEvent => NamedElement::nameExpression
-- CallOperationAction => NamedElement::nameExpression
-- CentralBufferNode => NamedElement::nameExpression
-- ChangeEvent => NamedElement::nameExpression
-- Class => NamedElement::nameExpression
-- ClearAssociationAction => NamedElement::nameExpression
-- ClearStructuralFeatureAction => NamedElement::nameExpression
-- ClearVariableAction => NamedElement::nameExpression
-- Collaboration => NamedElement::nameExpression
-- CollaborationUse => NamedElement::nameExpression
-- CombinedFragment => NamedElement::nameExpression
-- CommunicationPath => NamedElement::nameExpression
-- Component => NamedElement::nameExpression
-- ComponentRealization => NamedElement::nameExpression
-- ConditionalNode => NamedElement::nameExpression
-- ConnectionPointReference => NamedElement::nameExpression
-- Connector => NamedElement::nameExpression
-- ConsiderIgnoreFragment => NamedElement::nameExpression
-- Constraint => NamedElement::nameExpression
-- Continuation => NamedElement::nameExpression
-- ControlFlow => NamedElement::nameExpression
-- CreateLinkAction => NamedElement::nameExpression
-- CreateLinkObjectAction => NamedElement::nameExpression
-- CreateObjectAction => NamedElement::nameExpression
-- UMLActivityDiagram => NamedElement::nameExpression
-- UMLClassDiagram => NamedElement::nameExpression
-- UMLComponentDiagram => NamedElement::nameExpression
-- UMLCompositeStructureDiagram => NamedElement::nameExpression
-- UMLDeploymentDiagram => NamedElement::nameExpression
-- UMLInteractionDiagram => NamedElement::nameExpression
-- UMLObjectDiagram => NamedElement::nameExpression
-- UMLPackageDiagram => NamedElement::nameExpression
-- UMLProfileDiagram => NamedElement::nameExpression
-- UMLStateMachineDiagram => NamedElement::nameExpression
-- UMLStyle => NamedElement::nameExpression
-- UMLUseCaseDiagram => NamedElement::nameExpression
-- DataStoreNode => NamedElement::nameExpression
-- DataType => NamedElement::nameExpression
-- DecisionNode => NamedElement::nameExpression
-- Dependency => NamedElement::nameExpression
-- Deployment => NamedElement::nameExpression
-- DeploymentSpecification => NamedElement::nameExpression
-- DestroyLinkAction => NamedElement::nameExpression
-- DestroyObjectAction => NamedElement::nameExpression
-- DestructionOccurrenceSpecification => NamedElement::nameExpression
-- Device => NamedElement::nameExpression
-- Duration => NamedElement::nameExpression
-- DurationConstraint => NamedElement::nameExpression
-- DurationInterval => NamedElement::nameExpression
-- DurationObservation => NamedElement::nameExpression
-- Enumeration => NamedElement::nameExpression
-- EnumerationLiteral => NamedElement::nameExpression
-- ExecutionEnvironment => NamedElement::nameExpression
-- ExecutionOccurrenceSpecification => NamedElement::nameExpression
-- ExpansionNode => NamedElement::nameExpression
-- ExpansionRegion => NamedElement::nameExpression
-- Expression => NamedElement::nameExpression
-- Extend => NamedElement::nameExpression
-- Extension => NamedElement::nameExpression
-- ExtensionEnd => NamedElement::nameExpression
-- ExtensionPoint => NamedElement::nameExpression
-- FinalState => NamedElement::nameExpression
-- FlowFinalNode => NamedElement::nameExpression
-- ForkNode => NamedElement::nameExpression
-- FunctionBehavior => NamedElement::nameExpression
-- Gate => NamedElement::nameExpression
-- GeneralOrdering => NamedElement::nameExpression
-- GeneralizationSet => NamedElement::nameExpression
-- Include => NamedElement::nameExpression
-- InformationFlow => NamedElement::nameExpression
-- InformationItem => NamedElement::nameExpression
-- InitialNode => NamedElement::nameExpression
-- InputPin => NamedElement::nameExpression
-- InstanceSpecification => NamedElement::nameExpression
-- InstanceValue => NamedElement::nameExpression
-- Interaction => NamedElement::nameExpression
-- InteractionConstraint => NamedElement::nameExpression
-- InteractionOperand => NamedElement::nameExpression
-- InteractionUse => NamedElement::nameExpression
-- Interface => NamedElement::nameExpression
-- InterfaceRealization => NamedElement::nameExpression
-- InterruptibleActivityRegion => NamedElement::nameExpression
-- Interval => NamedElement::nameExpression
-- IntervalConstraint => NamedElement::nameExpression
-- JoinNode => NamedElement::nameExpression
-- Lifeline => NamedElement::nameExpression
-- LiteralBoolean => NamedElement::nameExpression
-- LiteralInteger => NamedElement::nameExpression
-- LiteralNull => NamedElement::nameExpression
-- LiteralReal => NamedElement::nameExpression
-- LiteralString => NamedElement::nameExpression
-- LiteralUnlimitedNatural => NamedElement::nameExpression
-- LoopNode => NamedElement::nameExpression
-- Manifestation => NamedElement::nameExpression
-- MergeNode => NamedElement::nameExpression
-- Message => NamedElement::nameExpression
-- MessageOccurrenceSpecification => NamedElement::nameExpression
-- Model => NamedElement::nameExpression
-- Node => NamedElement::nameExpression
-- ObjectFlow => NamedElement::nameExpression
-- OccurrenceSpecification => NamedElement::nameExpression
-- OpaqueAction => NamedElement::nameExpression
-- OpaqueBehavior => NamedElement::nameExpression
-- OpaqueExpression => NamedElement::nameExpression
-- Operation => NamedElement::nameExpression
-- OutputPin => NamedElement::nameExpression
-- Package => NamedElement::nameExpression
-- Parameter => NamedElement::nameExpression
-- ParameterSet => NamedElement::nameExpression
-- PartDecomposition => NamedElement::nameExpression
-- Port => NamedElement::nameExpression
-- PrimitiveType => NamedElement::nameExpression
-- Profile => NamedElement::nameExpression
-- Property => NamedElement::nameExpression
-- ProtocolStateMachine => NamedElement::nameExpression
-- ProtocolTransition => NamedElement::nameExpression
-- Pseudostate => NamedElement::nameExpression
-- RaiseExceptionAction => NamedElement::nameExpression
-- ReadExtentAction => NamedElement::nameExpression
-- ReadIsClassifiedObjectAction => NamedElement::nameExpression
-- ReadLinkAction => NamedElement::nameExpression
-- ReadLinkObjectEndAction => NamedElement::nameExpression
-- ReadLinkObjectEndQualifierAction => NamedElement::nameExpression
-- ReadSelfAction => NamedElement::nameExpression
-- ReadStructuralFeatureAction => NamedElement::nameExpression
-- ReadVariableAction => NamedElement::nameExpression
-- Realization => NamedElement::nameExpression
-- Reception => NamedElement::nameExpression
-- ReclassifyObjectAction => NamedElement::nameExpression
-- RedefinableTemplateSignature => NamedElement::nameExpression
-- ReduceAction => NamedElement::nameExpression
-- Region => NamedElement::nameExpression
-- RemoveStructuralFeatureValueAction => NamedElement::nameExpression
-- RemoveVariableValueAction => NamedElement::nameExpression
-- ReplyAction => NamedElement::nameExpression
-- SendObjectAction => NamedElement::nameExpression
-- SendSignalAction => NamedElement::nameExpression
-- SequenceNode => NamedElement::nameExpression
-- Signal => NamedElement::nameExpression
-- SignalEvent => NamedElement::nameExpression
-- StartClassifierBehaviorAction => NamedElement::nameExpression
-- StartObjectBehaviorAction => NamedElement::nameExpression
-- State => NamedElement::nameExpression
-- StateInvariant => NamedElement::nameExpression
-- StateMachine => NamedElement::nameExpression
-- Stereotype => NamedElement::nameExpression
-- StringExpression => NamedElement::nameExpression
-- StructuredActivityNode => NamedElement::nameExpression
-- Substitution => NamedElement::nameExpression
-- TestIdentityAction => NamedElement::nameExpression
-- TimeConstraint => NamedElement::nameExpression
-- TimeEvent => NamedElement::nameExpression
-- TimeExpression => NamedElement::nameExpression
-- TimeInterval => NamedElement::nameExpression
-- TimeObservation => NamedElement::nameExpression
-- Transition => NamedElement::nameExpression
-- Trigger => NamedElement::nameExpression
-- UnmarshallAction => NamedElement::nameExpression
-- Usage => NamedElement::nameExpression
-- UseCase => NamedElement::nameExpression
-- ValuePin => NamedElement::nameExpression
-- ValueSpecificationAction => NamedElement::nameExpression
-- Variable => NamedElement::nameExpression
function Internal_Get_Namespace
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- Abstraction => NamedElement::namespace
-- AcceptCallAction => NamedElement::namespace
-- AcceptEventAction => NamedElement::namespace
-- ActionExecutionSpecification => NamedElement::namespace
-- ActionInputPin => NamedElement::namespace
-- Activity => NamedElement::namespace
-- ActivityFinalNode => NamedElement::namespace
-- ActivityParameterNode => NamedElement::namespace
-- ActivityPartition => NamedElement::namespace
-- Actor => NamedElement::namespace
-- AddStructuralFeatureValueAction => NamedElement::namespace
-- AddVariableValueAction => NamedElement::namespace
-- AnyReceiveEvent => NamedElement::namespace
-- Artifact => NamedElement::namespace
-- Association => NamedElement::namespace
-- AssociationClass => NamedElement::namespace
-- BehaviorExecutionSpecification => NamedElement::namespace
-- BroadcastSignalAction => NamedElement::namespace
-- CallBehaviorAction => NamedElement::namespace
-- CallEvent => NamedElement::namespace
-- CallOperationAction => NamedElement::namespace
-- CentralBufferNode => NamedElement::namespace
-- ChangeEvent => NamedElement::namespace
-- Class => NamedElement::namespace
-- ClearAssociationAction => NamedElement::namespace
-- ClearStructuralFeatureAction => NamedElement::namespace
-- ClearVariableAction => NamedElement::namespace
-- Collaboration => NamedElement::namespace
-- CollaborationUse => NamedElement::namespace
-- CombinedFragment => NamedElement::namespace
-- CommunicationPath => NamedElement::namespace
-- Component => NamedElement::namespace
-- ComponentRealization => NamedElement::namespace
-- ConditionalNode => NamedElement::namespace
-- ConnectionPointReference => NamedElement::namespace
-- Connector => NamedElement::namespace
-- ConsiderIgnoreFragment => NamedElement::namespace
-- Constraint => NamedElement::namespace
-- Continuation => NamedElement::namespace
-- ControlFlow => NamedElement::namespace
-- CreateLinkAction => NamedElement::namespace
-- CreateLinkObjectAction => NamedElement::namespace
-- CreateObjectAction => NamedElement::namespace
-- UMLActivityDiagram => NamedElement::namespace
-- UMLClassDiagram => NamedElement::namespace
-- UMLComponentDiagram => NamedElement::namespace
-- UMLCompositeStructureDiagram => NamedElement::namespace
-- UMLDeploymentDiagram => NamedElement::namespace
-- UMLInteractionDiagram => NamedElement::namespace
-- UMLObjectDiagram => NamedElement::namespace
-- UMLPackageDiagram => NamedElement::namespace
-- UMLProfileDiagram => NamedElement::namespace
-- UMLStateMachineDiagram => NamedElement::namespace
-- UMLStyle => NamedElement::namespace
-- UMLUseCaseDiagram => NamedElement::namespace
-- DataStoreNode => NamedElement::namespace
-- DataType => NamedElement::namespace
-- DecisionNode => NamedElement::namespace
-- Dependency => NamedElement::namespace
-- Deployment => NamedElement::namespace
-- DeploymentSpecification => NamedElement::namespace
-- DestroyLinkAction => NamedElement::namespace
-- DestroyObjectAction => NamedElement::namespace
-- DestructionOccurrenceSpecification => NamedElement::namespace
-- Device => NamedElement::namespace
-- Duration => NamedElement::namespace
-- DurationConstraint => NamedElement::namespace
-- DurationInterval => NamedElement::namespace
-- DurationObservation => NamedElement::namespace
-- Enumeration => NamedElement::namespace
-- EnumerationLiteral => NamedElement::namespace
-- ExecutionEnvironment => NamedElement::namespace
-- ExecutionOccurrenceSpecification => NamedElement::namespace
-- ExpansionNode => NamedElement::namespace
-- ExpansionRegion => NamedElement::namespace
-- Expression => NamedElement::namespace
-- Extend => NamedElement::namespace
-- Extension => NamedElement::namespace
-- ExtensionEnd => NamedElement::namespace
-- ExtensionPoint => NamedElement::namespace
-- FinalState => NamedElement::namespace
-- FlowFinalNode => NamedElement::namespace
-- ForkNode => NamedElement::namespace
-- FunctionBehavior => NamedElement::namespace
-- Gate => NamedElement::namespace
-- GeneralOrdering => NamedElement::namespace
-- GeneralizationSet => NamedElement::namespace
-- Include => NamedElement::namespace
-- InformationFlow => NamedElement::namespace
-- InformationItem => NamedElement::namespace
-- InitialNode => NamedElement::namespace
-- InputPin => NamedElement::namespace
-- InstanceSpecification => NamedElement::namespace
-- InstanceValue => NamedElement::namespace
-- Interaction => NamedElement::namespace
-- InteractionConstraint => NamedElement::namespace
-- InteractionOperand => NamedElement::namespace
-- InteractionUse => NamedElement::namespace
-- Interface => NamedElement::namespace
-- InterfaceRealization => NamedElement::namespace
-- InterruptibleActivityRegion => NamedElement::namespace
-- Interval => NamedElement::namespace
-- IntervalConstraint => NamedElement::namespace
-- JoinNode => NamedElement::namespace
-- Lifeline => NamedElement::namespace
-- LiteralBoolean => NamedElement::namespace
-- LiteralInteger => NamedElement::namespace
-- LiteralNull => NamedElement::namespace
-- LiteralReal => NamedElement::namespace
-- LiteralString => NamedElement::namespace
-- LiteralUnlimitedNatural => NamedElement::namespace
-- LoopNode => NamedElement::namespace
-- Manifestation => NamedElement::namespace
-- MergeNode => NamedElement::namespace
-- Message => NamedElement::namespace
-- MessageOccurrenceSpecification => NamedElement::namespace
-- Model => NamedElement::namespace
-- Node => NamedElement::namespace
-- ObjectFlow => NamedElement::namespace
-- OccurrenceSpecification => NamedElement::namespace
-- OpaqueAction => NamedElement::namespace
-- OpaqueBehavior => NamedElement::namespace
-- OpaqueExpression => NamedElement::namespace
-- Operation => NamedElement::namespace
-- OutputPin => NamedElement::namespace
-- Package => NamedElement::namespace
-- Parameter => NamedElement::namespace
-- ParameterSet => NamedElement::namespace
-- PartDecomposition => NamedElement::namespace
-- Port => NamedElement::namespace
-- PrimitiveType => NamedElement::namespace
-- Profile => NamedElement::namespace
-- Property => NamedElement::namespace
-- ProtocolStateMachine => NamedElement::namespace
-- ProtocolTransition => NamedElement::namespace
-- Pseudostate => NamedElement::namespace
-- RaiseExceptionAction => NamedElement::namespace
-- ReadExtentAction => NamedElement::namespace
-- ReadIsClassifiedObjectAction => NamedElement::namespace
-- ReadLinkAction => NamedElement::namespace
-- ReadLinkObjectEndAction => NamedElement::namespace
-- ReadLinkObjectEndQualifierAction => NamedElement::namespace
-- ReadSelfAction => NamedElement::namespace
-- ReadStructuralFeatureAction => NamedElement::namespace
-- ReadVariableAction => NamedElement::namespace
-- Realization => NamedElement::namespace
-- Reception => NamedElement::namespace
-- ReclassifyObjectAction => NamedElement::namespace
-- RedefinableTemplateSignature => NamedElement::namespace
-- ReduceAction => NamedElement::namespace
-- Region => NamedElement::namespace
-- RemoveStructuralFeatureValueAction => NamedElement::namespace
-- RemoveVariableValueAction => NamedElement::namespace
-- ReplyAction => NamedElement::namespace
-- SendObjectAction => NamedElement::namespace
-- SendSignalAction => NamedElement::namespace
-- SequenceNode => NamedElement::namespace
-- Signal => NamedElement::namespace
-- SignalEvent => NamedElement::namespace
-- StartClassifierBehaviorAction => NamedElement::namespace
-- StartObjectBehaviorAction => NamedElement::namespace
-- State => NamedElement::namespace
-- StateInvariant => NamedElement::namespace
-- StateMachine => NamedElement::namespace
-- Stereotype => NamedElement::namespace
-- StringExpression => NamedElement::namespace
-- StructuredActivityNode => NamedElement::namespace
-- Substitution => NamedElement::namespace
-- TestIdentityAction => NamedElement::namespace
-- TimeConstraint => NamedElement::namespace
-- TimeEvent => NamedElement::namespace
-- TimeExpression => NamedElement::namespace
-- TimeInterval => NamedElement::namespace
-- TimeObservation => NamedElement::namespace
-- Transition => NamedElement::namespace
-- Trigger => NamedElement::namespace
-- UnmarshallAction => NamedElement::namespace
-- Usage => NamedElement::namespace
-- UseCase => NamedElement::namespace
-- ValuePin => NamedElement::namespace
-- ValueSpecificationAction => NamedElement::namespace
-- Variable => NamedElement::namespace
function Internal_Get_Navigability_Notation
(Self : AMF.Internals.AMF_Element)
return AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind;
procedure Internal_Set_Navigability_Notation
(Self : AMF.Internals.AMF_Element;
To : AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind);
-- UMLClassDiagram => UMLClassOrCompositeStructureDiagram::navigabilityNotation
-- UMLCompositeStructureDiagram => UMLClassOrCompositeStructureDiagram::navigabilityNotation
function Internal_Get_Navigable_Owned_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Association => Association::navigableOwnedEnd
-- AssociationClass => Association::navigableOwnedEnd
-- CommunicationPath => Association::navigableOwnedEnd
-- Extension => Association::navigableOwnedEnd
function Internal_Get_Nested_Artifact
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Artifact => Artifact::nestedArtifact
-- DeploymentSpecification => Artifact::nestedArtifact
function Internal_Get_Nested_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Class::nestedClassifier
-- AssociationClass => Class::nestedClassifier
-- Class => Class::nestedClassifier
-- Component => Class::nestedClassifier
-- Device => Class::nestedClassifier
-- ExecutionEnvironment => Class::nestedClassifier
-- FunctionBehavior => Class::nestedClassifier
-- Interaction => Class::nestedClassifier
-- Interface => Interface::nestedClassifier
-- Node => Class::nestedClassifier
-- OpaqueBehavior => Class::nestedClassifier
-- ProtocolStateMachine => Class::nestedClassifier
-- StateMachine => Class::nestedClassifier
-- Stereotype => Class::nestedClassifier
function Internal_Get_Nested_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Device => Node::nestedNode
-- ExecutionEnvironment => Node::nestedNode
-- Node => Node::nestedNode
function Internal_Get_Nested_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Model => Package::nestedPackage
-- Package => Package::nestedPackage
-- Profile => Package::nestedPackage
function Internal_Get_Nesting_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Nesting_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Model => Package::nestingPackage
-- Package => Package::nestingPackage
-- Profile => Package::nestingPackage
function Internal_Get_New_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ReclassifyObjectAction => ReclassifyObjectAction::newClassifier
function Internal_Get_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Activity::node
-- ActivityPartition => ActivityPartition::node
-- ConditionalNode => StructuredActivityNode::node
-- ExpansionRegion => StructuredActivityNode::node
-- InterruptibleActivityRegion => InterruptibleActivityRegion::node
-- LoopNode => StructuredActivityNode::node
-- SequenceNode => StructuredActivityNode::node
-- StructuredActivityNode => StructuredActivityNode::node
function Internal_Get_Non_Navigability_Notation
(Self : AMF.Internals.AMF_Element)
return AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind;
procedure Internal_Set_Non_Navigability_Notation
(Self : AMF.Internals.AMF_Element;
To : AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind);
-- UMLClassDiagram => UMLClassOrCompositeStructureDiagram::nonNavigabilityNotation
-- UMLCompositeStructureDiagram => UMLClassOrCompositeStructureDiagram::nonNavigabilityNotation
function Internal_Get_Object
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Object
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AddStructuralFeatureValueAction => StructuralFeatureAction::object
-- ClearAssociationAction => ClearAssociationAction::object
-- ClearStructuralFeatureAction => StructuralFeatureAction::object
-- ReadIsClassifiedObjectAction => ReadIsClassifiedObjectAction::object
-- ReadLinkObjectEndAction => ReadLinkObjectEndAction::object
-- ReadLinkObjectEndQualifierAction => ReadLinkObjectEndQualifierAction::object
-- ReadStructuralFeatureAction => StructuralFeatureAction::object
-- ReclassifyObjectAction => ReclassifyObjectAction::object
-- RemoveStructuralFeatureValueAction => StructuralFeatureAction::object
-- StartClassifierBehaviorAction => StartClassifierBehaviorAction::object
-- StartObjectBehaviorAction => StartObjectBehaviorAction::object
-- UnmarshallAction => UnmarshallAction::object
function Internal_Get_Observation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Duration => Duration::observation
-- TimeExpression => TimeExpression::observation
function Internal_Get_Old_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ReclassifyObjectAction => ReclassifyObjectAction::oldClassifier
function Internal_Get_On_Port
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_On_Port
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- BroadcastSignalAction => InvocationAction::onPort
-- CallBehaviorAction => InvocationAction::onPort
-- CallOperationAction => InvocationAction::onPort
-- SendObjectAction => InvocationAction::onPort
-- SendSignalAction => InvocationAction::onPort
-- StartObjectBehaviorAction => InvocationAction::onPort
function Internal_Get_Operand
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- CombinedFragment => CombinedFragment::operand
-- ConsiderIgnoreFragment => CombinedFragment::operand
-- Expression => Expression::operand
-- StringExpression => Expression::operand
function Internal_Get_Operation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Operation
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- CallEvent => CallEvent::operation
-- CallOperationAction => CallOperationAction::operation
-- Parameter => Parameter::operation
function Internal_Get_Opposite
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Opposite
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::opposite
-- Port => Property::opposite
-- Property => Property::opposite
function Internal_Get_Ordering
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Object_Node_Ordering_Kind;
procedure Internal_Set_Ordering
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Object_Node_Ordering_Kind);
-- ActionInputPin => ObjectNode::ordering
-- ActivityParameterNode => ObjectNode::ordering
-- CentralBufferNode => ObjectNode::ordering
-- DataStoreNode => ObjectNode::ordering
-- ExpansionNode => ObjectNode::ordering
-- InputPin => ObjectNode::ordering
-- OutputPin => ObjectNode::ordering
-- ValuePin => ObjectNode::ordering
function Internal_Get_Outgoing
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ActivityNode::outgoing
-- AcceptEventAction => ActivityNode::outgoing
-- ActionInputPin => ActivityNode::outgoing
-- ActivityFinalNode => ActivityNode::outgoing
-- ActivityParameterNode => ActivityNode::outgoing
-- AddStructuralFeatureValueAction => ActivityNode::outgoing
-- AddVariableValueAction => ActivityNode::outgoing
-- BroadcastSignalAction => ActivityNode::outgoing
-- CallBehaviorAction => ActivityNode::outgoing
-- CallOperationAction => ActivityNode::outgoing
-- CentralBufferNode => ActivityNode::outgoing
-- ClearAssociationAction => ActivityNode::outgoing
-- ClearStructuralFeatureAction => ActivityNode::outgoing
-- ClearVariableAction => ActivityNode::outgoing
-- ConditionalNode => ActivityNode::outgoing
-- ConnectionPointReference => Vertex::outgoing
-- CreateLinkAction => ActivityNode::outgoing
-- CreateLinkObjectAction => ActivityNode::outgoing
-- CreateObjectAction => ActivityNode::outgoing
-- DataStoreNode => ActivityNode::outgoing
-- DecisionNode => ActivityNode::outgoing
-- DestroyLinkAction => ActivityNode::outgoing
-- DestroyObjectAction => ActivityNode::outgoing
-- ExpansionNode => ActivityNode::outgoing
-- ExpansionRegion => ActivityNode::outgoing
-- FinalState => Vertex::outgoing
-- FlowFinalNode => ActivityNode::outgoing
-- ForkNode => ActivityNode::outgoing
-- InitialNode => ActivityNode::outgoing
-- InputPin => ActivityNode::outgoing
-- JoinNode => ActivityNode::outgoing
-- LoopNode => ActivityNode::outgoing
-- MergeNode => ActivityNode::outgoing
-- OpaqueAction => ActivityNode::outgoing
-- OutputPin => ActivityNode::outgoing
-- Pseudostate => Vertex::outgoing
-- RaiseExceptionAction => ActivityNode::outgoing
-- ReadExtentAction => ActivityNode::outgoing
-- ReadIsClassifiedObjectAction => ActivityNode::outgoing
-- ReadLinkAction => ActivityNode::outgoing
-- ReadLinkObjectEndAction => ActivityNode::outgoing
-- ReadLinkObjectEndQualifierAction => ActivityNode::outgoing
-- ReadSelfAction => ActivityNode::outgoing
-- ReadStructuralFeatureAction => ActivityNode::outgoing
-- ReadVariableAction => ActivityNode::outgoing
-- ReclassifyObjectAction => ActivityNode::outgoing
-- ReduceAction => ActivityNode::outgoing
-- RemoveStructuralFeatureValueAction => ActivityNode::outgoing
-- RemoveVariableValueAction => ActivityNode::outgoing
-- ReplyAction => ActivityNode::outgoing
-- SendObjectAction => ActivityNode::outgoing
-- SendSignalAction => ActivityNode::outgoing
-- SequenceNode => ActivityNode::outgoing
-- StartClassifierBehaviorAction => ActivityNode::outgoing
-- StartObjectBehaviorAction => ActivityNode::outgoing
-- State => Vertex::outgoing
-- StructuredActivityNode => ActivityNode::outgoing
-- TestIdentityAction => ActivityNode::outgoing
-- UnmarshallAction => ActivityNode::outgoing
-- ValuePin => ActivityNode::outgoing
-- ValueSpecificationAction => ActivityNode::outgoing
function Internal_Get_Output
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => Action::output
-- AcceptEventAction => Action::output
-- AddStructuralFeatureValueAction => Action::output
-- AddVariableValueAction => Action::output
-- BroadcastSignalAction => Action::output
-- CallBehaviorAction => Action::output
-- CallOperationAction => Action::output
-- ClearAssociationAction => Action::output
-- ClearStructuralFeatureAction => Action::output
-- ClearVariableAction => Action::output
-- ConditionalNode => Action::output
-- CreateLinkAction => Action::output
-- CreateLinkObjectAction => Action::output
-- CreateObjectAction => Action::output
-- DestroyLinkAction => Action::output
-- DestroyObjectAction => Action::output
-- ExpansionRegion => Action::output
-- LoopNode => Action::output
-- OpaqueAction => Action::output
-- RaiseExceptionAction => Action::output
-- ReadExtentAction => Action::output
-- ReadIsClassifiedObjectAction => Action::output
-- ReadLinkAction => Action::output
-- ReadLinkObjectEndAction => Action::output
-- ReadLinkObjectEndQualifierAction => Action::output
-- ReadSelfAction => Action::output
-- ReadStructuralFeatureAction => Action::output
-- ReadVariableAction => Action::output
-- ReclassifyObjectAction => Action::output
-- ReduceAction => Action::output
-- RemoveStructuralFeatureValueAction => Action::output
-- RemoveVariableValueAction => Action::output
-- ReplyAction => Action::output
-- SendObjectAction => Action::output
-- SendSignalAction => Action::output
-- SequenceNode => Action::output
-- StartClassifierBehaviorAction => Action::output
-- StartObjectBehaviorAction => Action::output
-- StructuredActivityNode => Action::output
-- TestIdentityAction => Action::output
-- UnmarshallAction => Action::output
-- ValueSpecificationAction => Action::output
function Internal_Get_Output_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ExpansionRegion => ExpansionRegion::outputElement
function Internal_Get_Output_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- OpaqueAction => OpaqueAction::outputValue
function Internal_Get_Owned_Actual
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owned_Actual
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TemplateParameterSubstitution => TemplateParameterSubstitution::ownedActual
function Internal_Get_Owned_Attribute
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Class::ownedAttribute
-- Artifact => Artifact::ownedAttribute
-- AssociationClass => Class::ownedAttribute
-- Class => Class::ownedAttribute
-- Collaboration => StructuredClassifier::ownedAttribute
-- Component => Class::ownedAttribute
-- DataType => DataType::ownedAttribute
-- DeploymentSpecification => Artifact::ownedAttribute
-- Device => Class::ownedAttribute
-- Enumeration => DataType::ownedAttribute
-- ExecutionEnvironment => Class::ownedAttribute
-- FunctionBehavior => Class::ownedAttribute
-- Interaction => Class::ownedAttribute
-- Interface => Interface::ownedAttribute
-- Node => Class::ownedAttribute
-- OpaqueBehavior => Class::ownedAttribute
-- PrimitiveType => DataType::ownedAttribute
-- ProtocolStateMachine => Class::ownedAttribute
-- Signal => Signal::ownedAttribute
-- StateMachine => Class::ownedAttribute
-- Stereotype => Class::ownedAttribute
function Internal_Get_Owned_Behavior
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => BehavioredClassifier::ownedBehavior
-- Actor => BehavioredClassifier::ownedBehavior
-- AssociationClass => BehavioredClassifier::ownedBehavior
-- Class => BehavioredClassifier::ownedBehavior
-- Collaboration => BehavioredClassifier::ownedBehavior
-- Component => BehavioredClassifier::ownedBehavior
-- Device => BehavioredClassifier::ownedBehavior
-- ExecutionEnvironment => BehavioredClassifier::ownedBehavior
-- FunctionBehavior => BehavioredClassifier::ownedBehavior
-- Interaction => BehavioredClassifier::ownedBehavior
-- Node => BehavioredClassifier::ownedBehavior
-- OpaqueBehavior => BehavioredClassifier::ownedBehavior
-- ProtocolStateMachine => BehavioredClassifier::ownedBehavior
-- StateMachine => BehavioredClassifier::ownedBehavior
-- Stereotype => BehavioredClassifier::ownedBehavior
-- UseCase => BehavioredClassifier::ownedBehavior
function Internal_Get_Owned_Comment
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => Element::ownedComment
-- AcceptCallAction => Element::ownedComment
-- AcceptEventAction => Element::ownedComment
-- ActionExecutionSpecification => Element::ownedComment
-- ActionInputPin => Element::ownedComment
-- Activity => Element::ownedComment
-- ActivityFinalNode => Element::ownedComment
-- ActivityParameterNode => Element::ownedComment
-- ActivityPartition => Element::ownedComment
-- Actor => Element::ownedComment
-- AddStructuralFeatureValueAction => Element::ownedComment
-- AddVariableValueAction => Element::ownedComment
-- AnyReceiveEvent => Element::ownedComment
-- Artifact => Element::ownedComment
-- Association => Element::ownedComment
-- AssociationClass => Element::ownedComment
-- BehaviorExecutionSpecification => Element::ownedComment
-- BroadcastSignalAction => Element::ownedComment
-- CallBehaviorAction => Element::ownedComment
-- CallEvent => Element::ownedComment
-- CallOperationAction => Element::ownedComment
-- CentralBufferNode => Element::ownedComment
-- ChangeEvent => Element::ownedComment
-- Class => Element::ownedComment
-- ClassifierTemplateParameter => Element::ownedComment
-- Clause => Element::ownedComment
-- ClearAssociationAction => Element::ownedComment
-- ClearStructuralFeatureAction => Element::ownedComment
-- ClearVariableAction => Element::ownedComment
-- Collaboration => Element::ownedComment
-- CollaborationUse => Element::ownedComment
-- CombinedFragment => Element::ownedComment
-- Comment => Element::ownedComment
-- CommunicationPath => Element::ownedComment
-- Component => Element::ownedComment
-- ComponentRealization => Element::ownedComment
-- ConditionalNode => Element::ownedComment
-- ConnectableElementTemplateParameter => Element::ownedComment
-- ConnectionPointReference => Element::ownedComment
-- Connector => Element::ownedComment
-- ConnectorEnd => Element::ownedComment
-- ConsiderIgnoreFragment => Element::ownedComment
-- Constraint => Element::ownedComment
-- Continuation => Element::ownedComment
-- ControlFlow => Element::ownedComment
-- CreateLinkAction => Element::ownedComment
-- CreateLinkObjectAction => Element::ownedComment
-- CreateObjectAction => Element::ownedComment
-- UMLActivityDiagram => Element::ownedComment
-- UMLClassDiagram => Element::ownedComment
-- UMLComponentDiagram => Element::ownedComment
-- UMLCompositeStructureDiagram => Element::ownedComment
-- UMLDeploymentDiagram => Element::ownedComment
-- UMLInteractionDiagram => Element::ownedComment
-- UMLObjectDiagram => Element::ownedComment
-- UMLPackageDiagram => Element::ownedComment
-- UMLProfileDiagram => Element::ownedComment
-- UMLStateMachineDiagram => Element::ownedComment
-- UMLStyle => Element::ownedComment
-- UMLUseCaseDiagram => Element::ownedComment
-- DataStoreNode => Element::ownedComment
-- DataType => Element::ownedComment
-- DecisionNode => Element::ownedComment
-- Dependency => Element::ownedComment
-- Deployment => Element::ownedComment
-- DeploymentSpecification => Element::ownedComment
-- DestroyLinkAction => Element::ownedComment
-- DestroyObjectAction => Element::ownedComment
-- DestructionOccurrenceSpecification => Element::ownedComment
-- Device => Element::ownedComment
-- Duration => Element::ownedComment
-- DurationConstraint => Element::ownedComment
-- DurationInterval => Element::ownedComment
-- DurationObservation => Element::ownedComment
-- ElementImport => Element::ownedComment
-- Enumeration => Element::ownedComment
-- EnumerationLiteral => Element::ownedComment
-- ExceptionHandler => Element::ownedComment
-- ExecutionEnvironment => Element::ownedComment
-- ExecutionOccurrenceSpecification => Element::ownedComment
-- ExpansionNode => Element::ownedComment
-- ExpansionRegion => Element::ownedComment
-- Expression => Element::ownedComment
-- Extend => Element::ownedComment
-- Extension => Element::ownedComment
-- ExtensionEnd => Element::ownedComment
-- ExtensionPoint => Element::ownedComment
-- FinalState => Element::ownedComment
-- FlowFinalNode => Element::ownedComment
-- ForkNode => Element::ownedComment
-- FunctionBehavior => Element::ownedComment
-- Gate => Element::ownedComment
-- GeneralOrdering => Element::ownedComment
-- Generalization => Element::ownedComment
-- GeneralizationSet => Element::ownedComment
-- Image => Element::ownedComment
-- Include => Element::ownedComment
-- InformationFlow => Element::ownedComment
-- InformationItem => Element::ownedComment
-- InitialNode => Element::ownedComment
-- InputPin => Element::ownedComment
-- InstanceSpecification => Element::ownedComment
-- InstanceValue => Element::ownedComment
-- Interaction => Element::ownedComment
-- InteractionConstraint => Element::ownedComment
-- InteractionOperand => Element::ownedComment
-- InteractionUse => Element::ownedComment
-- Interface => Element::ownedComment
-- InterfaceRealization => Element::ownedComment
-- InterruptibleActivityRegion => Element::ownedComment
-- Interval => Element::ownedComment
-- IntervalConstraint => Element::ownedComment
-- JoinNode => Element::ownedComment
-- Lifeline => Element::ownedComment
-- LinkEndCreationData => Element::ownedComment
-- LinkEndData => Element::ownedComment
-- LinkEndDestructionData => Element::ownedComment
-- LiteralBoolean => Element::ownedComment
-- LiteralInteger => Element::ownedComment
-- LiteralNull => Element::ownedComment
-- LiteralReal => Element::ownedComment
-- LiteralString => Element::ownedComment
-- LiteralUnlimitedNatural => Element::ownedComment
-- LoopNode => Element::ownedComment
-- Manifestation => Element::ownedComment
-- MergeNode => Element::ownedComment
-- Message => Element::ownedComment
-- MessageOccurrenceSpecification => Element::ownedComment
-- Model => Element::ownedComment
-- Node => Element::ownedComment
-- ObjectFlow => Element::ownedComment
-- OccurrenceSpecification => Element::ownedComment
-- OpaqueAction => Element::ownedComment
-- OpaqueBehavior => Element::ownedComment
-- OpaqueExpression => Element::ownedComment
-- Operation => Element::ownedComment
-- OperationTemplateParameter => Element::ownedComment
-- OutputPin => Element::ownedComment
-- Package => Element::ownedComment
-- PackageImport => Element::ownedComment
-- PackageMerge => Element::ownedComment
-- Parameter => Element::ownedComment
-- ParameterSet => Element::ownedComment
-- PartDecomposition => Element::ownedComment
-- Port => Element::ownedComment
-- PrimitiveType => Element::ownedComment
-- Profile => Element::ownedComment
-- ProfileApplication => Element::ownedComment
-- Property => Element::ownedComment
-- ProtocolConformance => Element::ownedComment
-- ProtocolStateMachine => Element::ownedComment
-- ProtocolTransition => Element::ownedComment
-- Pseudostate => Element::ownedComment
-- QualifierValue => Element::ownedComment
-- RaiseExceptionAction => Element::ownedComment
-- ReadExtentAction => Element::ownedComment
-- ReadIsClassifiedObjectAction => Element::ownedComment
-- ReadLinkAction => Element::ownedComment
-- ReadLinkObjectEndAction => Element::ownedComment
-- ReadLinkObjectEndQualifierAction => Element::ownedComment
-- ReadSelfAction => Element::ownedComment
-- ReadStructuralFeatureAction => Element::ownedComment
-- ReadVariableAction => Element::ownedComment
-- Realization => Element::ownedComment
-- Reception => Element::ownedComment
-- ReclassifyObjectAction => Element::ownedComment
-- RedefinableTemplateSignature => Element::ownedComment
-- ReduceAction => Element::ownedComment
-- Region => Element::ownedComment
-- RemoveStructuralFeatureValueAction => Element::ownedComment
-- RemoveVariableValueAction => Element::ownedComment
-- ReplyAction => Element::ownedComment
-- SendObjectAction => Element::ownedComment
-- SendSignalAction => Element::ownedComment
-- SequenceNode => Element::ownedComment
-- Signal => Element::ownedComment
-- SignalEvent => Element::ownedComment
-- Slot => Element::ownedComment
-- StartClassifierBehaviorAction => Element::ownedComment
-- StartObjectBehaviorAction => Element::ownedComment
-- State => Element::ownedComment
-- StateInvariant => Element::ownedComment
-- StateMachine => Element::ownedComment
-- Stereotype => Element::ownedComment
-- StringExpression => Element::ownedComment
-- StructuredActivityNode => Element::ownedComment
-- Substitution => Element::ownedComment
-- TemplateBinding => Element::ownedComment
-- TemplateParameter => Element::ownedComment
-- TemplateParameterSubstitution => Element::ownedComment
-- TemplateSignature => Element::ownedComment
-- TestIdentityAction => Element::ownedComment
-- TimeConstraint => Element::ownedComment
-- TimeEvent => Element::ownedComment
-- TimeExpression => Element::ownedComment
-- TimeInterval => Element::ownedComment
-- TimeObservation => Element::ownedComment
-- Transition => Element::ownedComment
-- Trigger => Element::ownedComment
-- UnmarshallAction => Element::ownedComment
-- Usage => Element::ownedComment
-- UseCase => Element::ownedComment
-- ValuePin => Element::ownedComment
-- ValueSpecificationAction => Element::ownedComment
-- Variable => Element::ownedComment
function Internal_Get_Owned_Connector
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => StructuredClassifier::ownedConnector
-- AssociationClass => StructuredClassifier::ownedConnector
-- Class => StructuredClassifier::ownedConnector
-- Collaboration => StructuredClassifier::ownedConnector
-- Component => StructuredClassifier::ownedConnector
-- Device => StructuredClassifier::ownedConnector
-- ExecutionEnvironment => StructuredClassifier::ownedConnector
-- FunctionBehavior => StructuredClassifier::ownedConnector
-- Interaction => StructuredClassifier::ownedConnector
-- Node => StructuredClassifier::ownedConnector
-- OpaqueBehavior => StructuredClassifier::ownedConnector
-- ProtocolStateMachine => StructuredClassifier::ownedConnector
-- StateMachine => StructuredClassifier::ownedConnector
-- Stereotype => StructuredClassifier::ownedConnector
function Internal_Get_Owned_Default
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owned_Default
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ClassifierTemplateParameter => TemplateParameter::ownedDefault
-- ConnectableElementTemplateParameter => TemplateParameter::ownedDefault
-- OperationTemplateParameter => TemplateParameter::ownedDefault
-- TemplateParameter => TemplateParameter::ownedDefault
function Internal_Get_Owned_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => Element::ownedElement
-- AcceptCallAction => Element::ownedElement
-- AcceptEventAction => Element::ownedElement
-- ActionExecutionSpecification => Element::ownedElement
-- ActionInputPin => Element::ownedElement
-- Activity => Element::ownedElement
-- ActivityFinalNode => Element::ownedElement
-- ActivityParameterNode => Element::ownedElement
-- ActivityPartition => Element::ownedElement
-- Actor => Element::ownedElement
-- AddStructuralFeatureValueAction => Element::ownedElement
-- AddVariableValueAction => Element::ownedElement
-- AnyReceiveEvent => Element::ownedElement
-- Artifact => Element::ownedElement
-- Association => Element::ownedElement
-- AssociationClass => Element::ownedElement
-- BehaviorExecutionSpecification => Element::ownedElement
-- BroadcastSignalAction => Element::ownedElement
-- CallBehaviorAction => Element::ownedElement
-- CallEvent => Element::ownedElement
-- CallOperationAction => Element::ownedElement
-- CentralBufferNode => Element::ownedElement
-- ChangeEvent => Element::ownedElement
-- Class => Element::ownedElement
-- ClassifierTemplateParameter => Element::ownedElement
-- Clause => Element::ownedElement
-- ClearAssociationAction => Element::ownedElement
-- ClearStructuralFeatureAction => Element::ownedElement
-- ClearVariableAction => Element::ownedElement
-- Collaboration => Element::ownedElement
-- CollaborationUse => Element::ownedElement
-- CombinedFragment => Element::ownedElement
-- Comment => Element::ownedElement
-- CommunicationPath => Element::ownedElement
-- Component => Element::ownedElement
-- ComponentRealization => Element::ownedElement
-- ConditionalNode => Element::ownedElement
-- ConnectableElementTemplateParameter => Element::ownedElement
-- ConnectionPointReference => Element::ownedElement
-- Connector => Element::ownedElement
-- ConnectorEnd => Element::ownedElement
-- ConsiderIgnoreFragment => Element::ownedElement
-- Constraint => Element::ownedElement
-- Continuation => Element::ownedElement
-- ControlFlow => Element::ownedElement
-- CreateLinkAction => Element::ownedElement
-- CreateLinkObjectAction => Element::ownedElement
-- CreateObjectAction => Element::ownedElement
-- UMLActivityDiagram => Element::ownedElement
-- UMLAssociationEndLabel => UMLDiagramElement::ownedElement
-- UMLAssociationOrConnectorOrLinkShape => UMLDiagramElement::ownedElement
-- UMLClassDiagram => Element::ownedElement
-- UMLClassifierShape => UMLDiagramElement::ownedElement
-- UMLCompartment => UMLDiagramElement::ownedElement
-- UMLCompartmentableShape => UMLDiagramElement::ownedElement
-- UMLComponentDiagram => Element::ownedElement
-- UMLCompositeStructureDiagram => Element::ownedElement
-- UMLDeploymentDiagram => Element::ownedElement
-- UMLEdge => UMLDiagramElement::ownedElement
-- UMLInteractionDiagram => Element::ownedElement
-- UMLInteractionTableLabel => UMLDiagramElement::ownedElement
-- UMLKeywordLabel => UMLDiagramElement::ownedElement
-- UMLLabel => UMLDiagramElement::ownedElement
-- UMLMultiplicityLabel => UMLDiagramElement::ownedElement
-- UMLNameLabel => UMLDiagramElement::ownedElement
-- UMLObjectDiagram => Element::ownedElement
-- UMLPackageDiagram => Element::ownedElement
-- UMLProfileDiagram => Element::ownedElement
-- UMLRedefinesLabel => UMLDiagramElement::ownedElement
-- UMLShape => UMLDiagramElement::ownedElement
-- UMLStateMachineDiagram => Element::ownedElement
-- UMLStateShape => UMLDiagramElement::ownedElement
-- UMLStereotypePropertyValueLabel => UMLDiagramElement::ownedElement
-- UMLStyle => Element::ownedElement
-- UMLTypedElementLabel => UMLDiagramElement::ownedElement
-- UMLUseCaseDiagram => Element::ownedElement
-- DataStoreNode => Element::ownedElement
-- DataType => Element::ownedElement
-- DecisionNode => Element::ownedElement
-- Dependency => Element::ownedElement
-- Deployment => Element::ownedElement
-- DeploymentSpecification => Element::ownedElement
-- DestroyLinkAction => Element::ownedElement
-- DestroyObjectAction => Element::ownedElement
-- DestructionOccurrenceSpecification => Element::ownedElement
-- Device => Element::ownedElement
-- Duration => Element::ownedElement
-- DurationConstraint => Element::ownedElement
-- DurationInterval => Element::ownedElement
-- DurationObservation => Element::ownedElement
-- ElementImport => Element::ownedElement
-- Enumeration => Element::ownedElement
-- EnumerationLiteral => Element::ownedElement
-- ExceptionHandler => Element::ownedElement
-- ExecutionEnvironment => Element::ownedElement
-- ExecutionOccurrenceSpecification => Element::ownedElement
-- ExpansionNode => Element::ownedElement
-- ExpansionRegion => Element::ownedElement
-- Expression => Element::ownedElement
-- Extend => Element::ownedElement
-- Extension => Element::ownedElement
-- ExtensionEnd => Element::ownedElement
-- ExtensionPoint => Element::ownedElement
-- FinalState => Element::ownedElement
-- FlowFinalNode => Element::ownedElement
-- ForkNode => Element::ownedElement
-- FunctionBehavior => Element::ownedElement
-- Gate => Element::ownedElement
-- GeneralOrdering => Element::ownedElement
-- Generalization => Element::ownedElement
-- GeneralizationSet => Element::ownedElement
-- Image => Element::ownedElement
-- Include => Element::ownedElement
-- InformationFlow => Element::ownedElement
-- InformationItem => Element::ownedElement
-- InitialNode => Element::ownedElement
-- InputPin => Element::ownedElement
-- InstanceSpecification => Element::ownedElement
-- InstanceValue => Element::ownedElement
-- Interaction => Element::ownedElement
-- InteractionConstraint => Element::ownedElement
-- InteractionOperand => Element::ownedElement
-- InteractionUse => Element::ownedElement
-- Interface => Element::ownedElement
-- InterfaceRealization => Element::ownedElement
-- InterruptibleActivityRegion => Element::ownedElement
-- Interval => Element::ownedElement
-- IntervalConstraint => Element::ownedElement
-- JoinNode => Element::ownedElement
-- Lifeline => Element::ownedElement
-- LinkEndCreationData => Element::ownedElement
-- LinkEndData => Element::ownedElement
-- LinkEndDestructionData => Element::ownedElement
-- LiteralBoolean => Element::ownedElement
-- LiteralInteger => Element::ownedElement
-- LiteralNull => Element::ownedElement
-- LiteralReal => Element::ownedElement
-- LiteralString => Element::ownedElement
-- LiteralUnlimitedNatural => Element::ownedElement
-- LoopNode => Element::ownedElement
-- Manifestation => Element::ownedElement
-- MergeNode => Element::ownedElement
-- Message => Element::ownedElement
-- MessageOccurrenceSpecification => Element::ownedElement
-- Model => Element::ownedElement
-- Node => Element::ownedElement
-- ObjectFlow => Element::ownedElement
-- OccurrenceSpecification => Element::ownedElement
-- OpaqueAction => Element::ownedElement
-- OpaqueBehavior => Element::ownedElement
-- OpaqueExpression => Element::ownedElement
-- Operation => Element::ownedElement
-- OperationTemplateParameter => Element::ownedElement
-- OutputPin => Element::ownedElement
-- Package => Element::ownedElement
-- PackageImport => Element::ownedElement
-- PackageMerge => Element::ownedElement
-- Parameter => Element::ownedElement
-- ParameterSet => Element::ownedElement
-- PartDecomposition => Element::ownedElement
-- Port => Element::ownedElement
-- PrimitiveType => Element::ownedElement
-- Profile => Element::ownedElement
-- ProfileApplication => Element::ownedElement
-- Property => Element::ownedElement
-- ProtocolConformance => Element::ownedElement
-- ProtocolStateMachine => Element::ownedElement
-- ProtocolTransition => Element::ownedElement
-- Pseudostate => Element::ownedElement
-- QualifierValue => Element::ownedElement
-- RaiseExceptionAction => Element::ownedElement
-- ReadExtentAction => Element::ownedElement
-- ReadIsClassifiedObjectAction => Element::ownedElement
-- ReadLinkAction => Element::ownedElement
-- ReadLinkObjectEndAction => Element::ownedElement
-- ReadLinkObjectEndQualifierAction => Element::ownedElement
-- ReadSelfAction => Element::ownedElement
-- ReadStructuralFeatureAction => Element::ownedElement
-- ReadVariableAction => Element::ownedElement
-- Realization => Element::ownedElement
-- Reception => Element::ownedElement
-- ReclassifyObjectAction => Element::ownedElement
-- RedefinableTemplateSignature => Element::ownedElement
-- ReduceAction => Element::ownedElement
-- Region => Element::ownedElement
-- RemoveStructuralFeatureValueAction => Element::ownedElement
-- RemoveVariableValueAction => Element::ownedElement
-- ReplyAction => Element::ownedElement
-- SendObjectAction => Element::ownedElement
-- SendSignalAction => Element::ownedElement
-- SequenceNode => Element::ownedElement
-- Signal => Element::ownedElement
-- SignalEvent => Element::ownedElement
-- Slot => Element::ownedElement
-- StartClassifierBehaviorAction => Element::ownedElement
-- StartObjectBehaviorAction => Element::ownedElement
-- State => Element::ownedElement
-- StateInvariant => Element::ownedElement
-- StateMachine => Element::ownedElement
-- Stereotype => Element::ownedElement
-- StringExpression => Element::ownedElement
-- StructuredActivityNode => Element::ownedElement
-- Substitution => Element::ownedElement
-- TemplateBinding => Element::ownedElement
-- TemplateParameter => Element::ownedElement
-- TemplateParameterSubstitution => Element::ownedElement
-- TemplateSignature => Element::ownedElement
-- TestIdentityAction => Element::ownedElement
-- TimeConstraint => Element::ownedElement
-- TimeEvent => Element::ownedElement
-- TimeExpression => Element::ownedElement
-- TimeInterval => Element::ownedElement
-- TimeObservation => Element::ownedElement
-- Transition => Element::ownedElement
-- Trigger => Element::ownedElement
-- UnmarshallAction => Element::ownedElement
-- Usage => Element::ownedElement
-- UseCase => Element::ownedElement
-- ValuePin => Element::ownedElement
-- ValueSpecificationAction => Element::ownedElement
-- Variable => Element::ownedElement
function Internal_Get_Owned_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Association => Association::ownedEnd
-- AssociationClass => Association::ownedEnd
-- CommunicationPath => Association::ownedEnd
-- Extension => Association::ownedEnd
function Internal_Get_Owned_End
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owned_End
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Extension => Extension::ownedEnd
function Internal_Get_Owned_Literal
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Enumeration => Enumeration::ownedLiteral
function Internal_Get_Owned_Member
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Namespace::ownedMember
-- Actor => Namespace::ownedMember
-- Artifact => Namespace::ownedMember
-- Association => Namespace::ownedMember
-- AssociationClass => Namespace::ownedMember
-- Class => Namespace::ownedMember
-- Collaboration => Namespace::ownedMember
-- CommunicationPath => Namespace::ownedMember
-- Component => Namespace::ownedMember
-- ConditionalNode => Namespace::ownedMember
-- DataType => Namespace::ownedMember
-- DeploymentSpecification => Namespace::ownedMember
-- Device => Namespace::ownedMember
-- Enumeration => Namespace::ownedMember
-- ExecutionEnvironment => Namespace::ownedMember
-- ExpansionRegion => Namespace::ownedMember
-- Extension => Namespace::ownedMember
-- FinalState => Namespace::ownedMember
-- FunctionBehavior => Namespace::ownedMember
-- InformationItem => Namespace::ownedMember
-- Interaction => Namespace::ownedMember
-- InteractionOperand => Namespace::ownedMember
-- Interface => Namespace::ownedMember
-- LoopNode => Namespace::ownedMember
-- Model => Namespace::ownedMember
-- Node => Namespace::ownedMember
-- OpaqueBehavior => Namespace::ownedMember
-- Operation => Namespace::ownedMember
-- Package => Namespace::ownedMember
-- PrimitiveType => Namespace::ownedMember
-- Profile => Namespace::ownedMember
-- ProtocolStateMachine => Namespace::ownedMember
-- ProtocolTransition => Namespace::ownedMember
-- Reception => Namespace::ownedMember
-- Region => Namespace::ownedMember
-- SequenceNode => Namespace::ownedMember
-- Signal => Namespace::ownedMember
-- State => Namespace::ownedMember
-- StateMachine => Namespace::ownedMember
-- Stereotype => Namespace::ownedMember
-- StructuredActivityNode => Namespace::ownedMember
-- Transition => Namespace::ownedMember
-- UseCase => Namespace::ownedMember
function Internal_Get_Owned_Operation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Class::ownedOperation
-- Artifact => Artifact::ownedOperation
-- AssociationClass => Class::ownedOperation
-- Class => Class::ownedOperation
-- Component => Class::ownedOperation
-- DataType => DataType::ownedOperation
-- DeploymentSpecification => Artifact::ownedOperation
-- Device => Class::ownedOperation
-- Enumeration => DataType::ownedOperation
-- ExecutionEnvironment => Class::ownedOperation
-- FunctionBehavior => Class::ownedOperation
-- Interaction => Class::ownedOperation
-- Interface => Interface::ownedOperation
-- Node => Class::ownedOperation
-- OpaqueBehavior => Class::ownedOperation
-- PrimitiveType => DataType::ownedOperation
-- ProtocolStateMachine => Class::ownedOperation
-- StateMachine => Class::ownedOperation
-- Stereotype => Class::ownedOperation
function Internal_Get_Owned_Parameter
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Behavior::ownedParameter
-- FunctionBehavior => Behavior::ownedParameter
-- Interaction => Behavior::ownedParameter
-- OpaqueBehavior => Behavior::ownedParameter
-- Operation => BehavioralFeature::ownedParameter
-- ProtocolStateMachine => Behavior::ownedParameter
-- Reception => BehavioralFeature::ownedParameter
-- RedefinableTemplateSignature => TemplateSignature::ownedParameter
-- StateMachine => Behavior::ownedParameter
-- TemplateSignature => TemplateSignature::ownedParameter
function Internal_Get_Owned_Parameter_Set
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Behavior::ownedParameterSet
-- FunctionBehavior => Behavior::ownedParameterSet
-- Interaction => Behavior::ownedParameterSet
-- OpaqueBehavior => Behavior::ownedParameterSet
-- Operation => BehavioralFeature::ownedParameterSet
-- ProtocolStateMachine => Behavior::ownedParameterSet
-- Reception => BehavioralFeature::ownedParameterSet
-- StateMachine => Behavior::ownedParameterSet
function Internal_Get_Owned_Parametered_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owned_Parametered_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ClassifierTemplateParameter => TemplateParameter::ownedParameteredElement
-- ConnectableElementTemplateParameter => TemplateParameter::ownedParameteredElement
-- OperationTemplateParameter => TemplateParameter::ownedParameteredElement
-- TemplateParameter => TemplateParameter::ownedParameteredElement
function Internal_Get_Owned_Port
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => EncapsulatedClassifier::ownedPort
-- AssociationClass => EncapsulatedClassifier::ownedPort
-- Class => EncapsulatedClassifier::ownedPort
-- Component => EncapsulatedClassifier::ownedPort
-- Device => EncapsulatedClassifier::ownedPort
-- ExecutionEnvironment => EncapsulatedClassifier::ownedPort
-- FunctionBehavior => EncapsulatedClassifier::ownedPort
-- Interaction => EncapsulatedClassifier::ownedPort
-- Node => EncapsulatedClassifier::ownedPort
-- OpaqueBehavior => EncapsulatedClassifier::ownedPort
-- ProtocolStateMachine => EncapsulatedClassifier::ownedPort
-- StateMachine => EncapsulatedClassifier::ownedPort
-- Stereotype => EncapsulatedClassifier::ownedPort
function Internal_Get_Owned_Reception
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Class::ownedReception
-- AssociationClass => Class::ownedReception
-- Class => Class::ownedReception
-- Component => Class::ownedReception
-- Device => Class::ownedReception
-- ExecutionEnvironment => Class::ownedReception
-- FunctionBehavior => Class::ownedReception
-- Interaction => Class::ownedReception
-- Interface => Interface::ownedReception
-- Node => Class::ownedReception
-- OpaqueBehavior => Class::ownedReception
-- ProtocolStateMachine => Class::ownedReception
-- StateMachine => Class::ownedReception
-- Stereotype => Class::ownedReception
function Internal_Get_Owned_Rule
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Namespace::ownedRule
-- Actor => Namespace::ownedRule
-- Artifact => Namespace::ownedRule
-- Association => Namespace::ownedRule
-- AssociationClass => Namespace::ownedRule
-- Class => Namespace::ownedRule
-- Collaboration => Namespace::ownedRule
-- CommunicationPath => Namespace::ownedRule
-- Component => Namespace::ownedRule
-- ConditionalNode => Namespace::ownedRule
-- DataType => Namespace::ownedRule
-- DeploymentSpecification => Namespace::ownedRule
-- Device => Namespace::ownedRule
-- Enumeration => Namespace::ownedRule
-- ExecutionEnvironment => Namespace::ownedRule
-- ExpansionRegion => Namespace::ownedRule
-- Extension => Namespace::ownedRule
-- FinalState => Namespace::ownedRule
-- FunctionBehavior => Namespace::ownedRule
-- InformationItem => Namespace::ownedRule
-- Interaction => Namespace::ownedRule
-- InteractionOperand => Namespace::ownedRule
-- Interface => Namespace::ownedRule
-- LoopNode => Namespace::ownedRule
-- Model => Namespace::ownedRule
-- Node => Namespace::ownedRule
-- OpaqueBehavior => Namespace::ownedRule
-- Operation => Namespace::ownedRule
-- Package => Namespace::ownedRule
-- PrimitiveType => Namespace::ownedRule
-- Profile => Namespace::ownedRule
-- ProtocolStateMachine => Namespace::ownedRule
-- ProtocolTransition => Namespace::ownedRule
-- Reception => Namespace::ownedRule
-- Region => Namespace::ownedRule
-- SequenceNode => Namespace::ownedRule
-- Signal => Namespace::ownedRule
-- State => Namespace::ownedRule
-- StateMachine => Namespace::ownedRule
-- Stereotype => Namespace::ownedRule
-- StructuredActivityNode => Namespace::ownedRule
-- Transition => Namespace::ownedRule
-- UseCase => Namespace::ownedRule
function Internal_Get_Owned_Stereotype
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Model => Package::ownedStereotype
-- Package => Package::ownedStereotype
-- Profile => Package::ownedStereotype
function Internal_Get_Owned_Template_Signature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owned_Template_Signature
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Activity => Classifier::ownedTemplateSignature
-- Actor => Classifier::ownedTemplateSignature
-- Artifact => Classifier::ownedTemplateSignature
-- Association => Classifier::ownedTemplateSignature
-- AssociationClass => Classifier::ownedTemplateSignature
-- Class => Classifier::ownedTemplateSignature
-- Collaboration => Classifier::ownedTemplateSignature
-- CommunicationPath => Classifier::ownedTemplateSignature
-- Component => Classifier::ownedTemplateSignature
-- DataType => Classifier::ownedTemplateSignature
-- DeploymentSpecification => Classifier::ownedTemplateSignature
-- Device => Classifier::ownedTemplateSignature
-- Enumeration => Classifier::ownedTemplateSignature
-- ExecutionEnvironment => Classifier::ownedTemplateSignature
-- Extension => Classifier::ownedTemplateSignature
-- FunctionBehavior => Classifier::ownedTemplateSignature
-- InformationItem => Classifier::ownedTemplateSignature
-- Interaction => Classifier::ownedTemplateSignature
-- Interface => Classifier::ownedTemplateSignature
-- Model => TemplateableElement::ownedTemplateSignature
-- Node => Classifier::ownedTemplateSignature
-- OpaqueBehavior => Classifier::ownedTemplateSignature
-- Operation => TemplateableElement::ownedTemplateSignature
-- Package => TemplateableElement::ownedTemplateSignature
-- PrimitiveType => Classifier::ownedTemplateSignature
-- Profile => TemplateableElement::ownedTemplateSignature
-- ProtocolStateMachine => Classifier::ownedTemplateSignature
-- Signal => Classifier::ownedTemplateSignature
-- StateMachine => Classifier::ownedTemplateSignature
-- Stereotype => Classifier::ownedTemplateSignature
-- StringExpression => TemplateableElement::ownedTemplateSignature
-- UseCase => Classifier::ownedTemplateSignature
function Internal_Get_Owned_Type
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Model => Package::ownedType
-- Package => Package::ownedType
-- Profile => Package::ownedType
function Internal_Get_Owned_Use_Case
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::ownedUseCase
-- Actor => Classifier::ownedUseCase
-- Artifact => Classifier::ownedUseCase
-- Association => Classifier::ownedUseCase
-- AssociationClass => Classifier::ownedUseCase
-- Class => Classifier::ownedUseCase
-- Collaboration => Classifier::ownedUseCase
-- CommunicationPath => Classifier::ownedUseCase
-- Component => Classifier::ownedUseCase
-- DataType => Classifier::ownedUseCase
-- DeploymentSpecification => Classifier::ownedUseCase
-- Device => Classifier::ownedUseCase
-- Enumeration => Classifier::ownedUseCase
-- ExecutionEnvironment => Classifier::ownedUseCase
-- Extension => Classifier::ownedUseCase
-- FunctionBehavior => Classifier::ownedUseCase
-- InformationItem => Classifier::ownedUseCase
-- Interaction => Classifier::ownedUseCase
-- Interface => Classifier::ownedUseCase
-- Node => Classifier::ownedUseCase
-- OpaqueBehavior => Classifier::ownedUseCase
-- PrimitiveType => Classifier::ownedUseCase
-- ProtocolStateMachine => Classifier::ownedUseCase
-- Signal => Classifier::ownedUseCase
-- StateMachine => Classifier::ownedUseCase
-- Stereotype => Classifier::ownedUseCase
-- UseCase => Classifier::ownedUseCase
function Internal_Get_Owner
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- Abstraction => Element::owner
-- AcceptCallAction => Element::owner
-- AcceptEventAction => Element::owner
-- ActionExecutionSpecification => Element::owner
-- ActionInputPin => Element::owner
-- Activity => Element::owner
-- ActivityFinalNode => Element::owner
-- ActivityParameterNode => Element::owner
-- ActivityPartition => Element::owner
-- Actor => Element::owner
-- AddStructuralFeatureValueAction => Element::owner
-- AddVariableValueAction => Element::owner
-- AnyReceiveEvent => Element::owner
-- Artifact => Element::owner
-- Association => Element::owner
-- AssociationClass => Element::owner
-- BehaviorExecutionSpecification => Element::owner
-- BroadcastSignalAction => Element::owner
-- CallBehaviorAction => Element::owner
-- CallEvent => Element::owner
-- CallOperationAction => Element::owner
-- CentralBufferNode => Element::owner
-- ChangeEvent => Element::owner
-- Class => Element::owner
-- ClassifierTemplateParameter => Element::owner
-- Clause => Element::owner
-- ClearAssociationAction => Element::owner
-- ClearStructuralFeatureAction => Element::owner
-- ClearVariableAction => Element::owner
-- Collaboration => Element::owner
-- CollaborationUse => Element::owner
-- CombinedFragment => Element::owner
-- Comment => Element::owner
-- CommunicationPath => Element::owner
-- Component => Element::owner
-- ComponentRealization => Element::owner
-- ConditionalNode => Element::owner
-- ConnectableElementTemplateParameter => Element::owner
-- ConnectionPointReference => Element::owner
-- Connector => Element::owner
-- ConnectorEnd => Element::owner
-- ConsiderIgnoreFragment => Element::owner
-- Constraint => Element::owner
-- Continuation => Element::owner
-- ControlFlow => Element::owner
-- CreateLinkAction => Element::owner
-- CreateLinkObjectAction => Element::owner
-- CreateObjectAction => Element::owner
-- UMLActivityDiagram => Element::owner
-- UMLClassDiagram => Element::owner
-- UMLComponentDiagram => Element::owner
-- UMLCompositeStructureDiagram => Element::owner
-- UMLDeploymentDiagram => Element::owner
-- UMLInteractionDiagram => Element::owner
-- UMLObjectDiagram => Element::owner
-- UMLPackageDiagram => Element::owner
-- UMLProfileDiagram => Element::owner
-- UMLStateMachineDiagram => Element::owner
-- UMLStyle => Element::owner
-- UMLUseCaseDiagram => Element::owner
-- DataStoreNode => Element::owner
-- DataType => Element::owner
-- DecisionNode => Element::owner
-- Dependency => Element::owner
-- Deployment => Element::owner
-- DeploymentSpecification => Element::owner
-- DestroyLinkAction => Element::owner
-- DestroyObjectAction => Element::owner
-- DestructionOccurrenceSpecification => Element::owner
-- Device => Element::owner
-- Duration => Element::owner
-- DurationConstraint => Element::owner
-- DurationInterval => Element::owner
-- DurationObservation => Element::owner
-- ElementImport => Element::owner
-- Enumeration => Element::owner
-- EnumerationLiteral => Element::owner
-- ExceptionHandler => Element::owner
-- ExecutionEnvironment => Element::owner
-- ExecutionOccurrenceSpecification => Element::owner
-- ExpansionNode => Element::owner
-- ExpansionRegion => Element::owner
-- Expression => Element::owner
-- Extend => Element::owner
-- Extension => Element::owner
-- ExtensionEnd => Element::owner
-- ExtensionPoint => Element::owner
-- FinalState => Element::owner
-- FlowFinalNode => Element::owner
-- ForkNode => Element::owner
-- FunctionBehavior => Element::owner
-- Gate => Element::owner
-- GeneralOrdering => Element::owner
-- Generalization => Element::owner
-- GeneralizationSet => Element::owner
-- Image => Element::owner
-- Include => Element::owner
-- InformationFlow => Element::owner
-- InformationItem => Element::owner
-- InitialNode => Element::owner
-- InputPin => Element::owner
-- InstanceSpecification => Element::owner
-- InstanceValue => Element::owner
-- Interaction => Element::owner
-- InteractionConstraint => Element::owner
-- InteractionOperand => Element::owner
-- InteractionUse => Element::owner
-- Interface => Element::owner
-- InterfaceRealization => Element::owner
-- InterruptibleActivityRegion => Element::owner
-- Interval => Element::owner
-- IntervalConstraint => Element::owner
-- JoinNode => Element::owner
-- Lifeline => Element::owner
-- LinkEndCreationData => Element::owner
-- LinkEndData => Element::owner
-- LinkEndDestructionData => Element::owner
-- LiteralBoolean => Element::owner
-- LiteralInteger => Element::owner
-- LiteralNull => Element::owner
-- LiteralReal => Element::owner
-- LiteralString => Element::owner
-- LiteralUnlimitedNatural => Element::owner
-- LoopNode => Element::owner
-- Manifestation => Element::owner
-- MergeNode => Element::owner
-- Message => Element::owner
-- MessageOccurrenceSpecification => Element::owner
-- Model => Element::owner
-- Node => Element::owner
-- ObjectFlow => Element::owner
-- OccurrenceSpecification => Element::owner
-- OpaqueAction => Element::owner
-- OpaqueBehavior => Element::owner
-- OpaqueExpression => Element::owner
-- Operation => Element::owner
-- OperationTemplateParameter => Element::owner
-- OutputPin => Element::owner
-- Package => Element::owner
-- PackageImport => Element::owner
-- PackageMerge => Element::owner
-- Parameter => Element::owner
-- ParameterSet => Element::owner
-- PartDecomposition => Element::owner
-- Port => Element::owner
-- PrimitiveType => Element::owner
-- Profile => Element::owner
-- ProfileApplication => Element::owner
-- Property => Element::owner
-- ProtocolConformance => Element::owner
-- ProtocolStateMachine => Element::owner
-- ProtocolTransition => Element::owner
-- Pseudostate => Element::owner
-- QualifierValue => Element::owner
-- RaiseExceptionAction => Element::owner
-- ReadExtentAction => Element::owner
-- ReadIsClassifiedObjectAction => Element::owner
-- ReadLinkAction => Element::owner
-- ReadLinkObjectEndAction => Element::owner
-- ReadLinkObjectEndQualifierAction => Element::owner
-- ReadSelfAction => Element::owner
-- ReadStructuralFeatureAction => Element::owner
-- ReadVariableAction => Element::owner
-- Realization => Element::owner
-- Reception => Element::owner
-- ReclassifyObjectAction => Element::owner
-- RedefinableTemplateSignature => Element::owner
-- ReduceAction => Element::owner
-- Region => Element::owner
-- RemoveStructuralFeatureValueAction => Element::owner
-- RemoveVariableValueAction => Element::owner
-- ReplyAction => Element::owner
-- SendObjectAction => Element::owner
-- SendSignalAction => Element::owner
-- SequenceNode => Element::owner
-- Signal => Element::owner
-- SignalEvent => Element::owner
-- Slot => Element::owner
-- StartClassifierBehaviorAction => Element::owner
-- StartObjectBehaviorAction => Element::owner
-- State => Element::owner
-- StateInvariant => Element::owner
-- StateMachine => Element::owner
-- Stereotype => Element::owner
-- StringExpression => Element::owner
-- StructuredActivityNode => Element::owner
-- Substitution => Element::owner
-- TemplateBinding => Element::owner
-- TemplateParameter => Element::owner
-- TemplateParameterSubstitution => Element::owner
-- TemplateSignature => Element::owner
-- TestIdentityAction => Element::owner
-- TimeConstraint => Element::owner
-- TimeEvent => Element::owner
-- TimeExpression => Element::owner
-- TimeInterval => Element::owner
-- TimeObservation => Element::owner
-- Transition => Element::owner
-- Trigger => Element::owner
-- UnmarshallAction => Element::owner
-- Usage => Element::owner
-- UseCase => Element::owner
-- ValuePin => Element::owner
-- ValueSpecificationAction => Element::owner
-- Variable => Element::owner
function Internal_Get_Owning_Association
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owning_Association
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionEnd => Property::owningAssociation
-- Port => Property::owningAssociation
-- Property => Property::owningAssociation
function Internal_Get_Owning_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owning_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLActivityDiagram => UMLDiagramElement::owningElement
-- UMLAssociationEndLabel => UMLDiagramElement::owningElement
-- UMLAssociationOrConnectorOrLinkShape => UMLDiagramElement::owningElement
-- UMLClassDiagram => UMLDiagramElement::owningElement
-- UMLClassifierShape => UMLDiagramElement::owningElement
-- UMLCompartment => UMLDiagramElement::owningElement
-- UMLCompartmentableShape => UMLDiagramElement::owningElement
-- UMLComponentDiagram => UMLDiagramElement::owningElement
-- UMLCompositeStructureDiagram => UMLDiagramElement::owningElement
-- UMLDeploymentDiagram => UMLDiagramElement::owningElement
-- UMLEdge => UMLDiagramElement::owningElement
-- UMLInteractionDiagram => UMLDiagramElement::owningElement
-- UMLInteractionTableLabel => UMLDiagramElement::owningElement
-- UMLKeywordLabel => UMLDiagramElement::owningElement
-- UMLLabel => UMLDiagramElement::owningElement
-- UMLMultiplicityLabel => UMLDiagramElement::owningElement
-- UMLNameLabel => UMLDiagramElement::owningElement
-- UMLObjectDiagram => UMLDiagramElement::owningElement
-- UMLPackageDiagram => UMLDiagramElement::owningElement
-- UMLProfileDiagram => UMLDiagramElement::owningElement
-- UMLRedefinesLabel => UMLDiagramElement::owningElement
-- UMLShape => UMLDiagramElement::owningElement
-- UMLStateMachineDiagram => UMLDiagramElement::owningElement
-- UMLStateShape => UMLDiagramElement::owningElement
-- UMLStereotypePropertyValueLabel => UMLDiagramElement::owningElement
-- UMLTypedElementLabel => UMLDiagramElement::owningElement
-- UMLUseCaseDiagram => UMLDiagramElement::owningElement
function Internal_Get_Owning_Expression
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owning_Expression
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- StringExpression => StringExpression::owningExpression
function Internal_Get_Owning_Instance
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owning_Instance
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Slot => Slot::owningInstance
function Internal_Get_Owning_Template_Parameter
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Owning_Template_Parameter
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Abstraction => ParameterableElement::owningTemplateParameter
-- Activity => ParameterableElement::owningTemplateParameter
-- Actor => ParameterableElement::owningTemplateParameter
-- AnyReceiveEvent => ParameterableElement::owningTemplateParameter
-- Artifact => ParameterableElement::owningTemplateParameter
-- Association => ParameterableElement::owningTemplateParameter
-- AssociationClass => ParameterableElement::owningTemplateParameter
-- CallEvent => ParameterableElement::owningTemplateParameter
-- ChangeEvent => ParameterableElement::owningTemplateParameter
-- Class => ParameterableElement::owningTemplateParameter
-- Collaboration => ParameterableElement::owningTemplateParameter
-- CommunicationPath => ParameterableElement::owningTemplateParameter
-- Component => ParameterableElement::owningTemplateParameter
-- ComponentRealization => ParameterableElement::owningTemplateParameter
-- Constraint => ParameterableElement::owningTemplateParameter
-- UMLActivityDiagram => ParameterableElement::owningTemplateParameter
-- UMLClassDiagram => ParameterableElement::owningTemplateParameter
-- UMLComponentDiagram => ParameterableElement::owningTemplateParameter
-- UMLCompositeStructureDiagram => ParameterableElement::owningTemplateParameter
-- UMLDeploymentDiagram => ParameterableElement::owningTemplateParameter
-- UMLInteractionDiagram => ParameterableElement::owningTemplateParameter
-- UMLObjectDiagram => ParameterableElement::owningTemplateParameter
-- UMLPackageDiagram => ParameterableElement::owningTemplateParameter
-- UMLProfileDiagram => ParameterableElement::owningTemplateParameter
-- UMLStateMachineDiagram => ParameterableElement::owningTemplateParameter
-- UMLStyle => ParameterableElement::owningTemplateParameter
-- UMLUseCaseDiagram => ParameterableElement::owningTemplateParameter
-- DataType => ParameterableElement::owningTemplateParameter
-- Dependency => ParameterableElement::owningTemplateParameter
-- Deployment => ParameterableElement::owningTemplateParameter
-- DeploymentSpecification => ParameterableElement::owningTemplateParameter
-- Device => ParameterableElement::owningTemplateParameter
-- Duration => ParameterableElement::owningTemplateParameter
-- DurationConstraint => ParameterableElement::owningTemplateParameter
-- DurationInterval => ParameterableElement::owningTemplateParameter
-- DurationObservation => ParameterableElement::owningTemplateParameter
-- Enumeration => ParameterableElement::owningTemplateParameter
-- EnumerationLiteral => ParameterableElement::owningTemplateParameter
-- ExecutionEnvironment => ParameterableElement::owningTemplateParameter
-- Expression => ParameterableElement::owningTemplateParameter
-- Extension => ParameterableElement::owningTemplateParameter
-- ExtensionEnd => ParameterableElement::owningTemplateParameter
-- FunctionBehavior => ParameterableElement::owningTemplateParameter
-- GeneralizationSet => ParameterableElement::owningTemplateParameter
-- InformationFlow => ParameterableElement::owningTemplateParameter
-- InformationItem => ParameterableElement::owningTemplateParameter
-- InstanceSpecification => ParameterableElement::owningTemplateParameter
-- InstanceValue => ParameterableElement::owningTemplateParameter
-- Interaction => ParameterableElement::owningTemplateParameter
-- InteractionConstraint => ParameterableElement::owningTemplateParameter
-- Interface => ParameterableElement::owningTemplateParameter
-- InterfaceRealization => ParameterableElement::owningTemplateParameter
-- Interval => ParameterableElement::owningTemplateParameter
-- IntervalConstraint => ParameterableElement::owningTemplateParameter
-- LiteralBoolean => ParameterableElement::owningTemplateParameter
-- LiteralInteger => ParameterableElement::owningTemplateParameter
-- LiteralNull => ParameterableElement::owningTemplateParameter
-- LiteralReal => ParameterableElement::owningTemplateParameter
-- LiteralString => ParameterableElement::owningTemplateParameter
-- LiteralUnlimitedNatural => ParameterableElement::owningTemplateParameter
-- Manifestation => ParameterableElement::owningTemplateParameter
-- Model => ParameterableElement::owningTemplateParameter
-- Node => ParameterableElement::owningTemplateParameter
-- OpaqueBehavior => ParameterableElement::owningTemplateParameter
-- OpaqueExpression => ParameterableElement::owningTemplateParameter
-- Operation => ParameterableElement::owningTemplateParameter
-- Package => ParameterableElement::owningTemplateParameter
-- Parameter => ParameterableElement::owningTemplateParameter
-- Port => ParameterableElement::owningTemplateParameter
-- PrimitiveType => ParameterableElement::owningTemplateParameter
-- Profile => ParameterableElement::owningTemplateParameter
-- Property => ParameterableElement::owningTemplateParameter
-- ProtocolStateMachine => ParameterableElement::owningTemplateParameter
-- Realization => ParameterableElement::owningTemplateParameter
-- Signal => ParameterableElement::owningTemplateParameter
-- SignalEvent => ParameterableElement::owningTemplateParameter
-- StateMachine => ParameterableElement::owningTemplateParameter
-- Stereotype => ParameterableElement::owningTemplateParameter
-- StringExpression => ParameterableElement::owningTemplateParameter
-- Substitution => ParameterableElement::owningTemplateParameter
-- TimeConstraint => ParameterableElement::owningTemplateParameter
-- TimeEvent => ParameterableElement::owningTemplateParameter
-- TimeExpression => ParameterableElement::owningTemplateParameter
-- TimeInterval => ParameterableElement::owningTemplateParameter
-- TimeObservation => ParameterableElement::owningTemplateParameter
-- Usage => ParameterableElement::owningTemplateParameter
-- UseCase => ParameterableElement::owningTemplateParameter
-- Variable => ParameterableElement::owningTemplateParameter
function Internal_Get_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Activity => Type::package
-- Actor => Type::package
-- Artifact => Type::package
-- Association => Type::package
-- AssociationClass => Type::package
-- Class => Type::package
-- Collaboration => Type::package
-- CommunicationPath => Type::package
-- Component => Type::package
-- DataType => Type::package
-- DeploymentSpecification => Type::package
-- Device => Type::package
-- Enumeration => Type::package
-- ExecutionEnvironment => Type::package
-- Extension => Type::package
-- FunctionBehavior => Type::package
-- InformationItem => Type::package
-- Interaction => Type::package
-- Interface => Type::package
-- Node => Type::package
-- OpaqueBehavior => Type::package
-- PrimitiveType => Type::package
-- ProtocolStateMachine => Type::package
-- Signal => Type::package
-- StateMachine => Type::package
-- Stereotype => Type::package
-- UseCase => Type::package
function Internal_Get_Package_Import
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Namespace::packageImport
-- Actor => Namespace::packageImport
-- Artifact => Namespace::packageImport
-- Association => Namespace::packageImport
-- AssociationClass => Namespace::packageImport
-- Class => Namespace::packageImport
-- Collaboration => Namespace::packageImport
-- CommunicationPath => Namespace::packageImport
-- Component => Namespace::packageImport
-- ConditionalNode => Namespace::packageImport
-- DataType => Namespace::packageImport
-- DeploymentSpecification => Namespace::packageImport
-- Device => Namespace::packageImport
-- Enumeration => Namespace::packageImport
-- ExecutionEnvironment => Namespace::packageImport
-- ExpansionRegion => Namespace::packageImport
-- Extension => Namespace::packageImport
-- FinalState => Namespace::packageImport
-- FunctionBehavior => Namespace::packageImport
-- InformationItem => Namespace::packageImport
-- Interaction => Namespace::packageImport
-- InteractionOperand => Namespace::packageImport
-- Interface => Namespace::packageImport
-- LoopNode => Namespace::packageImport
-- Model => Namespace::packageImport
-- Node => Namespace::packageImport
-- OpaqueBehavior => Namespace::packageImport
-- Operation => Namespace::packageImport
-- Package => Namespace::packageImport
-- PrimitiveType => Namespace::packageImport
-- Profile => Namespace::packageImport
-- ProtocolStateMachine => Namespace::packageImport
-- ProtocolTransition => Namespace::packageImport
-- Reception => Namespace::packageImport
-- Region => Namespace::packageImport
-- SequenceNode => Namespace::packageImport
-- Signal => Namespace::packageImport
-- State => Namespace::packageImport
-- StateMachine => Namespace::packageImport
-- Stereotype => Namespace::packageImport
-- StructuredActivityNode => Namespace::packageImport
-- Transition => Namespace::packageImport
-- UseCase => Namespace::packageImport
function Internal_Get_Package_Merge
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Model => Package::packageMerge
-- Package => Package::packageMerge
-- Profile => Package::packageMerge
function Internal_Get_Packaged_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Component => Component::packagedElement
-- Model => Package::packagedElement
-- Package => Package::packagedElement
-- Profile => Package::packagedElement
function Internal_Get_Parameter
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Parameter
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActivityParameterNode => ActivityParameterNode::parameter
function Internal_Get_Parameter
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ParameterSet => ParameterSet::parameter
-- RedefinableTemplateSignature => TemplateSignature::parameter
-- TemplateSignature => TemplateSignature::parameter
function Internal_Get_Parameter_Set
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Parameter => Parameter::parameterSet
function Internal_Get_Parameter_Substitution
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- TemplateBinding => TemplateBinding::parameterSubstitution
function Internal_Get_Parametered_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Parametered_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ClassifierTemplateParameter => ClassifierTemplateParameter::parameteredElement
-- ConnectableElementTemplateParameter => ConnectableElementTemplateParameter::parameteredElement
-- OperationTemplateParameter => OperationTemplateParameter::parameteredElement
-- TemplateParameter => TemplateParameter::parameteredElement
function Internal_Get_Part
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => StructuredClassifier::part
-- AssociationClass => StructuredClassifier::part
-- Class => StructuredClassifier::part
-- Collaboration => StructuredClassifier::part
-- Component => StructuredClassifier::part
-- Device => StructuredClassifier::part
-- ExecutionEnvironment => StructuredClassifier::part
-- FunctionBehavior => StructuredClassifier::part
-- Interaction => StructuredClassifier::part
-- Node => StructuredClassifier::part
-- OpaqueBehavior => StructuredClassifier::part
-- ProtocolStateMachine => StructuredClassifier::part
-- StateMachine => StructuredClassifier::part
-- Stereotype => StructuredClassifier::part
function Internal_Get_Part_With_Port
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Part_With_Port
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ConnectorEnd => ConnectorEnd::partWithPort
function Internal_Get_Partition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Activity::partition
function Internal_Get_Port
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Trigger => Trigger::port
function Internal_Get_Post_Condition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Post_Condition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProtocolTransition => ProtocolTransition::postCondition
function Internal_Get_Postcondition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Behavior::postcondition
-- FunctionBehavior => Behavior::postcondition
-- Interaction => Behavior::postcondition
-- OpaqueBehavior => Behavior::postcondition
-- Operation => Operation::postcondition
-- ProtocolStateMachine => Behavior::postcondition
-- StateMachine => Behavior::postcondition
function Internal_Get_Powertype
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Powertype
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- GeneralizationSet => GeneralizationSet::powertype
function Internal_Get_Powertype_Extent
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::powertypeExtent
-- Actor => Classifier::powertypeExtent
-- Artifact => Classifier::powertypeExtent
-- Association => Classifier::powertypeExtent
-- AssociationClass => Classifier::powertypeExtent
-- Class => Classifier::powertypeExtent
-- Collaboration => Classifier::powertypeExtent
-- CommunicationPath => Classifier::powertypeExtent
-- Component => Classifier::powertypeExtent
-- DataType => Classifier::powertypeExtent
-- DeploymentSpecification => Classifier::powertypeExtent
-- Device => Classifier::powertypeExtent
-- Enumeration => Classifier::powertypeExtent
-- ExecutionEnvironment => Classifier::powertypeExtent
-- Extension => Classifier::powertypeExtent
-- FunctionBehavior => Classifier::powertypeExtent
-- InformationItem => Classifier::powertypeExtent
-- Interaction => Classifier::powertypeExtent
-- Interface => Classifier::powertypeExtent
-- Node => Classifier::powertypeExtent
-- OpaqueBehavior => Classifier::powertypeExtent
-- PrimitiveType => Classifier::powertypeExtent
-- ProtocolStateMachine => Classifier::powertypeExtent
-- Signal => Classifier::powertypeExtent
-- StateMachine => Classifier::powertypeExtent
-- Stereotype => Classifier::powertypeExtent
-- UseCase => Classifier::powertypeExtent
function Internal_Get_Pre_Condition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Pre_Condition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProtocolTransition => ProtocolTransition::preCondition
function Internal_Get_Precondition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Behavior::precondition
-- FunctionBehavior => Behavior::precondition
-- Interaction => Behavior::precondition
-- OpaqueBehavior => Behavior::precondition
-- Operation => Operation::precondition
-- ProtocolStateMachine => Behavior::precondition
-- StateMachine => Behavior::precondition
function Internal_Get_Predecessor_Clause
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Clause => Clause::predecessorClause
function Internal_Get_Profile
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- Stereotype => Stereotype::profile
function Internal_Get_Profile_Application
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Model => Package::profileApplication
-- Package => Package::profileApplication
-- Profile => Package::profileApplication
function Internal_Get_Protected_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Protected_Node
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExceptionHandler => ExceptionHandler::protectedNode
function Internal_Get_Protocol
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Protocol
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Interface => Interface::protocol
-- Port => Port::protocol
function Internal_Get_Provided
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Component => Component::provided
-- Port => Port::provided
function Internal_Get_Qualified_Name
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
-- Abstraction => NamedElement::qualifiedName
-- AcceptCallAction => NamedElement::qualifiedName
-- AcceptEventAction => NamedElement::qualifiedName
-- ActionExecutionSpecification => NamedElement::qualifiedName
-- ActionInputPin => NamedElement::qualifiedName
-- Activity => NamedElement::qualifiedName
-- ActivityFinalNode => NamedElement::qualifiedName
-- ActivityParameterNode => NamedElement::qualifiedName
-- ActivityPartition => NamedElement::qualifiedName
-- Actor => NamedElement::qualifiedName
-- AddStructuralFeatureValueAction => NamedElement::qualifiedName
-- AddVariableValueAction => NamedElement::qualifiedName
-- AnyReceiveEvent => NamedElement::qualifiedName
-- Artifact => NamedElement::qualifiedName
-- Association => NamedElement::qualifiedName
-- AssociationClass => NamedElement::qualifiedName
-- BehaviorExecutionSpecification => NamedElement::qualifiedName
-- BroadcastSignalAction => NamedElement::qualifiedName
-- CallBehaviorAction => NamedElement::qualifiedName
-- CallEvent => NamedElement::qualifiedName
-- CallOperationAction => NamedElement::qualifiedName
-- CentralBufferNode => NamedElement::qualifiedName
-- ChangeEvent => NamedElement::qualifiedName
-- Class => NamedElement::qualifiedName
-- ClearAssociationAction => NamedElement::qualifiedName
-- ClearStructuralFeatureAction => NamedElement::qualifiedName
-- ClearVariableAction => NamedElement::qualifiedName
-- Collaboration => NamedElement::qualifiedName
-- CollaborationUse => NamedElement::qualifiedName
-- CombinedFragment => NamedElement::qualifiedName
-- CommunicationPath => NamedElement::qualifiedName
-- Component => NamedElement::qualifiedName
-- ComponentRealization => NamedElement::qualifiedName
-- ConditionalNode => NamedElement::qualifiedName
-- ConnectionPointReference => NamedElement::qualifiedName
-- Connector => NamedElement::qualifiedName
-- ConsiderIgnoreFragment => NamedElement::qualifiedName
-- Constraint => NamedElement::qualifiedName
-- Continuation => NamedElement::qualifiedName
-- ControlFlow => NamedElement::qualifiedName
-- CreateLinkAction => NamedElement::qualifiedName
-- CreateLinkObjectAction => NamedElement::qualifiedName
-- CreateObjectAction => NamedElement::qualifiedName
-- UMLActivityDiagram => NamedElement::qualifiedName
-- UMLClassDiagram => NamedElement::qualifiedName
-- UMLComponentDiagram => NamedElement::qualifiedName
-- UMLCompositeStructureDiagram => NamedElement::qualifiedName
-- UMLDeploymentDiagram => NamedElement::qualifiedName
-- UMLInteractionDiagram => NamedElement::qualifiedName
-- UMLObjectDiagram => NamedElement::qualifiedName
-- UMLPackageDiagram => NamedElement::qualifiedName
-- UMLProfileDiagram => NamedElement::qualifiedName
-- UMLStateMachineDiagram => NamedElement::qualifiedName
-- UMLStyle => NamedElement::qualifiedName
-- UMLUseCaseDiagram => NamedElement::qualifiedName
-- DataStoreNode => NamedElement::qualifiedName
-- DataType => NamedElement::qualifiedName
-- DecisionNode => NamedElement::qualifiedName
-- Dependency => NamedElement::qualifiedName
-- Deployment => NamedElement::qualifiedName
-- DeploymentSpecification => NamedElement::qualifiedName
-- DestroyLinkAction => NamedElement::qualifiedName
-- DestroyObjectAction => NamedElement::qualifiedName
-- DestructionOccurrenceSpecification => NamedElement::qualifiedName
-- Device => NamedElement::qualifiedName
-- Duration => NamedElement::qualifiedName
-- DurationConstraint => NamedElement::qualifiedName
-- DurationInterval => NamedElement::qualifiedName
-- DurationObservation => NamedElement::qualifiedName
-- Enumeration => NamedElement::qualifiedName
-- EnumerationLiteral => NamedElement::qualifiedName
-- ExecutionEnvironment => NamedElement::qualifiedName
-- ExecutionOccurrenceSpecification => NamedElement::qualifiedName
-- ExpansionNode => NamedElement::qualifiedName
-- ExpansionRegion => NamedElement::qualifiedName
-- Expression => NamedElement::qualifiedName
-- Extend => NamedElement::qualifiedName
-- Extension => NamedElement::qualifiedName
-- ExtensionEnd => NamedElement::qualifiedName
-- ExtensionPoint => NamedElement::qualifiedName
-- FinalState => NamedElement::qualifiedName
-- FlowFinalNode => NamedElement::qualifiedName
-- ForkNode => NamedElement::qualifiedName
-- FunctionBehavior => NamedElement::qualifiedName
-- Gate => NamedElement::qualifiedName
-- GeneralOrdering => NamedElement::qualifiedName
-- GeneralizationSet => NamedElement::qualifiedName
-- Include => NamedElement::qualifiedName
-- InformationFlow => NamedElement::qualifiedName
-- InformationItem => NamedElement::qualifiedName
-- InitialNode => NamedElement::qualifiedName
-- InputPin => NamedElement::qualifiedName
-- InstanceSpecification => NamedElement::qualifiedName
-- InstanceValue => NamedElement::qualifiedName
-- Interaction => NamedElement::qualifiedName
-- InteractionConstraint => NamedElement::qualifiedName
-- InteractionOperand => NamedElement::qualifiedName
-- InteractionUse => NamedElement::qualifiedName
-- Interface => NamedElement::qualifiedName
-- InterfaceRealization => NamedElement::qualifiedName
-- InterruptibleActivityRegion => NamedElement::qualifiedName
-- Interval => NamedElement::qualifiedName
-- IntervalConstraint => NamedElement::qualifiedName
-- JoinNode => NamedElement::qualifiedName
-- Lifeline => NamedElement::qualifiedName
-- LiteralBoolean => NamedElement::qualifiedName
-- LiteralInteger => NamedElement::qualifiedName
-- LiteralNull => NamedElement::qualifiedName
-- LiteralReal => NamedElement::qualifiedName
-- LiteralString => NamedElement::qualifiedName
-- LiteralUnlimitedNatural => NamedElement::qualifiedName
-- LoopNode => NamedElement::qualifiedName
-- Manifestation => NamedElement::qualifiedName
-- MergeNode => NamedElement::qualifiedName
-- Message => NamedElement::qualifiedName
-- MessageOccurrenceSpecification => NamedElement::qualifiedName
-- Model => NamedElement::qualifiedName
-- Node => NamedElement::qualifiedName
-- ObjectFlow => NamedElement::qualifiedName
-- OccurrenceSpecification => NamedElement::qualifiedName
-- OpaqueAction => NamedElement::qualifiedName
-- OpaqueBehavior => NamedElement::qualifiedName
-- OpaqueExpression => NamedElement::qualifiedName
-- Operation => NamedElement::qualifiedName
-- OutputPin => NamedElement::qualifiedName
-- Package => NamedElement::qualifiedName
-- Parameter => NamedElement::qualifiedName
-- ParameterSet => NamedElement::qualifiedName
-- PartDecomposition => NamedElement::qualifiedName
-- Port => NamedElement::qualifiedName
-- PrimitiveType => NamedElement::qualifiedName
-- Profile => NamedElement::qualifiedName
-- Property => NamedElement::qualifiedName
-- ProtocolStateMachine => NamedElement::qualifiedName
-- ProtocolTransition => NamedElement::qualifiedName
-- Pseudostate => NamedElement::qualifiedName
-- RaiseExceptionAction => NamedElement::qualifiedName
-- ReadExtentAction => NamedElement::qualifiedName
-- ReadIsClassifiedObjectAction => NamedElement::qualifiedName
-- ReadLinkAction => NamedElement::qualifiedName
-- ReadLinkObjectEndAction => NamedElement::qualifiedName
-- ReadLinkObjectEndQualifierAction => NamedElement::qualifiedName
-- ReadSelfAction => NamedElement::qualifiedName
-- ReadStructuralFeatureAction => NamedElement::qualifiedName
-- ReadVariableAction => NamedElement::qualifiedName
-- Realization => NamedElement::qualifiedName
-- Reception => NamedElement::qualifiedName
-- ReclassifyObjectAction => NamedElement::qualifiedName
-- RedefinableTemplateSignature => NamedElement::qualifiedName
-- ReduceAction => NamedElement::qualifiedName
-- Region => NamedElement::qualifiedName
-- RemoveStructuralFeatureValueAction => NamedElement::qualifiedName
-- RemoveVariableValueAction => NamedElement::qualifiedName
-- ReplyAction => NamedElement::qualifiedName
-- SendObjectAction => NamedElement::qualifiedName
-- SendSignalAction => NamedElement::qualifiedName
-- SequenceNode => NamedElement::qualifiedName
-- Signal => NamedElement::qualifiedName
-- SignalEvent => NamedElement::qualifiedName
-- StartClassifierBehaviorAction => NamedElement::qualifiedName
-- StartObjectBehaviorAction => NamedElement::qualifiedName
-- State => NamedElement::qualifiedName
-- StateInvariant => NamedElement::qualifiedName
-- StateMachine => NamedElement::qualifiedName
-- Stereotype => NamedElement::qualifiedName
-- StringExpression => NamedElement::qualifiedName
-- StructuredActivityNode => NamedElement::qualifiedName
-- Substitution => NamedElement::qualifiedName
-- TestIdentityAction => NamedElement::qualifiedName
-- TimeConstraint => NamedElement::qualifiedName
-- TimeEvent => NamedElement::qualifiedName
-- TimeExpression => NamedElement::qualifiedName
-- TimeInterval => NamedElement::qualifiedName
-- TimeObservation => NamedElement::qualifiedName
-- Transition => NamedElement::qualifiedName
-- Trigger => NamedElement::qualifiedName
-- UnmarshallAction => NamedElement::qualifiedName
-- Usage => NamedElement::qualifiedName
-- UseCase => NamedElement::qualifiedName
-- ValuePin => NamedElement::qualifiedName
-- ValueSpecificationAction => NamedElement::qualifiedName
-- Variable => NamedElement::qualifiedName
function Internal_Get_Qualifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ExtensionEnd => Property::qualifier
-- LinkEndCreationData => LinkEndData::qualifier
-- LinkEndData => LinkEndData::qualifier
-- LinkEndDestructionData => LinkEndData::qualifier
-- Port => Property::qualifier
-- Property => Property::qualifier
function Internal_Get_Qualifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Qualifier
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- QualifierValue => QualifierValue::qualifier
-- ReadLinkObjectEndQualifierAction => ReadLinkObjectEndQualifierAction::qualifier
function Internal_Get_Raised_Exception
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Operation => BehavioralFeature::raisedException
-- Reception => BehavioralFeature::raisedException
function Internal_Get_Realization
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Component => Component::realization
-- InformationFlow => InformationFlow::realization
function Internal_Get_Realizing_Activity_Edge
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationFlow => InformationFlow::realizingActivityEdge
function Internal_Get_Realizing_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ComponentRealization => ComponentRealization::realizingClassifier
function Internal_Get_Realizing_Connector
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationFlow => InformationFlow::realizingConnector
function Internal_Get_Realizing_Message
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationFlow => InformationFlow::realizingMessage
function Internal_Get_Receive_Event
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Receive_Event
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Message => Message::receiveEvent
function Internal_Get_Receiving_Package
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Receiving_Package
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- PackageMerge => PackageMerge::receivingPackage
function Internal_Get_Redefined_Behavior
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Behavior::redefinedBehavior
-- FunctionBehavior => Behavior::redefinedBehavior
-- Interaction => Behavior::redefinedBehavior
-- OpaqueBehavior => Behavior::redefinedBehavior
-- ProtocolStateMachine => Behavior::redefinedBehavior
-- StateMachine => Behavior::redefinedBehavior
function Internal_Get_Redefined_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::redefinedClassifier
-- Actor => Classifier::redefinedClassifier
-- Artifact => Classifier::redefinedClassifier
-- Association => Classifier::redefinedClassifier
-- AssociationClass => Classifier::redefinedClassifier
-- Class => Classifier::redefinedClassifier
-- Collaboration => Classifier::redefinedClassifier
-- CommunicationPath => Classifier::redefinedClassifier
-- Component => Classifier::redefinedClassifier
-- DataType => Classifier::redefinedClassifier
-- DeploymentSpecification => Classifier::redefinedClassifier
-- Device => Classifier::redefinedClassifier
-- Enumeration => Classifier::redefinedClassifier
-- ExecutionEnvironment => Classifier::redefinedClassifier
-- Extension => Classifier::redefinedClassifier
-- FunctionBehavior => Classifier::redefinedClassifier
-- InformationItem => Classifier::redefinedClassifier
-- Interaction => Classifier::redefinedClassifier
-- Interface => Classifier::redefinedClassifier
-- Node => Classifier::redefinedClassifier
-- OpaqueBehavior => Classifier::redefinedClassifier
-- PrimitiveType => Classifier::redefinedClassifier
-- ProtocolStateMachine => Classifier::redefinedClassifier
-- Signal => Classifier::redefinedClassifier
-- StateMachine => Classifier::redefinedClassifier
-- Stereotype => Classifier::redefinedClassifier
-- UseCase => Classifier::redefinedClassifier
function Internal_Get_Redefined_Connector
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Connector => Connector::redefinedConnector
function Internal_Get_Redefined_Edge
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ControlFlow => ActivityEdge::redefinedEdge
-- ObjectFlow => ActivityEdge::redefinedEdge
function Internal_Get_Redefined_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => RedefinableElement::redefinedElement
-- AcceptEventAction => RedefinableElement::redefinedElement
-- ActionInputPin => RedefinableElement::redefinedElement
-- Activity => RedefinableElement::redefinedElement
-- ActivityFinalNode => RedefinableElement::redefinedElement
-- ActivityParameterNode => RedefinableElement::redefinedElement
-- Actor => RedefinableElement::redefinedElement
-- AddStructuralFeatureValueAction => RedefinableElement::redefinedElement
-- AddVariableValueAction => RedefinableElement::redefinedElement
-- Artifact => RedefinableElement::redefinedElement
-- Association => RedefinableElement::redefinedElement
-- AssociationClass => RedefinableElement::redefinedElement
-- BroadcastSignalAction => RedefinableElement::redefinedElement
-- CallBehaviorAction => RedefinableElement::redefinedElement
-- CallOperationAction => RedefinableElement::redefinedElement
-- CentralBufferNode => RedefinableElement::redefinedElement
-- Class => RedefinableElement::redefinedElement
-- ClearAssociationAction => RedefinableElement::redefinedElement
-- ClearStructuralFeatureAction => RedefinableElement::redefinedElement
-- ClearVariableAction => RedefinableElement::redefinedElement
-- Collaboration => RedefinableElement::redefinedElement
-- CommunicationPath => RedefinableElement::redefinedElement
-- Component => RedefinableElement::redefinedElement
-- ConditionalNode => RedefinableElement::redefinedElement
-- Connector => RedefinableElement::redefinedElement
-- ControlFlow => RedefinableElement::redefinedElement
-- CreateLinkAction => RedefinableElement::redefinedElement
-- CreateLinkObjectAction => RedefinableElement::redefinedElement
-- CreateObjectAction => RedefinableElement::redefinedElement
-- DataStoreNode => RedefinableElement::redefinedElement
-- DataType => RedefinableElement::redefinedElement
-- DecisionNode => RedefinableElement::redefinedElement
-- DeploymentSpecification => RedefinableElement::redefinedElement
-- DestroyLinkAction => RedefinableElement::redefinedElement
-- DestroyObjectAction => RedefinableElement::redefinedElement
-- Device => RedefinableElement::redefinedElement
-- Enumeration => RedefinableElement::redefinedElement
-- ExecutionEnvironment => RedefinableElement::redefinedElement
-- ExpansionNode => RedefinableElement::redefinedElement
-- ExpansionRegion => RedefinableElement::redefinedElement
-- Extension => RedefinableElement::redefinedElement
-- ExtensionEnd => RedefinableElement::redefinedElement
-- ExtensionPoint => RedefinableElement::redefinedElement
-- FinalState => RedefinableElement::redefinedElement
-- FlowFinalNode => RedefinableElement::redefinedElement
-- ForkNode => RedefinableElement::redefinedElement
-- FunctionBehavior => RedefinableElement::redefinedElement
-- InformationItem => RedefinableElement::redefinedElement
-- InitialNode => RedefinableElement::redefinedElement
-- InputPin => RedefinableElement::redefinedElement
-- Interaction => RedefinableElement::redefinedElement
-- Interface => RedefinableElement::redefinedElement
-- JoinNode => RedefinableElement::redefinedElement
-- LoopNode => RedefinableElement::redefinedElement
-- MergeNode => RedefinableElement::redefinedElement
-- Node => RedefinableElement::redefinedElement
-- ObjectFlow => RedefinableElement::redefinedElement
-- OpaqueAction => RedefinableElement::redefinedElement
-- OpaqueBehavior => RedefinableElement::redefinedElement
-- Operation => RedefinableElement::redefinedElement
-- OutputPin => RedefinableElement::redefinedElement
-- Port => RedefinableElement::redefinedElement
-- PrimitiveType => RedefinableElement::redefinedElement
-- Property => RedefinableElement::redefinedElement
-- ProtocolStateMachine => RedefinableElement::redefinedElement
-- ProtocolTransition => RedefinableElement::redefinedElement
-- RaiseExceptionAction => RedefinableElement::redefinedElement
-- ReadExtentAction => RedefinableElement::redefinedElement
-- ReadIsClassifiedObjectAction => RedefinableElement::redefinedElement
-- ReadLinkAction => RedefinableElement::redefinedElement
-- ReadLinkObjectEndAction => RedefinableElement::redefinedElement
-- ReadLinkObjectEndQualifierAction => RedefinableElement::redefinedElement
-- ReadSelfAction => RedefinableElement::redefinedElement
-- ReadStructuralFeatureAction => RedefinableElement::redefinedElement
-- ReadVariableAction => RedefinableElement::redefinedElement
-- Reception => RedefinableElement::redefinedElement
-- ReclassifyObjectAction => RedefinableElement::redefinedElement
-- RedefinableTemplateSignature => RedefinableElement::redefinedElement
-- ReduceAction => RedefinableElement::redefinedElement
-- Region => RedefinableElement::redefinedElement
-- RemoveStructuralFeatureValueAction => RedefinableElement::redefinedElement
-- RemoveVariableValueAction => RedefinableElement::redefinedElement
-- ReplyAction => RedefinableElement::redefinedElement
-- SendObjectAction => RedefinableElement::redefinedElement
-- SendSignalAction => RedefinableElement::redefinedElement
-- SequenceNode => RedefinableElement::redefinedElement
-- Signal => RedefinableElement::redefinedElement
-- StartClassifierBehaviorAction => RedefinableElement::redefinedElement
-- StartObjectBehaviorAction => RedefinableElement::redefinedElement
-- State => RedefinableElement::redefinedElement
-- StateMachine => RedefinableElement::redefinedElement
-- Stereotype => RedefinableElement::redefinedElement
-- StructuredActivityNode => RedefinableElement::redefinedElement
-- TestIdentityAction => RedefinableElement::redefinedElement
-- Transition => RedefinableElement::redefinedElement
-- UnmarshallAction => RedefinableElement::redefinedElement
-- UseCase => RedefinableElement::redefinedElement
-- ValuePin => RedefinableElement::redefinedElement
-- ValueSpecificationAction => RedefinableElement::redefinedElement
function Internal_Get_Redefined_Interface
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Interface => Interface::redefinedInterface
function Internal_Get_Redefined_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => ActivityNode::redefinedNode
-- AcceptEventAction => ActivityNode::redefinedNode
-- ActionInputPin => ActivityNode::redefinedNode
-- ActivityFinalNode => ActivityNode::redefinedNode
-- ActivityParameterNode => ActivityNode::redefinedNode
-- AddStructuralFeatureValueAction => ActivityNode::redefinedNode
-- AddVariableValueAction => ActivityNode::redefinedNode
-- BroadcastSignalAction => ActivityNode::redefinedNode
-- CallBehaviorAction => ActivityNode::redefinedNode
-- CallOperationAction => ActivityNode::redefinedNode
-- CentralBufferNode => ActivityNode::redefinedNode
-- ClearAssociationAction => ActivityNode::redefinedNode
-- ClearStructuralFeatureAction => ActivityNode::redefinedNode
-- ClearVariableAction => ActivityNode::redefinedNode
-- ConditionalNode => ActivityNode::redefinedNode
-- CreateLinkAction => ActivityNode::redefinedNode
-- CreateLinkObjectAction => ActivityNode::redefinedNode
-- CreateObjectAction => ActivityNode::redefinedNode
-- DataStoreNode => ActivityNode::redefinedNode
-- DecisionNode => ActivityNode::redefinedNode
-- DestroyLinkAction => ActivityNode::redefinedNode
-- DestroyObjectAction => ActivityNode::redefinedNode
-- ExpansionNode => ActivityNode::redefinedNode
-- ExpansionRegion => ActivityNode::redefinedNode
-- FlowFinalNode => ActivityNode::redefinedNode
-- ForkNode => ActivityNode::redefinedNode
-- InitialNode => ActivityNode::redefinedNode
-- InputPin => ActivityNode::redefinedNode
-- JoinNode => ActivityNode::redefinedNode
-- LoopNode => ActivityNode::redefinedNode
-- MergeNode => ActivityNode::redefinedNode
-- OpaqueAction => ActivityNode::redefinedNode
-- OutputPin => ActivityNode::redefinedNode
-- RaiseExceptionAction => ActivityNode::redefinedNode
-- ReadExtentAction => ActivityNode::redefinedNode
-- ReadIsClassifiedObjectAction => ActivityNode::redefinedNode
-- ReadLinkAction => ActivityNode::redefinedNode
-- ReadLinkObjectEndAction => ActivityNode::redefinedNode
-- ReadLinkObjectEndQualifierAction => ActivityNode::redefinedNode
-- ReadSelfAction => ActivityNode::redefinedNode
-- ReadStructuralFeatureAction => ActivityNode::redefinedNode
-- ReadVariableAction => ActivityNode::redefinedNode
-- ReclassifyObjectAction => ActivityNode::redefinedNode
-- ReduceAction => ActivityNode::redefinedNode
-- RemoveStructuralFeatureValueAction => ActivityNode::redefinedNode
-- RemoveVariableValueAction => ActivityNode::redefinedNode
-- ReplyAction => ActivityNode::redefinedNode
-- SendObjectAction => ActivityNode::redefinedNode
-- SendSignalAction => ActivityNode::redefinedNode
-- SequenceNode => ActivityNode::redefinedNode
-- StartClassifierBehaviorAction => ActivityNode::redefinedNode
-- StartObjectBehaviorAction => ActivityNode::redefinedNode
-- StructuredActivityNode => ActivityNode::redefinedNode
-- TestIdentityAction => ActivityNode::redefinedNode
-- UnmarshallAction => ActivityNode::redefinedNode
-- ValuePin => ActivityNode::redefinedNode
-- ValueSpecificationAction => ActivityNode::redefinedNode
function Internal_Get_Redefined_Operation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Operation => Operation::redefinedOperation
function Internal_Get_Redefined_Port
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Port => Port::redefinedPort
function Internal_Get_Redefined_Property
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ExtensionEnd => Property::redefinedProperty
-- Port => Property::redefinedProperty
-- Property => Property::redefinedProperty
function Internal_Get_Redefined_State
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Redefined_State
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- FinalState => State::redefinedState
-- State => State::redefinedState
function Internal_Get_Redefined_Transition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Redefined_Transition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProtocolTransition => Transition::redefinedTransition
-- Transition => Transition::redefinedTransition
function Internal_Get_Redefinition_Context
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => RedefinableElement::redefinitionContext
-- AcceptEventAction => RedefinableElement::redefinitionContext
-- ActionInputPin => RedefinableElement::redefinitionContext
-- Activity => RedefinableElement::redefinitionContext
-- ActivityFinalNode => RedefinableElement::redefinitionContext
-- ActivityParameterNode => RedefinableElement::redefinitionContext
-- Actor => RedefinableElement::redefinitionContext
-- AddStructuralFeatureValueAction => RedefinableElement::redefinitionContext
-- AddVariableValueAction => RedefinableElement::redefinitionContext
-- Artifact => RedefinableElement::redefinitionContext
-- Association => RedefinableElement::redefinitionContext
-- AssociationClass => RedefinableElement::redefinitionContext
-- BroadcastSignalAction => RedefinableElement::redefinitionContext
-- CallBehaviorAction => RedefinableElement::redefinitionContext
-- CallOperationAction => RedefinableElement::redefinitionContext
-- CentralBufferNode => RedefinableElement::redefinitionContext
-- Class => RedefinableElement::redefinitionContext
-- ClearAssociationAction => RedefinableElement::redefinitionContext
-- ClearStructuralFeatureAction => RedefinableElement::redefinitionContext
-- ClearVariableAction => RedefinableElement::redefinitionContext
-- Collaboration => RedefinableElement::redefinitionContext
-- CommunicationPath => RedefinableElement::redefinitionContext
-- Component => RedefinableElement::redefinitionContext
-- ConditionalNode => RedefinableElement::redefinitionContext
-- Connector => RedefinableElement::redefinitionContext
-- ControlFlow => RedefinableElement::redefinitionContext
-- CreateLinkAction => RedefinableElement::redefinitionContext
-- CreateLinkObjectAction => RedefinableElement::redefinitionContext
-- CreateObjectAction => RedefinableElement::redefinitionContext
-- DataStoreNode => RedefinableElement::redefinitionContext
-- DataType => RedefinableElement::redefinitionContext
-- DecisionNode => RedefinableElement::redefinitionContext
-- DeploymentSpecification => RedefinableElement::redefinitionContext
-- DestroyLinkAction => RedefinableElement::redefinitionContext
-- DestroyObjectAction => RedefinableElement::redefinitionContext
-- Device => RedefinableElement::redefinitionContext
-- Enumeration => RedefinableElement::redefinitionContext
-- ExecutionEnvironment => RedefinableElement::redefinitionContext
-- ExpansionNode => RedefinableElement::redefinitionContext
-- ExpansionRegion => RedefinableElement::redefinitionContext
-- Extension => RedefinableElement::redefinitionContext
-- ExtensionEnd => RedefinableElement::redefinitionContext
-- ExtensionPoint => RedefinableElement::redefinitionContext
-- FinalState => RedefinableElement::redefinitionContext
-- FlowFinalNode => RedefinableElement::redefinitionContext
-- ForkNode => RedefinableElement::redefinitionContext
-- FunctionBehavior => RedefinableElement::redefinitionContext
-- InformationItem => RedefinableElement::redefinitionContext
-- InitialNode => RedefinableElement::redefinitionContext
-- InputPin => RedefinableElement::redefinitionContext
-- Interaction => RedefinableElement::redefinitionContext
-- Interface => RedefinableElement::redefinitionContext
-- JoinNode => RedefinableElement::redefinitionContext
-- LoopNode => RedefinableElement::redefinitionContext
-- MergeNode => RedefinableElement::redefinitionContext
-- Node => RedefinableElement::redefinitionContext
-- ObjectFlow => RedefinableElement::redefinitionContext
-- OpaqueAction => RedefinableElement::redefinitionContext
-- OpaqueBehavior => RedefinableElement::redefinitionContext
-- Operation => RedefinableElement::redefinitionContext
-- OutputPin => RedefinableElement::redefinitionContext
-- Port => RedefinableElement::redefinitionContext
-- PrimitiveType => RedefinableElement::redefinitionContext
-- Property => RedefinableElement::redefinitionContext
-- ProtocolStateMachine => RedefinableElement::redefinitionContext
-- ProtocolTransition => RedefinableElement::redefinitionContext
-- RaiseExceptionAction => RedefinableElement::redefinitionContext
-- ReadExtentAction => RedefinableElement::redefinitionContext
-- ReadIsClassifiedObjectAction => RedefinableElement::redefinitionContext
-- ReadLinkAction => RedefinableElement::redefinitionContext
-- ReadLinkObjectEndAction => RedefinableElement::redefinitionContext
-- ReadLinkObjectEndQualifierAction => RedefinableElement::redefinitionContext
-- ReadSelfAction => RedefinableElement::redefinitionContext
-- ReadStructuralFeatureAction => RedefinableElement::redefinitionContext
-- ReadVariableAction => RedefinableElement::redefinitionContext
-- Reception => RedefinableElement::redefinitionContext
-- ReclassifyObjectAction => RedefinableElement::redefinitionContext
-- RedefinableTemplateSignature => RedefinableElement::redefinitionContext
-- ReduceAction => RedefinableElement::redefinitionContext
-- Region => RedefinableElement::redefinitionContext
-- RemoveStructuralFeatureValueAction => RedefinableElement::redefinitionContext
-- RemoveVariableValueAction => RedefinableElement::redefinitionContext
-- ReplyAction => RedefinableElement::redefinitionContext
-- SendObjectAction => RedefinableElement::redefinitionContext
-- SendSignalAction => RedefinableElement::redefinitionContext
-- SequenceNode => RedefinableElement::redefinitionContext
-- Signal => RedefinableElement::redefinitionContext
-- StartClassifierBehaviorAction => RedefinableElement::redefinitionContext
-- StartObjectBehaviorAction => RedefinableElement::redefinitionContext
-- State => RedefinableElement::redefinitionContext
-- StateMachine => RedefinableElement::redefinitionContext
-- Stereotype => RedefinableElement::redefinitionContext
-- StructuredActivityNode => RedefinableElement::redefinitionContext
-- TestIdentityAction => RedefinableElement::redefinitionContext
-- Transition => RedefinableElement::redefinitionContext
-- UnmarshallAction => RedefinableElement::redefinitionContext
-- UseCase => RedefinableElement::redefinitionContext
-- ValuePin => RedefinableElement::redefinitionContext
-- ValueSpecificationAction => RedefinableElement::redefinitionContext
function Internal_Get_Redefinition_Context
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- FinalState => State::redefinitionContext
-- ProtocolTransition => Transition::redefinitionContext
-- Region => Region::redefinitionContext
-- State => State::redefinitionContext
-- Transition => Transition::redefinitionContext
function Internal_Get_Reducer
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Reducer
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ReduceAction => ReduceAction::reducer
function Internal_Get_Referred
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ProtocolTransition => ProtocolTransition::referred
function Internal_Get_Refers_To
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Refers_To
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InteractionUse => InteractionUse::refersTo
-- PartDecomposition => InteractionUse::refersTo
function Internal_Get_Region
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- FinalState => State::region
-- ProtocolStateMachine => StateMachine::region
-- State => State::region
-- StateMachine => StateMachine::region
function Internal_Get_Region_As_Input
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Region_As_Input
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExpansionNode => ExpansionNode::regionAsInput
function Internal_Get_Region_As_Output
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Region_As_Output
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExpansionNode => ExpansionNode::regionAsOutput
function Internal_Get_Related_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => Relationship::relatedElement
-- Association => Relationship::relatedElement
-- AssociationClass => Relationship::relatedElement
-- CommunicationPath => Relationship::relatedElement
-- ComponentRealization => Relationship::relatedElement
-- Dependency => Relationship::relatedElement
-- Deployment => Relationship::relatedElement
-- ElementImport => Relationship::relatedElement
-- Extend => Relationship::relatedElement
-- Extension => Relationship::relatedElement
-- Generalization => Relationship::relatedElement
-- Include => Relationship::relatedElement
-- InformationFlow => Relationship::relatedElement
-- InterfaceRealization => Relationship::relatedElement
-- Manifestation => Relationship::relatedElement
-- PackageImport => Relationship::relatedElement
-- PackageMerge => Relationship::relatedElement
-- ProfileApplication => Relationship::relatedElement
-- ProtocolConformance => Relationship::relatedElement
-- Realization => Relationship::relatedElement
-- Substitution => Relationship::relatedElement
-- TemplateBinding => Relationship::relatedElement
-- Usage => Relationship::relatedElement
function Internal_Get_Remove_At
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Remove_At
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- RemoveStructuralFeatureValueAction => RemoveStructuralFeatureValueAction::removeAt
-- RemoveVariableValueAction => RemoveVariableValueAction::removeAt
function Internal_Get_Reply_To_Call
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Reply_To_Call
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ReplyAction => ReplyAction::replyToCall
function Internal_Get_Reply_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ReplyAction => ReplyAction::replyValue
function Internal_Get_Representation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Representation
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Activity => Classifier::representation
-- Actor => Classifier::representation
-- Artifact => Classifier::representation
-- Association => Classifier::representation
-- AssociationClass => Classifier::representation
-- Class => Classifier::representation
-- Collaboration => Classifier::representation
-- CommunicationPath => Classifier::representation
-- Component => Classifier::representation
-- DataType => Classifier::representation
-- DeploymentSpecification => Classifier::representation
-- Device => Classifier::representation
-- Enumeration => Classifier::representation
-- ExecutionEnvironment => Classifier::representation
-- Extension => Classifier::representation
-- FunctionBehavior => Classifier::representation
-- InformationItem => Classifier::representation
-- Interaction => Classifier::representation
-- Interface => Classifier::representation
-- Node => Classifier::representation
-- OpaqueBehavior => Classifier::representation
-- PrimitiveType => Classifier::representation
-- ProtocolStateMachine => Classifier::representation
-- Signal => Classifier::representation
-- StateMachine => Classifier::representation
-- Stereotype => Classifier::representation
-- UseCase => Classifier::representation
function Internal_Get_Represented
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- InformationItem => InformationItem::represented
function Internal_Get_Represents
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Represents
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActivityPartition => ActivityPartition::represents
-- Lifeline => Lifeline::represents
function Internal_Get_Request
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Request
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- SendObjectAction => SendObjectAction::request
function Internal_Get_Required
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Component => Component::required
-- Port => Port::required
function Internal_Get_Resolution
(Self : AMF.Internals.AMF_Element)
return AMF.Real;
procedure Internal_Set_Resolution
(Self : AMF.Internals.AMF_Element;
To : AMF.Real);
-- UMLActivityDiagram => Diagram::resolution
-- UMLClassDiagram => Diagram::resolution
-- UMLComponentDiagram => Diagram::resolution
-- UMLCompositeStructureDiagram => Diagram::resolution
-- UMLDeploymentDiagram => Diagram::resolution
-- UMLInteractionDiagram => Diagram::resolution
-- UMLObjectDiagram => Diagram::resolution
-- UMLPackageDiagram => Diagram::resolution
-- UMLProfileDiagram => Diagram::resolution
-- UMLStateMachineDiagram => Diagram::resolution
-- UMLUseCaseDiagram => Diagram::resolution
function Internal_Get_Result
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => AcceptEventAction::result
-- AcceptEventAction => AcceptEventAction::result
-- CallBehaviorAction => CallAction::result
-- CallOperationAction => CallAction::result
-- ConditionalNode => ConditionalNode::result
-- LoopNode => LoopNode::result
-- StartObjectBehaviorAction => CallAction::result
-- UnmarshallAction => UnmarshallAction::result
function Internal_Get_Result
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Result
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AddStructuralFeatureValueAction => WriteStructuralFeatureAction::result
-- ClearStructuralFeatureAction => ClearStructuralFeatureAction::result
-- CreateLinkObjectAction => CreateLinkObjectAction::result
-- CreateObjectAction => CreateObjectAction::result
-- OpaqueExpression => OpaqueExpression::result
-- ReadExtentAction => ReadExtentAction::result
-- ReadIsClassifiedObjectAction => ReadIsClassifiedObjectAction::result
-- ReadLinkAction => ReadLinkAction::result
-- ReadLinkObjectEndAction => ReadLinkObjectEndAction::result
-- ReadLinkObjectEndQualifierAction => ReadLinkObjectEndQualifierAction::result
-- ReadSelfAction => ReadSelfAction::result
-- ReadStructuralFeatureAction => ReadStructuralFeatureAction::result
-- ReadVariableAction => ReadVariableAction::result
-- ReduceAction => ReduceAction::result
-- RemoveStructuralFeatureValueAction => WriteStructuralFeatureAction::result
-- TestIdentityAction => TestIdentityAction::result
-- ValueSpecificationAction => ValueSpecificationAction::result
function Internal_Get_Return_Information
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Return_Information
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AcceptCallAction => AcceptCallAction::returnInformation
-- ReplyAction => ReplyAction::returnInformation
function Internal_Get_Return_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Return_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InteractionUse => InteractionUse::returnValue
-- PartDecomposition => InteractionUse::returnValue
function Internal_Get_Return_Value_Recipient
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Return_Value_Recipient
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- InteractionUse => InteractionUse::returnValueRecipient
-- PartDecomposition => InteractionUse::returnValueRecipient
function Internal_Get_Role
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Role
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ConnectorEnd => ConnectorEnd::role
function Internal_Get_Role
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => StructuredClassifier::role
-- AssociationClass => StructuredClassifier::role
-- Class => StructuredClassifier::role
-- Collaboration => StructuredClassifier::role
-- Component => StructuredClassifier::role
-- Device => StructuredClassifier::role
-- ExecutionEnvironment => StructuredClassifier::role
-- FunctionBehavior => StructuredClassifier::role
-- Interaction => StructuredClassifier::role
-- Node => StructuredClassifier::role
-- OpaqueBehavior => StructuredClassifier::role
-- ProtocolStateMachine => StructuredClassifier::role
-- StateMachine => StructuredClassifier::role
-- Stereotype => StructuredClassifier::role
function Internal_Get_Role_Binding
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- CollaborationUse => CollaborationUse::roleBinding
function Internal_Get_Scope
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Scope
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Variable => Variable::scope
function Internal_Get_Second
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Second
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TestIdentityAction => TestIdentityAction::second
function Internal_Get_Selection
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Selection
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionInputPin => ObjectNode::selection
-- ActivityParameterNode => ObjectNode::selection
-- CentralBufferNode => ObjectNode::selection
-- DataStoreNode => ObjectNode::selection
-- ExpansionNode => ObjectNode::selection
-- InputPin => ObjectNode::selection
-- ObjectFlow => ObjectFlow::selection
-- OutputPin => ObjectNode::selection
-- ValuePin => ObjectNode::selection
function Internal_Get_Selector
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Selector
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Lifeline => Lifeline::selector
function Internal_Get_Send_Event
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Send_Event
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Message => Message::sendEvent
function Internal_Get_Setting
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Setting
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- Continuation => Continuation::setting
function Internal_Get_Setup_Part
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- LoopNode => LoopNode::setupPart
function Internal_Get_Shared_Style
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Shared_Style
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLActivityDiagram => UMLDiagramElement::sharedStyle
-- UMLAssociationEndLabel => UMLDiagramElement::sharedStyle
-- UMLAssociationOrConnectorOrLinkShape => UMLDiagramElement::sharedStyle
-- UMLClassDiagram => UMLDiagramElement::sharedStyle
-- UMLClassifierShape => UMLDiagramElement::sharedStyle
-- UMLCompartment => UMLDiagramElement::sharedStyle
-- UMLCompartmentableShape => UMLDiagramElement::sharedStyle
-- UMLComponentDiagram => UMLDiagramElement::sharedStyle
-- UMLCompositeStructureDiagram => UMLDiagramElement::sharedStyle
-- UMLDeploymentDiagram => UMLDiagramElement::sharedStyle
-- UMLEdge => UMLDiagramElement::sharedStyle
-- UMLInteractionDiagram => UMLDiagramElement::sharedStyle
-- UMLInteractionTableLabel => UMLDiagramElement::sharedStyle
-- UMLKeywordLabel => UMLDiagramElement::sharedStyle
-- UMLLabel => UMLDiagramElement::sharedStyle
-- UMLMultiplicityLabel => UMLDiagramElement::sharedStyle
-- UMLNameLabel => UMLDiagramElement::sharedStyle
-- UMLObjectDiagram => UMLDiagramElement::sharedStyle
-- UMLPackageDiagram => UMLDiagramElement::sharedStyle
-- UMLProfileDiagram => UMLDiagramElement::sharedStyle
-- UMLRedefinesLabel => UMLDiagramElement::sharedStyle
-- UMLShape => UMLDiagramElement::sharedStyle
-- UMLStateMachineDiagram => UMLDiagramElement::sharedStyle
-- UMLStateShape => UMLDiagramElement::sharedStyle
-- UMLStereotypePropertyValueLabel => UMLDiagramElement::sharedStyle
-- UMLTypedElementLabel => UMLDiagramElement::sharedStyle
-- UMLUseCaseDiagram => UMLDiagramElement::sharedStyle
function Internal_Get_Signal
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Signal
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- BroadcastSignalAction => BroadcastSignalAction::signal
-- Reception => Reception::signal
-- SendSignalAction => SendSignalAction::signal
-- SignalEvent => SignalEvent::signal
function Internal_Get_Signature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Signature
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ClassifierTemplateParameter => TemplateParameter::signature
-- ConnectableElementTemplateParameter => TemplateParameter::signature
-- Message => Message::signature
-- OperationTemplateParameter => TemplateParameter::signature
-- TemplateBinding => TemplateBinding::signature
-- TemplateParameter => TemplateParameter::signature
function Internal_Get_Slot
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- EnumerationLiteral => InstanceSpecification::slot
-- InstanceSpecification => InstanceSpecification::slot
function Internal_Get_Source
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Source
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ControlFlow => ActivityEdge::source
-- UMLEdge => UMLEdge::source
-- ObjectFlow => ActivityEdge::source
-- ProtocolTransition => Transition::source
-- Transition => Transition::source
function Internal_Get_Source
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => DirectedRelationship::source
-- ComponentRealization => DirectedRelationship::source
-- Dependency => DirectedRelationship::source
-- Deployment => DirectedRelationship::source
-- ElementImport => DirectedRelationship::source
-- Extend => DirectedRelationship::source
-- Generalization => DirectedRelationship::source
-- Include => DirectedRelationship::source
-- InformationFlow => DirectedRelationship::source
-- InterfaceRealization => DirectedRelationship::source
-- Manifestation => DirectedRelationship::source
-- PackageImport => DirectedRelationship::source
-- PackageMerge => DirectedRelationship::source
-- ProfileApplication => DirectedRelationship::source
-- ProtocolConformance => DirectedRelationship::source
-- Realization => DirectedRelationship::source
-- Substitution => DirectedRelationship::source
-- TemplateBinding => DirectedRelationship::source
-- Usage => DirectedRelationship::source
function Internal_Get_Specific
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Specific
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Generalization => Generalization::specific
function Internal_Get_Specific_Machine
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Specific_Machine
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ProtocolConformance => ProtocolConformance::specificMachine
function Internal_Get_Specification
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Specification
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Activity => Behavior::specification
-- Constraint => Constraint::specification
-- DurationConstraint => Constraint::specification
-- EnumerationLiteral => InstanceSpecification::specification
-- FunctionBehavior => Behavior::specification
-- InstanceSpecification => InstanceSpecification::specification
-- Interaction => Behavior::specification
-- InteractionConstraint => Constraint::specification
-- IntervalConstraint => Constraint::specification
-- OpaqueBehavior => Behavior::specification
-- ProtocolStateMachine => Behavior::specification
-- StateMachine => Behavior::specification
-- TimeConstraint => Constraint::specification
function Internal_Get_Start
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Start
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionExecutionSpecification => ExecutionSpecification::start
-- BehaviorExecutionSpecification => ExecutionSpecification::start
function Internal_Get_State
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_State
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ConnectionPointReference => ConnectionPointReference::state
-- Pseudostate => Pseudostate::state
-- Region => Region::state
function Internal_Get_State_Invariant
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_State_Invariant
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- FinalState => State::stateInvariant
-- State => State::stateInvariant
function Internal_Get_State_Machine
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_State_Machine
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Pseudostate => Pseudostate::stateMachine
-- Region => Region::stateMachine
function Internal_Get_Stereotyped_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Stereotyped_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UMLStereotypePropertyValueLabel => UMLStereotypePropertyValueLabel::stereotypedElement
function Internal_Get_Structural_Feature
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Structural_Feature
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AddStructuralFeatureValueAction => StructuralFeatureAction::structuralFeature
-- ClearStructuralFeatureAction => StructuralFeatureAction::structuralFeature
-- ReadStructuralFeatureAction => StructuralFeatureAction::structuralFeature
-- RemoveStructuralFeatureValueAction => StructuralFeatureAction::structuralFeature
function Internal_Get_Structured_Node
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Activity::structuredNode
function Internal_Get_Structured_Node_Input
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ConditionalNode => StructuredActivityNode::structuredNodeInput
-- ExpansionRegion => StructuredActivityNode::structuredNodeInput
-- LoopNode => StructuredActivityNode::structuredNodeInput
-- SequenceNode => StructuredActivityNode::structuredNodeInput
-- StructuredActivityNode => StructuredActivityNode::structuredNodeInput
function Internal_Get_Structured_Node_Output
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ConditionalNode => StructuredActivityNode::structuredNodeOutput
-- ExpansionRegion => StructuredActivityNode::structuredNodeOutput
-- LoopNode => StructuredActivityNode::structuredNodeOutput
-- SequenceNode => StructuredActivityNode::structuredNodeOutput
-- StructuredActivityNode => StructuredActivityNode::structuredNodeOutput
function Internal_Get_Sub_Expression
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- StringExpression => StringExpression::subExpression
function Internal_Get_Subgroup
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActivityPartition => ActivityGroup::subgroup
-- ConditionalNode => ActivityGroup::subgroup
-- ExpansionRegion => ActivityGroup::subgroup
-- InterruptibleActivityRegion => ActivityGroup::subgroup
-- LoopNode => ActivityGroup::subgroup
-- SequenceNode => ActivityGroup::subgroup
-- StructuredActivityNode => ActivityGroup::subgroup
function Internal_Get_Subject
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- UseCase => UseCase::subject
function Internal_Get_Submachine
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Submachine
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- FinalState => State::submachine
-- State => State::submachine
function Internal_Get_Submachine_State
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ProtocolStateMachine => StateMachine::submachineState
-- StateMachine => StateMachine::submachineState
function Internal_Get_Subpartition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ActivityPartition => ActivityPartition::subpartition
function Internal_Get_Subsetted_Property
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- ExtensionEnd => Property::subsettedProperty
-- Port => Property::subsettedProperty
-- Property => Property::subsettedProperty
function Internal_Get_Substituting_Classifier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Substituting_Classifier
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Substitution => Substitution::substitutingClassifier
function Internal_Get_Substitution
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::substitution
-- Actor => Classifier::substitution
-- Artifact => Classifier::substitution
-- Association => Classifier::substitution
-- AssociationClass => Classifier::substitution
-- Class => Classifier::substitution
-- Collaboration => Classifier::substitution
-- CommunicationPath => Classifier::substitution
-- Component => Classifier::substitution
-- DataType => Classifier::substitution
-- DeploymentSpecification => Classifier::substitution
-- Device => Classifier::substitution
-- Enumeration => Classifier::substitution
-- ExecutionEnvironment => Classifier::substitution
-- Extension => Classifier::substitution
-- FunctionBehavior => Classifier::substitution
-- InformationItem => Classifier::substitution
-- Interaction => Classifier::substitution
-- Interface => Classifier::substitution
-- Node => Classifier::substitution
-- OpaqueBehavior => Classifier::substitution
-- PrimitiveType => Classifier::substitution
-- ProtocolStateMachine => Classifier::substitution
-- Signal => Classifier::substitution
-- StateMachine => Classifier::substitution
-- Stereotype => Classifier::substitution
-- UseCase => Classifier::substitution
function Internal_Get_Subvertex
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Region => Region::subvertex
function Internal_Get_Successor_Clause
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Clause => Clause::successorClause
function Internal_Get_Super_Class
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Class::superClass
-- AssociationClass => Class::superClass
-- Class => Class::superClass
-- Component => Class::superClass
-- Device => Class::superClass
-- ExecutionEnvironment => Class::superClass
-- FunctionBehavior => Class::superClass
-- Interaction => Class::superClass
-- Node => Class::superClass
-- OpaqueBehavior => Class::superClass
-- ProtocolStateMachine => Class::superClass
-- StateMachine => Class::superClass
-- Stereotype => Class::superClass
function Internal_Get_Super_Group
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
-- ActivityPartition => ActivityGroup::superGroup
-- ConditionalNode => ActivityGroup::superGroup
-- ExpansionRegion => ActivityGroup::superGroup
-- InterruptibleActivityRegion => ActivityGroup::superGroup
-- LoopNode => ActivityGroup::superGroup
-- SequenceNode => ActivityGroup::superGroup
-- StructuredActivityNode => ActivityGroup::superGroup
function Internal_Get_Super_Partition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Super_Partition
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActivityPartition => ActivityPartition::superPartition
function Internal_Get_Supplier
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => Dependency::supplier
-- ComponentRealization => Dependency::supplier
-- Dependency => Dependency::supplier
-- Deployment => Dependency::supplier
-- InterfaceRealization => Dependency::supplier
-- Manifestation => Dependency::supplier
-- Realization => Dependency::supplier
-- Substitution => Dependency::supplier
-- Usage => Dependency::supplier
function Internal_Get_Symbol
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Symbol
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Expression => Expression::symbol
-- StringExpression => Expression::symbol
function Internal_Get_Target
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Target
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- CallOperationAction => CallOperationAction::target
-- ControlFlow => ActivityEdge::target
-- UMLEdge => UMLEdge::target
-- DestroyObjectAction => DestroyObjectAction::target
-- ObjectFlow => ActivityEdge::target
-- ProtocolTransition => Transition::target
-- SendObjectAction => SendObjectAction::target
-- SendSignalAction => SendSignalAction::target
-- Transition => Transition::target
function Internal_Get_Target
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Abstraction => DirectedRelationship::target
-- ComponentRealization => DirectedRelationship::target
-- Dependency => DirectedRelationship::target
-- Deployment => DirectedRelationship::target
-- ElementImport => DirectedRelationship::target
-- Extend => DirectedRelationship::target
-- Generalization => DirectedRelationship::target
-- Include => DirectedRelationship::target
-- InformationFlow => DirectedRelationship::target
-- InterfaceRealization => DirectedRelationship::target
-- Manifestation => DirectedRelationship::target
-- PackageImport => DirectedRelationship::target
-- PackageMerge => DirectedRelationship::target
-- ProfileApplication => DirectedRelationship::target
-- ProtocolConformance => DirectedRelationship::target
-- Realization => DirectedRelationship::target
-- Substitution => DirectedRelationship::target
-- TemplateBinding => DirectedRelationship::target
-- Usage => DirectedRelationship::target
function Internal_Get_Template
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Template
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- RedefinableTemplateSignature => TemplateSignature::template
-- TemplateSignature => TemplateSignature::template
function Internal_Get_Template_Binding
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Template_Binding
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TemplateParameterSubstitution => TemplateParameterSubstitution::templateBinding
function Internal_Get_Template_Binding
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => TemplateableElement::templateBinding
-- Actor => TemplateableElement::templateBinding
-- Artifact => TemplateableElement::templateBinding
-- Association => TemplateableElement::templateBinding
-- AssociationClass => TemplateableElement::templateBinding
-- Class => TemplateableElement::templateBinding
-- Collaboration => TemplateableElement::templateBinding
-- CommunicationPath => TemplateableElement::templateBinding
-- Component => TemplateableElement::templateBinding
-- DataType => TemplateableElement::templateBinding
-- DeploymentSpecification => TemplateableElement::templateBinding
-- Device => TemplateableElement::templateBinding
-- Enumeration => TemplateableElement::templateBinding
-- ExecutionEnvironment => TemplateableElement::templateBinding
-- Extension => TemplateableElement::templateBinding
-- FunctionBehavior => TemplateableElement::templateBinding
-- InformationItem => TemplateableElement::templateBinding
-- Interaction => TemplateableElement::templateBinding
-- Interface => TemplateableElement::templateBinding
-- Model => TemplateableElement::templateBinding
-- Node => TemplateableElement::templateBinding
-- OpaqueBehavior => TemplateableElement::templateBinding
-- Operation => TemplateableElement::templateBinding
-- Package => TemplateableElement::templateBinding
-- PrimitiveType => TemplateableElement::templateBinding
-- Profile => TemplateableElement::templateBinding
-- ProtocolStateMachine => TemplateableElement::templateBinding
-- Signal => TemplateableElement::templateBinding
-- StateMachine => TemplateableElement::templateBinding
-- Stereotype => TemplateableElement::templateBinding
-- StringExpression => TemplateableElement::templateBinding
-- UseCase => TemplateableElement::templateBinding
function Internal_Get_Template_Parameter
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Template_Parameter
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Abstraction => ParameterableElement::templateParameter
-- Activity => Classifier::templateParameter
-- Actor => Classifier::templateParameter
-- AnyReceiveEvent => ParameterableElement::templateParameter
-- Artifact => Classifier::templateParameter
-- Association => Classifier::templateParameter
-- AssociationClass => Classifier::templateParameter
-- CallEvent => ParameterableElement::templateParameter
-- ChangeEvent => ParameterableElement::templateParameter
-- Class => Classifier::templateParameter
-- Collaboration => Classifier::templateParameter
-- CommunicationPath => Classifier::templateParameter
-- Component => Classifier::templateParameter
-- ComponentRealization => ParameterableElement::templateParameter
-- Constraint => ParameterableElement::templateParameter
-- UMLActivityDiagram => ParameterableElement::templateParameter
-- UMLClassDiagram => ParameterableElement::templateParameter
-- UMLComponentDiagram => ParameterableElement::templateParameter
-- UMLCompositeStructureDiagram => ParameterableElement::templateParameter
-- UMLDeploymentDiagram => ParameterableElement::templateParameter
-- UMLInteractionDiagram => ParameterableElement::templateParameter
-- UMLObjectDiagram => ParameterableElement::templateParameter
-- UMLPackageDiagram => ParameterableElement::templateParameter
-- UMLProfileDiagram => ParameterableElement::templateParameter
-- UMLStateMachineDiagram => ParameterableElement::templateParameter
-- UMLStyle => ParameterableElement::templateParameter
-- UMLUseCaseDiagram => ParameterableElement::templateParameter
-- DataType => Classifier::templateParameter
-- Dependency => ParameterableElement::templateParameter
-- Deployment => ParameterableElement::templateParameter
-- DeploymentSpecification => Classifier::templateParameter
-- Device => Classifier::templateParameter
-- Duration => ParameterableElement::templateParameter
-- DurationConstraint => ParameterableElement::templateParameter
-- DurationInterval => ParameterableElement::templateParameter
-- DurationObservation => ParameterableElement::templateParameter
-- Enumeration => Classifier::templateParameter
-- EnumerationLiteral => ParameterableElement::templateParameter
-- ExecutionEnvironment => Classifier::templateParameter
-- Expression => ParameterableElement::templateParameter
-- Extension => Classifier::templateParameter
-- ExtensionEnd => ConnectableElement::templateParameter
-- FunctionBehavior => Classifier::templateParameter
-- GeneralizationSet => ParameterableElement::templateParameter
-- InformationFlow => ParameterableElement::templateParameter
-- InformationItem => Classifier::templateParameter
-- InstanceSpecification => ParameterableElement::templateParameter
-- InstanceValue => ParameterableElement::templateParameter
-- Interaction => Classifier::templateParameter
-- InteractionConstraint => ParameterableElement::templateParameter
-- Interface => Classifier::templateParameter
-- InterfaceRealization => ParameterableElement::templateParameter
-- Interval => ParameterableElement::templateParameter
-- IntervalConstraint => ParameterableElement::templateParameter
-- LiteralBoolean => ParameterableElement::templateParameter
-- LiteralInteger => ParameterableElement::templateParameter
-- LiteralNull => ParameterableElement::templateParameter
-- LiteralReal => ParameterableElement::templateParameter
-- LiteralString => ParameterableElement::templateParameter
-- LiteralUnlimitedNatural => ParameterableElement::templateParameter
-- Manifestation => ParameterableElement::templateParameter
-- Model => ParameterableElement::templateParameter
-- Node => Classifier::templateParameter
-- OpaqueBehavior => Classifier::templateParameter
-- OpaqueExpression => ParameterableElement::templateParameter
-- Operation => Operation::templateParameter
-- Package => ParameterableElement::templateParameter
-- Parameter => ConnectableElement::templateParameter
-- Port => ConnectableElement::templateParameter
-- PrimitiveType => Classifier::templateParameter
-- Profile => ParameterableElement::templateParameter
-- Property => ConnectableElement::templateParameter
-- ProtocolStateMachine => Classifier::templateParameter
-- Realization => ParameterableElement::templateParameter
-- Signal => Classifier::templateParameter
-- SignalEvent => ParameterableElement::templateParameter
-- StateMachine => Classifier::templateParameter
-- Stereotype => Classifier::templateParameter
-- StringExpression => ParameterableElement::templateParameter
-- Substitution => ParameterableElement::templateParameter
-- TimeConstraint => ParameterableElement::templateParameter
-- TimeEvent => ParameterableElement::templateParameter
-- TimeExpression => ParameterableElement::templateParameter
-- TimeInterval => ParameterableElement::templateParameter
-- TimeObservation => ParameterableElement::templateParameter
-- Usage => ParameterableElement::templateParameter
-- UseCase => Classifier::templateParameter
-- Variable => ConnectableElement::templateParameter
function Internal_Get_Test
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Clause => Clause::test
-- LoopNode => LoopNode::test
function Internal_Get_Text
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Text
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- UMLAssociationEndLabel => UMLLabel::text
-- UMLInteractionTableLabel => UMLLabel::text
-- UMLKeywordLabel => UMLLabel::text
-- UMLLabel => UMLLabel::text
-- UMLMultiplicityLabel => UMLLabel::text
-- UMLNameLabel => UMLLabel::text
-- UMLRedefinesLabel => UMLLabel::text
-- UMLStereotypePropertyValueLabel => UMLLabel::text
-- UMLTypedElementLabel => UMLLabel::text
function Internal_Get_To_After
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- DestructionOccurrenceSpecification => OccurrenceSpecification::toAfter
-- ExecutionOccurrenceSpecification => OccurrenceSpecification::toAfter
-- MessageOccurrenceSpecification => OccurrenceSpecification::toAfter
-- OccurrenceSpecification => OccurrenceSpecification::toAfter
function Internal_Get_To_Before
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- DestructionOccurrenceSpecification => OccurrenceSpecification::toBefore
-- ExecutionOccurrenceSpecification => OccurrenceSpecification::toBefore
-- MessageOccurrenceSpecification => OccurrenceSpecification::toBefore
-- OccurrenceSpecification => OccurrenceSpecification::toBefore
function Internal_Get_Transformation
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Transformation
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ObjectFlow => ObjectFlow::transformation
function Internal_Get_Transition
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Region => Region::transition
function Internal_Get_Trigger
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- AcceptCallAction => AcceptEventAction::trigger
-- AcceptEventAction => AcceptEventAction::trigger
-- ProtocolTransition => Transition::trigger
-- Transition => Transition::trigger
function Internal_Get_Type
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Type
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionInputPin => TypedElement::type
-- ActivityParameterNode => TypedElement::type
-- CentralBufferNode => TypedElement::type
-- CollaborationUse => CollaborationUse::type
-- Connector => Connector::type
-- DataStoreNode => TypedElement::type
-- Duration => TypedElement::type
-- DurationInterval => TypedElement::type
-- ExpansionNode => TypedElement::type
-- Expression => TypedElement::type
-- ExtensionEnd => ExtensionEnd::type
-- InputPin => TypedElement::type
-- InstanceValue => TypedElement::type
-- Interval => TypedElement::type
-- LiteralBoolean => TypedElement::type
-- LiteralInteger => TypedElement::type
-- LiteralNull => TypedElement::type
-- LiteralReal => TypedElement::type
-- LiteralString => TypedElement::type
-- LiteralUnlimitedNatural => TypedElement::type
-- OpaqueExpression => TypedElement::type
-- Operation => Operation::type
-- OutputPin => TypedElement::type
-- Parameter => TypedElement::type
-- Port => TypedElement::type
-- Property => TypedElement::type
-- StringExpression => TypedElement::type
-- TimeExpression => TypedElement::type
-- TimeInterval => TypedElement::type
-- ValuePin => TypedElement::type
-- Variable => TypedElement::type
function Internal_Get_Unmarshall_Type
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Unmarshall_Type
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- UnmarshallAction => UnmarshallAction::unmarshallType
function Internal_Get_Upper
(Self : AMF.Internals.AMF_Element)
return AMF.Optional_Unlimited_Natural;
procedure Internal_Set_Upper
(Self : AMF.Internals.AMF_Element;
To : AMF.Optional_Unlimited_Natural);
-- ActionInputPin => MultiplicityElement::upper
-- ConnectorEnd => MultiplicityElement::upper
-- ExtensionEnd => MultiplicityElement::upper
-- InputPin => MultiplicityElement::upper
-- Operation => Operation::upper
-- OutputPin => MultiplicityElement::upper
-- Parameter => MultiplicityElement::upper
-- Port => MultiplicityElement::upper
-- Property => MultiplicityElement::upper
-- ValuePin => MultiplicityElement::upper
-- Variable => MultiplicityElement::upper
function Internal_Get_Upper_Bound
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Upper_Bound
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionInputPin => ObjectNode::upperBound
-- ActivityParameterNode => ObjectNode::upperBound
-- CentralBufferNode => ObjectNode::upperBound
-- DataStoreNode => ObjectNode::upperBound
-- ExpansionNode => ObjectNode::upperBound
-- InputPin => ObjectNode::upperBound
-- OutputPin => ObjectNode::upperBound
-- ValuePin => ObjectNode::upperBound
function Internal_Get_Upper_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Upper_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ActionInputPin => MultiplicityElement::upperValue
-- ConnectorEnd => MultiplicityElement::upperValue
-- ExtensionEnd => MultiplicityElement::upperValue
-- InputPin => MultiplicityElement::upperValue
-- OutputPin => MultiplicityElement::upperValue
-- Parameter => MultiplicityElement::upperValue
-- Port => MultiplicityElement::upperValue
-- Property => MultiplicityElement::upperValue
-- ValuePin => MultiplicityElement::upperValue
-- Variable => MultiplicityElement::upperValue
function Internal_Get_Use_Case
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Classifier::useCase
-- Actor => Classifier::useCase
-- Artifact => Classifier::useCase
-- Association => Classifier::useCase
-- AssociationClass => Classifier::useCase
-- Class => Classifier::useCase
-- Collaboration => Classifier::useCase
-- CommunicationPath => Classifier::useCase
-- Component => Classifier::useCase
-- DataType => Classifier::useCase
-- DeploymentSpecification => Classifier::useCase
-- Device => Classifier::useCase
-- Enumeration => Classifier::useCase
-- ExecutionEnvironment => Classifier::useCase
-- Extension => Classifier::useCase
-- FunctionBehavior => Classifier::useCase
-- InformationItem => Classifier::useCase
-- Interaction => Classifier::useCase
-- Interface => Classifier::useCase
-- Node => Classifier::useCase
-- OpaqueBehavior => Classifier::useCase
-- PrimitiveType => Classifier::useCase
-- ProtocolStateMachine => Classifier::useCase
-- Signal => Classifier::useCase
-- StateMachine => Classifier::useCase
-- Stereotype => Classifier::useCase
-- UseCase => Classifier::useCase
function Internal_Get_Use_Case
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Use_Case
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ExtensionPoint => ExtensionPoint::useCase
function Internal_Get_Utilized_Element
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Utilized_Element
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- Manifestation => Manifestation::utilizedElement
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return Boolean;
procedure Internal_Set_Value
(Self : AMF.Internals.AMF_Element;
To : Boolean);
-- LiteralBoolean => LiteralBoolean::value
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return Integer;
procedure Internal_Set_Value
(Self : AMF.Internals.AMF_Element;
To : Integer);
-- LiteralInteger => LiteralInteger::value
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Real;
procedure Internal_Set_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Real);
-- LiteralReal => LiteralReal::value
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Value
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- LiteralString => LiteralString::value
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Unlimited_Natural;
procedure Internal_Set_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Unlimited_Natural);
-- LiteralUnlimitedNatural => LiteralUnlimitedNatural::value
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Slot => Slot::value
function Internal_Get_Value
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Value
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AddStructuralFeatureValueAction => WriteStructuralFeatureAction::value
-- AddVariableValueAction => WriteVariableAction::value
-- LinkEndCreationData => LinkEndData::value
-- LinkEndData => LinkEndData::value
-- LinkEndDestructionData => LinkEndData::value
-- QualifierValue => QualifierValue::value
-- RemoveStructuralFeatureValueAction => WriteStructuralFeatureAction::value
-- RemoveVariableValueAction => WriteVariableAction::value
-- ValuePin => ValuePin::value
-- ValueSpecificationAction => ValueSpecificationAction::value
function Internal_Get_Variable
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Collection_Of_Element;
-- Activity => Activity::variable
-- ConditionalNode => StructuredActivityNode::variable
-- ExpansionRegion => StructuredActivityNode::variable
-- LoopNode => StructuredActivityNode::variable
-- SequenceNode => StructuredActivityNode::variable
-- StructuredActivityNode => StructuredActivityNode::variable
function Internal_Get_Variable
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Variable
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- AddVariableValueAction => VariableAction::variable
-- ClearVariableAction => VariableAction::variable
-- ReadVariableAction => VariableAction::variable
-- RemoveVariableValueAction => VariableAction::variable
function Internal_Get_Viewpoint
(Self : AMF.Internals.AMF_Element)
return Matreshka.Internals.Strings.Shared_String_Access;
procedure Internal_Set_Viewpoint
(Self : AMF.Internals.AMF_Element;
To : Matreshka.Internals.Strings.Shared_String_Access);
-- Model => Model::viewpoint
function Internal_Get_Visibility
(Self : AMF.Internals.AMF_Element)
return AMF.UML.UML_Visibility_Kind;
procedure Internal_Set_Visibility
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.UML_Visibility_Kind);
-- ElementImport => ElementImport::visibility
-- PackageImport => PackageImport::visibility
function Internal_Get_Visibility
(Self : AMF.Internals.AMF_Element)
return AMF.UML.Optional_UML_Visibility_Kind;
procedure Internal_Set_Visibility
(Self : AMF.Internals.AMF_Element;
To : AMF.UML.Optional_UML_Visibility_Kind);
-- Abstraction => NamedElement::visibility
-- AcceptCallAction => NamedElement::visibility
-- AcceptEventAction => NamedElement::visibility
-- ActionExecutionSpecification => NamedElement::visibility
-- ActionInputPin => NamedElement::visibility
-- Activity => NamedElement::visibility
-- ActivityFinalNode => NamedElement::visibility
-- ActivityParameterNode => NamedElement::visibility
-- ActivityPartition => NamedElement::visibility
-- Actor => NamedElement::visibility
-- AddStructuralFeatureValueAction => NamedElement::visibility
-- AddVariableValueAction => NamedElement::visibility
-- AnyReceiveEvent => NamedElement::visibility
-- Artifact => NamedElement::visibility
-- Association => NamedElement::visibility
-- AssociationClass => NamedElement::visibility
-- BehaviorExecutionSpecification => NamedElement::visibility
-- BroadcastSignalAction => NamedElement::visibility
-- CallBehaviorAction => NamedElement::visibility
-- CallEvent => NamedElement::visibility
-- CallOperationAction => NamedElement::visibility
-- CentralBufferNode => NamedElement::visibility
-- ChangeEvent => NamedElement::visibility
-- Class => NamedElement::visibility
-- ClearAssociationAction => NamedElement::visibility
-- ClearStructuralFeatureAction => NamedElement::visibility
-- ClearVariableAction => NamedElement::visibility
-- Collaboration => NamedElement::visibility
-- CollaborationUse => NamedElement::visibility
-- CombinedFragment => NamedElement::visibility
-- CommunicationPath => NamedElement::visibility
-- Component => NamedElement::visibility
-- ComponentRealization => NamedElement::visibility
-- ConditionalNode => NamedElement::visibility
-- ConnectionPointReference => NamedElement::visibility
-- Connector => NamedElement::visibility
-- ConsiderIgnoreFragment => NamedElement::visibility
-- Constraint => NamedElement::visibility
-- Continuation => NamedElement::visibility
-- ControlFlow => NamedElement::visibility
-- CreateLinkAction => NamedElement::visibility
-- CreateLinkObjectAction => NamedElement::visibility
-- CreateObjectAction => NamedElement::visibility
-- UMLActivityDiagram => NamedElement::visibility
-- UMLClassDiagram => NamedElement::visibility
-- UMLComponentDiagram => NamedElement::visibility
-- UMLCompositeStructureDiagram => NamedElement::visibility
-- UMLDeploymentDiagram => NamedElement::visibility
-- UMLInteractionDiagram => NamedElement::visibility
-- UMLObjectDiagram => NamedElement::visibility
-- UMLPackageDiagram => NamedElement::visibility
-- UMLProfileDiagram => NamedElement::visibility
-- UMLStateMachineDiagram => NamedElement::visibility
-- UMLStyle => NamedElement::visibility
-- UMLUseCaseDiagram => NamedElement::visibility
-- DataStoreNode => NamedElement::visibility
-- DataType => NamedElement::visibility
-- DecisionNode => NamedElement::visibility
-- Dependency => NamedElement::visibility
-- Deployment => NamedElement::visibility
-- DeploymentSpecification => NamedElement::visibility
-- DestroyLinkAction => NamedElement::visibility
-- DestroyObjectAction => NamedElement::visibility
-- DestructionOccurrenceSpecification => NamedElement::visibility
-- Device => NamedElement::visibility
-- Duration => NamedElement::visibility
-- DurationConstraint => NamedElement::visibility
-- DurationInterval => NamedElement::visibility
-- DurationObservation => NamedElement::visibility
-- Enumeration => NamedElement::visibility
-- EnumerationLiteral => NamedElement::visibility
-- ExecutionEnvironment => NamedElement::visibility
-- ExecutionOccurrenceSpecification => NamedElement::visibility
-- ExpansionNode => NamedElement::visibility
-- ExpansionRegion => NamedElement::visibility
-- Expression => NamedElement::visibility
-- Extend => NamedElement::visibility
-- Extension => NamedElement::visibility
-- ExtensionEnd => NamedElement::visibility
-- ExtensionPoint => NamedElement::visibility
-- FinalState => NamedElement::visibility
-- FlowFinalNode => NamedElement::visibility
-- ForkNode => NamedElement::visibility
-- FunctionBehavior => NamedElement::visibility
-- Gate => NamedElement::visibility
-- GeneralOrdering => NamedElement::visibility
-- GeneralizationSet => NamedElement::visibility
-- Include => NamedElement::visibility
-- InformationFlow => NamedElement::visibility
-- InformationItem => NamedElement::visibility
-- InitialNode => NamedElement::visibility
-- InputPin => NamedElement::visibility
-- InstanceSpecification => NamedElement::visibility
-- InstanceValue => NamedElement::visibility
-- Interaction => NamedElement::visibility
-- InteractionConstraint => NamedElement::visibility
-- InteractionOperand => NamedElement::visibility
-- InteractionUse => NamedElement::visibility
-- Interface => NamedElement::visibility
-- InterfaceRealization => NamedElement::visibility
-- InterruptibleActivityRegion => NamedElement::visibility
-- Interval => NamedElement::visibility
-- IntervalConstraint => NamedElement::visibility
-- JoinNode => NamedElement::visibility
-- Lifeline => NamedElement::visibility
-- LiteralBoolean => NamedElement::visibility
-- LiteralInteger => NamedElement::visibility
-- LiteralNull => NamedElement::visibility
-- LiteralReal => NamedElement::visibility
-- LiteralString => NamedElement::visibility
-- LiteralUnlimitedNatural => NamedElement::visibility
-- LoopNode => NamedElement::visibility
-- Manifestation => NamedElement::visibility
-- MergeNode => NamedElement::visibility
-- Message => NamedElement::visibility
-- MessageOccurrenceSpecification => NamedElement::visibility
-- Model => NamedElement::visibility
-- Node => NamedElement::visibility
-- ObjectFlow => NamedElement::visibility
-- OccurrenceSpecification => NamedElement::visibility
-- OpaqueAction => NamedElement::visibility
-- OpaqueBehavior => NamedElement::visibility
-- OpaqueExpression => NamedElement::visibility
-- Operation => NamedElement::visibility
-- OutputPin => NamedElement::visibility
-- Package => NamedElement::visibility
-- Parameter => NamedElement::visibility
-- ParameterSet => NamedElement::visibility
-- PartDecomposition => NamedElement::visibility
-- Port => NamedElement::visibility
-- PrimitiveType => NamedElement::visibility
-- Profile => NamedElement::visibility
-- Property => NamedElement::visibility
-- ProtocolStateMachine => NamedElement::visibility
-- ProtocolTransition => NamedElement::visibility
-- Pseudostate => NamedElement::visibility
-- RaiseExceptionAction => NamedElement::visibility
-- ReadExtentAction => NamedElement::visibility
-- ReadIsClassifiedObjectAction => NamedElement::visibility
-- ReadLinkAction => NamedElement::visibility
-- ReadLinkObjectEndAction => NamedElement::visibility
-- ReadLinkObjectEndQualifierAction => NamedElement::visibility
-- ReadSelfAction => NamedElement::visibility
-- ReadStructuralFeatureAction => NamedElement::visibility
-- ReadVariableAction => NamedElement::visibility
-- Realization => NamedElement::visibility
-- Reception => NamedElement::visibility
-- ReclassifyObjectAction => NamedElement::visibility
-- RedefinableTemplateSignature => NamedElement::visibility
-- ReduceAction => NamedElement::visibility
-- Region => NamedElement::visibility
-- RemoveStructuralFeatureValueAction => NamedElement::visibility
-- RemoveVariableValueAction => NamedElement::visibility
-- ReplyAction => NamedElement::visibility
-- SendObjectAction => NamedElement::visibility
-- SendSignalAction => NamedElement::visibility
-- SequenceNode => NamedElement::visibility
-- Signal => NamedElement::visibility
-- SignalEvent => NamedElement::visibility
-- StartClassifierBehaviorAction => NamedElement::visibility
-- StartObjectBehaviorAction => NamedElement::visibility
-- State => NamedElement::visibility
-- StateInvariant => NamedElement::visibility
-- StateMachine => NamedElement::visibility
-- Stereotype => NamedElement::visibility
-- StringExpression => NamedElement::visibility
-- StructuredActivityNode => NamedElement::visibility
-- Substitution => NamedElement::visibility
-- TestIdentityAction => NamedElement::visibility
-- TimeConstraint => NamedElement::visibility
-- TimeEvent => NamedElement::visibility
-- TimeExpression => NamedElement::visibility
-- TimeInterval => NamedElement::visibility
-- TimeObservation => NamedElement::visibility
-- Transition => NamedElement::visibility
-- Trigger => NamedElement::visibility
-- UnmarshallAction => NamedElement::visibility
-- Usage => NamedElement::visibility
-- UseCase => NamedElement::visibility
-- ValuePin => NamedElement::visibility
-- ValueSpecificationAction => NamedElement::visibility
-- Variable => NamedElement::visibility
function Internal_Get_Waypoint
(Self : AMF.Internals.AMF_Element)
return AMF.DC.Sequence_Of_DC_Point;
-- UMLEdge => Edge::waypoint
function Internal_Get_Weight
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_Weight
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- ControlFlow => ActivityEdge::weight
-- ObjectFlow => ActivityEdge::weight
function Internal_Get_When
(Self : AMF.Internals.AMF_Element)
return AMF.Internals.AMF_Element;
procedure Internal_Set_When
(Self : AMF.Internals.AMF_Element;
To : AMF.Internals.AMF_Element);
-- TimeEvent => TimeEvent::when
end AMF.Internals.Tables.UML_Attributes;
|
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, not taking more than you give.
--
with Ada.Characters.Handling;
package body Options is
procedure Set_Language
is
use Ada.Characters.Handling;
LANG : constant String := To_Upper (Options.Language_String.all);
begin
if LANG = "ADA" then
Language := Language_Ada;
elsif LANG = "C" then
Language := Language_C;
else
raise Constraint_Error
with "Error: Unknown language";
end if;
end Set_Language;
end Options;
|
-- The MIT License (MIT)
-- Copyright (c) 2015 Pavel Zhukov <landgraf@fedoraproject.org>
-- 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.
with Nanomsg.Domains;
with Nanomsg.Survey;
with Aunit.Assertions;
with Nanomsg.Messages;
with Ada.Text_Io;
package body Nanomsg.Test_Survey is
procedure Run_Test (T : in out TC) is
use Aunit.Assertions;
Address : constant String := "tcp://127.0.0.1:5555";
Ping : constant String := "PING";
Pong : constant String := "PONG";
task Server is
entry Start;
end Server;
task body Server is
begin
T.Server.Init (Nanomsg.Domains.Af_Sp, Nanomsg.Survey.Nn_Surveyor);
T.Server.Bind ("tcp://*:5555");
delay 1.0;
accept Start;
declare
Msg : Nanomsg.Messages.Message_T;
begin
Msg.From_String (Ping);
T.Server.Send (Msg);
end;
for X in T.Clients'Range loop
declare
Msg : Nanomsg.Messages.Message_T;
begin
select
delay 2.0;
Assert (False, "Abort in server");
then abort
T.Server.Receive (Msg);
end select;
end;
end loop;
end Server;
begin
for Client of T.Clients loop
Client.Init (Nanomsg.Domains.Af_Sp, Nanomsg.Survey.Nn_Respondent);
Client.Connect (Address);
end loop;
Server.Start;
for Client of T.Clients loop
declare
Msg : Nanomsg.Messages.Message_T;
begin
select
delay 2.0;
Assert (False, "Recv aborted");
then abort
Client.Receive (Msg);
end select;
Assert (Msg.Text = Ping, "Ping request doesn't match");
end;
end loop;
for Client of T.Clients loop
declare
Msg : Nanomsg.Messages.Message_T;
begin
Msg.From_String (Pong);
Client.Send (Msg);
end;
end loop;
end Run_Test;
function Name (T : TC) return Message_String is
begin
return Aunit.Format ("Test case name : Survey test");
end Name;
procedure Tear_Down (T : in out Tc) is
begin
if T.Server.Get_Fd >= 0 then
T.Server.Close;
end if;
for Client of T.Clients loop
if Client.Get_Fd >= 0 then
Client.Close;
end if;
end loop;
end Tear_Down;
end Nanomsg.Test_Survey;
|
with Ada.Containers.Functional_Sets;
generic
type Element_Type is private;
with function Elements_Equal(Left, Right : Element_Type)
return Boolean is "=";
package TLSF.Proof.Relation with SPARK_Mode is
use Ada.Containers;
subtype Positive_Count_Type is Count_Type range 1 .. Count_Type'Last;
type Arrow is record
From : Element_Type;
To : Element_Type;
end record;
function "=" (Left, Right : Arrow) return Boolean
is (Elements_Equal(Left.From, Right.From)
and Elements_Equal(Left.To, Right.To));
function Inverse (A : Arrow) return Arrow
is (Arrow'(From => A.To,
To => A.From));
package S is new Ada.Containers.Functional_Sets
(Element_Type => Arrow);
use S;
subtype R is S.Set;
function "=" (Left : R; Right : R) return Boolean renames S."=";
function "<=" (Left : R; Right : R) return Boolean renames S."<=";
function "<" (Left : R; Right : R) return Boolean
is (Left <= Right and not (Left = Right));
function Empty (Rel : R) return Boolean
is (Length(Rel) = 0);
function Relate(Container : R;
From, To : Element_Type) return R
with
Pre => Length (Container) < Positive_Count_Type'Last,
Post => (if Contains(Container, Arrow'(From,To))
then
Relation."="(Relate'Result, Container)
else
Length (Relate'Result) = Length (Container) + 1
and Container < Relate'Result
and Contains(Container, Arrow'(From, To)));
function Related (Container : R;
From, To : Element_Type)
return Boolean
is (Contains(Container, Arrow'(From, To)));
-- function Symmetric (Container : V.Sequence) return Boolean
-- with
-- Contract_Cases =>
-- ( (for all Idx in 1..V.Length(Container) =>
-- (not (for all Idx_J in 1..V.Length(Container) =>
-- (if Idx /= Idx_J
-- then V.Get(Container, Idx_J) /= V.Get(Container, Idx)))))
-- => Symmetric'Result = True,
-- others
-- => Symmetric'Result = False);
--
-- function Antysymmetric (Container : V.Sequence) return Boolean
-- with
-- function Find_Address (V : Va.Sequence; Addr : Address) return Count_Type
-- -- Search for Address
-- with
-- Global => null,
-- Post =>
-- (if Find_Address'Result > 0 then
-- Find_Address'Result <= Va.Length (V)
-- and Addr = Va.Get (V, Find_Address'Result));
--
-- function Address_Present(V : Va.Sequence; Addr : Address) return Boolean
-- is (Find_Address(V, Addr) > 0);
end TLSF.Proof.Relation;
|
-----------------------------------------------------------------------
-- Util.Serialize.Mappers.Vector_Mapper -- Mapper for vector types
-- Copyright (C) 2010, 2011 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Containers;
with Ada.Containers.Vectors;
with Util.Serialize.Contexts;
with Util.Serialize.Mappers.Record_Mapper;
with Util.Serialize.IO;
generic
-- Package that represents the vectors of elements.
with package Vectors is
new Ada.Containers.Vectors (<>);
-- Package that maps the element into a record.
with package Element_Mapper is
new Record_Mapper (Element_Type => Vectors.Element_Type,
others => <>);
package Util.Serialize.Mappers.Vector_Mapper is
subtype Element_Type is Vectors.Element_Type;
subtype Vector is Vectors.Vector;
subtype Index_Type is Vectors.Index_Type;
type Vector_Type_Access is access all Vector;
-- Procedure to give access to the <b>Vector</b> object from the context.
type Process_Object is not null
access procedure (Ctx : in out Util.Serialize.Contexts.Context'Class;
Process : not null access procedure (Item : in out Vector));
-- -----------------------
-- Data context
-- -----------------------
-- Data context to get access to the target element.
type Vector_Data is new Util.Serialize.Contexts.Data with private;
type Vector_Data_Access is access all Vector_Data'Class;
-- Get the vector object.
function Get_Vector (Data : in Vector_Data) return Vector_Type_Access;
-- Set the vector object.
procedure Set_Vector (Data : in out Vector_Data;
Vector : in Vector_Type_Access);
-- -----------------------
-- Record mapper
-- -----------------------
type Mapper is new Util.Serialize.Mappers.Mapper with private;
type Mapper_Access is access all Mapper'Class;
-- Execute the mapping operation on the object associated with the current context.
-- The object is extracted from the context and the <b>Execute</b> operation is called.
procedure Execute (Handler : in Mapper;
Map : in Mapping'Class;
Ctx : in out Util.Serialize.Contexts.Context'Class;
Value : in Util.Beans.Objects.Object);
-- Set the <b>Data</b> vector in the context.
procedure Set_Context (Ctx : in out Util.Serialize.Contexts.Context'Class;
Data : in Vector_Type_Access);
procedure Set_Mapping (Into : in out Mapper;
Inner : in Element_Mapper.Mapper_Access);
-- Find the mapper associated with the given name.
-- Returns null if there is no mapper.
function Find_Mapper (Controller : in Mapper;
Name : in String) return Util.Serialize.Mappers.Mapper_Access;
procedure Start_Object (Handler : in Mapper;
Context : in out Util.Serialize.Contexts.Context'Class;
Name : in String);
procedure Finish_Object (Handler : in Mapper;
Context : in out Util.Serialize.Contexts.Context'Class;
Name : in String);
-- Write the element on the stream using the mapper description.
procedure Write (Handler : in Mapper;
Stream : in out Util.Serialize.IO.Output_Stream'Class;
Element : in Vectors.Vector);
private
type Vector_Data is new Util.Serialize.Contexts.Data with record
Vector : Vector_Type_Access;
Position : Index_Type;
end record;
type Mapper is new Util.Serialize.Mappers.Mapper with record
Map : aliased Element_Mapper.Mapper;
end record;
overriding
procedure Initialize (Controller : in out Mapper);
end Util.Serialize.Mappers.Vector_Mapper; |
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <vgodunko@gmail.com> --
-- 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$
------------------------------------------------------------------------------
-- Definition of data structures of FastCGI protocol.
------------------------------------------------------------------------------
with Ada.Streams;
package Matreshka.FastCGI.Protocol is
pragma Preelaborate;
type FCGI_Version is mod 2 ** 8;
Supported_FCGI_Version : constant FCGI_Version := 1;
type FCGI_Packet_Type is mod 2 ** 8;
FCGI_Begin_Request : constant FCGI_Packet_Type := 1;
FCGI_Abort_Request : constant FCGI_Packet_Type := 2;
FCGI_End_Request : constant FCGI_Packet_Type := 3;
FCGI_Params : constant FCGI_Packet_Type := 4;
FCGI_Stdin : constant FCGI_Packet_Type := 5;
FCGI_Stdout : constant FCGI_Packet_Type := 6;
FCGI_Stderr : constant FCGI_Packet_Type := 7;
FCGI_Data : constant FCGI_Packet_Type := 8;
FCGI_Get_Values : constant FCGI_Packet_Type := 9;
FCGI_Get_Values_Result : constant FCGI_Packet_Type := 10;
FCGI_Unknown_Type : constant FCGI_Packet_Type := 11;
subtype FCGI_Content_Length is Ada.Streams.Stream_Element_Offset
range 0 .. 65_535;
subtype FCGI_Padding_Length is Ada.Streams.Stream_Element_Offset
range 0 .. 65_535;
type FCGI_Role is mod 2 ** 16;
FCGI_Responder : constant FCGI_Role := 1;
FCGI_Authorizer : constant FCGI_Role := 2;
FCGI_Filter : constant FCGI_Role := 3;
type FCGI_Flags is record
FCGI_Keep_Conn : Boolean;
Reserved_1 : Boolean;
Reserved_2 : Boolean;
Reserved_3 : Boolean;
Reserved_4 : Boolean;
Reserved_5 : Boolean;
Reserved_6 : Boolean;
Reserved_7 : Boolean;
end record;
pragma Pack (FCGI_Flags);
for FCGI_Flags'Size use 8;
-----------------
-- FCGI_Header --
-----------------
type FCGI_Header is private;
subtype Raw_FCGI_Header is Ada.Streams.Stream_Element_Array (0 .. 7);
function Get_Version (Header : FCGI_Header) return FCGI_Version;
pragma Inline (Get_Version);
function Get_Packet_Type (Header : FCGI_Header) return FCGI_Packet_Type;
pragma Inline (Get_Packet_Type);
function Get_Request_Id
(Header : FCGI_Header) return FCGI_Request_Identifier;
pragma Inline (Get_Request_Id);
function Get_Content_Length
(Header : FCGI_Header) return FCGI_Content_Length;
pragma Inline (Get_Content_Length);
function Get_Padding_Length
(Header : FCGI_Header) return FCGI_Padding_Length;
pragma Inline (Get_Padding_Length);
procedure Initialize
(Header : out FCGI_Header;
Packet_Type : FCGI_Packet_Type;
Request_Id : FCGI_Request_Identifier;
Content_Length : FCGI_Content_Length;
Padding_Length : FCGI_Padding_Length);
-------------------------------
-- FCGI_Begin_Request_Record --
-------------------------------
type FCGI_Begin_Request_Record is private;
subtype Raw_FCGI_Begin_Request_Record
is Ada.Streams.Stream_Element_Array (0 .. 7);
function Get_Role (Item : FCGI_Begin_Request_Record) return FCGI_Role;
pragma Inline (Get_Role);
function Get_Flags (Item : FCGI_Begin_Request_Record) return FCGI_Flags;
pragma Inline (Get_Flags);
private
type FCGI_Header is record
Version : Ada.Streams.Stream_Element;
Packet_Type : Ada.Streams.Stream_Element;
Request_Id_Byte_1 : Ada.Streams.Stream_Element;
Request_Id_Byte_0 : Ada.Streams.Stream_Element;
Content_Length_Byte_1 : Ada.Streams.Stream_Element;
Content_Length_Byte_0 : Ada.Streams.Stream_Element;
Padding_Length : Ada.Streams.Stream_Element;
Reserved : Ada.Streams.Stream_Element;
end record;
type FCGI_Begin_Request_Record is record
Role_Byte_1 : Ada.Streams.Stream_Element;
Role_Byte_0 : Ada.Streams.Stream_Element;
Flags : Ada.Streams.Stream_Element;
Reserved_1 : Ada.Streams.Stream_Element;
Reserved_2 : Ada.Streams.Stream_Element;
Reserved_3 : Ada.Streams.Stream_Element;
Reserved_4 : Ada.Streams.Stream_Element;
Reserved_5 : Ada.Streams.Stream_Element;
end record;
end Matreshka.FastCGI.Protocol;
|
with AUnit; use AUnit;
with AUnit.Test_Cases; use AUnit.Test_Cases;
package Alarm_Tests is
type Alarm_Test is new AUnit.Test_Cases with null Record;
end Alarm_Tests;
|
PROCEDURE defining_enumeration_literal IS
TYPE E1 IS (A, B, C, 'A', 'C', 'B');
BEGIN
NULL;
END defining_enumeration_literal;
|
with Ada.Numerics.Complex_Types; use Ada.Numerics.Complex_Types;
package Loop_Optimization13 is
type Complex_Vector is array (Integer range <>) of Complex;
type Complex_Vector_Ptr is access Complex_Vector;
type Rec (Kind : Boolean := False) is record
case Kind is
when True => V : Complex_Vector_Ptr;
when False => null;
end case;
end record;
function F (A : Rec) return Rec;
end Loop_Optimization13;
|
package body any_Math.any_Algebra.any_linear.any_d2
is
-----------
-- Vector_2
--
function Angle_between_pre_Norm (U, V : in Vector_2) return Radians
is
use Functions, Vectors;
Val : Real := U * V; -- Dot product.
begin
if val < -1.0 then val := -1.0; -- Clamp to avoid rounding errors. arcCos will
elsif val > 1.0 then val := 1.0; -- fail with values outside this range.
end if;
return arcCos (Val);
end Angle_between_pre_Norm;
function Midpoint (From, To : in Vector_2) return Vector_2
is
begin
return ((From (1) + To (1)) * 0.5,
(From (2) + To (2)) * 0.5);
end Midpoint;
function Distance (From, To : in Vector_2) return Real
is
begin
return abs (From - To);
end Distance;
function Interpolated (From, To : in Vector_2;
Percent : in unit_Percentage) return Vector_2
is
P : constant Real := to_Real (Percent);
S : constant Real := 1.0 - P;
begin
return (S * From (1) + P * To (1),
S * From (2) + P * To (2));
end Interpolated;
-------------
-- Matrix_2x2
--
function to_Matrix (Row_1, Row_2 : in Vector_2) return Matrix_2x2
is
begin
return ((Row_1 (1), Row_1 (2)),
(Row_2 (1), Row_2 (2)));
end to_Matrix;
function to_rotation_Matrix (Angle : in Radians ) return Matrix_2x2
is
use Functions;
begin
return (( cos (Angle), sin (Angle)),
(-sin (Angle), cos (Angle)));
end to_rotation_Matrix;
function up_Direction (Self : in Matrix_2x2) return Vector_2
is
begin
return Normalised (Row (Self, 2));
end up_Direction;
function right_Direction (Self : in Matrix_2x2) return Vector_2
is
begin
return Normalised (Row (Self, 1));
end right_Direction;
function to_rotation_Transform (Rotation : in Matrix_2x2) return Matrix_3x3
is
begin
return ((Rotation (1, 1), Rotation (1, 2), 0.0),
(Rotation (2, 1), Rotation (2, 2), 0.0),
( 0.0, 0.0, 1.0));
end to_rotation_Transform;
-------------
-- Transform
--
function to_Transform_2d (From : in Matrix_3x3) return Transform_2d
is
begin
return (Rotation => get_Rotation (From),
Translation => get_Translation (From));
end to_Transform_2d;
function to_Transform (From : in Transform_2d) return Matrix_3x3
is
begin
return to_rotation_Transform (From.Rotation) * to_translation_Transform (From.Translation);
end to_Transform;
function to_translation_Transform (Translation : Vector_2) return Matrix_3x3
is
begin
return (( 1.0, 0.0, 0.0),
( 0.0, 1.0, 0.0),
(Translation (1), Translation (2), 1.0));
end to_translation_Transform;
function to_rotation_Transform (Angle : in Radians) return Matrix_3x3
is
use Functions;
begin
return (( cos (Angle), sin (Angle), 0.0),
(-sin (Angle), cos (Angle), 0.0),
( 0.0, 0.0, 1.0));
end to_rotation_Transform;
function to_scale_Transform (Scale : in Vector_2) return Matrix_3x3
is
begin
return ((Scale (1), 0.0, 0.0),
( 0.0, Scale (2), 0.0),
( 0.0, 0.0, 1.0));
end to_scale_Transform;
function to_Transform (Rotation : in Matrix_2x2;
Translation : in Vector_2) return Matrix_3x3
is
begin
return ((Rotation (1, 1), Rotation (1, 2), 0.0),
(Rotation (2, 1), Rotation (2, 2), 0.0),
(Translation (1), Translation (2), 1.0));
end to_Transform;
function to_Transform_2d (Rotation : in Radians;
Translation : in Vector_2) return Transform_2d
is
begin
return (to_rotation_Matrix (Rotation),
Translation);
end to_Transform_2d;
function "*" (Left : in Vector_2; Right : in Transform_2d) return Vector_2
is
Pad : constant Vector_3 := (Left (1), Left (2), 1.0);
Result : constant Vector_3 := Pad * to_Transform (Right);
begin
return Vector_2 (Result (1 .. 2));
end "*";
function "*" (Left : in Vector_2; Right : in Matrix_3x3) return Vector_2
is
use Vectors;
Result : constant Vector := Vector (Left & 1.0) * Matrix (Right);
begin
return Vector_2 (Result (1 .. 2));
end "*";
function Invert (Transform : in Transform_2d) return Transform_2d
is
inverse_Rotation : constant Matrix_2x2 := Transpose (Transform.Rotation);
begin
return (Translation => inverse_Rotation * (-Transform.Translation),
Rotation => inverse_Rotation);
end Invert;
function inverse_Transform (Transform : in Transform_2d; Vector : in Vector_2) return Vector_2
is
V : constant Vector_2 := Vector - Transform.Translation;
begin
return Transpose (Transform.Rotation) * V;
end inverse_Transform;
function get_Rotation (Transform : in Matrix_3x3) return Matrix_2x2
is
begin
return ((Transform (1, 1), Transform (1, 2)),
(Transform (2, 1), Transform (2, 2)));
end get_Rotation;
procedure set_Rotation (Transform : in out Matrix_3x3; To : in Matrix_2x2)
is
begin
Transform (1, 1) := To (1, 1);
Transform (1, 2) := To (1, 2);
Transform (1, 3) := 0.0;
Transform (2, 1) := To (2, 1);
Transform (2, 2) := To (2, 2);
Transform (2, 3) := 0.0;
end set_Rotation;
function get_Translation (Transform : in Matrix_3x3) return Vector_2
is
begin
return (Transform (3, 1),
Transform (3, 2));
end get_Translation;
procedure set_Translation (Transform : in out Matrix_3x3; To : in Vector_2)
is
begin
Transform (3, 1) := To (1);
Transform (3, 2) := To (2);
Transform (3, 3) := 1.0;
end set_Translation;
end any_Math.any_Algebra.any_linear.any_d2;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P U T _ S C O S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the function used to read SCO information from the
-- internal tables defined in package SCOs, and output text information for
-- the ALI file. The interface allows control over the destination of the
-- output, so that this routine can also be used for debugging purposes.
with Namet; use Namet;
with Types; use Types;
generic
-- The following procedures are used to output text information. The
-- destination of the text information is thus under control of the
-- particular instantiation. In particular, this procedure is used to
-- write output to the ALI file, and also for debugging output.
with procedure Write_Info_Char (C : Character) is <>;
-- Outputs one character
with procedure Write_Info_Initiate (Key : Character) is <>;
-- Initiates write of new line to output file, the parameter is the
-- keyword character for the line.
with procedure Write_Info_Name (Nam : Name_Id) is <>;
-- Outputs one name
with procedure Write_Info_Nat (N : Nat) is <>;
-- Writes image of N to output file with no leading or trailing blanks
with procedure Write_Info_Terminate is <>;
-- Terminate current info line and output lines built in Info_Buffer
procedure Put_SCOs;
-- Read information from SCOs.SCO_Table and SCOs.SCO_Unit_Table and output
-- corresponding information in ALI format using the Write_Info procedures.
|
------------------------------------------------------------------------------
-- --
-- Internet Protocol Suite Package --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Richard Wai (ANNEXI-STRAYLINE) --
-- --
-- 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 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 --
-- 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. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Pointers;
with Ada.Unchecked_Conversion;
with INET.IP.OS_Address_Info;
with INET.Internal.OS_Constants; use INET.Internal.OS_Constants;
pragma External_With ("inet-ip-lookup-sys.c");
package body INET.IP.Lookup is
IPv4_addrlen: constant socklen_t with Import => True, Convention => C,
External_Name => "__inet_ip_lookup_sys_addrlen4";
IPv6_addrlen: constant socklen_t with Import => True, Convention => C,
External_Name => "__inet_ip_lookup_sys_addrlen6";
package SSE renames System.Storage_Elements;
use type SSE.Integer_Address;
type addrinfo is new INET.IP.OS_Address_Info.struct_addrinfo with
Convention => C;
-- ^ Taft amendment completion
-----------------------
-- Assert_Constraint --
-----------------------
procedure Assert_Constraint (Check : in Boolean; Message: in String) with
Inline is
begin
if not Check then
raise Constraint_Error with Message;
end if;
end Assert_Constraint;
------------
-- Lookup --
------------
procedure Lookup_Actual (List : in out IP_Lookup;
Host_Name : in String;
Protocol : in IP_Protocols := Proto_Any;
Version : in IP_Version;
Any_Version: in Boolean)
with Inline is
use Interfaces.C.Strings;
-- Any_Version ignores the value of Version
function getaddrinfo (hostname: in char_array;
servname: in chars_ptr := Null_Chars_Ptr;
hints : in addrinfo;
res : out Entry_Pointer)
return int
with Import => True, Convention => C, External_Name => "getaddrinfo";
hints: addrinfo;
Retval: int;
begin
if Host_Name'Length = 0 then
raise Constraint_Error with "Host_Name is an empty String";
end if;
List.Finalize; -- Ensure any previous lookups are freed
-- Set-up hints
hints.ai_flags := AI_CANONNAME;
if Any_Version then
hints.ai_flags := hints.ai_flags + AI_ADDRCONFIG;
hints.ai_family := AF_UNSPEC;
else
hints.ai_family := (case Version is
when IPv4 => AF_INET,
when IPv6 => AF_INET6);
end if;
case Protocol is
when Proto_Any =>
null; -- defaults are correct
when Proto_TCP =>
hints.ai_socktype := SOCK_STREAM;
hints.ai_protocol := IPPROTO_TCP;
when Proto_UDP =>
hints.ai_socktype := SOCK_DGRAM;
hints.ai_protocol := IPPROTO_UDP;
when Proto_SCTP =>
hints.ai_socktype := SOCK_SEQPACKET;
hints.ai_protocol := IPPROTO_SCTP;
end case;
Retval := getaddrinfo (hostname => To_C (Host_Name),
hints => hints,
res => List.List_Head);
if Retval /= 0 then
List.Finalize;
return;
end if;
List.Next_Pop := List.List_Head;
List.Canonname := List.List_Head.ai_canonname;
end Lookup_Actual;
----------------------------------------------------------------------
procedure Lookup (List : in out IP_Lookup;
Host_Name: in String;
Protocol : in IP_Protocols := Proto_Any)
is begin
Lookup_Actual (List, Host_Name, Protocol,
Version => IPv6, -- This is arbitrary (ignored)
Any_Version => True);
end Lookup;
----------------------------------------------------------------------
procedure Lookup (List : in out IP_Lookup;
Host_Name: in String;
Protocol : in IP_Protocols := Proto_Any;
Version : in IP_Version)
is begin
Lookup_Actual (List, Host_Name, Protocol, Version,
Any_Version => False);
end Lookup;
----------------------
-- Has_More_Entries --
----------------------
function Has_More_Entries (List: IP_Lookup) return Boolean is
(List.Next_Pop /= null);
--------------------
-- Canonical_Name --
--------------------
function Canonical_Name (List: IP_Lookup) return String is
use Interfaces.C.Strings;
begin
if List.Canonname = Null_Chars_Ptr then
return "";
else
return Value (List.Canonname);
end if;
end Canonical_Name;
---------
-- Pop --
---------
procedure Pop (List: in out IP_Lookup; Item: out IP_Lookup_Entry) is
subtype Void_Pointer is OS_Address_Info.Void_Pointer;
procedure extract4 (src: in Void_Pointer; addr: out IPv4_Address) with
Import => True, Convention => C,
External_Name => "__inet_ip_lookup_sys_extract4";
procedure extract6 (src: in Void_Pointer; addr: out IPv6_Address) with
Import => True, Convention => C,
External_Name => "__inet_ip_lookup_sys_extract6";
procedure Advance_List with Inline is
function To_Entry_Pointer is new Ada.Unchecked_Conversion
(Source => OS_Address_Info.addrinfo_ptr,
Target => Entry_Pointer);
-- This is always safe since Entry_Pointer points at a addrinfo
-- record, which is a struct_addrinfo
begin
List.Next_Pop := To_Entry_Pointer (List.Next_Pop.ai_next);
end;
begin
Assert_Constraint
(List.Has_More_Entries, "List has no more entires to pop.");
pragma Assert (List.Next_Pop /= null);
-- Would have been nice to use case statements here, but unfortunately
-- we needed to import the C macros as run-time elaborated constants,
-- and hence they are not static.
if List.Next_Pop.ai_protocol = IPPROTO_TCP then
Item.Protocol := Proto_TCP;
elsif List.Next_Pop.ai_protocol = IPPROTO_UDP then
Item.Protocol := Proto_UDP;
elsif List.Next_Pop.ai_protocol = IPPROTO_SCTP then
Item.Protocol := Proto_SCTP;
else
-- Ignore unsupported protocols, since the use won't be
-- able to used them anyways..
Advance_List;
return;
end if;
if List.Next_Pop.ai_family = AF_INET6 then
Assert_Constraint (List.Next_Pop.ai_addrlen = IPv6_addrlen,
"List item address not the exepected size");
Item.Address := (Version => IPv6, others => <>);
extract6 (src => List.Next_Pop.ai_addr,
addr => Item.Address.v6_Address);
elsif List.Next_Pop.ai_family = AF_INET then
-- getaddrinfo often mkaes the underlying ai_addr large enough for an
-- IPv6 address, even if it holds an IPv4 address, so notice how the
-- check is slightly different
Assert_Constraint (List.Next_Pop.ai_addrlen = IPv4_addrlen,
"List item address not the exepected size");
Item.Address := (Version => IPv4, others => <>);
extract4 (src => List.Next_Pop.ai_addr,
addr => Item.Address.v4_Address);
else
-- Throw out this item first
Advance_List;
raise Constraint_Error with
"List item address family not recognized";
end if;
Advance_List;
end Pop;
----------------------------------------------------------------------
function Pop (List: in out IP_Lookup) return IP_Lookup_Entry is
begin
return Item: IP_Lookup_Entry do
List.Pop (Item);
end return;
end Pop;
-------------
-- Iterate --
-------------
procedure Iterate
(List : in out IP_Lookup;
Action: not null access procedure (Item: in IP_Lookup_Entry))
is
Item: IP_Lookup_Entry;
begin
while List.Next_Pop /= null loop
List.Pop (Item);
Action (Item);
end loop;
end Iterate;
--------------
-- Finalize --
--------------
procedure Finalize (List: in out IP_Lookup) is
procedure freeaddrinfo (ai: Entry_Pointer) with
Import => True, Convention => C, External_Name => "freeaddrinfo";
begin
if List.List_Head /= null then
freeaddrinfo (List.List_Head);
end if;
List.List_Head := null;
List.Next_Pop := null;
List.Canonname := Null_Chars_Ptr;
end Finalize;
end INET.IP.Lookup;
|
--
-- Copyright (C) 2015-2018 secunet Security Networks AG
--
-- 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 2 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.
--
with HW.Debug;
with GNAT.Source_Info;
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Transcoder;
package body HW.GFX.GMA.Pipe_Setup is
ILK_DISPLAY_CHICKEN1_VGA_MASK : constant := 7 * 2 ** 29;
ILK_DISPLAY_CHICKEN1_VGA_ENABLE : constant := 5 * 2 ** 29;
ILK_DISPLAY_CHICKEN2_VGA_MASK : constant := 1 * 2 ** 25;
ILK_DISPLAY_CHICKEN2_VGA_ENABLE : constant := 0 * 2 ** 25;
DSPCNTR_ENABLE : constant := 1 * 2 ** 31;
DSPCNTR_GAMMA_CORRECTION : constant := 1 * 2 ** 30;
DSPCNTR_FORMAT_MASK : constant := 15 * 2 ** 26;
DSPCNTR_DISABLE_TRICKLE_FEED : constant := 1 * 2 ** 14;
DSPCNTR_TILED_SURFACE_LINEAR : constant := 0 * 2 ** 10;
DSPCNTR_TILED_SURFACE_X_TILED : constant := 1 * 2 ** 10;
DSPCNTR_TILED_SURFACE : constant array (Tiling_Type) of Word32 :=
(Linear => DSPCNTR_TILED_SURFACE_LINEAR,
X_Tiled => DSPCNTR_TILED_SURFACE_X_TILED,
Y_Tiled => 0); -- unsupported
DSPCNTR_MASK : constant Word32 :=
DSPCNTR_ENABLE or
DSPCNTR_GAMMA_CORRECTION or
DSPCNTR_FORMAT_MASK or
DSPCNTR_DISABLE_TRICKLE_FEED or
DSPCNTR_TILED_SURFACE_X_TILED;
PLANE_CTL_PLANE_ENABLE : constant := 1 * 2 ** 31;
PLANE_CTL_SRC_PIX_FMT_RGB_32B_8888 : constant := 4 * 2 ** 24;
PLANE_CTL_PLANE_GAMMA_DISABLE : constant := 1 * 2 ** 13;
PLANE_CTL_TILED_SURFACE_MASK : constant := 7 * 2 ** 10;
PLANE_CTL_TILED_SURFACE_LINEAR : constant := 0 * 2 ** 10;
PLANE_CTL_TILED_SURFACE_X_TILED : constant := 1 * 2 ** 10;
PLANE_CTL_TILED_SURFACE_Y_TILED : constant := 4 * 2 ** 10;
PLANE_CTL_TILED_SURFACE_YF_TILED : constant := 5 * 2 ** 10;
PLANE_CTL_TILED_SURFACE : constant array (Tiling_Type) of Word32 :=
(Linear => PLANE_CTL_TILED_SURFACE_LINEAR,
X_Tiled => PLANE_CTL_TILED_SURFACE_X_TILED,
Y_Tiled => PLANE_CTL_TILED_SURFACE_Y_TILED);
PLANE_CTL_PLANE_ROTATION_MASK : constant := 3 * 2 ** 0;
PLANE_CTL_PLANE_ROTATION : constant array (Rotation_Type) of Word32 :=
(No_Rotation => 0 * 2 ** 0,
Rotated_90 => 1 * 2 ** 0,
Rotated_180 => 2 * 2 ** 0,
Rotated_270 => 3 * 2 ** 0);
PLANE_WM_ENABLE : constant := 1 * 2 ** 31;
PLANE_WM_LINES_SHIFT : constant := 14;
PLANE_WM_LINES_MASK : constant := 16#001f# * 2 ** 14;
PLANE_WM_BLOCKS_MASK : constant := 16#03ff# * 2 ** 0;
VGA_SR_INDEX : constant := 16#03c4#;
VGA_SR_DATA : constant := 16#03c5#;
VGA_SR01 : constant := 16#01#;
VGA_SR01_SCREEN_OFF : constant := 1 * 2 ** 5;
VGA_CONTROL_VGA_DISPLAY_DISABLE : constant := 1 * 2 ** 31;
VGA_CONTROL_BLINK_DUTY_CYCLE_MASK : constant := 16#0003# * 2 ** 6;
VGA_CONTROL_BLINK_DUTY_CYCLE_50 : constant := 2 * 2 ** 6;
VGA_CONTROL_VSYNC_BLINK_RATE_MASK : constant := 16#003f# * 2 ** 0;
CUR_CTL_PIPE_SELECT : constant array (Pipe_Index) of Word32 :=
(Primary => 0 * 2 ** 28,
Secondary => 1 * 2 ** 28,
Tertiary => 2 * 2 ** 28);
CUR_CTL_MODE : constant array (Cursor_Mode, Cursor_Size) of Word32 :=
(No_Cursor => (others => 16#00#),
ARGB_Cursor =>
(Cursor_64x64 => 16#27#,
Cursor_128x128 => 16#22#,
Cursor_256x256 => 16#23#));
function CUR_POS_Y (Y : Int32) return Word32 is
((if Y >= 0 then 0 else 1 * 2 ** 31) or Shift_Left (Word32 (abs Y), 16))
with
Pre => Y > Int32'First;
function CUR_POS_X (X : Int32) return Word32 is
((if X >= 0 then 0 else 1 * 2 ** 15) or Word32 (abs X))
with
Pre => X > Int32'First;
subtype VGA_Cycle_Count is Pos32 range 2 .. 128;
function VGA_CONTROL_VSYNC_BLINK_RATE
(Cycles : VGA_Cycle_Count)
return Word32
is
begin
return Word32 (Cycles) / 2 - 1;
end VGA_CONTROL_VSYNC_BLINK_RATE;
PF_CTRL_ENABLE : constant := 1 * 2 ** 31;
PF_CTRL_PIPE_SELECT_MASK : constant := 3 * 2 ** 29;
PF_CTRL_FILTER_MED : constant := 1 * 2 ** 23;
PS_CTRL_ENABLE_SCALER : constant := 1 * 2 ** 31;
PS_CTRL_SCALER_MODE_7X5_EXTENDED : constant := 1 * 2 ** 28;
PS_CTRL_FILTER_SELECT_MEDIUM_2 : constant := 1 * 2 ** 23;
GMCH_PFIT_CONTROL_SELECT_MASK : constant := 3 * 2 ** 29;
GMCH_PFIT_CONTROL_SELECT_PIPE_A : constant := 0 * 2 ** 29;
GMCH_PFIT_CONTROL_SELECT_PIPE_B : constant := 1 * 2 ** 29;
GMCH_PFIT_CONTROL_SCALING_MASK : constant := 3 * 2 ** 26;
GMCH_PFIT_CONTROL_SCALING : constant array (Scaling_Aspect) of Word32 :=
(Uniform => 0 * 2 ** 26,
Pillarbox => 2 * 2 ** 26,
Letterbox => 3 * 2 ** 26);
VGACNTRL_REG : constant Registers.Registers_Index :=
(if Config.Has_GMCH_VGACNTRL then
Registers.GMCH_VGACNTRL
else Registers.CPU_VGACNTRL);
---------------------------------------------------------------------------
function PLANE_WM_LINES (Lines : Natural) return Word32 is
begin
return Shift_Left (Word32 (Lines), PLANE_WM_LINES_SHIFT)
and PLANE_WM_LINES_MASK;
end PLANE_WM_LINES;
function PLANE_WM_BLOCKS (Blocks : Natural) return Word32 is
begin
return Word32 (Blocks) and PLANE_WM_BLOCKS_MASK;
end PLANE_WM_BLOCKS;
---------------------------------------------------------------------------
function Encode (LSW, MSW : Pos32) return Word32 is
begin
return Shift_Left (Word32 (MSW) - 1, 16) or (Word32 (LSW) - 1);
end Encode;
----------------------------------------------------------------------------
procedure Clear_Watermarks (Controller : Controller_Type) is
begin
Registers.Write (Controller.CUR_BUF_CFG, 16#0000_0000#);
for Level in WM_Levels loop
Registers.Write (Controller.CUR_WM (Level), 16#0000_0000#);
end loop;
Registers.Write (Controller.PLANE_BUF_CFG, 16#0000_0000#);
for Level in WM_Levels loop
Registers.Write (Controller.PLANE_WM (Level), 16#0000_0000#);
end loop;
Registers.Write (Controller.WM_LINETIME, 16#0000_0000#);
end Clear_Watermarks;
procedure Setup_Watermarks (Controller : Controller_Type)
is
type Per_Plane_Buffer_Range is array (Pipe_Index) of Word32;
Cur_Buffer_Range : constant Per_Plane_Buffer_Range :=
(Primary => Shift_Left ( 7, 16) or 0,
Secondary => Shift_Left (167, 16) or 160,
Tertiary => Shift_Left (327, 16) or 320);
Plane_Buffer_Range : constant Per_Plane_Buffer_Range :=
(Primary => Shift_Left (159, 16) or 8,
Secondary => Shift_Left (319, 16) or 168,
Tertiary => Shift_Left (479, 16) or 328);
begin
Registers.Write
(Register => Controller.PLANE_BUF_CFG,
Value => Plane_Buffer_Range (Controller.Pipe));
Registers.Write
(Register => Controller.PLANE_WM (0),
Value => PLANE_WM_ENABLE or
PLANE_WM_LINES (2) or
PLANE_WM_BLOCKS (152));
Registers.Write
(Register => Controller.CUR_BUF_CFG,
Value => Cur_Buffer_Range (Controller.Pipe));
Registers.Write
(Register => Controller.CUR_WM (0),
Value => PLANE_WM_ENABLE or
PLANE_WM_LINES (2) or
PLANE_WM_BLOCKS (8));
end Setup_Watermarks;
----------------------------------------------------------------------------
procedure Setup_Hires_Plane
(Controller : Controller_Type;
FB : HW.GFX.Framebuffer_Type)
with
Global => (In_Out => Registers.Register_State),
Depends =>
(Registers.Register_State
=>+
(Registers.Register_State,
Controller,
FB)),
Pre => FB.Height + FB.Start_Y <= FB.V_Stride
is
-- FIXME: setup correct format, based on framebuffer RGB format
Format : constant Word32 := 6 * 2 ** 26;
PRI : Word32 := DSPCNTR_ENABLE or Format;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
if Config.Has_Plane_Control then
declare
Stride, Offset : Word32;
Width : constant Width_Type := Rotated_Width (FB);
Height : constant Width_Type := Rotated_Height (FB);
begin
if Rotation_90 (FB) then
Stride := Word32 (FB_Pitch (FB.V_Stride, FB));
Offset := Shift_Left (Word32 (FB.Start_X), 16) or
Word32 (FB.V_Stride - FB.Height - FB.Start_Y);
else
Stride := Word32 (FB_Pitch (FB.Stride, FB));
Offset := Shift_Left (Word32 (FB.Start_Y), 16) or
Word32 (FB.Start_X);
end if;
Registers.Write
(Register => Controller.PLANE_CTL,
Value => PLANE_CTL_PLANE_ENABLE or
PLANE_CTL_SRC_PIX_FMT_RGB_32B_8888 or
PLANE_CTL_PLANE_GAMMA_DISABLE or
PLANE_CTL_TILED_SURFACE (FB.Tiling) or
PLANE_CTL_PLANE_ROTATION (FB.Rotation));
Registers.Write (Controller.PLANE_OFFSET, Offset);
Registers.Write (Controller.PLANE_SIZE, Encode (Width, Height));
Registers.Write (Controller.PLANE_STRIDE, Stride);
Registers.Write (Controller.PLANE_POS, 16#0000_0000#);
Registers.Write (Controller.PLANE_SURF, FB.Offset and 16#ffff_f000#);
end;
else
if Config.Disable_Trickle_Feed then
PRI := PRI or DSPCNTR_DISABLE_TRICKLE_FEED;
end if;
-- for now, just disable gamma LUT (can't do anything
-- useful without colorimetry information from display)
Registers.Unset_And_Set_Mask
(Register => Controller.DSPCNTR,
Mask_Unset => DSPCNTR_MASK,
Mask_Set => PRI or DSPCNTR_TILED_SURFACE (FB.Tiling));
Registers.Write
(Controller.DSPSTRIDE, Word32 (Pixel_To_Bytes (FB.Stride, FB)));
if Config.Has_DSP_Linoff and then FB.Tiling = Linear then
Registers.Write
(Register => Controller.DSPLINOFF,
Value => Word32 (Pixel_To_Bytes
(FB.Start_Y * FB.Stride + FB.Start_X, FB)));
Registers.Write (Controller.DSPTILEOFF, 0);
else
if Config.Has_DSP_Linoff then
Registers.Write (Controller.DSPLINOFF, 0);
end if;
Registers.Write
(Register => Controller.DSPTILEOFF,
Value => Shift_Left (Word32 (FB.Start_Y), 16) or
Word32 (FB.Start_X));
end if;
Registers.Write (Controller.DSPSURF, FB.Offset and 16#ffff_f000#);
end if;
end Setup_Hires_Plane;
procedure Setup_Display
(Controller : Controller_Type;
Framebuffer : Framebuffer_Type;
Dither_BPC : BPC_Type;
Dither : Boolean)
with
Global => (In_Out => (Registers.Register_State, Port_IO.State)),
Depends =>
(Registers.Register_State
=>+
(Registers.Register_State,
Controller,
Framebuffer,
Dither_BPC,
Dither),
Port_IO.State
=>+
(Framebuffer)),
Pre =>
Framebuffer.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET or
Framebuffer.Height + Framebuffer.Start_Y <= Framebuffer.V_Stride
is
use type Word8;
Reg8 : Word8;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
if Config.Has_Plane_Control then
Setup_Watermarks (Controller);
end if;
if Framebuffer.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET then
if Config.VGA_Plane_Workaround then
Registers.Unset_And_Set_Mask
(Register => Registers.ILK_DISPLAY_CHICKEN1,
Mask_Unset => ILK_DISPLAY_CHICKEN1_VGA_MASK,
Mask_Set => ILK_DISPLAY_CHICKEN1_VGA_ENABLE);
Registers.Unset_And_Set_Mask
(Register => Registers.ILK_DISPLAY_CHICKEN2,
Mask_Unset => ILK_DISPLAY_CHICKEN2_VGA_MASK,
Mask_Set => ILK_DISPLAY_CHICKEN2_VGA_ENABLE);
end if;
Registers.Unset_And_Set_Mask
(Register => VGACNTRL_REG,
Mask_Unset => VGA_CONTROL_VGA_DISPLAY_DISABLE or
VGA_CONTROL_BLINK_DUTY_CYCLE_MASK or
VGA_CONTROL_VSYNC_BLINK_RATE_MASK,
Mask_Set => VGA_CONTROL_BLINK_DUTY_CYCLE_50 or
VGA_CONTROL_VSYNC_BLINK_RATE (30));
Port_IO.OutB (VGA_SR_INDEX, VGA_SR01);
Port_IO.InB (Reg8, VGA_SR_DATA);
Port_IO.OutB (VGA_SR_DATA, Reg8 and not (VGA_SR01_SCREEN_OFF));
else
Setup_Hires_Plane (Controller, Framebuffer);
end if;
Registers.Write
(Register => Controller.PIPESRC,
Value => Encode
(Rotated_Height (Framebuffer), Rotated_Width (Framebuffer)));
if Config.Has_Pipeconf_Misc then
Registers.Write
(Register => Controller.PIPEMISC,
Value => Transcoder.BPC_Conf (Dither_BPC, Dither));
end if;
end Setup_Display;
----------------------------------------------------------------------------
procedure Update_Cursor
(Pipe : Pipe_Index;
FB : Framebuffer_Type;
Cursor : Cursor_Type)
is
begin
-- on some platforms writing CUR_CTL disables self-arming of CUR_POS
-- so keep it first
Registers.Write
(Register => Controllers (Pipe).CUR_CTL,
Value => CUR_CTL_PIPE_SELECT (Pipe) or
CUR_CTL_MODE (Cursor.Mode, Cursor.Size));
Place_Cursor (Pipe, FB, Cursor);
end Update_Cursor;
procedure Place_Cursor
(Pipe : Pipe_Index;
FB : Framebuffer_Type;
Cursor : Cursor_Type)
is
Width : constant Width_Type := Cursor_Width (Cursor.Size);
X : Int32 := Cursor.Center_X - Width / 2;
Y : Int32 := Cursor.Center_Y - Width / 2;
begin
-- off-screen cursor needs special care
if X <= -Width or Y <= -Width or
X >= Rotated_Width (FB) or Y >= Rotated_Height (FB) or
X > Config.Maximum_Cursor_X or Y > Config.Maximum_Cursor_Y
then
X := -Width;
Y := -Width;
end if;
Registers.Write
(Register => Controllers (Pipe).CUR_POS,
Value => CUR_POS_Y (Y) or CUR_POS_X (X));
-- write to CUR_BASE always arms other CUR_* registers
Registers.Write
(Register => Controllers (Pipe).CUR_BASE,
Value => Shift_Left (Word32 (Cursor.GTT_Offset), 12));
end Place_Cursor;
----------------------------------------------------------------------------
function Scale (Val, Max, Num, Denom : Width_Type)
return Width_Type is ((Val * Num) / Denom)
with
Pre => Denom <= Num and Val * Num < Max * Denom,
Post => Scale'Result < Max;
procedure Scale_Keep_Aspect
(Width : out Width_Type;
Height : out Height_Type;
Max_Width : in Width_Type;
Max_Height : in Height_Type;
Framebuffer : in Framebuffer_Type)
with
Pre =>
Rotated_Width (Framebuffer) <= Max_Width and
Rotated_Height (Framebuffer) <= Max_Height,
Post =>
Width <= Max_Width and Height <= Max_Height
is
Src_Width : constant Width_Type := Rotated_Width (Framebuffer);
Src_Height : constant Height_Type := Rotated_Height (Framebuffer);
begin
case Scaling_Type (Src_Width, Src_Height, Max_Width, Max_Height) is
when Letterbox =>
Width := Max_Width;
Height := Scale (Src_Height, Max_Height, Max_Width, Src_Width);
when Pillarbox =>
Width := Scale (Src_Width, Max_Width, Max_Height, Src_Height);
Height := Max_Height;
when Uniform =>
Width := Max_Width;
Height := Max_Height;
end case;
end Scale_Keep_Aspect;
procedure Setup_Skylake_Pipe_Scaler
(Controller : in Controller_Type;
Mode : in HW.GFX.Mode_Type;
Framebuffer : in HW.GFX.Framebuffer_Type)
with
Pre =>
Rotated_Width (Framebuffer) <= Mode.H_Visible and
Rotated_Height (Framebuffer) <= Mode.V_Visible
is
use type Registers.Registers_Invalid_Index;
-- Enable 7x5 extended mode where possible:
Scaler_Mode : constant Word32 :=
(if Controller.PS_CTRL_2 /= Registers.Invalid_Register then
PS_CTRL_SCALER_MODE_7X5_EXTENDED else 0);
Width_In : constant Width_Type := Rotated_Width (Framebuffer);
Height_In : constant Height_Type := Rotated_Height (Framebuffer);
-- We can scale up to 2.99x horizontally:
Horizontal_Limit : constant Pos32 := (Width_In * 299) / 100;
-- The third scaler is limited to 1.99x
-- vertical scaling for source widths > 2048:
Vertical_Limit : constant Pos32 :=
(Height_In *
(if Controller.PS_CTRL_2 = Registers.Invalid_Register and
Width_In > 2048
then
199
else
299)) / 100;
Width : Width_Type;
Height : Height_Type;
begin
-- Writes to WIN_SZ arm the PS registers.
Scale_Keep_Aspect
(Width => Width,
Height => Height,
Max_Width => Pos32'Min (Horizontal_Limit, Mode.H_Visible),
Max_Height => Pos32'Min (Vertical_Limit, Mode.V_Visible),
Framebuffer => Framebuffer);
Registers.Write
(Register => Controller.PS_CTRL_1,
Value => PS_CTRL_ENABLE_SCALER or Scaler_Mode);
Registers.Write
(Register => Controller.PS_WIN_POS_1,
Value =>
Shift_Left (Word32 (Mode.H_Visible - Width) / 2, 16) or
Word32 (Mode.V_Visible - Height) / 2);
Registers.Write
(Register => Controller.PS_WIN_SZ_1,
Value => Shift_Left (Word32 (Width), 16) or Word32 (Height));
end Setup_Skylake_Pipe_Scaler;
procedure Setup_Ironlake_Panel_Fitter
(Controller : in Controller_Type;
Mode : in HW.GFX.Mode_Type;
Framebuffer : in HW.GFX.Framebuffer_Type)
with
Pre =>
Rotated_Width (Framebuffer) <= Mode.H_Visible and
Rotated_Height (Framebuffer) <= Mode.V_Visible
is
-- Force 1:1 mapping of panel fitter:pipe
PF_Ctrl_Pipe_Sel : constant Word32 :=
(if Config.Has_PF_Pipe_Select then
(case Controller.PF_CTRL is
when Registers.PFA_CTL_1 => 0 * 2 ** 29,
when Registers.PFB_CTL_1 => 1 * 2 ** 29,
when Registers.PFC_CTL_1 => 2 * 2 ** 29,
when others => 0) else 0);
Width : Width_Type;
Height : Height_Type;
X, Y : Int32;
begin
-- Writes to WIN_SZ arm the PF registers.
Scale_Keep_Aspect
(Width => Width,
Height => Height,
Max_Width => Mode.H_Visible,
Max_Height => Mode.V_Visible,
Framebuffer => Framebuffer);
-- Do not scale to odd width (at least Haswell has trouble with this).
if Width < Mode.H_Visible and Width mod 2 = 1 then
Width := Width + 1;
end if;
X := (Mode.H_Visible - Width) / 2;
Y := (Mode.V_Visible - Height) / 2;
-- Hardware is picky about minimal horizontal gaps.
if Mode.H_Visible - Width <= 3 then
Width := Mode.H_Visible;
X := 0;
end if;
Registers.Write
(Register => Controller.PF_CTRL,
Value => PF_CTRL_ENABLE or PF_Ctrl_Pipe_Sel or PF_CTRL_FILTER_MED);
Registers.Write
(Register => Controller.PF_WIN_POS,
Value => Shift_Left (Word32 (X), 16) or Word32 (Y));
Registers.Write
(Register => Controller.PF_WIN_SZ,
Value => Shift_Left (Word32 (Width), 16) or Word32 (Height));
end Setup_Ironlake_Panel_Fitter;
procedure Setup_Gmch_Panel_Fitter
(Controller : in Controller_Type;
Mode : in HW.GFX.Mode_Type;
Framebuffer : in HW.GFX.Framebuffer_Type)
is
PF_Ctrl_Pipe_Sel : constant Word32 :=
(case Controller.Pipe is
when Primary => GMCH_PFIT_CONTROL_SELECT_PIPE_A,
when Secondary => GMCH_PFIT_CONTROL_SELECT_PIPE_B,
when others => 0);
PF_Ctrl_Scaling : constant Word32 :=
GMCH_PFIT_CONTROL_SCALING (Scaling_Type (Framebuffer, Mode));
In_Use : Boolean;
begin
Registers.Is_Set_Mask
(Register => Registers.GMCH_PFIT_CONTROL,
Mask => PF_CTRL_ENABLE,
Result => In_Use);
if not In_Use then
Registers.Write
(Register => Registers.GMCH_PFIT_CONTROL,
Value => PF_CTRL_ENABLE or PF_Ctrl_Pipe_Sel or PF_Ctrl_Scaling);
else
Debug.Put_Line ("GMCH Pannel fitter already in use, skipping...");
end if;
end Setup_Gmch_Panel_Fitter;
procedure Gmch_Panel_Fitter_Pipe (Pipe : out Pipe_Index)
is
Used_For_Secondary : Boolean;
begin
Registers.Is_Set_Mask
(Register => Registers.GMCH_PFIT_CONTROL,
Mask => GMCH_PFIT_CONTROL_SELECT_PIPE_B,
Result => Used_For_Secondary);
Pipe := (if Used_For_Secondary then Secondary else Primary);
end;
procedure Panel_Fitter_Off (Controller : Controller_Type)
is
use type HW.GFX.GMA.Registers.Registers_Invalid_Index;
Pipe_Using_PF : Pipe_Index;
begin
-- Writes to WIN_SZ arm the PS/PF registers.
if Config.Has_Plane_Control then
Registers.Unset_Mask (Controller.PS_CTRL_1, PS_CTRL_ENABLE_SCALER);
Registers.Write (Controller.PS_WIN_SZ_1, 16#0000_0000#);
if Controller.PS_CTRL_2 /= Registers.Invalid_Register and
Controller.PS_WIN_SZ_2 /= Registers.Invalid_Register
then
Registers.Unset_Mask (Controller.PS_CTRL_2, PS_CTRL_ENABLE_SCALER);
Registers.Write (Controller.PS_WIN_SZ_2, 16#0000_0000#);
end if;
elsif Config.Has_GMCH_PFIT_CONTROL then
Gmch_Panel_Fitter_Pipe (Pipe_Using_PF);
if Pipe_Using_PF = Controller.Pipe then
Registers.Unset_Mask (Registers.GMCH_PFIT_CONTROL, PF_CTRL_ENABLE);
end if;
else
Registers.Unset_Mask (Controller.PF_CTRL, PF_CTRL_ENABLE);
Registers.Write (Controller.PF_WIN_SZ, 16#0000_0000#);
end if;
end Panel_Fitter_Off;
procedure Setup_Scaling
(Controller : in Controller_Type;
Mode : in HW.GFX.Mode_Type;
Framebuffer : in HW.GFX.Framebuffer_Type)
with
Pre =>
Rotated_Width (Framebuffer) <= Mode.H_Visible and
Rotated_Height (Framebuffer) <= Mode.V_Visible
is
begin
if Requires_Scaling (Framebuffer, Mode) then
if Config.Has_Plane_Control then
Setup_Skylake_Pipe_Scaler (Controller, Mode, Framebuffer);
elsif Config.Has_GMCH_PFIT_CONTROL then
Setup_Gmch_Panel_Fitter (Controller, Mode, Framebuffer);
else
Setup_Ironlake_Panel_Fitter (Controller, Mode, Framebuffer);
end if;
else
Panel_Fitter_Off (Controller);
end if;
end Setup_Scaling;
procedure Scaler_Available (Available : out Boolean; Pipe : Pipe_Index)
is
Pipe_Using_PF : Pipe_Index := Pipe_Index'First;
PF_Enabled : Boolean;
begin
if Config.Has_GMCH_PFIT_CONTROL then
Registers.Is_Set_Mask
(Register => Registers.GMCH_PFIT_CONTROL,
Mask => PF_CTRL_ENABLE,
Result => PF_Enabled);
if PF_Enabled then
Gmch_Panel_Fitter_Pipe (Pipe_Using_PF);
end if;
Available := not PF_Enabled or Pipe_Using_PF = Pipe;
else
Available := True;
end if;
end Scaler_Available;
----------------------------------------------------------------------------
procedure Setup_FB
(Pipe : Pipe_Index;
Mode : Mode_Type;
Framebuffer : Framebuffer_Type)
is
-- Enable dithering if framebuffer BPC differs from port BPC,
-- as smooth gradients look really bad without.
Dither : constant Boolean := Framebuffer.BPC /= Mode.BPC;
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
-- Disable the cursor first.
Update_Cursor (Pipe, Framebuffer, Default_Cursor);
Setup_Display (Controllers (Pipe), Framebuffer, Mode.BPC, Dither);
Setup_Scaling (Controllers (Pipe), Mode, Framebuffer);
end Setup_FB;
procedure On
(Pipe : Pipe_Index;
Port_Cfg : Port_Config;
Framebuffer : Framebuffer_Type;
Cursor : Cursor_Type)
is
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
Transcoder.Setup (Pipe, Port_Cfg);
Setup_FB (Pipe, Port_Cfg.Mode, Framebuffer);
Update_Cursor (Pipe, Framebuffer, Cursor);
Transcoder.On
(Pipe => Pipe,
Port_Cfg => Port_Cfg,
Dither => Framebuffer.BPC /= Port_Cfg.Mode.BPC,
Scale => Requires_Scaling (Framebuffer, Port_Cfg.Mode));
end On;
----------------------------------------------------------------------------
procedure Planes_Off (Controller : Controller_Type) is
begin
Registers.Write (Controller.CUR_CTL, 16#0000_0000#);
if Config.Has_Cursor_FBC_Control then
Registers.Write (Controller.CUR_FBC_CTL, 16#0000_0000#);
end if;
Registers.Unset_Mask (Controller.SPCNTR, DSPCNTR_ENABLE);
if Config.Has_Plane_Control then
Clear_Watermarks (Controller);
Registers.Unset_Mask (Controller.PLANE_CTL, PLANE_CTL_PLANE_ENABLE);
Registers.Write (Controller.PLANE_SURF, 16#0000_0000#);
else
Registers.Unset_Mask (Controller.DSPCNTR, DSPCNTR_ENABLE);
end if;
end Planes_Off;
procedure Off (Pipe : Pipe_Index)
is
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
Planes_Off (Controllers (Pipe));
Transcoder.Off (Pipe);
Panel_Fitter_Off (Controllers (Pipe));
Transcoder.Clk_Off (Pipe);
end Off;
procedure Legacy_VGA_Off
is
use type HW.Word8;
Reg8 : Word8;
begin
Port_IO.OutB (VGA_SR_INDEX, VGA_SR01);
Port_IO.InB (Reg8, VGA_SR_DATA);
Port_IO.OutB (VGA_SR_DATA, Reg8 or VGA_SR01_SCREEN_OFF);
Time.U_Delay (100); -- PRM says 100us, Linux does 300
Registers.Set_Mask (VGACNTRL_REG, VGA_CONTROL_VGA_DISPLAY_DISABLE);
end Legacy_VGA_Off;
procedure All_Off
is
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
Legacy_VGA_Off;
for Pipe in Pipe_Index loop
Planes_Off (Controllers (Pipe));
Transcoder.Off (Pipe);
Panel_Fitter_Off (Controllers (Pipe));
Transcoder.Clk_Off (Pipe);
end loop;
end All_Off;
end HW.GFX.GMA.Pipe_Setup;
|
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Wide_Wide_Text_IO;
with Ada.Command_Line;
package body Errors is
-------------------------
-- Circular_Dependency --
-------------------------
overriding procedure Circular_Dependency
(Self : access Error_Listener;
Name : Program.Text)
is
pragma Unreferenced (Self);
begin
Ada.Wide_Wide_Text_IO.Put_Line
(Ada.Wide_Wide_Text_IO.Standard_Error,
"Circular dependency for unit: " & Name);
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
end Circular_Dependency;
------------------
-- No_Body_Text --
------------------
overriding procedure No_Body_Text
(Self : access Error_Listener;
Name : Program.Text)
is
pragma Unreferenced (Self);
begin
Ada.Wide_Wide_Text_IO.Put_Line
(Ada.Wide_Wide_Text_IO.Standard_Error,
"No text for unit/body: " & Name);
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
end No_Body_Text;
end Errors;
|
with Ada.Calendar;
package DCF.Streams.Calendar is
-- Set_Time again, but with the standard Ada Time type.
-- Overriding is useless and potentially harmful, so we prevent it with
-- a class-wide profile.
procedure Set_Time (S : out Root_Zipstream_Type'Class; Modification_Time : Ada.Calendar.Time);
-- Get_Time again, but with the standard Ada Time type.
-- Overriding is useless and potentially harmful, so we prevent it with
-- a class-wide profile.
function Get_Time (S : in Root_Zipstream_Type'Class) return Ada.Calendar.Time;
----------------------------
-- Routines around Time --
----------------------------
function Convert (Date : in Ada.Calendar.Time) return Time;
function Convert (Date : in Time) return Ada.Calendar.Time;
use Ada.Calendar;
procedure Split
(Date : Time;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Seconds : out Day_Duration);
function Time_Of
(Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Seconds : Day_Duration := 0.0) return Time;
function ">" (Left, Right : Time) return Boolean;
Time_Error : exception;
end DCF.Streams.Calendar;
|
package openGL.IO.collada
--
-- Provides a function to convert a Collada model file to an openGL IO model.
--
is
function to_Model (model_Path : in String) return IO.Model;
end openGL.IO.collada;
|
-- SPDX-FileCopyrightText: 2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package body Network.Managers is
-------------
-- Connect --
-------------
procedure Connect
(Self : in out Manager'Class;
Address : Network.Addresses.Address;
Error : out League.Strings.Universal_String;
Promise : out Connection_Promises.Promise;
Options : League.String_Vectors.Universal_String_Vector :=
League.String_Vectors.Empty_Universal_String_Vector)
is
begin
for Proto of Self.Proto (1 .. Self.Last) loop
if Proto.Can_Connect (Address) then
Proto.Connect (Address, Self.Poll, Error, Promise, Options);
return;
end if;
end loop;
Error.Append ("Unknown protocol");
end Connect;
----------------
-- Initialize --
----------------
procedure Initialize (Self : in out Manager'Class) is
begin
Self.Poll.Initialize;
end Initialize;
------------
-- Listen --
------------
procedure Listen
(Self : in out Manager'Class;
List : Network.Addresses.Address_Array;
Listener : Connection_Listener_Access;
Error : out League.Strings.Universal_String;
Options : League.String_Vectors.Universal_String_Vector :=
League.String_Vectors.Empty_Universal_String_Vector)
is
Done : array (List'Range) of Boolean := (List'Range => False);
begin
for Proto of Self.Proto (1 .. Self.Last) loop
declare
Ok : League.Strings.Universal_String;
Slice : Network.Addresses.Address_Array (List'Range);
Last : Natural := Slice'First - 1;
begin
for J in List'Range loop
if not Done (J) and then Proto.Can_Listen (List (J)) then
Done (J) := True;
Last := Last + 1;
Slice (Last) := List (J);
end if;
end loop;
if Last >= Slice'First then
Proto.Listen
(Slice (Slice'First .. Last),
Listener,
Self.Poll,
Ok,
Options);
Error.Append (Ok);
end if;
end;
end loop;
if Done /= (List'Range => True) then
for J in Done'Range loop
Error.Append ("Unknown protocol for ");
Error.Append (Network.Addresses.To_String (List (J)));
Error.Append (". ");
end loop;
end if;
end Listen;
--------------
-- Register --
--------------
procedure Register
(Self : in out Manager;
Protocol : not null Protocol_Access) is
begin
Self.Last := Self.Last + 1;
Self.Proto (Self.Last) := Protocol;
end Register;
----------
-- Wait --
----------
procedure Wait
(Self : in out Manager'Class;
Timeout : Duration) is
begin
Self.Poll.Wait (Timeout);
end Wait;
end Network.Managers;
|
-- There are exactly ten ways of selecting three from five, 12345:
--
-- 123, 124, 125, 134, 135, 145, 234, 235, 245, and 345
--
-- In combinatorics, we use the notation, 5C3 = 10.
--
-- In general,nCr = n!/(r!(n-r)!) ,where r < n
--
-- It is not until n = 23, that a value exceeds one-million: 23C10 = 1,144,066.
--
-- How many, not necessarily distinct, values of nCr, for 1 <= n <= 100, are greater than one-million?
package Problem_53 is
procedure Solve;
end Problem_53;
|
with AdaBase;
with Connect;
with Ada.Text_IO;
with Ada.Exceptions;
procedure MultiQuery is
package CON renames Connect;
package TIO renames Ada.Text_IO;
package EX renames Ada.Exceptions;
numrows : AdaBase.Affected_Rows;
setting : Boolean;
nextone : Boolean;
SQL : constant String :=
"DELETE FROM fruits WHERE color = 'red'; " &
"DELETE FROM fruits WHERE color = 'orange'";
begin
CON.connect_database;
TIO.Put_Line ("This demonstration shows how multiple queries in the " &
"same SQL string are handled.");
TIO.Put_Line ("SQL string used: " & SQL);
TIO.Put_Line ("");
setting := CON.DR.trait_multiquery_enabled;
nextone := not setting;
TIO.Put_Line ("Testing query with MultiQuery option set to " & setting'Img);
TIO.Put_Line ("-- Execution attempt #1 --");
begin
numrows := CON.DR.execute (SQL);
TIO.Put_Line ("Query succeeded");
CON.DR.rollback;
exception
when ouch : others =>
TIO.Put_Line ("Exception: " & EX.Exception_Message (ouch));
TIO.Put_Line ("Failed to test this setting");
end;
TIO.Put_Line ("");
TIO.Put_Line ("Attempt to toggle MultiQuery setting to " & nextone'Img);
begin
CON.DR.set_trait_multiquery_enabled (nextone);
TIO.Put_Line ("-- Execution attempt #2 --");
numrows := CON.DR.execute (SQL);
TIO.Put_Line ("Query succeeded");
CON.DR.rollback;
exception
when ouch : others =>
TIO.Put_Line ("Exception: " & EX.Exception_Message (ouch));
TIO.Put_Line ("Failed to test this setting");
end;
CON.DR.disconnect;
end MultiQuery;
|
-- SPDX-FileCopyrightText: 2020-2021 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Discrete_Simple_Expression_Ranges;
package body Program.Nodes.Proxy_Associations is
----------------------
-- Actual_Parameter --
----------------------
overriding function Actual_Parameter (Self : Proxy_Association)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Expression;
end Actual_Parameter;
-----------------
-- Arrow_Token --
-----------------
overriding function Arrow_Token (Self : Proxy_Association)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Arrow_Token;
end Arrow_Token;
---------------
-- Box_Token --
---------------
overriding function Box_Token (Self : Proxy_Association)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Box_Token;
end Box_Token;
-------------
-- Choices --
-------------
overriding function Choices (Self : Proxy_Association)
return Program.Element_Vectors.Element_Vector_Access
is
begin
return Self.Choices;
end Choices;
---------------------
-- Component_Value --
---------------------
overriding function Component_Value (Self : Proxy_Association)
return Program.Elements.Expressions.Expression_Access is
begin
return Self.Expression;
end Component_Value;
------------
-- Create --
------------
function Create
(Choices : Program.Element_Vectors.Element_Vector_Access;
Arrow_Token : Program.Lexical_Elements.Lexical_Element_Access;
Expression : Program.Elements.Expressions.Expression_Access;
Box_Token : Program.Lexical_Elements.Lexical_Element_Access)
return Proxy_Association is
begin
pragma Warnings (Off, "others choice is redundant"); -- gpl 2019
return Result : aliased Proxy_Association :=
(This => null,
Choices => Choices,
Selectors => <>,
Arrow_Token => Arrow_Token,
Expression => Expression,
Box_Token => Box_Token,
Enclosing_Element => null,
Current => A_Record_Component_Association)
do
Result.This := Result'Unchecked_Access;
for Item in Result.Choices.Each_Element loop
Set_Enclosing_Element (Item.Element, Result'Unchecked_Access);
end loop;
if Result.Expression.Assigned then
Set_Enclosing_Element (Result.Expression, Result'Unchecked_Access);
end if;
end return;
end Create;
---------------
-- Delimiter --
---------------
overriding function Delimiter
(Self : Identifier_Vector;
Index : Positive)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Parent.Choices.Delimiter (Index);
end Delimiter;
------------------------
-- Discriminant_Value --
------------------------
overriding function Discriminant_Value
(Self : Proxy_Association)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Expression;
end Discriminant_Value;
-------------
-- Element --
-------------
overriding function Element
(Self : Identifier_Vector;
Index : Positive)
return not null Program.Elements.Element_Access is
begin
return Self.Parent.Choices.Element (Index);
end Element;
----------------
-- Get_Length --
----------------
overriding function Get_Length (Self : Identifier_Vector) return Positive is
begin
return Self.Parent.Choices.Get_Length;
end Get_Length;
----------------------
-- Formal_Parameter --
----------------------
overriding function Formal_Parameter (Self : Proxy_Association)
return Program.Elements.Expressions.Expression_Access is
begin
if Self.Choices.Length = 1 then
return Self.Choices.Element (1).To_Expression;
else
return null;
end if;
end Formal_Parameter;
--------------------
-- Is_Association --
--------------------
overriding function Is_Association (Self : Proxy_Association)
return Boolean
is
pragma Unreferenced (Self);
begin
return True;
end Is_Association;
-------------------
-- Is_Definition --
-------------------
overriding function Is_Definition
(Self : Proxy_Association) return Boolean is
begin
return Self.Current = A_Discrete_Simple_Expression_Range;
end Is_Definition;
-----------------------
-- Is_Discrete_Range --
-----------------------
overriding function Is_Discrete_Range
(Self : Proxy_Association) return Boolean is
begin
return Self.Current = A_Discrete_Simple_Expression_Range;
end Is_Discrete_Range;
-----------------------------------------
-- Is_Discrete_Simple_Expression_Range --
-----------------------------------------
overriding function Is_Discrete_Simple_Expression_Range
(Self : Proxy_Association) return Boolean is
begin
return Self.Current = A_Discrete_Simple_Expression_Range;
end Is_Discrete_Simple_Expression_Range;
---------------------------------
-- Is_Discriminant_Association --
---------------------------------
overriding function Is_Discriminant_Association
(Self : Proxy_Association) return Boolean is
begin
return Self.Current = A_Discriminant_Association;
end Is_Discriminant_Association;
------------------------------
-- Is_Parameter_Association --
------------------------------
overriding function Is_Parameter_Association (Self : Proxy_Association)
return Boolean is
begin
return Self.Current = A_Parameter_Association;
end Is_Parameter_Association;
-------------------------------------
-- Is_Record_Component_Association --
-------------------------------------
overriding function Is_Record_Component_Association
(Self : Proxy_Association) return Boolean is
begin
return Self.Current = A_Record_Component_Association;
end Is_Record_Component_Association;
--------------------
-- Selector_Names --
--------------------
overriding function Selector_Names
(Self : Proxy_Association)
return Program.Elements.Identifiers.Identifier_Vector_Access is
begin
return Self.This.Selectors'Unchecked_Access;
end Selector_Names;
--------------------------------------
-- To_Discriminant_Association_Text --
--------------------------------------
overriding function To_Discriminant_Association_Text
(Self : in out Proxy_Association)
return Program.Elements.Discriminant_Associations
.Discriminant_Association_Text_Access is
begin
return Self'Unchecked_Access;
end To_Discriminant_Association_Text;
------------------------------------------
-- To_Record_Component_Association_Text --
------------------------------------------
overriding function To_Record_Component_Association_Text
(Self : in out Proxy_Association)
return Program.Elements.Record_Component_Associations
.Record_Component_Association_Text_Access is
begin
return Self'Unchecked_Access;
end To_Record_Component_Association_Text;
-----------------------------------
-- To_Parameter_Association_Text --
-----------------------------------
overriding function To_Parameter_Association_Text
(Self : in out Proxy_Association)
return Program.Elements.Parameter_Associations
.Parameter_Association_Text_Access is
begin
return Self'Unchecked_Access;
end To_Parameter_Association_Text;
----------------------------
-- Turn_To_Discrete_Range --
----------------------------
procedure Turn_To_Discrete_Range (Self : in out Proxy_Association'Class) is
begin
if Self.Choices.Length = 1
and then Self.Choices.Element (1).Is_Discrete_Simple_Expression_Range
then
Self.Current := A_Discrete_Simple_Expression_Range;
else
raise Program_Error;
end if;
end Turn_To_Discrete_Range;
--------------------------------------
-- Turn_To_Discriminant_Association --
--------------------------------------
procedure Turn_To_Discriminant_Association
(Self : in out Proxy_Association'Class) is
begin
Self.Current := A_Discriminant_Association;
end Turn_To_Discriminant_Association;
-----------------------
-- Turn_To_Parameter --
-----------------------
procedure Turn_To_Parameter (Self : in out Proxy_Association'Class) is
begin
Self.Current := A_Parameter_Association;
end Turn_To_Parameter;
-----------
-- Visit --
-----------
overriding procedure Visit
(Self : not null access Proxy_Association;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
case Self.Current is
when A_Parameter_Association =>
Visitor.Parameter_Association (Self);
when A_Record_Component_Association =>
Visitor.Record_Component_Association (Self);
when A_Discriminant_Association =>
Visitor.Discriminant_Association (Self);
when A_Discrete_Simple_Expression_Range =>
Visitor.Discrete_Simple_Expression_Range
(Program.Elements.Discrete_Simple_Expression_Ranges
.Discrete_Simple_Expression_Range_Access
(Self.Choices.Element (1)));
end case;
end Visit;
end Program.Nodes.Proxy_Associations;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.