repo_name
stringlengths 9
74
| language
stringclasses 1
value | length_bytes
int64 11
9.34M
| extension
stringclasses 2
values | content
stringlengths 11
9.34M
|
---|---|---|---|---|
mirror/ncurses | Ada | 3,817 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- Sample.Form_Demo.Handler --
-- --
-- S P E C --
-- --
------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses;
use Terminal_Interface.Curses;
with Terminal_Interface.Curses.Panels;
use Terminal_Interface.Curses.Panels;
with Terminal_Interface.Curses.Forms;
use Terminal_Interface.Curses.Forms;
generic
with function My_Driver (Frm : Form;
K : Key_Code;
Pan : Panel) return Boolean;
package Sample.Form_Demo.Handler is
procedure Drive_Me (F : Form;
Lin : Line_Position;
Col : Column_Position;
Title : String := "");
-- Position the menu at the given point and drive it.
procedure Drive_Me (F : Form;
Title : String := "");
-- Center menu and drive it.
end Sample.Form_Demo.Handler;
|
reznikmm/matreshka | Ada | 4,583 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Smil.Subtype_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Smil_Subtype_Attribute_Node is
begin
return Self : Smil_Subtype_Attribute_Node do
Matreshka.ODF_Smil.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Smil_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Smil_Subtype_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Subtype_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Smil_URI,
Matreshka.ODF_String_Constants.Subtype_Attribute,
Smil_Subtype_Attribute_Node'Tag);
end Matreshka.ODF_Smil.Subtype_Attributes;
|
reznikmm/matreshka | Ada | 5,901 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2015, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- GNAT: enforce generation of preinitialized data section instead of
-- generation of elaboration code.
package Matreshka.Internals.Unicode.Ucd.Core_016A is
pragma Preelaborate;
Group_016A : aliased constant Core_Second_Stage
:= (16#00# .. 16#38# => -- 016A00 .. 016A38
(Other_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Alphabetic
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#40# .. 16#5E# => -- 016A40 .. 016A5E
(Other_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Alphabetic
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#60# .. 16#69# => -- 016A60 .. 016A69
(Decimal_Number, Neutral,
Other, Numeric, Numeric, Numeric,
(Grapheme_Base
| ID_Continue
| XID_Continue => True,
others => False)),
16#6E# .. 16#6F# => -- 016A6E .. 016A6F
(Other_Punctuation, Neutral,
Other, Other, S_Term, Break_After,
(STerm
| Terminal_Punctuation
| Grapheme_Base => True,
others => False)),
16#D0# .. 16#ED# => -- 016AD0 .. 016AED
(Other_Letter, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Alphabetic
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#F0# .. 16#F4# => -- 016AF0 .. 016AF4
(Nonspacing_Mark, Neutral,
Extend, Extend, Extend, Combining_Mark,
(Diacritic
| Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)),
16#F5# => -- 016AF5
(Other_Punctuation, Neutral,
Other, Other, S_Term, Break_After,
(STerm
| Terminal_Punctuation
| Grapheme_Base => True,
others => False)),
others =>
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)));
end Matreshka.Internals.Unicode.Ucd.Core_016A;
|
stcarrez/ada-util | Ada | 14,792 | ads | -----------------------------------------------------------------------
-- util-system-os -- Windows system operations
-- Copyright (C) 2011, 2012, 2015, 2018, 2019, 2021, 2022 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with System;
with Interfaces.C;
with Interfaces.C.Strings;
with Util.Systems.Types;
with Util.Systems.Constants;
-- The <b>Util.Systems.Os</b> package defines various types and operations which are specific
-- to the OS (Windows).
package Util.Systems.Os is
-- The directory separator.
Directory_Separator : constant Character := '\';
-- The path separator.
Path_Separator : constant Character := ';';
-- The line ending separator.
Line_Separator : constant String := "" & ASCII.CR & ASCII.LF;
-- Defines several windows specific types.
type BOOL is mod 8;
type WORD is new Interfaces.C.short;
type DWORD is new Interfaces.C.unsigned_long;
type PDWORD is access all DWORD;
for PDWORD'Size use Standard'Address_Size;
type Process_Identifier is new Integer;
function Get_Last_Error return Integer
with Import => True, Convention => Stdcall, Link_Name => "GetLastError";
function Errno return Integer
with Import => True, Convention => Stdcall, Link_Name => "GetLastError";
-- Some useful error codes (See Windows document "System Error Codes (0-499)").
ERROR_BROKEN_PIPE : constant Integer := 109;
-- ------------------------------
-- Handle
-- ------------------------------
-- The windows HANDLE is defined as a void* in the C API.
subtype HANDLE is Util.Systems.Types.HANDLE;
use type Util.Systems.Types.HANDLE;
INVALID_HANDLE_VALUE : constant HANDLE := -1;
type PHANDLE is access all HANDLE;
for PHANDLE'Size use Standard'Address_Size;
function Wait_For_Single_Object (H : in HANDLE;
Time : in DWORD) return DWORD
with Import => True, Convention => Stdcall, Link_Name => "WaitForSingleObject";
type Security_Attributes is record
Length : DWORD;
Security_Descriptor : System.Address;
Inherit : Interfaces.C.int := 0;
end record;
type LPSECURITY_ATTRIBUTES is access all Security_Attributes;
for LPSECURITY_ATTRIBUTES'Size use Standard'Address_Size;
-- ------------------------------
-- File operations
-- ------------------------------
subtype File_Type is Util.Systems.Types.File_Type;
NO_FILE : constant File_Type := 0;
STD_INPUT_HANDLE : constant DWORD := 16#fffffff6#;
STD_OUTPUT_HANDLE : constant DWORD := 16#fffffff5#;
STD_ERROR_HANDLE : constant DWORD := 16#fffffff4#;
-- These values are specific to Linux.
O_RDONLY : constant Interfaces.C.int := Util.Systems.Constants.O_RDONLY;
O_WRONLY : constant Interfaces.C.int := Util.Systems.Constants.O_WRONLY;
O_RDWR : constant Interfaces.C.int := Util.Systems.Constants.O_RDWR;
O_CREAT : constant Interfaces.C.int := Util.Systems.Constants.O_CREAT;
O_EXCL : constant Interfaces.C.int := Util.Systems.Constants.O_EXCL;
O_TRUNC : constant Interfaces.C.int := Util.Systems.Constants.O_TRUNC;
O_APPEND : constant Interfaces.C.int := Util.Systems.Constants.O_APPEND;
function Get_Std_Handle (Kind : in DWORD) return File_Type
with Import => True, Convention => Stdcall, Link_Name => "GetStdHandle";
function STDIN_FILENO return File_Type
is (Get_Std_Handle (STD_INPUT_HANDLE));
function STDOUT_FILENO return File_Type
is (Get_Std_Handle (STD_OUTPUT_HANDLE));
function STDERR_FILENO return File_Type
is (Get_Std_Handle (STD_ERROR_HANDLE));
function Close_Handle (Fd : in File_Type) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "CloseHandle";
function Duplicate_Handle (SourceProcessHandle : in HANDLE;
SourceHandle : in HANDLE;
TargetProcessHandle : in HANDLE;
TargetHandle : in PHANDLE;
DesiredAccess : in DWORD;
InheritHandle : in BOOL;
Options : in DWORD) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "DuplicateHandle";
function Read_File (Fd : in File_Type;
Buf : in System.Address;
Size : in DWORD;
Result : in PDWORD;
Overlap : in System.Address) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "ReadFile";
function Write_File (Fd : in File_Type;
Buf : in System.Address;
Size : in DWORD;
Result : in PDWORD;
Overlap : in System.Address) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "WriteFile";
function Create_Pipe (Read_Handle : in PHANDLE;
Write_Handle : in PHANDLE;
Attributes : in LPSECURITY_ATTRIBUTES;
Buf_Size : in DWORD) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "CreatePipe";
subtype LPWSTR is Interfaces.C.Strings.chars_ptr;
subtype LPCSTR is Interfaces.C.Strings.chars_ptr;
subtype PBYTE is Interfaces.C.Strings.chars_ptr;
subtype Ptr is Interfaces.C.Strings.chars_ptr;
subtype LPCTSTR is System.Address;
subtype LPTSTR is System.Address;
subtype LPVOID is System.Address;
type CommandPtr is access all Interfaces.C.wchar_array;
NULL_STR : constant LPWSTR := Interfaces.C.Strings.Null_Ptr;
type FileTime is record
dwLowDateTime : DWORD;
dwHighDateTime : DWORD;
end record;
type LPFILETIME is access all FileTime;
function To_Time (Time : in FileTime) return Util.Systems.Types.Time_Type;
type Startup_Info is record
cb : DWORD := 0;
lpReserved : LPWSTR := NULL_STR;
lpDesktop : LPWSTR := NULL_STR;
lpTitle : LPWSTR := NULL_STR;
dwX : DWORD := 0;
dwY : DWORD := 0;
dwXsize : DWORD := 0;
dwYsize : DWORD := 0;
dwXCountChars : DWORD := 0;
dwYCountChars : DWORD := 0;
dwFillAttribute : DWORD := 0;
dwFlags : DWORD := 0;
wShowWindow : WORD := 0;
cbReserved2 : WORD := 0;
lpReserved2 : PBYTE := Interfaces.C.Strings.Null_Ptr;
hStdInput : HANDLE := 0;
hStdOutput : HANDLE := 0;
hStdError : HANDLE := 0;
end record;
type Startup_Info_Access is access all Startup_Info;
type PROCESS_INFORMATION is record
hProcess : HANDLE := NO_FILE;
hThread : HANDLE := NO_FILE;
dwProcessId : DWORD;
dwThreadId : DWORD;
end record;
type Process_Information_Access is access all PROCESS_INFORMATION;
function Get_Current_Process return HANDLE
with Import => True, Convention => Stdcall, Link_Name => "GetCurrentProcess";
function Get_Exit_Code_Process (Proc : in HANDLE;
Code : in PDWORD) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "GetExitCodeProcess";
function Create_Process (Name : in LPCTSTR;
Command : in System.Address;
Process_Attributes : in LPSECURITY_ATTRIBUTES;
Thread_Attributes : in LPSECURITY_ATTRIBUTES;
Inherit_Handles : in BOOL;
Creation_Flags : in DWORD;
Environment : in LPTSTR;
Directory : in LPCTSTR;
Startup_Info : in Startup_Info_Access;
Process_Info : in Process_Information_Access)
return Integer
with Import => True, Convention => Stdcall, Link_Name => "CreateProcessW";
-- Terminate the windows process and all its threads.
function Terminate_Process (Proc : in HANDLE;
Code : in DWORD) return Integer
with Import => True, Convention => Stdcall, Link_Name => "TerminateProcess";
function Sys_Stat (Path : in LPWSTR;
Stat : access Util.Systems.Types.Stat_Type) return Integer
with Import => True, Convention => Stdcall, Link_Name => "_stat64";
function Sys_Fstat (Fs : in File_Type;
Stat : access Util.Systems.Types.Stat_Type) return Integer;
function Sys_Lstat (Path : in String;
Stat : access Util.Systems.Types.Stat_Type) return Integer
with Import => True, Convention => Stdcall, Link_Name => "_stat64";
function Sys_Lseek (Fs : in File_Type;
Offset : in Util.Systems.Types.off_t;
Mode : in Util.Systems.Types.Seek_Mode)
return Util.Systems.Types.off_t;
FILE_SHARE_WRITE : constant DWORD := 16#02#;
FILE_SHARE_READ : constant DWORD := 16#01#;
GENERIC_READ : constant DWORD := 16#80000000#;
GENERIC_WRITE : constant DWORD := 16#40000000#;
CREATE_NEW : constant DWORD := 1;
CREATE_ALWAYS : constant DWORD := 2;
OPEN_EXISTING : constant DWORD := 3;
OPEN_ALWAYS : constant DWORD := 4;
TRUNCATE_EXISTING : constant DWORD := 5;
FILE_APPEND_DATA : constant DWORD := 4;
FILE_ATTRIBUTE_ARCHIVE : constant DWORD := 16#20#;
FILE_ATTRIBUTE_HIDDEN : constant DWORD := 16#02#;
FILE_ATTRIBUTE_NORMAL : constant DWORD := 16#80#;
FILE_ATTRIBUTE_READONLY : constant DWORD := 16#01#;
FILE_ATTRIBUTE_TEMPORARY : constant DWORD := 16#100#;
function Create_File (Name : in LPCTSTR;
Desired_Access : in DWORD;
Share_Mode : in DWORD;
Attributes : in LPSECURITY_ATTRIBUTES;
Creation : in DWORD;
Flags : in DWORD;
Template_File : HANDLE) return HANDLE
with Import => True, Convention => Stdcall, Link_Name => "CreateFileW";
function Replace_File (Replaced_File : in LPCTSTR;
Replacement_File : in LPCTSTR;
Backup_File : in LPCTSTR;
Replace_Flags : in DWORD;
Exclude : in LPCTSTR;
Reserved : in LPCTSTR) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "ReplaceFileW";
function Move_File (Existing_File : in LPCTSTR;
New_File : in LPCTSTR;
Flags : in DWORD) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "MoveFileExW";
function Get_Full_Pathname (Path : in LPCTSTR;
Length : in DWORD;
Buffer : in LPCTSTR;
Ptr : in LPCSTR) return DWORD
with Import => True, Convention => Stdcall, Link_Name => "GetFullPathNameW";
-- Close a file
function Sys_Close (Fd : in File_Type) return Integer;
-- Open a file
function Sys_Open (Path : in Ptr;
Flags : in Interfaces.C.int;
Mode : in Util.Systems.Types.mode_t) return File_Type;
function Sys_Ftruncate (Fs : in File_Type;
Length : in Util.Systems.Types.off_t) return Integer;
function Sys_Fchmod (Fd : in File_Type;
Mode : in Util.Systems.Types.mode_t) return Integer;
-- Change permission of a file.
function Sys_Chmod (Path : in Ptr;
Mode : in Util.Systems.Types.mode_t) return Integer
with Import => True, Convention => Stdcall, Link_Name => "_chmod";
function Sys_Realpath (S : in Ptr;
R : in Ptr) return Ptr;
function Strerror (Errno : in Integer) return Interfaces.C.Strings.chars_ptr
with Import => True, Convention => Stdcall, Link_Name => "strerror";
function Sys_GetHandleInformation (Fd : in HANDLE; Flags : access DWORD) return BOOL
with Import => True, Convention => Stdcall, Link_Name => "GetHandleInformation";
type Wchar_Ptr is access all Interfaces.C.wchar_array;
function To_WSTR (Value : in String) return Wchar_Ptr;
procedure Free is
new Ada.Unchecked_Deallocation (Object => Interfaces.C.wchar_array,
Name => Wchar_Ptr);
-- Rename a file (the Ada.Directories.Rename does not allow to use
-- the Unix atomic file rename!)
function Sys_Rename (Oldpath : in String;
Newpath : in String) return Integer;
function Sys_Unlink (Path : in String) return Integer
with Import => True, Convention => C, Link_Name => "unlink";
type DIR is new System.Address;
Null_Dir : constant DIR := DIR (System.Null_Address);
-- Equivalent to Posix opendir (3) but handles some portability issues.
-- We could use opendir, readdir_r and closedir but the __gnat_* alternative
-- solves
function Opendir (Directory : in String) return DIR
with Import, External_Name => "__gnat_opendir", Convention => C;
function Readdir (Directory : in DIR;
Buffer : in System.Address;
Last : not null access Integer) return System.Address
with Import, External_Name => "__gnat_readdir", Convention => C;
function Closedir (Directory : in DIR) return Integer
with Import, External_Name => "__gnat_closedir", Convention => C;
private
-- kernel32 is used on Windows32 as well as Windows64.
pragma Linker_Options ("-lkernel32");
end Util.Systems.Os;
|
optikos/oasis | Ada | 3,052 | adb | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Compilation_Unit_Vectors is
procedure Skip_Elements
(Self : Iterator;
Pos : in out Compilation_Unit_Cursor;
Step : Integer);
-- Find a good Element starting from Pos.Index and set other fields of Pos
---------------
-- Each_Unit --
---------------
function Each_Unit
(Self : access Compilation_Unit_Vector'Class;
When_Unit : Compilation_Unit_Checker := null) return Iterator is
begin
return (Vector => Self, Condition => When_Unit);
end Each_Unit;
-----------
-- First --
-----------
overriding function First (Self : Iterator)
return Program.Compilation_Unit_Vectors.Compilation_Unit_Cursor is
begin
return Result : Compilation_Unit_Cursor := (Index => 1, others => <>) do
Self.Skip_Elements (Result, Step => 1);
end return;
end First;
----------
-- Last --
----------
overriding function Last (Self : Iterator)
return Program.Compilation_Unit_Vectors.Compilation_Unit_Cursor
is
begin
return Result : Compilation_Unit_Cursor :=
(Index => Self.Vector.Length, others => <>)
do
Self.Skip_Elements (Result, Step => -1);
end return;
end Last;
----------
-- Next --
----------
overriding function Next
(Self : Iterator;
Cursor : Program.Compilation_Unit_Vectors.Compilation_Unit_Cursor)
return Program.Compilation_Unit_Vectors.Compilation_Unit_Cursor is
begin
return Result : Compilation_Unit_Cursor := Cursor do
Result.Index := Result.Index + 1;
Self.Skip_Elements (Result, Step => 1);
end return;
end Next;
--------------
-- Previous --
--------------
overriding function Previous
(Self : Iterator;
Cursor : Program.Compilation_Unit_Vectors.Compilation_Unit_Cursor)
return Program.Compilation_Unit_Vectors.Compilation_Unit_Cursor is
begin
return Result : Compilation_Unit_Cursor := Cursor do
Result.Index := Result.Index - 1;
Self.Skip_Elements (Result, Step => -1);
end return;
end Previous;
-------------------
-- Skip_Elements --
-------------------
procedure Skip_Elements
(Self : Iterator;
Pos : in out Compilation_Unit_Cursor;
Step : Integer) is
begin
while Pos.Index in 1 .. Self.Vector.Length
and then Self.Condition /= null
and then not Self.Condition (Self.Vector.Element (Pos.Index).all)
loop
Pos.Index := Pos.Index + Step;
end loop;
if Pos.Index in 1 .. Self.Vector.Length then
Pos := (Self.Vector.Element (Pos.Index),
Pos.Index,
Pos.Index = Self.Vector.Length);
else
Pos := (null, 1, False);
end if;
end Skip_Elements;
end Program.Compilation_Unit_Vectors;
|
zhmu/ananas | Ada | 3,062 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S T R E A M S . S T R E A M _ I O . C _ S T R E A M S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package provides an interface between Ada.Stream_IO and the
-- C streams. This allows sharing of a stream between Ada and C or C++,
-- as well as allowing the Ada program to operate directly on the stream.
with Interfaces.C_Streams;
package Ada.Streams.Stream_IO.C_Streams is
package ICS renames Interfaces.C_Streams;
function C_Stream (F : File_Type) return ICS.FILEs;
-- Obtain stream from existing open file
procedure Open
(File : in out File_Type;
Mode : File_Mode;
C_Stream : ICS.FILEs;
Form : String := "";
Name : String := "");
-- Create new file from existing stream
end Ada.Streams.Stream_IO.C_Streams;
|
persan/AdaYaml | Ada | 272 | ads | -- part of AdaYaml, (c) 2017 Felix Krause
-- released under the terms of the MIT license, see the file "copying.txt"
with AUnit.Test_Suites;
package Yaml.Loading_Tests.Suite is
function Suite return AUnit.Test_Suites.Access_Test_Suite;
end Yaml.Loading_Tests.Suite;
|
reznikmm/matreshka | Ada | 20,730 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.UML_Named_Elements;
with AMF.UML.Activities;
with AMF.UML.Activity_Edges.Collections;
with AMF.UML.Activity_Groups.Collections;
with AMF.UML.Activity_Nodes.Collections;
with AMF.UML.Activity_Partitions.Collections;
with AMF.UML.Classifiers.Collections;
with AMF.UML.Constraints.Collections;
with AMF.UML.Dependencies.Collections;
with AMF.UML.Exception_Handlers.Collections;
with AMF.UML.Input_Pins.Collections;
with AMF.UML.Interruptible_Activity_Regions.Collections;
with AMF.UML.Named_Elements;
with AMF.UML.Namespaces;
with AMF.UML.Output_Pins.Collections;
with AMF.UML.Packages.Collections;
with AMF.UML.Read_Is_Classified_Object_Actions;
with AMF.UML.Redefinable_Elements.Collections;
with AMF.UML.String_Expressions;
with AMF.UML.Structured_Activity_Nodes;
with AMF.Visitors;
package AMF.Internals.UML_Read_Is_Classified_Object_Actions is
type UML_Read_Is_Classified_Object_Action_Proxy is
limited new AMF.Internals.UML_Named_Elements.UML_Named_Element_Proxy
and AMF.UML.Read_Is_Classified_Object_Actions.UML_Read_Is_Classified_Object_Action with null record;
overriding function Get_Classifier
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access;
-- Getter of ReadIsClassifiedObjectAction::classifier.
--
-- The classifier against which the classification of the input object is
-- tested.
overriding procedure Set_Classifier
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : AMF.UML.Classifiers.UML_Classifier_Access);
-- Setter of ReadIsClassifiedObjectAction::classifier.
--
-- The classifier against which the classification of the input object is
-- tested.
overriding function Get_Is_Direct
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return Boolean;
-- Getter of ReadIsClassifiedObjectAction::isDirect.
--
-- Indicates whether the classifier must directly classify the input
-- object.
overriding procedure Set_Is_Direct
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : Boolean);
-- Setter of ReadIsClassifiedObjectAction::isDirect.
--
-- Indicates whether the classifier must directly classify the input
-- object.
overriding function Get_Object
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Input_Pins.UML_Input_Pin_Access;
-- Getter of ReadIsClassifiedObjectAction::object.
--
-- Holds the object whose classification is to be tested.
overriding procedure Set_Object
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : AMF.UML.Input_Pins.UML_Input_Pin_Access);
-- Setter of ReadIsClassifiedObjectAction::object.
--
-- Holds the object whose classification is to be tested.
overriding function Get_Result
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Output_Pins.UML_Output_Pin_Access;
-- Getter of ReadIsClassifiedObjectAction::result.
--
-- After termination of the action, will hold the result of the test.
overriding procedure Set_Result
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : AMF.UML.Output_Pins.UML_Output_Pin_Access);
-- Setter of ReadIsClassifiedObjectAction::result.
--
-- After termination of the action, will hold the result of the test.
overriding function Get_Context
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access;
-- Getter of Action::context.
--
-- The classifier that owns the behavior of which this action is a part.
overriding function Get_Input
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin;
-- Getter of Action::input.
--
-- The ordered set of input pins connected to the Action. These are among
-- the total set of inputs.
overriding function Get_Is_Locally_Reentrant
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return Boolean;
-- Getter of Action::isLocallyReentrant.
--
-- If true, the action can begin a new, concurrent execution, even if
-- there is already another execution of the action ongoing. If false, the
-- action cannot begin a new execution until any previous execution has
-- completed.
overriding procedure Set_Is_Locally_Reentrant
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : Boolean);
-- Setter of Action::isLocallyReentrant.
--
-- If true, the action can begin a new, concurrent execution, even if
-- there is already another execution of the action ongoing. If false, the
-- action cannot begin a new execution until any previous execution has
-- completed.
overriding function Get_Local_Postcondition
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Action::localPostcondition.
--
-- Constraint that must be satisfied when executed is completed.
overriding function Get_Local_Precondition
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint;
-- Getter of Action::localPrecondition.
--
-- Constraint that must be satisfied when execution is started.
overriding function Get_Output
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin;
-- Getter of Action::output.
--
-- The ordered set of output pins connected to the Action. The action
-- places its results onto pins in this set.
overriding function Get_Handler
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler;
-- Getter of ExecutableNode::handler.
--
-- A set of exception handlers that are examined if an uncaught exception
-- propagates to the outer level of the executable node.
overriding function Get_Activity
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Activities.UML_Activity_Access;
-- Getter of ActivityNode::activity.
--
-- Activity containing the node.
overriding procedure Set_Activity
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : AMF.UML.Activities.UML_Activity_Access);
-- Setter of ActivityNode::activity.
--
-- Activity containing the node.
overriding function Get_In_Group
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group;
-- Getter of ActivityNode::inGroup.
--
-- Groups containing the node.
overriding function Get_In_Interruptible_Region
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region;
-- Getter of ActivityNode::inInterruptibleRegion.
--
-- Interruptible regions containing the node.
overriding function Get_In_Partition
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition;
-- Getter of ActivityNode::inPartition.
--
-- Partitions containing the node.
overriding function Get_In_Structured_Node
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access;
-- Getter of ActivityNode::inStructuredNode.
--
-- Structured activity node containing the node.
overriding procedure Set_In_Structured_Node
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access);
-- Setter of ActivityNode::inStructuredNode.
--
-- Structured activity node containing the node.
overriding function Get_Incoming
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
-- Getter of ActivityNode::incoming.
--
-- Edges that have the node as target.
overriding function Get_Outgoing
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge;
-- Getter of ActivityNode::outgoing.
--
-- Edges that have the node as source.
overriding function Get_Redefined_Node
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node;
-- Getter of ActivityNode::redefinedNode.
--
-- Inherited nodes replaced by this node in a specialization of the
-- activity.
overriding function Get_Is_Leaf
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return Boolean;
-- Getter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding procedure Set_Is_Leaf
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : Boolean);
-- Setter of RedefinableElement::isLeaf.
--
-- Indicates whether it is possible to further redefine a
-- RedefinableElement. If the value is true, then it is not possible to
-- further redefine the RedefinableElement. Note that this property is
-- preserved through package merge operations; that is, the capability to
-- redefine a RedefinableElement (i.e., isLeaf=false) must be preserved in
-- the resulting RedefinableElement of a package merge operation where a
-- RedefinableElement with isLeaf=false is merged with a matching
-- RedefinableElement with isLeaf=true: the resulting RedefinableElement
-- will have isLeaf=false. Default value is false.
overriding function Get_Redefined_Element
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element;
-- Getter of RedefinableElement::redefinedElement.
--
-- The redefinable element that is being redefined by this element.
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier;
-- Getter of RedefinableElement::redefinitionContext.
--
-- References the contexts that this element may be redefined from.
overriding function Get_Client_Dependency
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency;
-- Getter of NamedElement::clientDependency.
--
-- Indicates the dependencies that reference the client.
overriding function Get_Name_Expression
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access;
-- Getter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding procedure Set_Name_Expression
(Self : not null access UML_Read_Is_Classified_Object_Action_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access);
-- Setter of NamedElement::nameExpression.
--
-- The string expression used to define the name of this named element.
overriding function Get_Namespace
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Getter of NamedElement::namespace.
--
-- Specifies the namespace that owns the NamedElement.
overriding function Get_Qualified_Name
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.Optional_String;
-- Getter of NamedElement::qualifiedName.
--
-- A name which allows the NamedElement to be identified within a
-- hierarchy of nested Namespaces. It is constructed from the names of the
-- containing namespaces starting at the root of the hierarchy and ending
-- with the name of the NamedElement itself.
overriding function Context
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access;
-- Operation Action::context.
--
-- Missing derivation for Action::/context : Classifier
overriding function Is_Consistent_With
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isConsistentWith.
--
-- The query isConsistentWith() specifies, for any two RedefinableElements
-- in a context in which redefinition is possible, whether redefinition
-- would be logically consistent. By default, this is false; this
-- operation must be overridden for subclasses of RedefinableElement to
-- define the consistency conditions.
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean;
-- Operation RedefinableElement::isRedefinitionContextValid.
--
-- The query isRedefinitionContextValid() specifies whether the
-- redefinition contexts of this RedefinableElement are properly related
-- to the redefinition contexts of the specified RedefinableElement to
-- allow this element to redefine the other. By default at least one of
-- the redefinition contexts of this element must be a specialization of
-- at least one of the redefinition contexts of the specified element.
overriding function All_Owning_Packages
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package;
-- Operation NamedElement::allOwningPackages.
--
-- The query allOwningPackages() returns all the directly or indirectly
-- owning packages.
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean;
-- Operation NamedElement::isDistinguishableFrom.
--
-- The query isDistinguishableFrom() determines whether two NamedElements
-- may logically co-exist within a Namespace. By default, two named
-- elements are distinguishable if (a) they have unrelated types or (b)
-- they have related types but different names.
overriding function Namespace
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access;
-- Operation NamedElement::namespace.
--
-- Missing derivation for NamedElement::/namespace : Namespace
overriding procedure Enter_Element
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Leave_Element
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of visitor interface.
overriding procedure Visit_Element
(Self : not null access constant UML_Read_Is_Classified_Object_Action_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control);
-- Dispatch call to corresponding subprogram of iterator interface.
end AMF.Internals.UML_Read_Is_Classified_Object_Actions;
|
Fabien-Chouteau/lvgl-ada | Ada | 57 | adb | procedure Check_Pix16 is
begin
null;
end Check_Pix16;
|
reznikmm/matreshka | Ada | 3,606 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements.Generic_Hash;
function AMF.CMOF.Operations.Hash is
new AMF.Elements.Generic_Hash (CMOF_Operation, CMOF_Operation_Access);
|
reznikmm/matreshka | Ada | 3,704 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Elements;
package ODF.DOM.Table_Change_Deletion_Elements is
pragma Preelaborate;
type ODF_Table_Change_Deletion is limited interface
and XML.DOM.Elements.DOM_Element;
type ODF_Table_Change_Deletion_Access is
access all ODF_Table_Change_Deletion'Class
with Storage_Size => 0;
end ODF.DOM.Table_Change_Deletion_Elements;
|
sungyeon/drake | Ada | 248 | ads | pragma License (Unrestricted);
-- extended unit
with Ada.Strings.Functions.Maps;
package Ada.Strings.Bounded_Strings.Functions.Maps is
new Generic_Maps (Strings.Functions.Maps);
pragma Preelaborate (Ada.Strings.Bounded_Strings.Functions.Maps);
|
reznikmm/matreshka | Ada | 3,999 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Svg_Font_Weight_Attributes;
package Matreshka.ODF_Svg.Font_Weight_Attributes is
type Svg_Font_Weight_Attribute_Node is
new Matreshka.ODF_Svg.Abstract_Svg_Attribute_Node
and ODF.DOM.Svg_Font_Weight_Attributes.ODF_Svg_Font_Weight_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Svg_Font_Weight_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Svg_Font_Weight_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Svg.Font_Weight_Attributes;
|
AdaCore/training_material | Ada | 11,039 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . L I B M --
-- --
-- S p e c --
-- --
-- Copyright (C) 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is the Ada Cert Math specific version of s-libm.ads
with Numerics;
package Libm is
pragma Pure;
Ln_2 : constant := 0.69314_71805_59945_30941_72321_21458_17656_80755;
Ln_3 : constant := 1.09861_22886_68109_69139_52452_36922_52570_46474;
Half_Ln_2 : constant := Ln_2 / 2.0;
Inv_Ln_2 : constant := 1.0 / Ln_2;
Half_Pi : constant := Numerics.Pi / 2.0;
Third_Pi : constant := Numerics.Pi / 3.0;
Quarter_Pi : constant := Numerics.Pi / 4.0;
Sixth_Pi : constant := Numerics.Pi / 6.0;
Max_Red_Trig_Arg : constant := 0.26 * Numerics.Pi;
-- This constant representing the maximum absolute value of the reduced
-- argument of the approximation functions for Sin, Cos and Tan. A value
-- slightly larger than Pi / 4 is used. The reduction doesn't reduce to
-- an interval strictly within +-Pi / 4, as that would complicate the
-- reduction code.
One_Over_Pi : constant := 1.0 / Numerics.Pi;
Two_Over_Pi : constant := 2.0 / Numerics.Pi;
Sqrt_2 : constant := 1.41421_35623_73095_04880_16887_24209_69807_85696;
Sqrt_3 : constant := 1.73205_08075_68877_29352_74463_41505_87236_69428;
Root16_Half : constant := 0.95760_32806_98573_64693_63056_35147_91544;
-- Sixteenth root of 0.5
Sqrt_Half : constant := 0.70710_67811_86547_52440_08443_62104;
subtype Quadrant is Integer range 0 .. 3;
generic
type T is digits <>;
with function Sqrt (X : T) return T is <>;
with function Approx_Asin (X : T) return T is <>;
function Generic_Acos (X : T) return T;
generic
type T is digits <>;
with function Approx_Atan (X : T) return T is <>;
function Generic_Atan2 (Y, X : T) return T;
generic
type T is digits <>;
procedure Generic_Pow_Special_Cases
(Left : T;
Right : T;
Is_Special : out Boolean;
Result : out T);
generic
type T is private;
Mantissa : Positive;
with function "-" (X : T) return T is <>;
with function "+" (X, Y : T) return T is <>;
with function "-" (X, Y : T) return T is <>;
with function "*" (X, Y : T) return T is <>;
with function "/" (X, Y : T) return T is <>;
with function "<=" (X, Y : T) return Boolean is <>;
with function "abs" (X : T) return T is <>;
with function Exact (X : Long_Float) return T is <>;
with function Maximum_Relative_Error (X : T) return Float is <>;
with function Sqrt (X : T) return T is <>;
package Generic_Approximations is
Epsilon : constant Float := 2.0**(1 - Mantissa);
-- The approximations in this package will work well for single
-- precision floating point types.
function Approx_Asin (X : T) return T
with Pre => abs X <= Exact (0.25),
Post => abs Approx_Asin'Result <= Exact (Half_Pi);
-- @llr Approx_Asin
-- The Approx_Asin function shallapproximate the mathematical function
-- arcsin (sqrt (x)) / sqrt (x) - 1.0 on -0.25 .. 0.25.
--
-- Ada accuracy requirements:
-- The approximation MRE shall be XXX T'Model_Epsilon.
function Approx_Atan (X : T) return T
with Pre => abs X <= Exact (Sqrt_3),
Post => abs (Approx_Atan'Result) <= Exact (Half_Pi) and then
Maximum_Relative_Error (Approx_Atan'Result) <= 2.0 * Epsilon;
-- @llr Approx_Atan
-- The Approx_Atan approximates the mathematical inverse tangent on
-- -Sqrt (3) .. Sqrt (3)
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Cos (X : T) return T
with Pre => abs (X) <= Exact (Max_Red_Trig_Arg),
Post => abs (Approx_Cos'Result) <= Exact (1.0)
and then Maximum_Relative_Error (Approx_Cos'Result)
<= 2.0 * Epsilon;
-- @llr Approx_Cos
-- The Approx_Cos approximates the mathematical cosine on
-- -0.26 * Pi .. 0.26 * Pi
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Exp (X : T) return T
with Pre => abs (X) <= Exact (Ln_2 / 2.0),
Post => Exact (0.0) <= Approx_Exp'Result and then
Maximum_Relative_Error (Approx_Exp'Result) <= 2.0 * Epsilon;
-- @llr Approx_Exp
-- The Approx_Exp function approximates the mathematical exponent on
-- -Ln (2.0) / 2.0 .. Ln (2.0) / 2.0
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Exp2 (X : T) return T
with Pre => abs (X) <= Exact (Ln_2 / 2.0),
Post => Exact (0.0) <= Approx_Exp2'Result and then
Maximum_Relative_Error (Approx_Exp2'Result) <= 2.0 * Epsilon;
-- @llr Approx_Exp2
-- The Approx_Exp2 function approximates the mathematical function
-- (x-> 2.0 ** x) on -Ln (2.0) / 2.0 .. Ln (2.0) / 2.0
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Log (X : T) return T
with
Pre => Exact (Sqrt_2 / 2.0) <= X and then
X <= Exact (Sqrt_2),
Post => Maximum_Relative_Error (Approx_Log'Result) <= 2.0 * Epsilon;
-- @llr Approx_Log
-- The Approx_Log function approximates the mathematical logarithm on
-- Sqrt (2.0) /2.0 .. Sqrt (2.0)
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Power_Log (X : T) return T;
-- @llr Approx_Power_Log
-- The Approx_Power_Log approximates the function
-- (x -> Log ((x-1) / (x+1), base => 2)) on the interval
-- TODO
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Sin (X : T) return T
with Pre => (abs X) <= Exact (Max_Red_Trig_Arg),
Post => abs Approx_Sin'Result <= Exact (1.0) and then
Maximum_Relative_Error (Approx_Sin'Result) <= 2.0 * Epsilon;
-- @llr Approx_Sin
-- The Approx_Sin function approximates the mathematical sine on
-- -0.26 * Pi .. 0.26 * Pi
--
-- Ada accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Sinh (X : T) return T
with Pre => True, -- The original X >= 0.0 and X <= 1.0, fails ???
Post => abs Approx_Sinh'Result <= Exact
((Numerics.e - 1.0 / Numerics.e) / 2.0)
and then Maximum_Relative_Error (Approx_Sinh'Result)
<= 2.0 * Epsilon;
-- @llr Approx_Sinh
-- The Approx_Sinh function approximates the mathematical hyperbolic
-- sine on XXX
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Tan (X : T) return T
with Pre => abs X <= Exact (Max_Red_Trig_Arg),
Post =>
Maximum_Relative_Error (Approx_Tan'Result) <= 2.0 * Epsilon;
-- @llr Approx_Tan
-- The Approx_Tan function approximates the mathematical tangent on
-- -0.26 * Pi .. 0.26 * Pi
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Cot (X : T) return T
with Pre => abs X <= Exact (Max_Red_Trig_Arg),
Post =>
Maximum_Relative_Error (Approx_Cot'Result) <= 2.0 * Epsilon;
-- @llr Approx_Cot
-- The Approx_Cot function approximates the mathematical cotangent on
-- -0.26 * Pi .. 0.26 * Pi
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Approx_Tanh (X : T) return T
with Pre => Exact (0.0) <= X and then X <= Exact (Ln_3 / 2.0),
Post => abs (Approx_Tanh'Result) <= Exact (Half_Pi)
and then Maximum_Relative_Error (Approx_Tanh'Result)
<= 2.0 * Epsilon;
-- @llr Approx_Tanh
-- The Approx_Tanh function approximates the mathematical hyperbolic
-- tangent on 0.0 .. Ln (3.0) / 2.0
--
-- Accuracy requirements:
-- The approximation MRE is XXX T'Model_Epsilon
function Asin (X : T) return T
with Pre => abs X <= Exact (1.0),
Post => Maximum_Relative_Error (Asin'Result) <= 400.0 * Epsilon;
-- @llr Asin
-- The Asin function has a maximum relative error of 2 epsilon.
end Generic_Approximations;
end Libm;
|
reznikmm/matreshka | Ada | 4,043 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Table_Marked_Invalid_Attributes;
package Matreshka.ODF_Table.Marked_Invalid_Attributes is
type Table_Marked_Invalid_Attribute_Node is
new Matreshka.ODF_Table.Abstract_Table_Attribute_Node
and ODF.DOM.Table_Marked_Invalid_Attributes.ODF_Table_Marked_Invalid_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Table_Marked_Invalid_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Table_Marked_Invalid_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Table.Marked_Invalid_Attributes;
|
reznikmm/matreshka | Ada | 4,818 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.String_Collections;
limited with AMF.UML.Structured_Classifiers;
package AMF.Utp.Test_Components is
pragma Preelaborate;
type Utp_Test_Component is limited interface;
type Utp_Test_Component_Access is
access all Utp_Test_Component'Class;
for Utp_Test_Component_Access'Storage_Size use 0;
not overriding function Get_Base_Structured_Classifier
(Self : not null access constant Utp_Test_Component)
return AMF.UML.Structured_Classifiers.UML_Structured_Classifier_Access is abstract;
-- Getter of TestComponent::base_StructuredClassifier.
--
not overriding procedure Set_Base_Structured_Classifier
(Self : not null access Utp_Test_Component;
To : AMF.UML.Structured_Classifiers.UML_Structured_Classifier_Access) is abstract;
-- Setter of TestComponent::base_StructuredClassifier.
--
not overriding function Get_Compatible_SUT_Version
(Self : not null access constant Utp_Test_Component)
return AMF.String_Collections.Set_Of_String is abstract;
-- Getter of TestComponent::compatibleSUTVersion.
--
not overriding function Get_Compatible_SUT_Variant
(Self : not null access constant Utp_Test_Component)
return AMF.String_Collections.Set_Of_String is abstract;
-- Getter of TestComponent::compatibleSUTVariant.
--
end AMF.Utp.Test_Components;
|
VitalijBondarenko/Formatted_Output_NG | Ada | 2,282 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (c) 2016-2022 Vitalii Bondarenko <[email protected]> --
-- --
------------------------------------------------------------------------------
-- --
-- The MIT License (MIT) --
-- --
-- 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 Formatted_Output.Integer_Output;
package Formatted_Output_Short_Short_Integer is
new Formatted_Output.Integer_Output (Short_Short_Integer);
|
jgrieger/2-to-the-5th | Ada | 471 | adb | -- cerner_2^5_2018
with Ada.Command_line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
procedure EvenOrOddInputs is
begin
for A in 1..Argument_Count loop
declare
N : Integer := Integer'Value(Argument(A));
begin
if N rem 2 = 0 then
Put_Line ("Even");
elsif N rem 2 /= 0 then
Put_Line ("Odd");
else
Put_Line ("This is very odd!");
end if;
end;
end loop;
New_Line;
end EvenOrOddInputs; |
sungyeon/drake | Ada | 2,609 | ads | pragma License (Unrestricted);
-- extended unit
package Ada.Numerics.Distributions is
-- Some kinds of distributions of random numers.
pragma Pure;
-- Simple distributions
generic
type Source is mod <>;
type Target is (<>);
function Linear_Discrete (X : Source) return Target;
-- [0,1]
generic
type Source is mod <>;
type Target is digits <>;
function Linear_Float_0_To_1 (X : Source) return Target'Base;
-- [0,1)
generic
type Source is mod <>;
type Target is digits <>;
function Linear_Float_0_To_Less_Than_1 (X : Source) return Target'Base;
-- (0,1)
generic
type Source is mod <>;
type Target is digits <>;
function Linear_Float_Greater_Than_0_To_Less_Than_1 (X : Source)
return Target'Base;
-- -log(0,1] = [0,inf), RM A.5.2(53/2)
generic
type Source is mod <>;
type Target is digits <>;
function Exponentially_Float (X : Source) return Target'Base;
-- Simple distributions for random number
generic
type Source is mod <>;
type Target is (<>);
type Generator (<>) is limited private;
with function Get (Gen : aliased in out Generator) return Source;
function Linear_Discrete_Random (Gen : aliased in out Generator)
return Target;
-- Strict uniform distributions for random number
generic
type Source is mod <>;
type Target is (<>);
type Generator (<>) is limited private;
with function Get (Gen : aliased in out Generator) return Source;
function Uniform_Discrete_Random (Gen : aliased in out Generator)
return Target;
-- [0,1]
generic
type Source is mod <>;
type Target is digits <>;
type Generator (<>) is limited private;
with function Get (Gen : aliased in out Generator) return Source;
function Uniform_Float_Random_0_To_1 (Gen : aliased in out Generator)
return Target;
-- [0,1)
generic
type Source is mod <>;
type Target is digits <>;
type Generator (<>) is limited private;
with function Get (Gen : aliased in out Generator) return Source;
function Uniform_Float_Random_0_To_Less_Than_1 (
Gen : aliased in out Generator)
return Target;
-- (0,1)
generic
type Source is mod <>;
type Target is digits <>;
type Generator (<>) is limited private;
with function Get (Gen : aliased in out Generator) return Source;
function Uniform_Float_Random_Greater_Than_0_To_Less_Than_1 (
Gen : aliased in out Generator)
return Target;
end Ada.Numerics.Distributions;
|
reznikmm/spawn | Ada | 4,101 | adb | --
-- Copyright (C) 2022, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
--
with GNAT.OS_Lib;
with Spawn.Posix;
package body Spawn.Polls.POSIX_Polls is
function To_Event_Set
(Set : Watch_Event_Set) return Interfaces.C.unsigned_short;
function To_Event_Set (Set : Interfaces.C.unsigned_short) return Event_Set;
----------------
-- Initialize --
----------------
overriding procedure Initialize (Self : out POSIX_Poll) is
begin
Self.Initialized := True;
end Initialize;
--------------------
-- Is_Initialized --
--------------------
overriding function Is_Initialized (Self : POSIX_Poll) return Boolean is
begin
return Self.Initialized;
end Is_Initialized;
------------------
-- To_Event_Set --
------------------
function To_Event_Set
(Set : Watch_Event_Set) return Interfaces.C.unsigned_short
is
use type Interfaces.C.unsigned_short;
Map : constant array (Watch_Event) of Interfaces.C.unsigned_short :=
(Input => Posix.POLLIN,
Output => Posix.POLLOUT);
Result : Interfaces.C.unsigned_short := 0;
begin
for J in Set'Range loop
if Set (J) then
Result := Result + Map (J);
end if;
end loop;
return Result;
end To_Event_Set;
------------------
-- To_Event_Set --
------------------
function To_Event_Set
(Set : Interfaces.C.unsigned_short) return Event_Set
is
use type Interfaces.C.unsigned_short;
Map : constant array (Event) of Interfaces.C.unsigned_short :=
(Close => Posix.POLLHUP,
Input => Posix.POLLIN,
Output => Posix.POLLOUT,
others => 0);
Value : Interfaces.C.unsigned_short := Set;
Result : Event_Set := (Event => False);
begin
for J in Map'Range loop
if (Value and Map (J)) /= 0 then
Value := Value - Map (J);
Result (J) := True;
end if;
end loop;
Result (Error) := Value /= 0;
return Result;
end To_Event_Set;
-----------
-- Watch --
-----------
overriding procedure Watch
(Self : in out POSIX_Poll;
Value : Descriptor;
Events : Watch_Event_Set;
Listener : Listener_Access := null)
is
Cursor : constant Info_Maps.Cursor := Self.Map.Find (Value);
begin
if Events = Empty_Set then
Self.Map.Exclude (Value);
elsif Info_Maps.Has_Element (Cursor) then
Self.Map (Cursor) := (Events, Listener);
else
Self.Map.Insert (Value, (Events, Listener));
end if;
end Watch;
----------
-- Wait --
----------
overriding procedure Wait
(Self : in out POSIX_Poll;
Timeout : Duration)
is
use type Interfaces.C.int;
use type Interfaces.C.unsigned_short;
Length : constant Natural := Natural (Self.Map.Length);
Index : Positive := 1;
fds : Posix.pollfd_array (1 .. Length);
Listener : Listener_Access;
m_sec : constant Interfaces.C.int := Interfaces.C.int (Timeout * 1000.0);
-- Wait for an event in the poll
Count : Interfaces.C.int;
begin
for Cursor in Self.Map.Iterate loop
fds (Index).fd := Info_Maps.Key (Cursor);
fds (Index).events :=
To_Event_Set (Info_Maps.Element (Cursor).Events);
fds (Index).revents := 0;
Index := Index + 1;
end loop;
Count := Posix.poll (fds, fds'Length, m_sec);
if Count > 0 then
for J in fds'Range loop
if fds (J).revents /= 0 then
Count := Count - 1;
Listener := Self.Map (fds (J).fd).Listener;
Self.Map.Delete (fds (J).fd);
Listener.On_Event
(Self'Unchecked_Access,
fds (J).fd,
To_Event_Set (fds (J).revents));
end if;
end loop;
elsif Count < 0 then
raise Program_Error with GNAT.OS_Lib.Errno_Message;
end if;
end Wait;
end Spawn.Polls.POSIX_Polls;
|
reznikmm/matreshka | Ada | 15,595 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.OCL.Any_Types;
with AMF.OCL.Association_Class_Call_Exps;
with AMF.OCL.Bag_Types;
with AMF.OCL.Boolean_Literal_Exps;
with AMF.OCL.Collection_Items;
with AMF.OCL.Collection_Literal_Exps;
with AMF.OCL.Collection_Ranges;
with AMF.OCL.Collection_Types;
with AMF.OCL.Enum_Literal_Exps;
with AMF.OCL.Expression_In_Ocls;
with AMF.OCL.If_Exps;
with AMF.OCL.Integer_Literal_Exps;
with AMF.OCL.Invalid_Literal_Exps;
with AMF.OCL.Invalid_Types;
with AMF.OCL.Iterate_Exps;
with AMF.OCL.Iterator_Exps;
with AMF.OCL.Let_Exps;
with AMF.OCL.Message_Exps;
with AMF.OCL.Message_Types;
with AMF.OCL.Null_Literal_Exps;
with AMF.OCL.Operation_Call_Exps;
with AMF.OCL.Ordered_Set_Types;
with AMF.OCL.Property_Call_Exps;
with AMF.OCL.Real_Literal_Exps;
with AMF.OCL.Sequence_Types;
with AMF.OCL.Set_Types;
with AMF.OCL.State_Exps;
with AMF.OCL.String_Literal_Exps;
with AMF.OCL.Template_Parameter_Types;
with AMF.OCL.Tuple_Literal_Exps;
with AMF.OCL.Tuple_Literal_Parts;
with AMF.OCL.Tuple_Types;
with AMF.OCL.Type_Exps;
with AMF.OCL.Unlimited_Natural_Literal_Exps;
with AMF.OCL.Unspecified_Value_Exps;
with AMF.OCL.Variable_Exps;
with AMF.OCL.Variables;
with AMF.OCL.Void_Types;
package AMF.Visitors.OCL_Iterators is
pragma Preelaborate;
type OCL_Iterator is limited interface and AMF.Visitors.Abstract_Iterator;
not overriding procedure Visit_Any_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Any_Types.OCL_Any_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Association_Class_Call_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Bag_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Bag_Types.OCL_Bag_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Boolean_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Collection_Item
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Collection_Items.OCL_Collection_Item_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Collection_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Collection_Range
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Collection_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Collection_Types.OCL_Collection_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Enum_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Expression_In_Ocl
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_If_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.If_Exps.OCL_If_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Integer_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Invalid_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Invalid_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Iterate_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Iterator_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Let_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Let_Exps.OCL_Let_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Message_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Message_Exps.OCL_Message_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Message_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Message_Types.OCL_Message_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Null_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Operation_Call_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Ordered_Set_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Property_Call_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Real_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Sequence_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Set_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Set_Types.OCL_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_State_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.State_Exps.OCL_State_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_String_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Template_Parameter_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Tuple_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Tuple_Literal_Part
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Tuple_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Type_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Type_Exps.OCL_Type_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Unlimited_Natural_Literal_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Unspecified_Value_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Variable
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Variables.OCL_Variable_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Variable_Exp
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Visit_Void_Type
(Self : in out OCL_Iterator;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Element : not null AMF.OCL.Void_Types.OCL_Void_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
end AMF.Visitors.OCL_Iterators;
|
AdaCore/Ada_Drivers_Library | Ada | 81,180 | ads | -- This spec has been automatically generated from STM32F7x9.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.TIM is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_CMS_Field is HAL.UInt2;
subtype CR1_CKD_Field is HAL.UInt2;
-- control register 1
type CR1_Register is record
-- Counter enable
CEN : Boolean := False;
-- Update disable
UDIS : Boolean := False;
-- Update request source
URS : Boolean := False;
-- One-pulse mode
OPM : Boolean := False;
-- Direction
DIR : Boolean := False;
-- Center-aligned mode selection
CMS : CR1_CMS_Field := 16#0#;
-- Auto-reload preload enable
ARPE : Boolean := False;
-- Clock division
CKD : CR1_CKD_Field := 16#0#;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
CEN at 0 range 0 .. 0;
UDIS at 0 range 1 .. 1;
URS at 0 range 2 .. 2;
OPM at 0 range 3 .. 3;
DIR at 0 range 4 .. 4;
CMS at 0 range 5 .. 6;
ARPE at 0 range 7 .. 7;
CKD at 0 range 8 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype CR2_MMS_Field is HAL.UInt3;
-- control register 2
type CR2_Register is record
-- Capture/compare preloaded control
CCPC : Boolean := False;
-- unspecified
Reserved_1_1 : HAL.Bit := 16#0#;
-- Capture/compare control update selection
CCUS : Boolean := False;
-- Capture/compare DMA selection
CCDS : Boolean := False;
-- Master mode selection
MMS : CR2_MMS_Field := 16#0#;
-- TI1 selection
TI1S : Boolean := False;
-- Output Idle state 1
OIS1 : Boolean := False;
-- Output Idle state 1
OIS1N : Boolean := False;
-- Output Idle state 2
OIS2 : Boolean := False;
-- Output Idle state 2
OIS2N : Boolean := False;
-- Output Idle state 3
OIS3 : Boolean := False;
-- Output Idle state 3
OIS3N : Boolean := False;
-- Output Idle state 4
OIS4 : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
CCPC at 0 range 0 .. 0;
Reserved_1_1 at 0 range 1 .. 1;
CCUS at 0 range 2 .. 2;
CCDS at 0 range 3 .. 3;
MMS at 0 range 4 .. 6;
TI1S at 0 range 7 .. 7;
OIS1 at 0 range 8 .. 8;
OIS1N at 0 range 9 .. 9;
OIS2 at 0 range 10 .. 10;
OIS2N at 0 range 11 .. 11;
OIS3 at 0 range 12 .. 12;
OIS3N at 0 range 13 .. 13;
OIS4 at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype SMCR_SMS_Field is HAL.UInt3;
subtype SMCR_TS_Field is HAL.UInt3;
subtype SMCR_ETF_Field is HAL.UInt4;
subtype SMCR_ETPS_Field is HAL.UInt2;
-- slave mode control register
type SMCR_Register is record
-- Slave mode selection - bit[2:0]
SMS : SMCR_SMS_Field := 16#0#;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- Trigger selection
TS : SMCR_TS_Field := 16#0#;
-- Master/Slave mode
MSM : Boolean := False;
-- External trigger filter
ETF : SMCR_ETF_Field := 16#0#;
-- External trigger prescaler
ETPS : SMCR_ETPS_Field := 16#0#;
-- External clock enable
ECE : Boolean := False;
-- External trigger polarity
ETP : Boolean := False;
-- Slave model selection - bit[3]
SMS_3 : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SMCR_Register use record
SMS at 0 range 0 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
TS at 0 range 4 .. 6;
MSM at 0 range 7 .. 7;
ETF at 0 range 8 .. 11;
ETPS at 0 range 12 .. 13;
ECE at 0 range 14 .. 14;
ETP at 0 range 15 .. 15;
SMS_3 at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- DMA/Interrupt enable register
type DIER_Register is record
-- Update interrupt enable
UIE : Boolean := False;
-- Capture/Compare 1 interrupt enable
CC1IE : Boolean := False;
-- Capture/Compare 2 interrupt enable
CC2IE : Boolean := False;
-- Capture/Compare 3 interrupt enable
CC3IE : Boolean := False;
-- Capture/Compare 4 interrupt enable
CC4IE : Boolean := False;
-- COM interrupt enable
COMIE : Boolean := False;
-- Trigger interrupt enable
TIE : Boolean := False;
-- Break interrupt enable
BIE : Boolean := False;
-- Update DMA request enable
UDE : Boolean := False;
-- Capture/Compare 1 DMA request enable
CC1DE : Boolean := False;
-- Capture/Compare 2 DMA request enable
CC2DE : Boolean := False;
-- Capture/Compare 3 DMA request enable
CC3DE : Boolean := False;
-- Capture/Compare 4 DMA request enable
CC4DE : Boolean := False;
-- COM DMA request enable
COMDE : Boolean := False;
-- Trigger DMA request enable
TDE : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register use record
UIE at 0 range 0 .. 0;
CC1IE at 0 range 1 .. 1;
CC2IE at 0 range 2 .. 2;
CC3IE at 0 range 3 .. 3;
CC4IE at 0 range 4 .. 4;
COMIE at 0 range 5 .. 5;
TIE at 0 range 6 .. 6;
BIE at 0 range 7 .. 7;
UDE at 0 range 8 .. 8;
CC1DE at 0 range 9 .. 9;
CC2DE at 0 range 10 .. 10;
CC3DE at 0 range 11 .. 11;
CC4DE at 0 range 12 .. 12;
COMDE at 0 range 13 .. 13;
TDE at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- status register
type SR_Register is record
-- Update interrupt flag
UIF : Boolean := False;
-- Capture/compare 1 interrupt flag
CC1IF : Boolean := False;
-- Capture/Compare 2 interrupt flag
CC2IF : Boolean := False;
-- Capture/Compare 3 interrupt flag
CC3IF : Boolean := False;
-- Capture/Compare 4 interrupt flag
CC4IF : Boolean := False;
-- COM interrupt flag
COMIF : Boolean := False;
-- Trigger interrupt flag
TIF : Boolean := False;
-- Break interrupt flag
BIF : Boolean := False;
-- unspecified
Reserved_8_8 : HAL.Bit := 16#0#;
-- Capture/Compare 1 overcapture flag
CC1OF : Boolean := False;
-- Capture/compare 2 overcapture flag
CC2OF : Boolean := False;
-- Capture/Compare 3 overcapture flag
CC3OF : Boolean := False;
-- Capture/Compare 4 overcapture flag
CC4OF : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
UIF at 0 range 0 .. 0;
CC1IF at 0 range 1 .. 1;
CC2IF at 0 range 2 .. 2;
CC3IF at 0 range 3 .. 3;
CC4IF at 0 range 4 .. 4;
COMIF at 0 range 5 .. 5;
TIF at 0 range 6 .. 6;
BIF at 0 range 7 .. 7;
Reserved_8_8 at 0 range 8 .. 8;
CC1OF at 0 range 9 .. 9;
CC2OF at 0 range 10 .. 10;
CC3OF at 0 range 11 .. 11;
CC4OF at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- event generation register
type EGR_Register is record
-- Write-only. Update generation
UG : Boolean := False;
-- Write-only. Capture/compare 1 generation
CC1G : Boolean := False;
-- Write-only. Capture/compare 2 generation
CC2G : Boolean := False;
-- Write-only. Capture/compare 3 generation
CC3G : Boolean := False;
-- Write-only. Capture/compare 4 generation
CC4G : Boolean := False;
-- Write-only. Capture/Compare control update generation
COMG : Boolean := False;
-- Write-only. Trigger generation
TG : Boolean := False;
-- Write-only. Break generation
BG : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register use record
UG at 0 range 0 .. 0;
CC1G at 0 range 1 .. 1;
CC2G at 0 range 2 .. 2;
CC3G at 0 range 3 .. 3;
CC4G at 0 range 4 .. 4;
COMG at 0 range 5 .. 5;
TG at 0 range 6 .. 6;
BG at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CCMR1_Output_CC1S_Field is HAL.UInt2;
subtype CCMR1_Output_OC1M_Field is HAL.UInt3;
subtype CCMR1_Output_CC2S_Field is HAL.UInt2;
subtype CCMR1_Output_OC2M_Field is HAL.UInt3;
-- capture/compare mode register 1 (output mode)
type CCMR1_Output_Register is record
-- Capture/Compare 1 selection
CC1S : CCMR1_Output_CC1S_Field := 16#0#;
-- Output Compare 1 fast enable
OC1FE : Boolean := False;
-- Output Compare 1 preload enable
OC1PE : Boolean := False;
-- Output Compare 1 mode
OC1M : CCMR1_Output_OC1M_Field := 16#0#;
-- Output Compare 1 clear enable
OC1CE : Boolean := False;
-- Capture/Compare 2 selection
CC2S : CCMR1_Output_CC2S_Field := 16#0#;
-- Output Compare 2 fast enable
OC2FE : Boolean := False;
-- Output Compare 2 preload enable
OC2PE : Boolean := False;
-- Output Compare 2 mode
OC2M : CCMR1_Output_OC2M_Field := 16#0#;
-- Output Compare 2 clear enable
OC2CE : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Output_Register use record
CC1S at 0 range 0 .. 1;
OC1FE at 0 range 2 .. 2;
OC1PE at 0 range 3 .. 3;
OC1M at 0 range 4 .. 6;
OC1CE at 0 range 7 .. 7;
CC2S at 0 range 8 .. 9;
OC2FE at 0 range 10 .. 10;
OC2PE at 0 range 11 .. 11;
OC2M at 0 range 12 .. 14;
OC2CE at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCMR1_Input_CC1S_Field is HAL.UInt2;
subtype CCMR1_Input_ICPCS_Field is HAL.UInt2;
subtype CCMR1_Input_IC1F_Field is HAL.UInt4;
subtype CCMR1_Input_CC2S_Field is HAL.UInt2;
subtype CCMR1_Input_IC2PCS_Field is HAL.UInt2;
subtype CCMR1_Input_IC2F_Field is HAL.UInt4;
-- capture/compare mode register 1 (input mode)
type CCMR1_Input_Register is record
-- Capture/Compare 1 selection
CC1S : CCMR1_Input_CC1S_Field := 16#0#;
-- Input capture 1 prescaler
ICPCS : CCMR1_Input_ICPCS_Field := 16#0#;
-- Input capture 1 filter
IC1F : CCMR1_Input_IC1F_Field := 16#0#;
-- Capture/Compare 2 selection
CC2S : CCMR1_Input_CC2S_Field := 16#0#;
-- Input capture 2 prescaler
IC2PCS : CCMR1_Input_IC2PCS_Field := 16#0#;
-- Input capture 2 filter
IC2F : CCMR1_Input_IC2F_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Input_Register use record
CC1S at 0 range 0 .. 1;
ICPCS at 0 range 2 .. 3;
IC1F at 0 range 4 .. 7;
CC2S at 0 range 8 .. 9;
IC2PCS at 0 range 10 .. 11;
IC2F at 0 range 12 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCMR2_Output_CC3S_Field is HAL.UInt2;
subtype CCMR2_Output_OC3M_Field is HAL.UInt3;
subtype CCMR2_Output_CC4S_Field is HAL.UInt2;
subtype CCMR2_Output_OC4M_Field is HAL.UInt3;
-- capture/compare mode register 2 (output mode)
type CCMR2_Output_Register is record
-- Capture/Compare 3 selection
CC3S : CCMR2_Output_CC3S_Field := 16#0#;
-- Output compare 3 fast enable
OC3FE : Boolean := False;
-- Output compare 3 preload enable
OC3PE : Boolean := False;
-- Output compare 3 mode
OC3M : CCMR2_Output_OC3M_Field := 16#0#;
-- Output compare 3 clear enable
OC3CE : Boolean := False;
-- Capture/Compare 4 selection
CC4S : CCMR2_Output_CC4S_Field := 16#0#;
-- Output compare 4 fast enable
OC4FE : Boolean := False;
-- Output compare 4 preload enable
OC4PE : Boolean := False;
-- Output compare 4 mode
OC4M : CCMR2_Output_OC4M_Field := 16#0#;
-- Output compare 4 clear enable
OC4CE : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Output_Register use record
CC3S at 0 range 0 .. 1;
OC3FE at 0 range 2 .. 2;
OC3PE at 0 range 3 .. 3;
OC3M at 0 range 4 .. 6;
OC3CE at 0 range 7 .. 7;
CC4S at 0 range 8 .. 9;
OC4FE at 0 range 10 .. 10;
OC4PE at 0 range 11 .. 11;
OC4M at 0 range 12 .. 14;
OC4CE at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCMR2_Input_CC3S_Field is HAL.UInt2;
subtype CCMR2_Input_IC3PSC_Field is HAL.UInt2;
subtype CCMR2_Input_IC3F_Field is HAL.UInt4;
subtype CCMR2_Input_CC4S_Field is HAL.UInt2;
subtype CCMR2_Input_IC4PSC_Field is HAL.UInt2;
subtype CCMR2_Input_IC4F_Field is HAL.UInt4;
-- capture/compare mode register 2 (input mode)
type CCMR2_Input_Register is record
-- Capture/compare 3 selection
CC3S : CCMR2_Input_CC3S_Field := 16#0#;
-- Input capture 3 prescaler
IC3PSC : CCMR2_Input_IC3PSC_Field := 16#0#;
-- Input capture 3 filter
IC3F : CCMR2_Input_IC3F_Field := 16#0#;
-- Capture/Compare 4 selection
CC4S : CCMR2_Input_CC4S_Field := 16#0#;
-- Input capture 4 prescaler
IC4PSC : CCMR2_Input_IC4PSC_Field := 16#0#;
-- Input capture 4 filter
IC4F : CCMR2_Input_IC4F_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Input_Register use record
CC3S at 0 range 0 .. 1;
IC3PSC at 0 range 2 .. 3;
IC3F at 0 range 4 .. 7;
CC4S at 0 range 8 .. 9;
IC4PSC at 0 range 10 .. 11;
IC4F at 0 range 12 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- capture/compare enable register
type CCER_Register is record
-- Capture/Compare 1 output enable
CC1E : Boolean := False;
-- Capture/Compare 1 output Polarity
CC1P : Boolean := False;
-- Capture/Compare 1 complementary output enable
CC1NE : Boolean := False;
-- Capture/Compare 1 output Polarity
CC1NP : Boolean := False;
-- Capture/Compare 2 output enable
CC2E : Boolean := False;
-- Capture/Compare 2 output Polarity
CC2P : Boolean := False;
-- Capture/Compare 2 complementary output enable
CC2NE : Boolean := False;
-- Capture/Compare 2 output Polarity
CC2NP : Boolean := False;
-- Capture/Compare 3 output enable
CC3E : Boolean := False;
-- Capture/Compare 3 output Polarity
CC3P : Boolean := False;
-- Capture/Compare 3 complementary output enable
CC3NE : Boolean := False;
-- Capture/Compare 3 output Polarity
CC3NP : Boolean := False;
-- Capture/Compare 4 output enable
CC4E : Boolean := False;
-- Capture/Compare 3 output Polarity
CC4P : Boolean := False;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCER_Register use record
CC1E at 0 range 0 .. 0;
CC1P at 0 range 1 .. 1;
CC1NE at 0 range 2 .. 2;
CC1NP at 0 range 3 .. 3;
CC2E at 0 range 4 .. 4;
CC2P at 0 range 5 .. 5;
CC2NE at 0 range 6 .. 6;
CC2NP at 0 range 7 .. 7;
CC3E at 0 range 8 .. 8;
CC3P at 0 range 9 .. 9;
CC3NE at 0 range 10 .. 10;
CC3NP at 0 range 11 .. 11;
CC4E at 0 range 12 .. 12;
CC4P at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype CNT_CNT_Field is HAL.UInt16;
-- counter
type CNT_Register is record
-- counter value
CNT : CNT_CNT_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CNT_Register use record
CNT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PSC_PSC_Field is HAL.UInt16;
-- prescaler
type PSC_Register is record
-- Prescaler value
PSC : PSC_PSC_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PSC_Register use record
PSC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype ARR_ARR_Field is HAL.UInt16;
-- auto-reload register
type ARR_Register is record
-- Auto-reload value
ARR : ARR_ARR_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ARR_Register use record
ARR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype RCR_REP_Field is HAL.UInt8;
-- repetition counter register
type RCR_Register is record
-- Repetition counter value
REP : RCR_REP_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RCR_Register use record
REP at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CCR1_CCR1_Field is HAL.UInt16;
-- capture/compare register 1
type CCR1_Register is record
-- Capture/Compare 1 value
CCR1 : CCR1_CCR1_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR1_Register use record
CCR1 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCR2_CCR2_Field is HAL.UInt16;
-- capture/compare register 2
type CCR2_Register is record
-- Capture/Compare 2 value
CCR2 : CCR2_CCR2_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR2_Register use record
CCR2 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCR3_CCR3_Field is HAL.UInt16;
-- capture/compare register 3
type CCR3_Register is record
-- Capture/Compare value
CCR3 : CCR3_CCR3_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR3_Register use record
CCR3 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCR4_CCR4_Field is HAL.UInt16;
-- capture/compare register 4
type CCR4_Register is record
-- Capture/Compare value
CCR4 : CCR4_CCR4_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR4_Register use record
CCR4 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype BDTR_DTG_Field is HAL.UInt8;
subtype BDTR_LOCK_Field is HAL.UInt2;
-- break and dead-time register
type BDTR_Register is record
-- Dead-time generator setup
DTG : BDTR_DTG_Field := 16#0#;
-- Lock configuration
LOCK : BDTR_LOCK_Field := 16#0#;
-- Off-state selection for Idle mode
OSSI : Boolean := False;
-- Off-state selection for Run mode
OSSR : Boolean := False;
-- Break enable
BKE : Boolean := False;
-- Break polarity
BKP : Boolean := False;
-- Automatic output enable
AOE : Boolean := False;
-- Main output enable
MOE : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BDTR_Register use record
DTG at 0 range 0 .. 7;
LOCK at 0 range 8 .. 9;
OSSI at 0 range 10 .. 10;
OSSR at 0 range 11 .. 11;
BKE at 0 range 12 .. 12;
BKP at 0 range 13 .. 13;
AOE at 0 range 14 .. 14;
MOE at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype DCR_DBA_Field is HAL.UInt5;
subtype DCR_DBL_Field is HAL.UInt5;
-- DMA control register
type DCR_Register is record
-- DMA base address
DBA : DCR_DBA_Field := 16#0#;
-- unspecified
Reserved_5_7 : HAL.UInt3 := 16#0#;
-- DMA burst length
DBL : DCR_DBL_Field := 16#0#;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DCR_Register use record
DBA at 0 range 0 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
DBL at 0 range 8 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype DMAR_DMAB_Field is HAL.UInt16;
-- DMA address for full transfer
type DMAR_Register is record
-- DMA register for burst accesses
DMAB : DMAR_DMAB_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMAR_Register use record
DMAB at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CCMR3_Output_OC5M_Field is HAL.UInt3;
subtype CCMR3_Output_OC6M_Field is HAL.UInt3;
-- capture/compare mode register 3 (output mode)
type CCMR3_Output_Register is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- Output compare 5 fast enable
OC5FE : Boolean := False;
-- Output compare 5 preload enable
OC5PE : Boolean := False;
-- Output compare 5 mode
OC5M : CCMR3_Output_OC5M_Field := 16#0#;
-- Output compare 5 clear enable
OC5CE : Boolean := False;
-- unspecified
Reserved_8_9 : HAL.UInt2 := 16#0#;
-- Output compare 6 fast enable
OC6FE : Boolean := False;
-- Output compare 6 preload enable
OC6PE : Boolean := False;
-- Output compare 6 mode
OC6M : CCMR3_Output_OC6M_Field := 16#0#;
-- Output compare 6 clear enable
OC6CE : Boolean := False;
-- Output Compare 5 mode
OC5M3 : Boolean := False;
-- unspecified
Reserved_17_23 : HAL.UInt7 := 16#0#;
-- Output Compare 6 mode
OC6M3 : Boolean := False;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR3_Output_Register use record
Reserved_0_1 at 0 range 0 .. 1;
OC5FE at 0 range 2 .. 2;
OC5PE at 0 range 3 .. 3;
OC5M at 0 range 4 .. 6;
OC5CE at 0 range 7 .. 7;
Reserved_8_9 at 0 range 8 .. 9;
OC6FE at 0 range 10 .. 10;
OC6PE at 0 range 11 .. 11;
OC6M at 0 range 12 .. 14;
OC6CE at 0 range 15 .. 15;
OC5M3 at 0 range 16 .. 16;
Reserved_17_23 at 0 range 17 .. 23;
OC6M3 at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype CCR5_CCR5_Field is HAL.UInt16;
-- CCR5_GC5C array
type CCR5_GC5C_Field_Array is array (1 .. 3) of Boolean
with Component_Size => 1, Size => 3;
-- Type definition for CCR5_GC5C
type CCR5_GC5C_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- GC5C as a value
Val : HAL.UInt3;
when True =>
-- GC5C as an array
Arr : CCR5_GC5C_Field_Array;
end case;
end record
with Unchecked_Union, Size => 3;
for CCR5_GC5C_Field use record
Val at 0 range 0 .. 2;
Arr at 0 range 0 .. 2;
end record;
-- capture/compare register 5
type CCR5_Register is record
-- Capture/Compare 5 value
CCR5 : CCR5_CCR5_Field := 16#0#;
-- unspecified
Reserved_16_28 : HAL.UInt13 := 16#0#;
-- Group Channel 5 and Channel 1
GC5C : CCR5_GC5C_Field := (As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR5_Register use record
CCR5 at 0 range 0 .. 15;
Reserved_16_28 at 0 range 16 .. 28;
GC5C at 0 range 29 .. 31;
end record;
subtype CRR6_CCR6_Field is HAL.UInt16;
-- capture/compare register 6
type CRR6_Register is record
-- Capture/Compare 6 value
CCR6 : CRR6_CCR6_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CRR6_Register use record
CCR6 at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- control register 2
type CR2_Register_1 is record
-- unspecified
Reserved_0_2 : HAL.UInt3 := 16#0#;
-- Capture/compare DMA selection
CCDS : Boolean := False;
-- Master mode selection
MMS : CR2_MMS_Field := 16#0#;
-- TI1 selection
TI1S : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register_1 use record
Reserved_0_2 at 0 range 0 .. 2;
CCDS at 0 range 3 .. 3;
MMS at 0 range 4 .. 6;
TI1S at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- DMA/Interrupt enable register
type DIER_Register_1 is record
-- Update interrupt enable
UIE : Boolean := False;
-- Capture/Compare 1 interrupt enable
CC1IE : Boolean := False;
-- Capture/Compare 2 interrupt enable
CC2IE : Boolean := False;
-- Capture/Compare 3 interrupt enable
CC3IE : Boolean := False;
-- Capture/Compare 4 interrupt enable
CC4IE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Trigger interrupt enable
TIE : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Update DMA request enable
UDE : Boolean := False;
-- Capture/Compare 1 DMA request enable
CC1DE : Boolean := False;
-- Capture/Compare 2 DMA request enable
CC2DE : Boolean := False;
-- Capture/Compare 3 DMA request enable
CC3DE : Boolean := False;
-- Capture/Compare 4 DMA request enable
CC4DE : Boolean := False;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- Trigger DMA request enable
TDE : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register_1 use record
UIE at 0 range 0 .. 0;
CC1IE at 0 range 1 .. 1;
CC2IE at 0 range 2 .. 2;
CC3IE at 0 range 3 .. 3;
CC4IE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TIE at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
UDE at 0 range 8 .. 8;
CC1DE at 0 range 9 .. 9;
CC2DE at 0 range 10 .. 10;
CC3DE at 0 range 11 .. 11;
CC4DE at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
TDE at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- status register
type SR_Register_1 is record
-- Update interrupt flag
UIF : Boolean := False;
-- Capture/compare 1 interrupt flag
CC1IF : Boolean := False;
-- Capture/Compare 2 interrupt flag
CC2IF : Boolean := False;
-- Capture/Compare 3 interrupt flag
CC3IF : Boolean := False;
-- Capture/Compare 4 interrupt flag
CC4IF : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Trigger interrupt flag
TIF : Boolean := False;
-- unspecified
Reserved_7_8 : HAL.UInt2 := 16#0#;
-- Capture/Compare 1 overcapture flag
CC1OF : Boolean := False;
-- Capture/compare 2 overcapture flag
CC2OF : Boolean := False;
-- Capture/Compare 3 overcapture flag
CC3OF : Boolean := False;
-- Capture/Compare 4 overcapture flag
CC4OF : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register_1 use record
UIF at 0 range 0 .. 0;
CC1IF at 0 range 1 .. 1;
CC2IF at 0 range 2 .. 2;
CC3IF at 0 range 3 .. 3;
CC4IF at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TIF at 0 range 6 .. 6;
Reserved_7_8 at 0 range 7 .. 8;
CC1OF at 0 range 9 .. 9;
CC2OF at 0 range 10 .. 10;
CC3OF at 0 range 11 .. 11;
CC4OF at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- event generation register
type EGR_Register_1 is record
-- Write-only. Update generation
UG : Boolean := False;
-- Write-only. Capture/compare 1 generation
CC1G : Boolean := False;
-- Write-only. Capture/compare 2 generation
CC2G : Boolean := False;
-- Write-only. Capture/compare 3 generation
CC3G : Boolean := False;
-- Write-only. Capture/compare 4 generation
CC4G : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Write-only. Trigger generation
TG : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register_1 use record
UG at 0 range 0 .. 0;
CC1G at 0 range 1 .. 1;
CC2G at 0 range 2 .. 2;
CC3G at 0 range 3 .. 3;
CC4G at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
TG at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- capture/compare mode register 2 (output mode)
type CCMR2_Output_Register_1 is record
-- CC3S
CC3S : CCMR2_Output_CC3S_Field := 16#0#;
-- OC3FE
OC3FE : Boolean := False;
-- OC3PE
OC3PE : Boolean := False;
-- OC3M
OC3M : CCMR2_Output_OC3M_Field := 16#0#;
-- OC3CE
OC3CE : Boolean := False;
-- CC4S
CC4S : CCMR2_Output_CC4S_Field := 16#0#;
-- OC4FE
OC4FE : Boolean := False;
-- OC4PE
OC4PE : Boolean := False;
-- OC4M
OC4M : CCMR2_Output_OC4M_Field := 16#0#;
-- O24CE
O24CE : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR2_Output_Register_1 use record
CC3S at 0 range 0 .. 1;
OC3FE at 0 range 2 .. 2;
OC3PE at 0 range 3 .. 3;
OC3M at 0 range 4 .. 6;
OC3CE at 0 range 7 .. 7;
CC4S at 0 range 8 .. 9;
OC4FE at 0 range 10 .. 10;
OC4PE at 0 range 11 .. 11;
OC4M at 0 range 12 .. 14;
O24CE at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- capture/compare enable register
type CCER_Register_1 is record
-- Capture/Compare 1 output enable
CC1E : Boolean := False;
-- Capture/Compare 1 output Polarity
CC1P : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Capture/Compare 1 output Polarity
CC1NP : Boolean := False;
-- Capture/Compare 2 output enable
CC2E : Boolean := False;
-- Capture/Compare 2 output Polarity
CC2P : Boolean := False;
-- unspecified
Reserved_6_6 : HAL.Bit := 16#0#;
-- Capture/Compare 2 output Polarity
CC2NP : Boolean := False;
-- Capture/Compare 3 output enable
CC3E : Boolean := False;
-- Capture/Compare 3 output Polarity
CC3P : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- Capture/Compare 3 output Polarity
CC3NP : Boolean := False;
-- Capture/Compare 4 output enable
CC4E : Boolean := False;
-- Capture/Compare 3 output Polarity
CC4P : Boolean := False;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
-- Capture/Compare 4 output Polarity
CC4NP : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCER_Register_1 use record
CC1E at 0 range 0 .. 0;
CC1P at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
CC1NP at 0 range 3 .. 3;
CC2E at 0 range 4 .. 4;
CC2P at 0 range 5 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
CC2NP at 0 range 7 .. 7;
CC3E at 0 range 8 .. 8;
CC3P at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
CC3NP at 0 range 11 .. 11;
CC4E at 0 range 12 .. 12;
CC4P at 0 range 13 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
CC4NP at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CNT_CNT_L_Field is HAL.UInt16;
subtype CNT_CNT_H_Field is HAL.UInt16;
-- counter
type CNT_Register_1 is record
-- Low counter value
CNT_L : CNT_CNT_L_Field := 16#0#;
-- High counter value
CNT_H : CNT_CNT_H_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CNT_Register_1 use record
CNT_L at 0 range 0 .. 15;
CNT_H at 0 range 16 .. 31;
end record;
subtype ARR_ARR_L_Field is HAL.UInt16;
subtype ARR_ARR_H_Field is HAL.UInt16;
-- auto-reload register
type ARR_Register_1 is record
-- Low Auto-reload value
ARR_L : ARR_ARR_L_Field := 16#0#;
-- High Auto-reload value
ARR_H : ARR_ARR_H_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ARR_Register_1 use record
ARR_L at 0 range 0 .. 15;
ARR_H at 0 range 16 .. 31;
end record;
subtype CCR1_CCR1_L_Field is HAL.UInt16;
subtype CCR1_CCR1_H_Field is HAL.UInt16;
-- capture/compare register 1
type CCR1_Register_1 is record
-- Low Capture/Compare 1 value
CCR1_L : CCR1_CCR1_L_Field := 16#0#;
-- High Capture/Compare 1 value
CCR1_H : CCR1_CCR1_H_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR1_Register_1 use record
CCR1_L at 0 range 0 .. 15;
CCR1_H at 0 range 16 .. 31;
end record;
subtype CCR2_CCR2_L_Field is HAL.UInt16;
subtype CCR2_CCR2_H_Field is HAL.UInt16;
-- capture/compare register 2
type CCR2_Register_1 is record
-- Low Capture/Compare 2 value
CCR2_L : CCR2_CCR2_L_Field := 16#0#;
-- High Capture/Compare 2 value
CCR2_H : CCR2_CCR2_H_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR2_Register_1 use record
CCR2_L at 0 range 0 .. 15;
CCR2_H at 0 range 16 .. 31;
end record;
subtype CCR3_CCR3_L_Field is HAL.UInt16;
subtype CCR3_CCR3_H_Field is HAL.UInt16;
-- capture/compare register 3
type CCR3_Register_1 is record
-- Low Capture/Compare value
CCR3_L : CCR3_CCR3_L_Field := 16#0#;
-- High Capture/Compare value
CCR3_H : CCR3_CCR3_H_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR3_Register_1 use record
CCR3_L at 0 range 0 .. 15;
CCR3_H at 0 range 16 .. 31;
end record;
subtype CCR4_CCR4_L_Field is HAL.UInt16;
subtype CCR4_CCR4_H_Field is HAL.UInt16;
-- capture/compare register 4
type CCR4_Register_1 is record
-- Low Capture/Compare value
CCR4_L : CCR4_CCR4_L_Field := 16#0#;
-- High Capture/Compare value
CCR4_H : CCR4_CCR4_H_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCR4_Register_1 use record
CCR4_L at 0 range 0 .. 15;
CCR4_H at 0 range 16 .. 31;
end record;
subtype OR1_TI4_RMP_Field is HAL.UInt2;
-- TIM2 option register 1
type OR1_Register is record
-- Internal trigger 1 remap
ITR1_RMP : Boolean := False;
-- External trigger remap
ETR1_RMP : Boolean := False;
-- Input Capture 4 remap
TI4_RMP : OR1_TI4_RMP_Field := 16#0#;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OR1_Register use record
ITR1_RMP at 0 range 0 .. 0;
ETR1_RMP at 0 range 1 .. 1;
TI4_RMP at 0 range 2 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
subtype OR2_ETRSEL_Field is HAL.UInt3;
-- TIM2 option register 2
type OR2_Register is record
-- unspecified
Reserved_0_13 : HAL.UInt14 := 16#0#;
-- ETR source selection
ETRSEL : OR2_ETRSEL_Field := 16#0#;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OR2_Register use record
Reserved_0_13 at 0 range 0 .. 13;
ETRSEL at 0 range 14 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
subtype OR_TI1_RMP_Field is HAL.UInt2;
-- TIM3 option register 1
type OR_Register is record
-- Input Capture 1 remap
TI1_RMP : OR_TI1_RMP_Field := 16#0#;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OR_Register use record
TI1_RMP at 0 range 0 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- control register 1
type CR1_Register_1 is record
-- Counter enable
CEN : Boolean := False;
-- Update disable
UDIS : Boolean := False;
-- Update request source
URS : Boolean := False;
-- One-pulse mode
OPM : Boolean := False;
-- unspecified
Reserved_4_6 : HAL.UInt3 := 16#0#;
-- Auto-reload preload enable
ARPE : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register_1 use record
CEN at 0 range 0 .. 0;
UDIS at 0 range 1 .. 1;
URS at 0 range 2 .. 2;
OPM at 0 range 3 .. 3;
Reserved_4_6 at 0 range 4 .. 6;
ARPE at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- control register 2
type CR2_Register_2 is record
-- unspecified
Reserved_0_3 : HAL.UInt4 := 16#0#;
-- Master mode selection
MMS : CR2_MMS_Field := 16#0#;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register_2 use record
Reserved_0_3 at 0 range 0 .. 3;
MMS at 0 range 4 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- DMA/Interrupt enable register
type DIER_Register_2 is record
-- Update interrupt enable
UIE : Boolean := False;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
-- Update DMA request enable
UDE : Boolean := False;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register_2 use record
UIE at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
UDE at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-- status register
type SR_Register_2 is record
-- Update interrupt flag
UIF : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register_2 use record
UIF at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- event generation register
type EGR_Register_2 is record
-- Write-only. Update generation
UG : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register_2 use record
UG at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- control register 1
type CR1_Register_2 is record
-- Counter enable
CEN : Boolean := False;
-- Update disable
UDIS : Boolean := False;
-- Update request source
URS : Boolean := False;
-- One-pulse mode
OPM : Boolean := False;
-- unspecified
Reserved_4_6 : HAL.UInt3 := 16#0#;
-- Auto-reload preload enable
ARPE : Boolean := False;
-- Clock division
CKD : CR1_CKD_Field := 16#0#;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register_2 use record
CEN at 0 range 0 .. 0;
UDIS at 0 range 1 .. 1;
URS at 0 range 2 .. 2;
OPM at 0 range 3 .. 3;
Reserved_4_6 at 0 range 4 .. 6;
ARPE at 0 range 7 .. 7;
CKD at 0 range 8 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- slave mode control register
type SMCR_Register_1 is record
-- Slave mode selection
SMS : SMCR_SMS_Field := 16#0#;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- Trigger selection
TS : SMCR_TS_Field := 16#0#;
-- Master/Slave mode
MSM : Boolean := False;
-- unspecified
Reserved_8_15 : HAL.UInt8 := 16#0#;
-- Slave mode selection
SMS_3 : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SMCR_Register_1 use record
SMS at 0 range 0 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
TS at 0 range 4 .. 6;
MSM at 0 range 7 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
SMS_3 at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
-- DMA/Interrupt enable register
type DIER_Register_3 is record
-- Update interrupt enable
UIE : Boolean := False;
-- Capture/Compare 1 interrupt enable
CC1IE : Boolean := False;
-- Capture/Compare 2 interrupt enable
CC2IE : Boolean := False;
-- unspecified
Reserved_3_5 : HAL.UInt3 := 16#0#;
-- Trigger interrupt enable
TIE : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register_3 use record
UIE at 0 range 0 .. 0;
CC1IE at 0 range 1 .. 1;
CC2IE at 0 range 2 .. 2;
Reserved_3_5 at 0 range 3 .. 5;
TIE at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- status register
type SR_Register_3 is record
-- Update interrupt flag
UIF : Boolean := False;
-- Capture/compare 1 interrupt flag
CC1IF : Boolean := False;
-- Capture/Compare 2 interrupt flag
CC2IF : Boolean := False;
-- unspecified
Reserved_3_5 : HAL.UInt3 := 16#0#;
-- Trigger interrupt flag
TIF : Boolean := False;
-- unspecified
Reserved_7_8 : HAL.UInt2 := 16#0#;
-- Capture/Compare 1 overcapture flag
CC1OF : Boolean := False;
-- Capture/compare 2 overcapture flag
CC2OF : Boolean := False;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register_3 use record
UIF at 0 range 0 .. 0;
CC1IF at 0 range 1 .. 1;
CC2IF at 0 range 2 .. 2;
Reserved_3_5 at 0 range 3 .. 5;
TIF at 0 range 6 .. 6;
Reserved_7_8 at 0 range 7 .. 8;
CC1OF at 0 range 9 .. 9;
CC2OF at 0 range 10 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- event generation register
type EGR_Register_3 is record
-- Write-only. Update generation
UG : Boolean := False;
-- Write-only. Capture/compare 1 generation
CC1G : Boolean := False;
-- Write-only. Capture/compare 2 generation
CC2G : Boolean := False;
-- unspecified
Reserved_3_5 : HAL.UInt3 := 16#0#;
-- Write-only. Trigger generation
TG : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register_3 use record
UG at 0 range 0 .. 0;
CC1G at 0 range 1 .. 1;
CC2G at 0 range 2 .. 2;
Reserved_3_5 at 0 range 3 .. 5;
TG at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- capture/compare mode register 1 (output mode)
type CCMR1_Output_Register_1 is record
-- Capture/Compare 1 selection
CC1S : CCMR1_Output_CC1S_Field := 16#0#;
-- Output Compare 1 fast enable
OC1FE : Boolean := False;
-- Output Compare 1 preload enable
OC1PE : Boolean := False;
-- Output Compare 1 mode
OC1M : CCMR1_Output_OC1M_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Capture/Compare 2 selection
CC2S : CCMR1_Output_CC2S_Field := 16#0#;
-- Output Compare 2 fast enable
OC2FE : Boolean := False;
-- Output Compare 2 preload enable
OC2PE : Boolean := False;
-- Output Compare 2 mode
OC2M : CCMR1_Output_OC2M_Field := 16#0#;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Output_Register_1 use record
CC1S at 0 range 0 .. 1;
OC1FE at 0 range 2 .. 2;
OC1PE at 0 range 3 .. 3;
OC1M at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
CC2S at 0 range 8 .. 9;
OC2FE at 0 range 10 .. 10;
OC2PE at 0 range 11 .. 11;
OC2M at 0 range 12 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype CCMR1_Input_IC1F_Field_1 is HAL.UInt3;
subtype CCMR1_Input_IC2F_Field_1 is HAL.UInt3;
-- capture/compare mode register 1 (input mode)
type CCMR1_Input_Register_1 is record
-- Capture/Compare 1 selection
CC1S : CCMR1_Input_CC1S_Field := 16#0#;
-- Input capture 1 prescaler
ICPCS : CCMR1_Input_ICPCS_Field := 16#0#;
-- Input capture 1 filter
IC1F : CCMR1_Input_IC1F_Field_1 := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Capture/Compare 2 selection
CC2S : CCMR1_Input_CC2S_Field := 16#0#;
-- Input capture 2 prescaler
IC2PCS : CCMR1_Input_IC2PCS_Field := 16#0#;
-- Input capture 2 filter
IC2F : CCMR1_Input_IC2F_Field_1 := 16#0#;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Input_Register_1 use record
CC1S at 0 range 0 .. 1;
ICPCS at 0 range 2 .. 3;
IC1F at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
CC2S at 0 range 8 .. 9;
IC2PCS at 0 range 10 .. 11;
IC2F at 0 range 12 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
-- capture/compare enable register
type CCER_Register_2 is record
-- Capture/Compare 1 output enable
CC1E : Boolean := False;
-- Capture/Compare 1 output Polarity
CC1P : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Capture/Compare 1 output Polarity
CC1NP : Boolean := False;
-- Capture/Compare 2 output enable
CC2E : Boolean := False;
-- Capture/Compare 2 output Polarity
CC2P : Boolean := False;
-- unspecified
Reserved_6_6 : HAL.Bit := 16#0#;
-- Capture/Compare 2 output Polarity
CC2NP : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCER_Register_2 use record
CC1E at 0 range 0 .. 0;
CC1P at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
CC1NP at 0 range 3 .. 3;
CC2E at 0 range 4 .. 4;
CC2P at 0 range 5 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
CC2NP at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- control register 1
type CR1_Register_3 is record
-- Counter enable
CEN : Boolean := False;
-- Update disable
UDIS : Boolean := False;
-- Update request source
URS : Boolean := False;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- Auto-reload preload enable
ARPE : Boolean := False;
-- Clock division
CKD : CR1_CKD_Field := 16#0#;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register_3 use record
CEN at 0 range 0 .. 0;
UDIS at 0 range 1 .. 1;
URS at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
ARPE at 0 range 7 .. 7;
CKD at 0 range 8 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- DMA/Interrupt enable register
type DIER_Register_4 is record
-- Update interrupt enable
UIE : Boolean := False;
-- Capture/Compare 1 interrupt enable
CC1IE : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DIER_Register_4 use record
UIE at 0 range 0 .. 0;
CC1IE at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- status register
type SR_Register_4 is record
-- Update interrupt flag
UIF : Boolean := False;
-- Capture/compare 1 interrupt flag
CC1IF : Boolean := False;
-- unspecified
Reserved_2_8 : HAL.UInt7 := 16#0#;
-- Capture/Compare 1 overcapture flag
CC1OF : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register_4 use record
UIF at 0 range 0 .. 0;
CC1IF at 0 range 1 .. 1;
Reserved_2_8 at 0 range 2 .. 8;
CC1OF at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- event generation register
type EGR_Register_4 is record
-- Write-only. Update generation
UG : Boolean := False;
-- Write-only. Capture/compare 1 generation
CC1G : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EGR_Register_4 use record
UG at 0 range 0 .. 0;
CC1G at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- capture/compare mode register 1 (output mode)
type CCMR1_Output_Register_2 is record
-- Capture/Compare 1 selection
CC1S : CCMR1_Output_CC1S_Field := 16#0#;
-- Output Compare 1 fast enable
OC1FE : Boolean := False;
-- Output Compare 1 preload enable
OC1PE : Boolean := False;
-- Output Compare 1 mode
OC1M : CCMR1_Output_OC1M_Field := 16#0#;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Output_Register_2 use record
CC1S at 0 range 0 .. 1;
OC1FE at 0 range 2 .. 2;
OC1PE at 0 range 3 .. 3;
OC1M at 0 range 4 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- capture/compare mode register 1 (input mode)
type CCMR1_Input_Register_2 is record
-- Capture/Compare 1 selection
CC1S : CCMR1_Input_CC1S_Field := 16#0#;
-- Input capture 1 prescaler
ICPCS : CCMR1_Input_ICPCS_Field := 16#0#;
-- Input capture 1 filter
IC1F : CCMR1_Input_IC1F_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCMR1_Input_Register_2 use record
CC1S at 0 range 0 .. 1;
ICPCS at 0 range 2 .. 3;
IC1F at 0 range 4 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- capture/compare enable register
type CCER_Register_3 is record
-- Capture/Compare 1 output enable
CC1E : Boolean := False;
-- Capture/Compare 1 output Polarity
CC1P : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Capture/Compare 1 output Polarity
CC1NP : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CCER_Register_3 use record
CC1E at 0 range 0 .. 0;
CC1P at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
CC1NP at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
type TIM1_Disc is
(
Output,
Input);
-- Advanced-timers
type TIM1_Peripheral
(Discriminent : TIM1_Disc := Output)
is record
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register;
-- slave mode control register
SMCR : aliased SMCR_Register;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register;
-- status register
SR : aliased SR_Register;
-- event generation register
EGR : aliased EGR_Register;
-- capture/compare enable register
CCER : aliased CCER_Register;
-- counter
CNT : aliased CNT_Register;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register;
-- repetition counter register
RCR : aliased RCR_Register;
-- capture/compare register 1
CCR1 : aliased CCR1_Register;
-- capture/compare register 2
CCR2 : aliased CCR2_Register;
-- capture/compare register 3
CCR3 : aliased CCR3_Register;
-- capture/compare register 4
CCR4 : aliased CCR4_Register;
-- break and dead-time register
BDTR : aliased BDTR_Register;
-- DMA control register
DCR : aliased DCR_Register;
-- DMA address for full transfer
DMAR : aliased DMAR_Register;
-- capture/compare mode register 3 (output mode)
CCMR3_Output : aliased CCMR3_Output_Register;
-- capture/compare register 5
CCR5 : aliased CCR5_Register;
-- capture/compare register 6
CRR6 : aliased CRR6_Register;
case Discriminent is
when Output =>
-- capture/compare mode register 1 (output mode)
CCMR1_Output : aliased CCMR1_Output_Register;
-- capture/compare mode register 2 (output mode)
CCMR2_Output : aliased CCMR2_Output_Register;
when Input =>
-- capture/compare mode register 1 (input mode)
CCMR1_Input : aliased CCMR1_Input_Register;
-- capture/compare mode register 2 (input mode)
CCMR2_Input : aliased CCMR2_Input_Register;
end case;
end record
with Unchecked_Union, Volatile;
for TIM1_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
RCR at 16#30# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCR3 at 16#3C# range 0 .. 31;
CCR4 at 16#40# range 0 .. 31;
BDTR at 16#44# range 0 .. 31;
DCR at 16#48# range 0 .. 31;
DMAR at 16#4C# range 0 .. 31;
CCMR3_Output at 16#54# range 0 .. 31;
CCR5 at 16#58# range 0 .. 31;
CRR6 at 16#5C# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR2_Output at 16#1C# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
CCMR2_Input at 16#1C# range 0 .. 31;
end record;
-- Advanced-timers
TIM1_Periph : aliased TIM1_Peripheral
with Import, Address => System'To_Address (16#40010000#);
-- Advanced-timers
TIM8_Periph : aliased TIM1_Peripheral
with Import, Address => System'To_Address (16#40010400#);
type TIM2_Disc is
(
Output,
Input);
-- General purpose timers
type TIM2_Peripheral
(Discriminent : TIM2_Disc := Output)
is record
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register_1;
-- slave mode control register
SMCR : aliased SMCR_Register;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register_1;
-- status register
SR : aliased SR_Register_1;
-- event generation register
EGR : aliased EGR_Register_1;
-- capture/compare enable register
CCER : aliased CCER_Register_1;
-- counter
CNT : aliased CNT_Register_1;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register_1;
-- capture/compare register 1
CCR1 : aliased CCR1_Register_1;
-- capture/compare register 2
CCR2 : aliased CCR2_Register_1;
-- capture/compare register 3
CCR3 : aliased CCR3_Register_1;
-- capture/compare register 4
CCR4 : aliased CCR4_Register_1;
-- DMA control register
DCR : aliased DCR_Register;
-- DMA address for full transfer
DMAR : aliased DMAR_Register;
-- TIM2 option register 1
OR1 : aliased OR1_Register;
-- TIM2 option register 2
OR2 : aliased OR2_Register;
case Discriminent is
when Output =>
-- capture/compare mode register 1 (output mode)
CCMR1_Output : aliased CCMR1_Output_Register;
-- capture/compare mode register 2 (output mode)
CCMR2_Output : aliased CCMR2_Output_Register_1;
when Input =>
-- capture/compare mode register 1 (input mode)
CCMR1_Input : aliased CCMR1_Input_Register;
-- capture/compare mode register 2 (input mode)
CCMR2_Input : aliased CCMR2_Input_Register;
end case;
end record
with Unchecked_Union, Volatile;
for TIM2_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCR3 at 16#3C# range 0 .. 31;
CCR4 at 16#40# range 0 .. 31;
DCR at 16#48# range 0 .. 31;
DMAR at 16#4C# range 0 .. 31;
OR1 at 16#50# range 0 .. 31;
OR2 at 16#60# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR2_Output at 16#1C# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
CCMR2_Input at 16#1C# range 0 .. 31;
end record;
-- General purpose timers
TIM2_Periph : aliased TIM2_Peripheral
with Import, Address => System'To_Address (16#40000000#);
type TIM3_Disc is
(
Output,
Input);
-- General purpose timers
type TIM3_Peripheral
(Discriminent : TIM3_Disc := Output)
is record
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register_1;
-- slave mode control register
SMCR : aliased SMCR_Register;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register_1;
-- status register
SR : aliased SR_Register_1;
-- event generation register
EGR : aliased EGR_Register_1;
-- capture/compare enable register
CCER : aliased CCER_Register_1;
-- counter
CNT : aliased CNT_Register_1;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register_1;
-- capture/compare register 1
CCR1 : aliased CCR1_Register_1;
-- capture/compare register 2
CCR2 : aliased CCR2_Register_1;
-- capture/compare register 3
CCR3 : aliased CCR3_Register_1;
-- capture/compare register 4
CCR4 : aliased CCR4_Register_1;
-- DMA control register
DCR : aliased DCR_Register;
-- DMA address for full transfer
DMAR : aliased DMAR_Register;
-- TIM3 option register 1
OR1 : aliased OR_Register;
-- TIM3 option register 2
OR2 : aliased OR2_Register;
case Discriminent is
when Output =>
-- capture/compare mode register 1 (output mode)
CCMR1_Output : aliased CCMR1_Output_Register;
-- capture/compare mode register 2 (output mode)
CCMR2_Output : aliased CCMR2_Output_Register_1;
when Input =>
-- capture/compare mode register 1 (input mode)
CCMR1_Input : aliased CCMR1_Input_Register;
-- capture/compare mode register 2 (input mode)
CCMR2_Input : aliased CCMR2_Input_Register;
end case;
end record
with Unchecked_Union, Volatile;
for TIM3_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCR3 at 16#3C# range 0 .. 31;
CCR4 at 16#40# range 0 .. 31;
DCR at 16#48# range 0 .. 31;
DMAR at 16#4C# range 0 .. 31;
OR1 at 16#50# range 0 .. 31;
OR2 at 16#60# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR2_Output at 16#1C# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
CCMR2_Input at 16#1C# range 0 .. 31;
end record;
-- General purpose timers
TIM3_Periph : aliased TIM3_Peripheral
with Import, Address => System'To_Address (16#40000400#);
type TIM4_Disc is
(
Output,
Input);
-- General purpose timers
type TIM4_Peripheral
(Discriminent : TIM4_Disc := Output)
is record
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register_1;
-- slave mode control register
SMCR : aliased SMCR_Register;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register_1;
-- status register
SR : aliased SR_Register_1;
-- event generation register
EGR : aliased EGR_Register_1;
-- capture/compare enable register
CCER : aliased CCER_Register_1;
-- counter
CNT : aliased CNT_Register_1;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register_1;
-- capture/compare register 1
CCR1 : aliased CCR1_Register_1;
-- capture/compare register 2
CCR2 : aliased CCR2_Register_1;
-- capture/compare register 3
CCR3 : aliased CCR3_Register_1;
-- capture/compare register 4
CCR4 : aliased CCR4_Register_1;
-- DMA control register
DCR : aliased DCR_Register;
-- DMA address for full transfer
DMAR : aliased DMAR_Register;
case Discriminent is
when Output =>
-- capture/compare mode register 1 (output mode)
CCMR1_Output : aliased CCMR1_Output_Register;
-- capture/compare mode register 2 (output mode)
CCMR2_Output : aliased CCMR2_Output_Register_1;
when Input =>
-- capture/compare mode register 1 (input mode)
CCMR1_Input : aliased CCMR1_Input_Register;
-- capture/compare mode register 2 (input mode)
CCMR2_Input : aliased CCMR2_Input_Register;
end case;
end record
with Unchecked_Union, Volatile;
for TIM4_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCR3 at 16#3C# range 0 .. 31;
CCR4 at 16#40# range 0 .. 31;
DCR at 16#48# range 0 .. 31;
DMAR at 16#4C# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR2_Output at 16#1C# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
CCMR2_Input at 16#1C# range 0 .. 31;
end record;
-- General purpose timers
TIM4_Periph : aliased TIM4_Peripheral
with Import, Address => System'To_Address (16#40000800#);
-- General purpose timers
TIM5_Periph : aliased TIM4_Peripheral
with Import, Address => System'To_Address (16#40000C00#);
-- Basic timers
type TIM6_Peripheral is record
-- control register 1
CR1 : aliased CR1_Register_1;
-- control register 2
CR2 : aliased CR2_Register_2;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register_2;
-- status register
SR : aliased SR_Register_2;
-- event generation register
EGR : aliased EGR_Register_2;
-- counter
CNT : aliased CNT_Register;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register;
end record
with Volatile;
for TIM6_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
end record;
-- Basic timers
TIM6_Periph : aliased TIM6_Peripheral
with Import, Address => System'To_Address (16#40001000#);
-- Basic timers
TIM7_Periph : aliased TIM6_Peripheral
with Import, Address => System'To_Address (16#40001400#);
type TIM9_Disc is
(
Output,
Input);
-- General purpose timers
type TIM9_Peripheral
(Discriminent : TIM9_Disc := Output)
is record
-- control register 1
CR1 : aliased CR1_Register_2;
-- slave mode control register
SMCR : aliased SMCR_Register_1;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register_3;
-- status register
SR : aliased SR_Register_3;
-- event generation register
EGR : aliased EGR_Register_3;
-- capture/compare enable register
CCER : aliased CCER_Register_2;
-- counter
CNT : aliased CNT_Register;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register;
-- capture/compare register 1
CCR1 : aliased CCR1_Register;
-- capture/compare register 2
CCR2 : aliased CCR2_Register;
case Discriminent is
when Output =>
-- capture/compare mode register 1 (output mode)
CCMR1_Output : aliased CCMR1_Output_Register_1;
when Input =>
-- capture/compare mode register 1 (input mode)
CCMR1_Input : aliased CCMR1_Input_Register_1;
end case;
end record
with Unchecked_Union, Volatile;
for TIM9_Peripheral use record
CR1 at 16#0# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
CCR2 at 16#38# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
end record;
-- General purpose timers
TIM9_Periph : aliased TIM9_Peripheral
with Import, Address => System'To_Address (16#40014000#);
-- General purpose timers
TIM12_Periph : aliased TIM9_Peripheral
with Import, Address => System'To_Address (16#40001800#);
type TIM10_Disc is
(
Output,
Input);
-- General-purpose-timers
type TIM10_Peripheral
(Discriminent : TIM10_Disc := Output)
is record
-- control register 1
CR1 : aliased CR1_Register_3;
-- slave mode control register
SMCR : aliased SMCR_Register;
-- DMA/Interrupt enable register
DIER : aliased DIER_Register_4;
-- status register
SR : aliased SR_Register_4;
-- event generation register
EGR : aliased EGR_Register_4;
-- capture/compare enable register
CCER : aliased CCER_Register_3;
-- counter
CNT : aliased CNT_Register;
-- prescaler
PSC : aliased PSC_Register;
-- auto-reload register
ARR : aliased ARR_Register;
-- capture/compare register 1
CCR1 : aliased CCR1_Register;
-- option register
OR_k : aliased OR_Register;
case Discriminent is
when Output =>
-- capture/compare mode register 1 (output mode)
CCMR1_Output : aliased CCMR1_Output_Register_2;
when Input =>
-- capture/compare mode register 1 (input mode)
CCMR1_Input : aliased CCMR1_Input_Register_2;
end case;
end record
with Unchecked_Union, Volatile;
for TIM10_Peripheral use record
CR1 at 16#0# range 0 .. 31;
SMCR at 16#8# range 0 .. 31;
DIER at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
EGR at 16#14# range 0 .. 31;
CCER at 16#20# range 0 .. 31;
CNT at 16#24# range 0 .. 31;
PSC at 16#28# range 0 .. 31;
ARR at 16#2C# range 0 .. 31;
CCR1 at 16#34# range 0 .. 31;
OR_k at 16#50# range 0 .. 31;
CCMR1_Output at 16#18# range 0 .. 31;
CCMR1_Input at 16#18# range 0 .. 31;
end record;
-- General-purpose-timers
TIM10_Periph : aliased TIM10_Peripheral
with Import, Address => System'To_Address (16#40014400#);
-- General-purpose-timers
TIM11_Periph : aliased TIM10_Peripheral
with Import, Address => System'To_Address (16#40014800#);
-- General-purpose-timers
TIM13_Periph : aliased TIM10_Peripheral
with Import, Address => System'To_Address (16#40001C00#);
-- General-purpose-timers
TIM14_Periph : aliased TIM10_Peripheral
with Import, Address => System'To_Address (16#40002000#);
end STM32_SVD.TIM;
|
reznikmm/matreshka | Ada | 4,623 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Form.Apply_Filter_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Form_Apply_Filter_Attribute_Node is
begin
return Self : Form_Apply_Filter_Attribute_Node do
Matreshka.ODF_Form.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Form_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Form_Apply_Filter_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Apply_Filter_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Form_URI,
Matreshka.ODF_String_Constants.Apply_Filter_Attribute,
Form_Apply_Filter_Attribute_Node'Tag);
end Matreshka.ODF_Form.Apply_Filter_Attributes;
|
AdaCore/gpr | Ada | 955 | adb | with p8_1; use p8_1;
package body p8_0 is
function p8_0_0 (Item : Integer) return Integer is
Result : Long_Long_Integer;
begin
if Item < 0 then
return -Item;
end if;
Result := Long_Long_Integer (p8_1_0 (Item - 1)) + 800;
return Integer (Result rem Long_Long_Integer (Integer'Last));
end p8_0_0;
function p8_0_1 (Item : Integer) return Integer is
Result : Long_Long_Integer;
begin
if Item < 0 then
return -Item;
end if;
Result := Long_Long_Integer (p8_1_1 (Item - 1)) + 801;
return Integer (Result rem Long_Long_Integer (Integer'Last));
end p8_0_1;
function p8_0_2 (Item : Integer) return Integer is
Result : Long_Long_Integer;
begin
if Item < 0 then
return -Item;
end if;
Result := Long_Long_Integer (p8_1_2 (Item - 1)) + 802;
return Integer (Result rem Long_Long_Integer (Integer'Last));
end p8_0_2;
end p8_0;
|
reznikmm/matreshka | Ada | 4,796 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Visitors;
with ODF.DOM.Table_Data_Pilot_Field_Elements;
package Matreshka.ODF_Table.Data_Pilot_Field_Elements is
type Table_Data_Pilot_Field_Element_Node is
new Matreshka.ODF_Table.Abstract_Table_Element_Node
and ODF.DOM.Table_Data_Pilot_Field_Elements.ODF_Table_Data_Pilot_Field
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters)
return Table_Data_Pilot_Field_Element_Node;
overriding function Get_Local_Name
(Self : not null access constant Table_Data_Pilot_Field_Element_Node)
return League.Strings.Universal_String;
overriding procedure Enter_Node
(Self : not null access Table_Data_Pilot_Field_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Leave_Node
(Self : not null access Table_Data_Pilot_Field_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Visit_Node
(Self : not null access Table_Data_Pilot_Field_Element_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
end Matreshka.ODF_Table.Data_Pilot_Field_Elements;
|
zhmu/ananas | Ada | 4,536 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- G N A T . S E M A P H O R E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2003-2022, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This package provides classic counting semaphores and binary semaphores.
-- Both types are visibly defined as protected types so that users can make
-- conditional and timed calls when appropriate.
with System;
package GNAT.Semaphores is
Default_Ceiling : constant System.Priority := System.Default_Priority;
-- A convenient value for the priority discriminants that follow
------------------------
-- Counting_Semaphore --
------------------------
protected type Counting_Semaphore
(Initial_Value : Natural;
-- A counting semaphore contains an internal counter. The initial
-- value of this counter is set by clients via the discriminant.
Ceiling : System.Priority)
-- Users must specify the ceiling priority for the object. If the
-- Real-Time Systems Annex is not in use this value is not important.
is
pragma Priority (Ceiling);
entry Seize;
-- Blocks caller until/unless the semaphore's internal counter is
-- greater than zero. Decrements the semaphore's internal counter when
-- executed.
procedure Release;
-- Increments the semaphore's internal counter
private
Count : Natural := Initial_Value;
end Counting_Semaphore;
----------------------
-- Binary_Semaphore --
----------------------
protected type Binary_Semaphore
(Initially_Available : Boolean;
-- Binary semaphores are either available or not; there is no internal
-- count involved. The discriminant value determines whether the
-- individual object is initially available.
Ceiling : System.Priority)
-- Users must specify the ceiling priority for the object. If the
-- Real-Time Systems Annex is not in use this value is not important.
is
pragma Priority (Ceiling);
entry Seize;
-- Blocks the caller unless/until semaphore is available. After
-- execution the semaphore is no longer available.
procedure Release;
-- Makes the semaphore available
private
Available : Boolean := Initially_Available;
end Binary_Semaphore;
end GNAT.Semaphores;
|
nateroling/swagger-codegen | Ada | 7,952 | ads | -- Swagger Petstore
-- This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special_key` to test the authorization filters.
--
-- OpenAPI spec version: 1.0.0
-- Contact: [email protected]
--
-- NOTE: This package is auto generated by the swagger code generator 2.3.1.
-- https://github.com/swagger-api/swagger-codegen.git
-- Do not edit the class manually.
with Swagger.Streams;
with Ada.Containers.Vectors;
package Samples.Petstore.Models is
-- ------------------------------
-- An uploaded response
-- Describes the result of uploading an image resource
-- ------------------------------
type ApiResponse_Type is
record
Code : Swagger.Nullable_Integer;
P_Type : Swagger.Nullable_UString;
Message : Swagger.Nullable_UString;
end record;
package ApiResponse_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => ApiResponse_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ApiResponse_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in ApiResponse_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ApiResponse_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out ApiResponse_Type_Vectors.Vector);
-- ------------------------------
-- Pet category
-- A category for a pet
-- ------------------------------
type Category_Type is
record
Id : Swagger.Nullable_Long;
Name : Swagger.Nullable_UString;
end record;
package Category_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Category_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Category_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Category_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Category_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Category_Type_Vectors.Vector);
-- ------------------------------
-- Pet Order
-- An order for a pets from the pet store
-- ------------------------------
type Order_Type is
record
Id : Swagger.Nullable_Long;
Pet_Id : Swagger.Nullable_Long;
Quantity : Swagger.Nullable_Integer;
Ship_Date : Swagger.Nullable_Date;
Status : Swagger.Nullable_UString;
Complete : Swagger.Nullable_Boolean;
end record;
package Order_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Order_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Order_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Order_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Order_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Order_Type_Vectors.Vector);
-- ------------------------------
-- Pet Tag
-- A tag for a pet
-- ------------------------------
type Tag_Type is
record
Id : Swagger.Nullable_Long;
Name : Swagger.Nullable_UString;
end record;
package Tag_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Tag_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Tag_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Tag_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Tag_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Tag_Type_Vectors.Vector);
-- ------------------------------
-- a Pet
-- A pet for sale in the pet store
-- ------------------------------
type Pet_Type is
record
Id : Swagger.Nullable_Long;
Category : Samples.Petstore.Models.Category_Type;
Name : Swagger.UString;
Photo_Urls : Swagger.Nullable_UString_Vectors.Vector;
Tags : Samples.Petstore.Models.Tag_Type_Vectors.Vector;
Status : Swagger.Nullable_UString;
end record;
package Pet_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Pet_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Pet_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in Pet_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Pet_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out Pet_Type_Vectors.Vector);
-- ------------------------------
-- a User
-- A User who is purchasing from the pet store
-- ------------------------------
type User_Type is
record
Id : Swagger.Nullable_Long;
Username : Swagger.Nullable_UString;
First_Name : Swagger.Nullable_UString;
Last_Name : Swagger.Nullable_UString;
Email : Swagger.Nullable_UString;
Password : Swagger.Nullable_UString;
Phone : Swagger.Nullable_UString;
User_Status : Swagger.Nullable_Integer;
end record;
package User_Type_Vectors is
new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => User_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in User_Type);
procedure Serialize (Into : in out Swagger.Streams.Output_Stream'Class;
Name : in String;
Value : in User_Type_Vectors.Vector);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out User_Type);
procedure Deserialize (From : in Swagger.Value_Type;
Name : in String;
Value : out User_Type_Vectors.Vector);
end Samples.Petstore.Models;
|
flyx/OpenGLAda | Ada | 1,895 | adb | package body GL.Text.UTF8 is
type Byte is mod 2**8;
subtype Surrogate_Halves is UTF8_Code_Point range 16#D800# .. 16#DFFF#;
procedure Read (Buffer : String; Position : in out Positive;
Result : out UTF8_Code_Point) is
Cur : Byte := Character'Pos (Buffer (Position));
Additional_Bytes : Positive;
begin
if (Cur and 2#10000000#) = 0 then
Result := UTF8_Code_Point (Cur);
Position := Position + 1;
return;
elsif (Cur and 2#01000000#) = 0 then
raise Rendering_Error with "Encoding error at code point starting byte"
& Position'Img;
elsif (Cur and 2#00100000#) = 0 then
Additional_Bytes := 1;
Result := UTF8_Code_Point (Cur and 2#00011111#) * 2**6;
elsif (Cur and 2#00010000#) = 0 then
Additional_Bytes := 2;
Result := UTF8_Code_Point (Cur and 2#00001111#) * 2**12;
elsif (Cur and 2#00001000#) = 0 then
Additional_Bytes := 3;
Result := UTF8_Code_Point (Cur and 2#00000111#) * 2**18;
else
raise Rendering_Error with "Encoding error at code point starting byte"
& Position'Img;
end if;
for Index in 1 .. Additional_Bytes loop
Cur := Character'Pos (Buffer (Position + Index));
if (Cur and 2#11000000#) /= 2#10000000# then
raise Rendering_Error with
"Encoding error at code point continuation byte" &
Positive'Image (Position + Index);
end if;
Result := Result + UTF8_Code_Point (Cur and 2#00111111#) *
2**(6 * (Additional_Bytes - Index));
end loop;
if Result in Surrogate_Halves then
raise Rendering_Error with
"Surrogate half not valid in UTF-8 at position" & Position'Img;
end if;
Position := Position + Additional_Bytes + 1;
end Read;
end GL.Text.UTF8;
|
stcarrez/stm32-ui | Ada | 1,633 | ads | -----------------------------------------------------------------------
-- ui-clocks -- Display a 12 hour clock
-- Copyright (C) 2018 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with HAL.Bitmap;
package UI.Clocks is
type Hand_Type is (HOUR_HAND, MINUTE_HAND, SECOND_HAND);
procedure Draw_Clock_Tick (Buffer : in out HAL.Bitmap.Bitmap_Buffer'Class;
Center : in HAL.Bitmap.Point;
Width : in Natural;
Hour : in Natural;
Minute : in Natural;
Second : in Natural;
Hand : in Hand_Type);
-- Draw the 12 hour clock at the given center position and with the given width.
procedure Draw_Clock (Buffer : in out HAL.Bitmap.Bitmap_Buffer'Class;
Center : in HAL.Bitmap.Point;
Width : in Natural);
end UI.Clocks;
|
AdaCore/libadalang | Ada | 62 | adb | function Bar return Boolean is
begin
return True;
end Bar;
|
onedigitallife-net/Byron | Ada | 3,179 | adb | Pragma Ada_2012;
Pragma Assertion_Policy( Check );
With
ada.Text_IO,
Ada.Containers,
Ada.Characters.Latin_1,
Ada.Strings.Wide_Wide_Unbounded;
-- Handle comments starting a TEXT token.
Procedure Lexington.Aux.P3(Data : in out Token_Vector_Pkg.Vector) is
use Ada.Strings.Wide_Wide_Unbounded, Lexington.Aux.Token_Pkg;
Function Is_Comment( Item : Token ) return Boolean is
Value : Wide_Wide_String renames Lexeme(Item);
Textual : constant Boolean := ID(Item) = TEXT;
Big_Enough : constant Boolean := Value'Length >= 2;
First : constant Positive:= Value'First;
Second : constant Positive:= Positive'Succ(First);
Begin
Return Textual and then Big_Enough and then
(Value(First) = '-' and Value(Second) = '-');
End Is_Comment;
Function Non_Comment( Item : Token ) return Wide_Wide_String is
Value : Wide_Wide_String renames Lexeme(Item);
Third : constant Positive := Value'First+1;
--renames Positive'Succ(Positive'Succ(Value'First));
Last : constant Natural:= Value'Last;
Begin
Return Value(Third..Last);
End Non_Comment;
Clear : Boolean:= True;
Procedure Alter_Type(Position : Token_Vector_Pkg.Cursor) is
Item : Token renames Token_Vector_Pkg.Element( Position );
Index : Positive renames Token_Vector_Pkg.To_Index( Position );
ID : Token_ID renames Token_Pkg.ID(Item);
Begin
if Is_Comment(Item) and then Clear then
Clear := False;
Token_Vector_Pkg.Replace_Element(
Container => Data,
Position => Position,
New_Item => Make_Token(Comment, Non_Comment(Item))
);
elsif (not clear) and then (ID = End_of_Line or else Index = Data.Last_Index) then
Clear:= True;
end if;
End Alter_Type;
Result : Token_Vector_Pkg.Vector;
Working : Unbounded_Wide_Wide_String;
Marked : Boolean:= False;
Procedure Collect_Comment(Position : Token_Vector_Pkg.Cursor) is
Item : Token renames Token_Vector_Pkg.Element( Position );
Index : Positive renames Token_Vector_Pkg.To_Index( Position );
ID : Token_ID renames Token_Pkg.ID(Item);
Begin
If not Marked and ID /= Comment then
Result.Append( Item );
elsif not Marked and ID = Comment then
Marked:= True;
Working:= To_Unbounded_Wide_Wide_String( Non_Comment( Item ) );
elsif Marked and ID = Comment then
raise Program_Error with "New comment started before old comment closed.";
elsif Marked and ID = End_of_Line then
Marked:= False;
Result.Append( Make_Token(Comment, To_Wide_Wide_String(Working)) );
elsif Marked and Index = Data.Last_Index then
Marked:= False;
Append(Working, Lexeme(Item));
Result.Append( Make_Token(Comment, To_Wide_Wide_String(Working)) );
else
Append(Working, Lexeme(Item));
end if;
End Collect_Comment;
subtype Tmp_Range is Positive range Data.First_Index..Data.Last_Index;
Begin
Data.Iterate( Alter_Type'Access );
Data.Iterate( Collect_Comment'Access );
Data:= Result;
End Lexington.Aux.P3;
|
reznikmm/matreshka | Ada | 6,921 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Table.Label_Ranges_Elements is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters)
return Table_Label_Ranges_Element_Node is
begin
return Self : Table_Label_Ranges_Element_Node do
Matreshka.ODF_Table.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Table_Prefix);
end return;
end Create;
----------------
-- Enter_Node --
----------------
overriding procedure Enter_Node
(Self : not null access Table_Label_Ranges_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control) is
begin
if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then
ODF.DOM.Visitors.Abstract_ODF_Visitor'Class
(Visitor).Enter_Table_Label_Ranges
(ODF.DOM.Table_Label_Ranges_Elements.ODF_Table_Label_Ranges_Access
(Self),
Control);
else
Matreshka.DOM_Elements.Abstract_Element_Node
(Self.all).Enter_Node (Visitor, Control);
end if;
end Enter_Node;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Table_Label_Ranges_Element_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Label_Ranges_Element;
end Get_Local_Name;
----------------
-- Leave_Node --
----------------
overriding procedure Leave_Node
(Self : not null access Table_Label_Ranges_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control) is
begin
if Visitor in ODF.DOM.Visitors.Abstract_ODF_Visitor'Class then
ODF.DOM.Visitors.Abstract_ODF_Visitor'Class
(Visitor).Leave_Table_Label_Ranges
(ODF.DOM.Table_Label_Ranges_Elements.ODF_Table_Label_Ranges_Access
(Self),
Control);
else
Matreshka.DOM_Elements.Abstract_Element_Node
(Self.all).Leave_Node (Visitor, Control);
end if;
end Leave_Node;
----------------
-- Visit_Node --
----------------
overriding procedure Visit_Node
(Self : not null access Table_Label_Ranges_Element_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control) is
begin
if Iterator in ODF.DOM.Iterators.Abstract_ODF_Iterator'Class then
ODF.DOM.Iterators.Abstract_ODF_Iterator'Class
(Iterator).Visit_Table_Label_Ranges
(Visitor,
ODF.DOM.Table_Label_Ranges_Elements.ODF_Table_Label_Ranges_Access
(Self),
Control);
else
Matreshka.DOM_Elements.Abstract_Element_Node
(Self.all).Visit_Node (Iterator, Visitor, Control);
end if;
end Visit_Node;
begin
Matreshka.DOM_Documents.Register_Element
(Matreshka.ODF_String_Constants.Table_URI,
Matreshka.ODF_String_Constants.Label_Ranges_Element,
Table_Label_Ranges_Element_Node'Tag);
end Matreshka.ODF_Table.Label_Ranges_Elements;
|
sungyeon/drake | Ada | 303 | ads | pragma License (Unrestricted);
-- extended unit
with Ada.Strings.Generic_Unbounded.Generic_Functions;
with Ada.Strings.Wide_Functions;
package Ada.Strings.Unbounded_Wide_Strings.Functions is
new Generic_Functions (Wide_Functions);
pragma Preelaborate (Ada.Strings.Unbounded_Wide_Strings.Functions);
|
damaki/libkeccak | Ada | 15,212 | adb | -------------------------------------------------------------------------------
-- Copyright (c) 2016, Daniel King
-- 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.
-- * The name of the copyright holder may not 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 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 Ada.Command_Line;
with Ada.Text_IO;
with CSHAKE_Runner;
with Duplex_Runner;
with Hash_Runner;
with MonkeyWrap_Runner;
with KMAC_Runner;
with ParallelHash_Runner;
with TupleHash_Runner;
with XOF_Runner;
with CSHAKE;
with Keccak.Keccak_1600.Rounds_24;
with Ketje;
with KMAC;
with Parallel_Hash;
with SHA3;
with SHAKE;
with Tuple_Hash;
with Gimli.Hash;
with Ascon.Hash;
with Ascon.XOF;
procedure KAT
is
use type Ada.Command_Line.Exit_Status;
package SHA3_224_Runner is new Hash_Runner (SHA3.SHA3_224);
package SHA3_256_Runner is new Hash_Runner (SHA3.SHA3_256);
package SHA3_384_Runner is new Hash_Runner (SHA3.SHA3_384);
package SHA3_512_Runner is new Hash_Runner (SHA3.SHA3_512);
package SHAKE_128_Runner is new XOF_Runner (SHAKE.SHAKE128);
package SHAKE_256_Runner is new XOF_Runner (SHAKE.SHAKE256);
package Keccak_224_Runner is new Hash_Runner (SHA3.Keccak_224);
package Keccak_256_Runner is new Hash_Runner (SHA3.Keccak_256);
package Keccak_384_Runner is new Hash_Runner (SHA3.Keccak_384);
package Keccak_512_Runner is new Hash_Runner (SHA3.Keccak_512);
package CSHAKE128_Runner is new CSHAKE_Runner (CSHAKE.CSHAKE128);
package CSHAKE256_Runner is new CSHAKE_Runner (CSHAKE.CSHAKE256);
package Duplex_1600_24_Runner is new Duplex_Runner (Keccak.Keccak_1600.Rounds_24.Duplex);
package KMAC128_Runner is new KMAC_Runner (KMAC.KMAC128);
package KMAC256_Runner is new KMAC_Runner (KMAC.KMAC256);
package ParallelHash128_Runner is new ParallelHash_Runner (Parallel_Hash.ParallelHash128);
package ParallelHash256_Runner is new ParallelHash_Runner (Parallel_Hash.ParallelHash256);
package TupleHash128_Runner is new TupleHash_Runner (Tuple_Hash.Tuple_Hash_128);
package TupleHash256_Runner is new TupleHash_Runner (Tuple_Hash.Tuple_Hash_256);
package KetjeJr_Runner is new MonkeyWrap_Runner (Ketje.Jr);
package KetjeSr_Runner is new MonkeyWrap_Runner (Ketje.Sr);
package KetjeMinor_Runner is new MonkeyWrap_Runner (Ketje.Minor);
package KetjeMajor_Runner is new MonkeyWrap_Runner (Ketje.Major);
package GimliHash_Runner is new Hash_Runner (Gimli.Hash);
package AsconHash_Runner is new Hash_Runner (Ascon.Hash);
package AsconXOF_Runner is new XOF_Runner (Ascon.XOF);
package Integer_IO is new Ada.Text_IO.Integer_IO (Integer);
Num_Passed : Natural;
Num_Failed : Natural;
Success : Boolean := True;
begin
if Ada.Command_Line.Argument_Count /= 2 then
Ada.Text_IO.Put_Line ("usage: " & Ada.Command_Line.Command_Name & " ALGO FILE");
Ada.Command_Line.Set_Exit_Status (-1);
else
declare
Algo : constant String := Ada.Command_Line.Argument (1);
begin
if Algo = "SHA3-224" then
SHA3_224_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "SHA3-256" then
SHA3_256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "SHA3-384" then
SHA3_384_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "SHA3-512" then
SHA3_512_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "SHAKE128" then
SHAKE_128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "SHAKE256" then
SHAKE_256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "Keccak-224" then
Keccak_224_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "Keccak-256" then
Keccak_256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "Keccak-384" then
Keccak_384_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "Keccak-512" then
Keccak_512_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "cSHAKE128" then
CSHAKE128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "cSHAKE256" then
CSHAKE256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "Duplexc574" then
Duplex_1600_24_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Capacity => 574,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "Duplexc573" then
Duplex_1600_24_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Capacity => 573,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KMAC128" then
KMAC128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KMAC256" then
KMAC256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KMACXOF128" then
KMAC128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KMACXOF256" then
KMAC256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "ParallelHash128" then
ParallelHash128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "ParallelHash256" then
ParallelHash256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "ParallelHashXOF128" then
ParallelHash128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "ParallelHashXOF256" then
ParallelHash256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "TupleHash128" then
TupleHash128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "TupleHash256" then
TupleHash256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "TupleHashXOF128" then
TupleHash128_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "TupleHashXOF256" then
TupleHash256_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
XOF => True,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KetjeJr" then
KetjeJr_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KetjeSr" then
KetjeSr_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KetjeMinor" then
KetjeMinor_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "KetjeMajor" then
KetjeMajor_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "GimliHash" then
GimliHash_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "AsconHash" then
AsconHash_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Align_Bits => False,
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
elsif Algo = "AsconXOF" then
AsconXOF_Runner.Run_Tests (File_Name => Ada.Command_Line.Argument (2),
Num_Passed => Num_Passed,
Num_Failed => Num_Failed);
else
Ada.Text_IO.Put_Line ("Unknown algorithm: " & Algo);
Ada.Command_Line.Set_Exit_Status (-1);
Success := False;
end if;
-- Print results
if Success then
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("Passed: ");
Integer_IO.Put (Num_Passed, Width => 0);
Ada.Text_IO.New_Line;
Ada.Text_IO.Put ("Failed: ");
Integer_IO.Put (Num_Failed, Width => 0);
Ada.Text_IO.New_Line;
if Num_Failed > 0 then
Ada.Command_Line.Set_Exit_Status (1);
end if;
end if;
end;
end if;
end KAT;
|
iptime-gpl/userapps_a3004nd | Ada | 16,898 | ads | ----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: zlib-thin.ads,v 1.1.1.1 2011/09/27 08:56:37 mvnas Exp $
with Interfaces.C.Strings;
with System.Address_To_Access_Conversions;
private package ZLib.Thin is
-- From zconf.h
MAX_MEM_LEVEL : constant := 9; -- zconf.h:105
-- zconf.h:105
MAX_WBITS : constant := 15; -- zconf.h:115
-- 32K LZ77 window
-- zconf.h:115
SEEK_SET : constant := 8#0000#; -- zconf.h:244
-- Seek from beginning of file.
-- zconf.h:244
SEEK_CUR : constant := 1; -- zconf.h:245
-- Seek from current position.
-- zconf.h:245
SEEK_END : constant := 2; -- zconf.h:246
-- Set file pointer to EOF plus "offset"
-- zconf.h:246
type Byte is new Interfaces.C.unsigned_char; -- 8 bits
-- zconf.h:214
type UInt is new Interfaces.C.unsigned; -- 16 bits or more
-- zconf.h:216
type Int is new Interfaces.C.int;
type ULong is new Interfaces.C.unsigned; -- 32 bits or more
-- zconf.h:217
subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
type ULong_Access is access ULong;
type Int_Access is access Int;
subtype Voidp is System.Address; -- zconf.h:232
package Bytes is new System.Address_To_Access_Conversions (Byte);
subtype Byte_Access is Bytes.Object_Pointer;
-- end from zconf
Z_NO_FLUSH : constant := 8#0000#; -- zlib.h:125
-- zlib.h:125
Z_PARTIAL_FLUSH : constant := 1; -- zlib.h:126
-- will be removed, use
-- Z_SYNC_FLUSH instead
-- zlib.h:126
Z_SYNC_FLUSH : constant := 2; -- zlib.h:127
-- zlib.h:127
Z_FULL_FLUSH : constant := 3; -- zlib.h:128
-- zlib.h:128
Z_FINISH : constant := 4; -- zlib.h:129
-- zlib.h:129
Z_OK : constant := 8#0000#; -- zlib.h:132
-- zlib.h:132
Z_STREAM_END : constant := 1; -- zlib.h:133
-- zlib.h:133
Z_NEED_DICT : constant := 2; -- zlib.h:134
-- zlib.h:134
Z_ERRNO : constant := -1; -- zlib.h:135
-- zlib.h:135
Z_STREAM_ERROR : constant := -2; -- zlib.h:136
-- zlib.h:136
Z_DATA_ERROR : constant := -3; -- zlib.h:137
-- zlib.h:137
Z_MEM_ERROR : constant := -4; -- zlib.h:138
-- zlib.h:138
Z_BUF_ERROR : constant := -5; -- zlib.h:139
-- zlib.h:139
Z_VERSION_ERROR : constant := -6; -- zlib.h:140
-- zlib.h:140
Z_NO_COMPRESSION : constant := 8#0000#; -- zlib.h:145
-- zlib.h:145
Z_BEST_SPEED : constant := 1; -- zlib.h:146
-- zlib.h:146
Z_BEST_COMPRESSION : constant := 9; -- zlib.h:147
-- zlib.h:147
Z_DEFAULT_COMPRESSION : constant := -1; -- zlib.h:148
-- zlib.h:148
Z_FILTERED : constant := 1; -- zlib.h:151
-- zlib.h:151
Z_HUFFMAN_ONLY : constant := 2; -- zlib.h:152
-- zlib.h:152
Z_DEFAULT_STRATEGY : constant := 8#0000#; -- zlib.h:153
-- zlib.h:153
Z_BINARY : constant := 8#0000#; -- zlib.h:156
-- zlib.h:156
Z_ASCII : constant := 1; -- zlib.h:157
-- zlib.h:157
Z_UNKNOWN : constant := 2; -- zlib.h:158
-- zlib.h:158
Z_DEFLATED : constant := 8; -- zlib.h:161
-- zlib.h:161
Z_NULL : constant := 8#0000#; -- zlib.h:164
-- for initializing zalloc, zfree, opaque
-- zlib.h:164
type gzFile is new Voidp; -- zlib.h:646
type Z_Stream is private;
type Z_Streamp is access all Z_Stream; -- zlib.h:89
type alloc_func is access function
(Opaque : Voidp;
Items : UInt;
Size : UInt)
return Voidp; -- zlib.h:63
type free_func is access procedure (opaque : Voidp; address : Voidp);
function zlibVersion return Chars_Ptr;
function Deflate (strm : Z_Streamp; flush : Int) return Int;
function DeflateEnd (strm : Z_Streamp) return Int;
function Inflate (strm : Z_Streamp; flush : Int) return Int;
function InflateEnd (strm : Z_Streamp) return Int;
function deflateSetDictionary
(strm : Z_Streamp;
dictionary : Byte_Access;
dictLength : UInt)
return Int;
function deflateCopy (dest : Z_Streamp; source : Z_Streamp) return Int;
-- zlib.h:478
function deflateReset (strm : Z_Streamp) return Int; -- zlib.h:495
function deflateParams
(strm : Z_Streamp;
level : Int;
strategy : Int)
return Int; -- zlib.h:506
function inflateSetDictionary
(strm : Z_Streamp;
dictionary : Byte_Access;
dictLength : UInt)
return Int; -- zlib.h:548
function inflateSync (strm : Z_Streamp) return Int; -- zlib.h:565
function inflateReset (strm : Z_Streamp) return Int; -- zlib.h:580
function compress
(dest : Byte_Access;
destLen : ULong_Access;
source : Byte_Access;
sourceLen : ULong)
return Int; -- zlib.h:601
function compress2
(dest : Byte_Access;
destLen : ULong_Access;
source : Byte_Access;
sourceLen : ULong;
level : Int)
return Int; -- zlib.h:615
function uncompress
(dest : Byte_Access;
destLen : ULong_Access;
source : Byte_Access;
sourceLen : ULong)
return Int;
function gzopen (path : Chars_Ptr; mode : Chars_Ptr) return gzFile;
function gzdopen (fd : Int; mode : Chars_Ptr) return gzFile;
function gzsetparams
(file : gzFile;
level : Int;
strategy : Int)
return Int;
function gzread
(file : gzFile;
buf : Voidp;
len : UInt)
return Int;
function gzwrite
(file : in gzFile;
buf : in Voidp;
len : in UInt)
return Int;
function gzprintf (file : in gzFile; format : in Chars_Ptr) return Int;
function gzputs (file : in gzFile; s : in Chars_Ptr) return Int;
function gzgets
(file : gzFile;
buf : Chars_Ptr;
len : Int)
return Chars_Ptr;
function gzputc (file : gzFile; char : Int) return Int;
function gzgetc (file : gzFile) return Int;
function gzflush (file : gzFile; flush : Int) return Int;
function gzseek
(file : gzFile;
offset : Int;
whence : Int)
return Int;
function gzrewind (file : gzFile) return Int;
function gztell (file : gzFile) return Int;
function gzeof (file : gzFile) return Int;
function gzclose (file : gzFile) return Int;
function gzerror (file : gzFile; errnum : Int_Access) return Chars_Ptr;
function adler32
(adler : ULong;
buf : Byte_Access;
len : UInt)
return ULong;
function crc32
(crc : ULong;
buf : Byte_Access;
len : UInt)
return ULong;
function deflateInit
(strm : Z_Streamp;
level : Int;
version : Chars_Ptr;
stream_size : Int)
return Int;
function Deflate_Init
(strm : in Z_Streamp;
level : in Int := Z_DEFAULT_COMPRESSION)
return Int;
pragma Inline (Deflate_Init);
function deflateInit2
(strm : Z_Streamp;
level : Int;
method : Int;
windowBits : Int;
memLevel : Int;
strategy : Int;
version : Chars_Ptr;
stream_size : Int)
return Int;
function Deflate_Init
(strm : Z_Streamp;
level : Int;
method : Int;
windowBits : Int;
memLevel : Int;
strategy : Int)
return Int;
pragma Inline (Deflate_Init);
function inflateInit
(strm : Z_Streamp;
version : Chars_Ptr;
stream_size : Int)
return Int;
function Inflate_Init (strm : Z_Streamp) return Int;
pragma Inline (Inflate_Init);
function inflateInit2
(strm : in Z_Streamp;
windowBits : in Int;
version : in Chars_Ptr;
stream_size : in Int)
return Int;
function inflateBackInit
(strm : in Z_Streamp;
windowBits : in Int;
window : in Byte_Access;
version : in Chars_Ptr;
stream_size : in Int)
return Int;
-- Size of window have to be 2**windowBits.
function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int;
pragma Inline (Inflate_Init);
function zError (err : Int) return Chars_Ptr;
function inflateSyncPoint (z : Z_Streamp) return Int;
function get_crc_table return ULong_Access;
-- Interface to the available fields of the z_stream structure.
-- The application must update next_in and avail_in when avail_in has
-- dropped to zero. It must update next_out and avail_out when avail_out
-- has dropped to zero. The application must initialize zalloc, zfree and
-- opaque before calling the init function.
function Need_In (strm : in Z_Stream) return Boolean;
-- return true when we do not need to setup Next_In and Avail_In fields.
pragma Inline (Need_In);
function Need_Out (strm : in Z_Stream) return Boolean;
-- return true when we do not need to setup Next_Out and Avail_Out field.
pragma Inline (Need_Out);
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Size : in UInt);
pragma Inline (Set_In);
procedure Set_In
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt);
pragma Inline (Set_In);
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Byte_Access;
Size : in UInt);
pragma Inline (Set_Out);
procedure Set_Out
(Strm : in out Z_Stream;
Buffer : in Voidp;
Size : in UInt);
pragma Inline (Set_Out);
procedure Set_Mem_Func
(Strm : in out Z_Stream;
Opaque : in Voidp;
Alloc : in alloc_func;
Free : in free_func);
pragma Inline (Set_Mem_Func);
function Last_Error_Message (Strm : in Z_Stream) return String;
pragma Inline (Last_Error_Message);
function Avail_Out (Strm : in Z_Stream) return UInt;
pragma Inline (Avail_Out);
function Avail_In (Strm : in Z_Stream) return UInt;
pragma Inline (Avail_In);
function Total_In (Strm : in Z_Stream) return ULong;
pragma Inline (Total_In);
function Total_Out (Strm : in Z_Stream) return ULong;
pragma Inline (Total_Out);
function inflateCopy
(dest : in Z_Streamp;
Source : in Z_Streamp)
return Int;
function compressBound (Source_Len : in ULong) return ULong;
function deflateBound
(Strm : in Z_Streamp;
Source_Len : in ULong)
return ULong;
function gzungetc (C : in Int; File : in gzFile) return Int;
function zlibCompileFlags return ULong;
function deflatePrime
(strm : Z_Streamp;
bits : Int;
value : Int)
return Int;
private
type Z_Stream is record -- zlib.h:68
Next_In : Byte_Access; -- next input byte
Avail_In : UInt := 0; -- number of bytes available at next_in
Total_In : ULong := 0; -- total nb of input bytes read so far
Next_Out : Byte_Access; -- next output byte should be put there
Avail_Out : UInt := 0; -- remaining free space at next_out
Total_Out : ULong := 0; -- total nb of bytes output so far
msg : Chars_Ptr; -- last error message, NULL if no error
state : Voidp; -- not visible by applications
zalloc : alloc_func := null; -- used to allocate the internal state
zfree : free_func := null; -- used to free the internal state
opaque : Voidp; -- private data object passed to
-- zalloc and zfree
data_type : Int; -- best guess about the data type:
-- ascii or binary
adler : ULong; -- adler32 value of the uncompressed
-- data
reserved : ULong; -- reserved for future use
end record;
pragma Convention (C, Z_Stream);
pragma Import (C, zlibVersion, "zlibVersion");
pragma Import (C, Deflate, "deflate");
pragma Import (C, DeflateEnd, "deflateEnd");
pragma Import (C, Inflate, "inflate");
pragma Import (C, InflateEnd, "inflateEnd");
pragma Import (C, deflateSetDictionary, "deflateSetDictionary");
pragma Import (C, deflateCopy, "deflateCopy");
pragma Import (C, deflateReset, "deflateReset");
pragma Import (C, deflateParams, "deflateParams");
pragma Import (C, inflateSetDictionary, "inflateSetDictionary");
pragma Import (C, inflateSync, "inflateSync");
pragma Import (C, inflateReset, "inflateReset");
pragma Import (C, compress, "compress");
pragma Import (C, compress2, "compress2");
pragma Import (C, uncompress, "uncompress");
pragma Import (C, gzopen, "gzopen");
pragma Import (C, gzdopen, "gzdopen");
pragma Import (C, gzsetparams, "gzsetparams");
pragma Import (C, gzread, "gzread");
pragma Import (C, gzwrite, "gzwrite");
pragma Import (C, gzprintf, "gzprintf");
pragma Import (C, gzputs, "gzputs");
pragma Import (C, gzgets, "gzgets");
pragma Import (C, gzputc, "gzputc");
pragma Import (C, gzgetc, "gzgetc");
pragma Import (C, gzflush, "gzflush");
pragma Import (C, gzseek, "gzseek");
pragma Import (C, gzrewind, "gzrewind");
pragma Import (C, gztell, "gztell");
pragma Import (C, gzeof, "gzeof");
pragma Import (C, gzclose, "gzclose");
pragma Import (C, gzerror, "gzerror");
pragma Import (C, adler32, "adler32");
pragma Import (C, crc32, "crc32");
pragma Import (C, deflateInit, "deflateInit_");
pragma Import (C, inflateInit, "inflateInit_");
pragma Import (C, deflateInit2, "deflateInit2_");
pragma Import (C, inflateInit2, "inflateInit2_");
pragma Import (C, zError, "zError");
pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
pragma Import (C, get_crc_table, "get_crc_table");
-- added in zlib 1.2.1:
pragma Import (C, inflateCopy, "inflateCopy");
pragma Import (C, compressBound, "compressBound");
pragma Import (C, deflateBound, "deflateBound");
pragma Import (C, gzungetc, "gzungetc");
pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
pragma Import (C, deflatePrime, "deflatePrime");
pragma Import (C, inflateBackInit, "inflateBackInit_");
-- I stopped binding the inflateBack routines, becouse realize that
-- it does not support zlib and gzip headers for now, and have no
-- symmetric deflateBack routines.
-- ZLib-Ada is symmetric regarding deflate/inflate data transformation
-- and has a similar generic callback interface for the
-- deflate/inflate transformation based on the regular Deflate/Inflate
-- routines.
-- pragma Import (C, inflateBack, "inflateBack");
-- pragma Import (C, inflateBackEnd, "inflateBackEnd");
end ZLib.Thin;
|
ptrebuc/ewok-kernel | Ada | 3,595 | ads | --
-- Copyright 2018 The wookey project team <[email protected]>
-- - 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.
--
--
with applications; use applications;
with ewok.exported.sleep; use ewok.exported.sleep;
with m4.systick;
package ewok.sleep
with spark_mode => off
is
type t_sleep_info is record
sleep_until : m4.systick.t_tick;
interruptible : boolean;
end record;
sleep_info : array (t_real_task_id'range) of t_sleep_info :=
(others => (0, false));
--
-- \brief declare a time to sleep.
--
-- This function is called in a syscall context and make the task
-- unschedulable for at least the given sleep_until. Only external events
-- (ISR, IPC) can awake the task during this period. If no external events
-- happend, the task is marked as schedulable at the end of the sleep
-- period, which means that the task is schedule *after* the sleep time,
-- not exactly at the sleep time end.
-- The variation of the time to wait between the end of the sleep time and
-- the effective time execution depends on the scheduling policy, the task
-- priority and the number of tasks on the system.
--
-- \param id -- --e task id requesting to sleep
-- \param sleep_until the sleep duration in unit given by unit argument
-- \param mode -- sleep mode (preemptible by ISR or IPC, or not)
--
procedure sleeping
(task_id : in t_real_task_id;
ms : in milliseconds;
mode : in t_sleep_mode)
with
global => (Output => sleep_info);
--
-- This function is called at each sched time of the systick handler, to
-- decrement the sleep_until of each task of 1.
-- If the speeptime reaches 0, the task mainthread is awoken.
--
-- WARNING: there is case where the task is awoken *before* the end of
-- its sleep period:
-- - when an ISR arise
-- - when an IPC targeting the task is pushed
--
-- In theses two cases, the sleep_cancel() function must be called in order
-- to cancel the current sleep round. The task is awoken by the corresponding
-- kernel module instead.
--
procedure check_is_awoke
with
global => (In_Out => sleep_info);
--
-- As explain in sleep_round function explanations, some external events
-- may awake the main thread. In that case, the sleep process must be
-- canceled as the awoking process is made by another module.
-- tasks that have requested locked sleep will continue to sleep
--
procedure try_waking_up
(task_id : in t_real_task_id)
with
global => (In_Out => sleep_info);
--
-- \brief check if a task is currently sleeping
--
-- \param id the task id to check
--
-- return true if a task is sleeping, or false
--
function is_sleeping
(task_id : in t_real_task_id)
return boolean
with
global => (Input => sleep_info);
end ewok.sleep;
|
reznikmm/matreshka | Ada | 156,192 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
package AMF.Internals.Tables.UML_Metamodel is
pragma Preelaborate;
function MM_UML_UML return AMF.Internals.CMOF_Element;
function MC_UML_Aggregation_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Call_Concurrency_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Connector_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Expansion_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Interaction_Operator_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Message_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Message_Sort return AMF.Internals.CMOF_Element;
function MC_UML_Object_Node_Ordering_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Parameter_Direction_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Parameter_Effect_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Pseudostate_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Transition_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Visibility_Kind return AMF.Internals.CMOF_Element;
function MC_UML_Abstraction return AMF.Internals.CMOF_Element;
function MC_UML_Accept_Call_Action return AMF.Internals.CMOF_Element;
function MC_UML_Accept_Event_Action return AMF.Internals.CMOF_Element;
function MC_UML_Action return AMF.Internals.CMOF_Element;
function MC_UML_Action_Execution_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Action_Input_Pin return AMF.Internals.CMOF_Element;
function MC_UML_Activity return AMF.Internals.CMOF_Element;
function MC_UML_Activity_Edge return AMF.Internals.CMOF_Element;
function MC_UML_Activity_Final_Node return AMF.Internals.CMOF_Element;
function MC_UML_Activity_Group return AMF.Internals.CMOF_Element;
function MC_UML_Activity_Node return AMF.Internals.CMOF_Element;
function MC_UML_Activity_Parameter_Node return AMF.Internals.CMOF_Element;
function MC_UML_Activity_Partition return AMF.Internals.CMOF_Element;
function MC_UML_Actor return AMF.Internals.CMOF_Element;
function MC_UML_Add_Structural_Feature_Value_Action return AMF.Internals.CMOF_Element;
function MC_UML_Add_Variable_Value_Action return AMF.Internals.CMOF_Element;
function MC_UML_Any_Receive_Event return AMF.Internals.CMOF_Element;
function MC_UML_Artifact return AMF.Internals.CMOF_Element;
function MC_UML_Association return AMF.Internals.CMOF_Element;
function MC_UML_Association_Class return AMF.Internals.CMOF_Element;
function MC_UML_Behavior return AMF.Internals.CMOF_Element;
function MC_UML_Behavior_Execution_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Behavioral_Feature return AMF.Internals.CMOF_Element;
function MC_UML_Behaviored_Classifier return AMF.Internals.CMOF_Element;
function MC_UML_Broadcast_Signal_Action return AMF.Internals.CMOF_Element;
function MC_UML_Call_Action return AMF.Internals.CMOF_Element;
function MC_UML_Call_Behavior_Action return AMF.Internals.CMOF_Element;
function MC_UML_Call_Event return AMF.Internals.CMOF_Element;
function MC_UML_Call_Operation_Action return AMF.Internals.CMOF_Element;
function MC_UML_Central_Buffer_Node return AMF.Internals.CMOF_Element;
function MC_UML_Change_Event return AMF.Internals.CMOF_Element;
function MC_UML_Class return AMF.Internals.CMOF_Element;
function MC_UML_Classifier return AMF.Internals.CMOF_Element;
function MC_UML_Classifier_Template_Parameter return AMF.Internals.CMOF_Element;
function MC_UML_Clause return AMF.Internals.CMOF_Element;
function MC_UML_Clear_Association_Action return AMF.Internals.CMOF_Element;
function MC_UML_Clear_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MC_UML_Clear_Variable_Action return AMF.Internals.CMOF_Element;
function MC_UML_Collaboration return AMF.Internals.CMOF_Element;
function MC_UML_Collaboration_Use return AMF.Internals.CMOF_Element;
function MC_UML_Combined_Fragment return AMF.Internals.CMOF_Element;
function MC_UML_Comment return AMF.Internals.CMOF_Element;
function MC_UML_Communication_Path return AMF.Internals.CMOF_Element;
function MC_UML_Component return AMF.Internals.CMOF_Element;
function MC_UML_Component_Realization return AMF.Internals.CMOF_Element;
function MC_UML_Conditional_Node return AMF.Internals.CMOF_Element;
function MC_UML_Connectable_Element return AMF.Internals.CMOF_Element;
function MC_UML_Connectable_Element_Template_Parameter return AMF.Internals.CMOF_Element;
function MC_UML_Connection_Point_Reference return AMF.Internals.CMOF_Element;
function MC_UML_Connector return AMF.Internals.CMOF_Element;
function MC_UML_Connector_End return AMF.Internals.CMOF_Element;
function MC_UML_Consider_Ignore_Fragment return AMF.Internals.CMOF_Element;
function MC_UML_Constraint return AMF.Internals.CMOF_Element;
function MC_UML_Continuation return AMF.Internals.CMOF_Element;
function MC_UML_Control_Flow return AMF.Internals.CMOF_Element;
function MC_UML_Control_Node return AMF.Internals.CMOF_Element;
function MC_UML_Create_Link_Action return AMF.Internals.CMOF_Element;
function MC_UML_Create_Link_Object_Action return AMF.Internals.CMOF_Element;
function MC_UML_Create_Object_Action return AMF.Internals.CMOF_Element;
function MC_UML_Data_Store_Node return AMF.Internals.CMOF_Element;
function MC_UML_Data_Type return AMF.Internals.CMOF_Element;
function MC_UML_Decision_Node return AMF.Internals.CMOF_Element;
function MC_UML_Dependency return AMF.Internals.CMOF_Element;
function MC_UML_Deployed_Artifact return AMF.Internals.CMOF_Element;
function MC_UML_Deployment return AMF.Internals.CMOF_Element;
function MC_UML_Deployment_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Deployment_Target return AMF.Internals.CMOF_Element;
function MC_UML_Destroy_Link_Action return AMF.Internals.CMOF_Element;
function MC_UML_Destroy_Object_Action return AMF.Internals.CMOF_Element;
function MC_UML_Destruction_Occurrence_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Device return AMF.Internals.CMOF_Element;
function MC_UML_Directed_Relationship return AMF.Internals.CMOF_Element;
function MC_UML_Duration return AMF.Internals.CMOF_Element;
function MC_UML_Duration_Constraint return AMF.Internals.CMOF_Element;
function MC_UML_Duration_Interval return AMF.Internals.CMOF_Element;
function MC_UML_Duration_Observation return AMF.Internals.CMOF_Element;
function MC_UML_Element return AMF.Internals.CMOF_Element;
function MC_UML_Element_Import return AMF.Internals.CMOF_Element;
function MC_UML_Encapsulated_Classifier return AMF.Internals.CMOF_Element;
function MC_UML_Enumeration return AMF.Internals.CMOF_Element;
function MC_UML_Enumeration_Literal return AMF.Internals.CMOF_Element;
function MC_UML_Event return AMF.Internals.CMOF_Element;
function MC_UML_Exception_Handler return AMF.Internals.CMOF_Element;
function MC_UML_Executable_Node return AMF.Internals.CMOF_Element;
function MC_UML_Execution_Environment return AMF.Internals.CMOF_Element;
function MC_UML_Execution_Occurrence_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Execution_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Expansion_Node return AMF.Internals.CMOF_Element;
function MC_UML_Expansion_Region return AMF.Internals.CMOF_Element;
function MC_UML_Expression return AMF.Internals.CMOF_Element;
function MC_UML_Extend return AMF.Internals.CMOF_Element;
function MC_UML_Extension return AMF.Internals.CMOF_Element;
function MC_UML_Extension_End return AMF.Internals.CMOF_Element;
function MC_UML_Extension_Point return AMF.Internals.CMOF_Element;
function MC_UML_Feature return AMF.Internals.CMOF_Element;
function MC_UML_Final_Node return AMF.Internals.CMOF_Element;
function MC_UML_Final_State return AMF.Internals.CMOF_Element;
function MC_UML_Flow_Final_Node return AMF.Internals.CMOF_Element;
function MC_UML_Fork_Node return AMF.Internals.CMOF_Element;
function MC_UML_Function_Behavior return AMF.Internals.CMOF_Element;
function MC_UML_Gate return AMF.Internals.CMOF_Element;
function MC_UML_General_Ordering return AMF.Internals.CMOF_Element;
function MC_UML_Generalization return AMF.Internals.CMOF_Element;
function MC_UML_Generalization_Set return AMF.Internals.CMOF_Element;
function MC_UML_Image return AMF.Internals.CMOF_Element;
function MC_UML_Include return AMF.Internals.CMOF_Element;
function MC_UML_Information_Flow return AMF.Internals.CMOF_Element;
function MC_UML_Information_Item return AMF.Internals.CMOF_Element;
function MC_UML_Initial_Node return AMF.Internals.CMOF_Element;
function MC_UML_Input_Pin return AMF.Internals.CMOF_Element;
function MC_UML_Instance_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Instance_Value return AMF.Internals.CMOF_Element;
function MC_UML_Interaction return AMF.Internals.CMOF_Element;
function MC_UML_Interaction_Constraint return AMF.Internals.CMOF_Element;
function MC_UML_Interaction_Fragment return AMF.Internals.CMOF_Element;
function MC_UML_Interaction_Operand return AMF.Internals.CMOF_Element;
function MC_UML_Interaction_Use return AMF.Internals.CMOF_Element;
function MC_UML_Interface return AMF.Internals.CMOF_Element;
function MC_UML_Interface_Realization return AMF.Internals.CMOF_Element;
function MC_UML_Interruptible_Activity_Region return AMF.Internals.CMOF_Element;
function MC_UML_Interval return AMF.Internals.CMOF_Element;
function MC_UML_Interval_Constraint return AMF.Internals.CMOF_Element;
function MC_UML_Invocation_Action return AMF.Internals.CMOF_Element;
function MC_UML_Join_Node return AMF.Internals.CMOF_Element;
function MC_UML_Lifeline return AMF.Internals.CMOF_Element;
function MC_UML_Link_Action return AMF.Internals.CMOF_Element;
function MC_UML_Link_End_Creation_Data return AMF.Internals.CMOF_Element;
function MC_UML_Link_End_Data return AMF.Internals.CMOF_Element;
function MC_UML_Link_End_Destruction_Data return AMF.Internals.CMOF_Element;
function MC_UML_Literal_Boolean return AMF.Internals.CMOF_Element;
function MC_UML_Literal_Integer return AMF.Internals.CMOF_Element;
function MC_UML_Literal_Null return AMF.Internals.CMOF_Element;
function MC_UML_Literal_Real return AMF.Internals.CMOF_Element;
function MC_UML_Literal_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Literal_String return AMF.Internals.CMOF_Element;
function MC_UML_Literal_Unlimited_Natural return AMF.Internals.CMOF_Element;
function MC_UML_Loop_Node return AMF.Internals.CMOF_Element;
function MC_UML_Manifestation return AMF.Internals.CMOF_Element;
function MC_UML_Merge_Node return AMF.Internals.CMOF_Element;
function MC_UML_Message return AMF.Internals.CMOF_Element;
function MC_UML_Message_End return AMF.Internals.CMOF_Element;
function MC_UML_Message_Event return AMF.Internals.CMOF_Element;
function MC_UML_Message_Occurrence_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Model return AMF.Internals.CMOF_Element;
function MC_UML_Multiplicity_Element return AMF.Internals.CMOF_Element;
function MC_UML_Named_Element return AMF.Internals.CMOF_Element;
function MC_UML_Namespace return AMF.Internals.CMOF_Element;
function MC_UML_Node return AMF.Internals.CMOF_Element;
function MC_UML_Object_Flow return AMF.Internals.CMOF_Element;
function MC_UML_Object_Node return AMF.Internals.CMOF_Element;
function MC_UML_Observation return AMF.Internals.CMOF_Element;
function MC_UML_Occurrence_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Opaque_Action return AMF.Internals.CMOF_Element;
function MC_UML_Opaque_Behavior return AMF.Internals.CMOF_Element;
function MC_UML_Opaque_Expression return AMF.Internals.CMOF_Element;
function MC_UML_Operation return AMF.Internals.CMOF_Element;
function MC_UML_Operation_Template_Parameter return AMF.Internals.CMOF_Element;
function MC_UML_Output_Pin return AMF.Internals.CMOF_Element;
function MC_UML_Package return AMF.Internals.CMOF_Element;
function MC_UML_Package_Import return AMF.Internals.CMOF_Element;
function MC_UML_Package_Merge return AMF.Internals.CMOF_Element;
function MC_UML_Packageable_Element return AMF.Internals.CMOF_Element;
function MC_UML_Parameter return AMF.Internals.CMOF_Element;
function MC_UML_Parameter_Set return AMF.Internals.CMOF_Element;
function MC_UML_Parameterable_Element return AMF.Internals.CMOF_Element;
function MC_UML_Part_Decomposition return AMF.Internals.CMOF_Element;
function MC_UML_Pin return AMF.Internals.CMOF_Element;
function MC_UML_Port return AMF.Internals.CMOF_Element;
function MC_UML_Primitive_Type return AMF.Internals.CMOF_Element;
function MC_UML_Profile return AMF.Internals.CMOF_Element;
function MC_UML_Profile_Application return AMF.Internals.CMOF_Element;
function MC_UML_Property return AMF.Internals.CMOF_Element;
function MC_UML_Protocol_Conformance return AMF.Internals.CMOF_Element;
function MC_UML_Protocol_State_Machine return AMF.Internals.CMOF_Element;
function MC_UML_Protocol_Transition return AMF.Internals.CMOF_Element;
function MC_UML_Pseudostate return AMF.Internals.CMOF_Element;
function MC_UML_Qualifier_Value return AMF.Internals.CMOF_Element;
function MC_UML_Raise_Exception_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Extent_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Link_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Self_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MC_UML_Read_Variable_Action return AMF.Internals.CMOF_Element;
function MC_UML_Realization return AMF.Internals.CMOF_Element;
function MC_UML_Reception return AMF.Internals.CMOF_Element;
function MC_UML_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MC_UML_Redefinable_Element return AMF.Internals.CMOF_Element;
function MC_UML_Redefinable_Template_Signature return AMF.Internals.CMOF_Element;
function MC_UML_Reduce_Action return AMF.Internals.CMOF_Element;
function MC_UML_Region return AMF.Internals.CMOF_Element;
function MC_UML_Relationship return AMF.Internals.CMOF_Element;
function MC_UML_Remove_Structural_Feature_Value_Action return AMF.Internals.CMOF_Element;
function MC_UML_Remove_Variable_Value_Action return AMF.Internals.CMOF_Element;
function MC_UML_Reply_Action return AMF.Internals.CMOF_Element;
function MC_UML_Send_Object_Action return AMF.Internals.CMOF_Element;
function MC_UML_Send_Signal_Action return AMF.Internals.CMOF_Element;
function MC_UML_Sequence_Node return AMF.Internals.CMOF_Element;
function MC_UML_Signal return AMF.Internals.CMOF_Element;
function MC_UML_Signal_Event return AMF.Internals.CMOF_Element;
function MC_UML_Slot return AMF.Internals.CMOF_Element;
function MC_UML_Start_Classifier_Behavior_Action return AMF.Internals.CMOF_Element;
function MC_UML_Start_Object_Behavior_Action return AMF.Internals.CMOF_Element;
function MC_UML_State return AMF.Internals.CMOF_Element;
function MC_UML_State_Invariant return AMF.Internals.CMOF_Element;
function MC_UML_State_Machine return AMF.Internals.CMOF_Element;
function MC_UML_Stereotype return AMF.Internals.CMOF_Element;
function MC_UML_String_Expression return AMF.Internals.CMOF_Element;
function MC_UML_Structural_Feature return AMF.Internals.CMOF_Element;
function MC_UML_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MC_UML_Structured_Activity_Node return AMF.Internals.CMOF_Element;
function MC_UML_Structured_Classifier return AMF.Internals.CMOF_Element;
function MC_UML_Substitution return AMF.Internals.CMOF_Element;
function MC_UML_Template_Binding return AMF.Internals.CMOF_Element;
function MC_UML_Template_Parameter return AMF.Internals.CMOF_Element;
function MC_UML_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MC_UML_Template_Signature return AMF.Internals.CMOF_Element;
function MC_UML_Templateable_Element return AMF.Internals.CMOF_Element;
function MC_UML_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MC_UML_Time_Constraint return AMF.Internals.CMOF_Element;
function MC_UML_Time_Event return AMF.Internals.CMOF_Element;
function MC_UML_Time_Expression return AMF.Internals.CMOF_Element;
function MC_UML_Time_Interval return AMF.Internals.CMOF_Element;
function MC_UML_Time_Observation return AMF.Internals.CMOF_Element;
function MC_UML_Transition return AMF.Internals.CMOF_Element;
function MC_UML_Trigger return AMF.Internals.CMOF_Element;
function MC_UML_Type return AMF.Internals.CMOF_Element;
function MC_UML_Typed_Element return AMF.Internals.CMOF_Element;
function MC_UML_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MC_UML_Usage return AMF.Internals.CMOF_Element;
function MC_UML_Use_Case return AMF.Internals.CMOF_Element;
function MC_UML_Value_Pin return AMF.Internals.CMOF_Element;
function MC_UML_Value_Specification return AMF.Internals.CMOF_Element;
function MC_UML_Value_Specification_Action return AMF.Internals.CMOF_Element;
function MC_UML_Variable return AMF.Internals.CMOF_Element;
function MC_UML_Variable_Action return AMF.Internals.CMOF_Element;
function MC_UML_Vertex return AMF.Internals.CMOF_Element;
function MC_UML_Write_Link_Action return AMF.Internals.CMOF_Element;
function MC_UML_Write_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MC_UML_Write_Variable_Action return AMF.Internals.CMOF_Element;
function MP_UML_Abstraction_Mapping_A_Abstraction return AMF.Internals.CMOF_Element;
function MP_UML_Accept_Call_Action_Return_Information_A_Accept_Call_Action return AMF.Internals.CMOF_Element;
function MP_UML_Accept_Event_Action_Is_Unmarshall return AMF.Internals.CMOF_Element;
function MP_UML_Accept_Event_Action_Result_A_Accept_Event_Action return AMF.Internals.CMOF_Element;
function MP_UML_Accept_Event_Action_Trigger_A_Accept_Event_Action return AMF.Internals.CMOF_Element;
function MP_UML_Action_Context_A_Action return AMF.Internals.CMOF_Element;
function MP_UML_Action_Input_A_Action return AMF.Internals.CMOF_Element;
function MP_UML_Action_Is_Locally_Reentrant return AMF.Internals.CMOF_Element;
function MP_UML_Action_Local_Postcondition_A_Action return AMF.Internals.CMOF_Element;
function MP_UML_Action_Local_Precondition_A_Action return AMF.Internals.CMOF_Element;
function MP_UML_Action_Output_A_Action return AMF.Internals.CMOF_Element;
function MP_UML_Action_Execution_Specification_Action_A_Action_Execution_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Action_Input_Pin_From_Action_A_Action_Input_Pin return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Activity_Edge_Activity return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Group_Activity_Group_In_Activity return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Is_Read_Only return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Is_Single_Execution return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_Activity_Node_Activity return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_A_Activity return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Structured_Node_Structured_Activity_Node_Activity return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Variable_Variable_Activity_Scope return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Activity_Activity_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Guard_A_Activity_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_In_Group_Activity_Group_Contained_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_In_Partition_Activity_Partition_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_In_Structured_Node_Structured_Activity_Node_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Interrupts_Interruptible_Activity_Region_Interrupting_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Redefined_Edge_A_Activity_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Source_Activity_Node_Outgoing return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Target_Activity_Node_Incoming return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Edge_Weight_A_Activity_Edge return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Group_Contained_Edge_Activity_Edge_In_Group return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Group_Contained_Node_Activity_Node_In_Group return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Group_In_Activity_Activity_Group return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Group_Subgroup_Activity_Group_Super_Group return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Group_Super_Group_Activity_Group_Subgroup return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_Activity_Activity_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_In_Group_Activity_Group_Contained_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_In_Interruptible_Region_Interruptible_Activity_Region_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_In_Partition_Activity_Partition_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_In_Structured_Node_Structured_Activity_Node_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_Incoming_Activity_Edge_Target return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_Outgoing_Activity_Edge_Source return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Node_Redefined_Node_A_Activity_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Parameter_Node_Parameter_A_Activity_Parameter_Node return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Edge_Activity_Edge_In_Partition return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Is_Dimension return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Is_External return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Node_Activity_Node_In_Partition return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Represents_A_Activity_Partition return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Subpartition_Activity_Partition_Super_Partition return AMF.Internals.CMOF_Element;
function MP_UML_Activity_Partition_Super_Partition_Activity_Partition_Subpartition return AMF.Internals.CMOF_Element;
function MP_UML_Add_Structural_Feature_Value_Action_Insert_At_A_Add_Structural_Feature_Value_Action return AMF.Internals.CMOF_Element;
function MP_UML_Add_Structural_Feature_Value_Action_Is_Replace_All return AMF.Internals.CMOF_Element;
function MP_UML_Add_Variable_Value_Action_Insert_At_A_Add_Variable_Value_Action return AMF.Internals.CMOF_Element;
function MP_UML_Add_Variable_Value_Action_Is_Replace_All return AMF.Internals.CMOF_Element;
function MP_UML_Artifact_File_Name return AMF.Internals.CMOF_Element;
function MP_UML_Artifact_Manifestation_A_Artifact return AMF.Internals.CMOF_Element;
function MP_UML_Artifact_Nested_Artifact_A_Artifact return AMF.Internals.CMOF_Element;
function MP_UML_Artifact_Owned_Attribute_A_Artifact return AMF.Internals.CMOF_Element;
function MP_UML_Artifact_Owned_Operation_A_Artifact return AMF.Internals.CMOF_Element;
function MP_UML_Association_End_Type_A_Association return AMF.Internals.CMOF_Element;
function MP_UML_Association_Is_Derived return AMF.Internals.CMOF_Element;
function MP_UML_Association_Member_End_Property_Association return AMF.Internals.CMOF_Element;
function MP_UML_Association_Navigable_Owned_End_A_Association return AMF.Internals.CMOF_Element;
function MP_UML_Association_Owned_End_Property_Owning_Association return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Context_A_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Is_Reentrant return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Owned_Parameter_A_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Owned_Parameter_Set_A_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Postcondition_A_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Precondition_A_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Redefined_Behavior_A_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Specification_Behavioral_Feature_Method return AMF.Internals.CMOF_Element;
function MP_UML_Behavior_Execution_Specification_Behavior_A_Behavior_Execution_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Behavioral_Feature_Concurrency return AMF.Internals.CMOF_Element;
function MP_UML_Behavioral_Feature_Is_Abstract return AMF.Internals.CMOF_Element;
function MP_UML_Behavioral_Feature_Method_Behavior_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Behavioral_Feature_Owned_Parameter_A_Owner_Formal_Param return AMF.Internals.CMOF_Element;
function MP_UML_Behavioral_Feature_Owned_Parameter_Set_A_Behavioral_Feature return AMF.Internals.CMOF_Element;
function MP_UML_Behavioral_Feature_Raised_Exception_A_Behavioral_Feature return AMF.Internals.CMOF_Element;
function MP_UML_Behaviored_Classifier_Classifier_Behavior_A_Behaviored_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Behaviored_Classifier_Interface_Realization_Interface_Realization_Implementing_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Behaviored_Classifier_Owned_Behavior_A_Behaviored_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Broadcast_Signal_Action_Signal_A_Broadcast_Signal_Action return AMF.Internals.CMOF_Element;
function MP_UML_Call_Action_Is_Synchronous return AMF.Internals.CMOF_Element;
function MP_UML_Call_Action_Result_A_Call_Action return AMF.Internals.CMOF_Element;
function MP_UML_Call_Behavior_Action_Behavior_A_Call_Behavior_Action return AMF.Internals.CMOF_Element;
function MP_UML_Call_Event_Operation_A_Call_Event return AMF.Internals.CMOF_Element;
function MP_UML_Call_Operation_Action_Operation_A_Call_Operation_Action return AMF.Internals.CMOF_Element;
function MP_UML_Call_Operation_Action_Target_A_Call_Operation_Action return AMF.Internals.CMOF_Element;
function MP_UML_Change_Event_Change_Expression_A_Change_Event return AMF.Internals.CMOF_Element;
function MP_UML_Class_Extension_Extension_Metaclass return AMF.Internals.CMOF_Element;
function MP_UML_Class_Is_Abstract return AMF.Internals.CMOF_Element;
function MP_UML_Class_Is_Active return AMF.Internals.CMOF_Element;
function MP_UML_Class_Nested_Classifier_A_Class return AMF.Internals.CMOF_Element;
function MP_UML_Class_Owned_Attribute_Property_Class return AMF.Internals.CMOF_Element;
function MP_UML_Class_Owned_Operation_Operation_Class return AMF.Internals.CMOF_Element;
function MP_UML_Class_Owned_Reception_A_Class return AMF.Internals.CMOF_Element;
function MP_UML_Class_Super_Class_A_Class return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Attribute_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Collaboration_Use_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Feature_Feature_Featuring_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_General_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Generalization_Generalization_Specific return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Inherited_Member_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Is_Abstract return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Is_Final_Specialization return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Owned_Template_Signature_Redefinable_Template_Signature_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Owned_Use_Case_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Powertype_Extent_Generalization_Set_Powertype return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Redefined_Classifier_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Representation_A_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Substitution_Substitution_Substituting_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Template_Parameter_Classifier_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Use_Case_Use_Case_Subject return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Template_Parameter_Allow_Substitutable return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Template_Parameter_Constraining_Classifier_A_Classifier_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Classifier_Template_Parameter_Parametered_Element_Classifier_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Clause_Body_A_Clause return AMF.Internals.CMOF_Element;
function MP_UML_Clause_Body_Output_A_Clause return AMF.Internals.CMOF_Element;
function MP_UML_Clause_Decider_A_Clause return AMF.Internals.CMOF_Element;
function MP_UML_Clause_Predecessor_Clause_Clause_Successor_Clause return AMF.Internals.CMOF_Element;
function MP_UML_Clause_Successor_Clause_Clause_Predecessor_Clause return AMF.Internals.CMOF_Element;
function MP_UML_Clause_Test_A_Clause return AMF.Internals.CMOF_Element;
function MP_UML_Clear_Association_Action_Association_A_Clear_Association_Action return AMF.Internals.CMOF_Element;
function MP_UML_Clear_Association_Action_Object_A_Clear_Association_Action return AMF.Internals.CMOF_Element;
function MP_UML_Clear_Structural_Feature_Action_Result_A_Clear_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MP_UML_Collaboration_Collaboration_Role_A_Collaboration return AMF.Internals.CMOF_Element;
function MP_UML_Collaboration_Use_Role_Binding_A_Collaboration_Use return AMF.Internals.CMOF_Element;
function MP_UML_Collaboration_Use_Type_A_Collaboration_Use return AMF.Internals.CMOF_Element;
function MP_UML_Combined_Fragment_Cfragment_Gate_A_Combined_Fragment return AMF.Internals.CMOF_Element;
function MP_UML_Combined_Fragment_Interaction_Operator return AMF.Internals.CMOF_Element;
function MP_UML_Combined_Fragment_Operand_A_Combined_Fragment return AMF.Internals.CMOF_Element;
function MP_UML_Comment_Annotated_Element_A_Comment return AMF.Internals.CMOF_Element;
function MP_UML_Comment_Body return AMF.Internals.CMOF_Element;
function MP_UML_Component_Is_Indirectly_Instantiated return AMF.Internals.CMOF_Element;
function MP_UML_Component_Packaged_Element_A_Component return AMF.Internals.CMOF_Element;
function MP_UML_Component_Provided_A_Component return AMF.Internals.CMOF_Element;
function MP_UML_Component_Realization_Component_Realization_Abstraction return AMF.Internals.CMOF_Element;
function MP_UML_Component_Required_A_Component return AMF.Internals.CMOF_Element;
function MP_UML_Component_Realization_Abstraction_Component_Realization return AMF.Internals.CMOF_Element;
function MP_UML_Component_Realization_Realizing_Classifier_A_Component_Realization return AMF.Internals.CMOF_Element;
function MP_UML_Conditional_Node_Clause_A_Conditional_Node return AMF.Internals.CMOF_Element;
function MP_UML_Conditional_Node_Is_Assured return AMF.Internals.CMOF_Element;
function MP_UML_Conditional_Node_Is_Determinate return AMF.Internals.CMOF_Element;
function MP_UML_Conditional_Node_Result_A_Conditional_Node return AMF.Internals.CMOF_Element;
function MP_UML_Connectable_Element_End_Connector_End_Role return AMF.Internals.CMOF_Element;
function MP_UML_Connectable_Element_Template_Parameter_Connectable_Element_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MP_UML_Connectable_Element_Template_Parameter_Parametered_Element_Connectable_Element_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Connection_Point_Reference_Entry_A_Connection_Point_Reference return AMF.Internals.CMOF_Element;
function MP_UML_Connection_Point_Reference_Exit_A_Connection_Point_Reference return AMF.Internals.CMOF_Element;
function MP_UML_Connection_Point_Reference_State_State_Connection return AMF.Internals.CMOF_Element;
function MP_UML_Connector_Contract_A_Connector return AMF.Internals.CMOF_Element;
function MP_UML_Connector_End_A_Connector return AMF.Internals.CMOF_Element;
function MP_UML_Connector_Kind return AMF.Internals.CMOF_Element;
function MP_UML_Connector_Redefined_Connector_A_Connector return AMF.Internals.CMOF_Element;
function MP_UML_Connector_Type_A_Connector return AMF.Internals.CMOF_Element;
function MP_UML_Connector_End_Defining_End_A_Connector_End return AMF.Internals.CMOF_Element;
function MP_UML_Connector_End_Part_With_Port_A_Connector_End return AMF.Internals.CMOF_Element;
function MP_UML_Connector_End_Role_Connectable_Element_End return AMF.Internals.CMOF_Element;
function MP_UML_Consider_Ignore_Fragment_Message_A_Consider_Ignore_Fragment return AMF.Internals.CMOF_Element;
function MP_UML_Constraint_Constrained_Element_A_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Constraint_Context_Namespace_Owned_Rule return AMF.Internals.CMOF_Element;
function MP_UML_Constraint_Specification_A_Owning_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Continuation_Setting return AMF.Internals.CMOF_Element;
function MP_UML_Create_Link_Action_End_Data_A_Create_Link_Action return AMF.Internals.CMOF_Element;
function MP_UML_Create_Link_Object_Action_Result_A_Create_Link_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Create_Object_Action_Classifier_A_Create_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Create_Object_Action_Result_A_Create_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Data_Type_Owned_Attribute_Property_Datatype return AMF.Internals.CMOF_Element;
function MP_UML_Data_Type_Owned_Operation_Operation_Datatype return AMF.Internals.CMOF_Element;
function MP_UML_Decision_Node_Decision_Input_A_Decision_Node return AMF.Internals.CMOF_Element;
function MP_UML_Decision_Node_Decision_Input_Flow_A_Decision_Node return AMF.Internals.CMOF_Element;
function MP_UML_Dependency_Client_Named_Element_Client_Dependency return AMF.Internals.CMOF_Element;
function MP_UML_Dependency_Supplier_A_Supplier_Dependency return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Configuration_Deployment_Specification_Deployment return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Deployed_Artifact_A_Deployment return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Location_Deployment_Target_Deployment return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Specification_Deployment_Deployment_Configuration return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Specification_Deployment_Location return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Specification_Execution_Location return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Target_Deployed_Element_A_Deployment_Target return AMF.Internals.CMOF_Element;
function MP_UML_Deployment_Target_Deployment_Deployment_Location return AMF.Internals.CMOF_Element;
function MP_UML_Destroy_Link_Action_End_Data_A_Destroy_Link_Action return AMF.Internals.CMOF_Element;
function MP_UML_Destroy_Object_Action_Is_Destroy_Links return AMF.Internals.CMOF_Element;
function MP_UML_Destroy_Object_Action_Is_Destroy_Owned_Objects return AMF.Internals.CMOF_Element;
function MP_UML_Destroy_Object_Action_Target_A_Destroy_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Directed_Relationship_Source_A_Directed_Relationship return AMF.Internals.CMOF_Element;
function MP_UML_Directed_Relationship_Target_A_Directed_Relationship return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Expr_A_Duration return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Observation_A_Duration return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Constraint_First_Event return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Constraint_Specification_A_Duration_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Interval_Max_A_Duration_Interval return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Interval_Min_A_Duration_Interval return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Observation_Event_A_Duration_Observation return AMF.Internals.CMOF_Element;
function MP_UML_Duration_Observation_First_Event return AMF.Internals.CMOF_Element;
function MP_UML_Element_Owned_Comment_A_Owning_Element return AMF.Internals.CMOF_Element;
function MP_UML_Element_Owned_Element_Element_Owner return AMF.Internals.CMOF_Element;
function MP_UML_Element_Owner_Element_Owned_Element return AMF.Internals.CMOF_Element;
function MP_UML_Element_Import_Alias return AMF.Internals.CMOF_Element;
function MP_UML_Element_Import_Imported_Element_A_Element_Import return AMF.Internals.CMOF_Element;
function MP_UML_Element_Import_Importing_Namespace_Namespace_Element_Import return AMF.Internals.CMOF_Element;
function MP_UML_Element_Import_Visibility return AMF.Internals.CMOF_Element;
function MP_UML_Encapsulated_Classifier_Owned_Port_A_Encapsulated_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Enumeration_Owned_Literal_Enumeration_Literal_Enumeration return AMF.Internals.CMOF_Element;
function MP_UML_Enumeration_Literal_Classifier_A_Enumeration_Literal return AMF.Internals.CMOF_Element;
function MP_UML_Enumeration_Literal_Enumeration_Enumeration_Owned_Literal return AMF.Internals.CMOF_Element;
function MP_UML_Exception_Handler_Exception_Input_A_Exception_Handler return AMF.Internals.CMOF_Element;
function MP_UML_Exception_Handler_Exception_Type_A_Exception_Handler return AMF.Internals.CMOF_Element;
function MP_UML_Exception_Handler_Handler_Body_A_Exception_Handler return AMF.Internals.CMOF_Element;
function MP_UML_Exception_Handler_Protected_Node_Executable_Node_Handler return AMF.Internals.CMOF_Element;
function MP_UML_Executable_Node_Handler_Exception_Handler_Protected_Node return AMF.Internals.CMOF_Element;
function MP_UML_Execution_Occurrence_Specification_Execution_A_Execution_Occurrence_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Execution_Specification_Finish_A_Execution_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Execution_Specification_Start_A_Execution_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Expansion_Node_Region_As_Input_Expansion_Region_Input_Element return AMF.Internals.CMOF_Element;
function MP_UML_Expansion_Node_Region_As_Output_Expansion_Region_Output_Element return AMF.Internals.CMOF_Element;
function MP_UML_Expansion_Region_Input_Element_Expansion_Node_Region_As_Input return AMF.Internals.CMOF_Element;
function MP_UML_Expansion_Region_Mode return AMF.Internals.CMOF_Element;
function MP_UML_Expansion_Region_Output_Element_Expansion_Node_Region_As_Output return AMF.Internals.CMOF_Element;
function MP_UML_Expression_Operand_A_Expression return AMF.Internals.CMOF_Element;
function MP_UML_Expression_Symbol return AMF.Internals.CMOF_Element;
function MP_UML_Extend_Condition_A_Extend return AMF.Internals.CMOF_Element;
function MP_UML_Extend_Extended_Case_A_Extend return AMF.Internals.CMOF_Element;
function MP_UML_Extend_Extension_Use_Case_Extend return AMF.Internals.CMOF_Element;
function MP_UML_Extend_Extension_Location_A_Extension return AMF.Internals.CMOF_Element;
function MP_UML_Extension_Is_Required return AMF.Internals.CMOF_Element;
function MP_UML_Extension_Metaclass_Class_Extension return AMF.Internals.CMOF_Element;
function MP_UML_Extension_Owned_End_A_Extension return AMF.Internals.CMOF_Element;
function MP_UML_Extension_End_Lower return AMF.Internals.CMOF_Element;
function MP_UML_Extension_End_Type_A_Extension_End return AMF.Internals.CMOF_Element;
function MP_UML_Extension_Point_Use_Case_Use_Case_Extension_Point return AMF.Internals.CMOF_Element;
function MP_UML_Feature_Featuring_Classifier_Classifier_Feature return AMF.Internals.CMOF_Element;
function MP_UML_Feature_Is_Static return AMF.Internals.CMOF_Element;
function MP_UML_General_Ordering_After_Occurrence_Specification_To_Before return AMF.Internals.CMOF_Element;
function MP_UML_General_Ordering_Before_Occurrence_Specification_To_After return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_General_A_Generalization return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Generalization_Set_Generalization_Set_Generalization return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Is_Substitutable return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Specific_Classifier_Generalization return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Set_Generalization_Generalization_Generalization_Set return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Set_Is_Covering return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Set_Is_Disjoint return AMF.Internals.CMOF_Element;
function MP_UML_Generalization_Set_Powertype_Classifier_Powertype_Extent return AMF.Internals.CMOF_Element;
function MP_UML_Image_Content return AMF.Internals.CMOF_Element;
function MP_UML_Image_Format return AMF.Internals.CMOF_Element;
function MP_UML_Image_Location return AMF.Internals.CMOF_Element;
function MP_UML_Include_Addition_A_Include return AMF.Internals.CMOF_Element;
function MP_UML_Include_Including_Case_Use_Case_Include return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Conveyed_A_Information_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Information_Source_A_Information_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Information_Target_A_Information_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Realization_A_Abstraction return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Realizing_Activity_Edge_A_Information_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Realizing_Connector_A_Information_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Information_Flow_Realizing_Message_A_Information_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Information_Item_Represented_A_Representation return AMF.Internals.CMOF_Element;
function MP_UML_Instance_Specification_Classifier_A_Instance_Specification return AMF.Internals.CMOF_Element;
function MP_UML_Instance_Specification_Slot_Slot_Owning_Instance return AMF.Internals.CMOF_Element;
function MP_UML_Instance_Specification_Specification_A_Owning_Instance_Spec return AMF.Internals.CMOF_Element;
function MP_UML_Instance_Value_Instance_A_Instance_Value return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Action_A_Interaction return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Formal_Gate_A_Interaction return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Fragment_Interaction_Fragment_Enclosing_Interaction return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Lifeline_Lifeline_Interaction return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Message_Message_Interaction return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Constraint_Maxint_A_Interaction_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Constraint_Minint_A_Interaction_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Fragment_Covered_Lifeline_Covered_By return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Fragment_Enclosing_Interaction_Interaction_Fragment return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Fragment_Enclosing_Operand_Interaction_Operand_Fragment return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Fragment_General_Ordering_A_Interaction_Fragment return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Operand_Fragment_Interaction_Fragment_Enclosing_Operand return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Operand_Guard_A_Interaction_Operand return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Use_Actual_Gate_A_Interaction_Use return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Use_Argument_A_Interaction_Use return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Use_Refers_To_A_Interaction_Use return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Use_Return_Value_A_Interaction_Use return AMF.Internals.CMOF_Element;
function MP_UML_Interaction_Use_Return_Value_Recipient_A_Interaction_Use return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Nested_Classifier_A_Interface return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Owned_Attribute_Property_Interface return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Owned_Operation_Operation_Interface return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Owned_Reception_A_Interface return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Protocol_A_Interface return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Redefined_Interface_A_Interface return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Realization_Contract_A_Interface_Realization return AMF.Internals.CMOF_Element;
function MP_UML_Interface_Realization_Implementing_Classifier_Behaviored_Classifier_Interface_Realization return AMF.Internals.CMOF_Element;
function MP_UML_Interruptible_Activity_Region_Interrupting_Edge_Activity_Edge_Interrupts return AMF.Internals.CMOF_Element;
function MP_UML_Interruptible_Activity_Region_Node_Activity_Node_In_Interruptible_Region return AMF.Internals.CMOF_Element;
function MP_UML_Interval_Max_A_Interval return AMF.Internals.CMOF_Element;
function MP_UML_Interval_Min_A_Interval return AMF.Internals.CMOF_Element;
function MP_UML_Interval_Constraint_Specification_A_Interval_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Invocation_Action_Argument_A_Invocation_Action return AMF.Internals.CMOF_Element;
function MP_UML_Invocation_Action_On_Port_A_Invocation_Action return AMF.Internals.CMOF_Element;
function MP_UML_Join_Node_Is_Combine_Duplicate return AMF.Internals.CMOF_Element;
function MP_UML_Join_Node_Join_Spec_A_Join_Node return AMF.Internals.CMOF_Element;
function MP_UML_Lifeline_Covered_By_Interaction_Fragment_Covered return AMF.Internals.CMOF_Element;
function MP_UML_Lifeline_Decomposed_As_A_Lifeline return AMF.Internals.CMOF_Element;
function MP_UML_Lifeline_Interaction_Interaction_Lifeline return AMF.Internals.CMOF_Element;
function MP_UML_Lifeline_Represents_A_Lifeline return AMF.Internals.CMOF_Element;
function MP_UML_Lifeline_Selector_A_Lifeline return AMF.Internals.CMOF_Element;
function MP_UML_Link_Action_End_Data_A_Link_Action return AMF.Internals.CMOF_Element;
function MP_UML_Link_Action_Input_Value_A_Link_Action return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Creation_Data_Insert_At_A_Link_End_Creation_Data return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Creation_Data_Is_Replace_All return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Data_End_A_Link_End_Data return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Data_Qualifier_A_Link_End_Data return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Data_Value_A_Link_End_Data return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Destruction_Data_Destroy_At_A_Link_End_Destruction_Data return AMF.Internals.CMOF_Element;
function MP_UML_Link_End_Destruction_Data_Is_Destroy_Duplicates return AMF.Internals.CMOF_Element;
function MP_UML_Literal_Boolean_Value return AMF.Internals.CMOF_Element;
function MP_UML_Literal_Integer_Value return AMF.Internals.CMOF_Element;
function MP_UML_Literal_Real_Value return AMF.Internals.CMOF_Element;
function MP_UML_Literal_String_Value return AMF.Internals.CMOF_Element;
function MP_UML_Literal_Unlimited_Natural_Value return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Body_Output_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Body_Part_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Decider_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Is_Tested_First return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Loop_Variable_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Loop_Variable_Input_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Result_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Setup_Part_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Loop_Node_Test_A_Loop_Node return AMF.Internals.CMOF_Element;
function MP_UML_Manifestation_Utilized_Element_A_Manifestation return AMF.Internals.CMOF_Element;
function MP_UML_Message_Argument_A_Message return AMF.Internals.CMOF_Element;
function MP_UML_Message_Connector_A_Message return AMF.Internals.CMOF_Element;
function MP_UML_Message_Interaction_Interaction_Message return AMF.Internals.CMOF_Element;
function MP_UML_Message_Message_Kind return AMF.Internals.CMOF_Element;
function MP_UML_Message_Message_Sort return AMF.Internals.CMOF_Element;
function MP_UML_Message_Receive_Event_A_End_Message return AMF.Internals.CMOF_Element;
function MP_UML_Message_Send_Event_A_End_Message return AMF.Internals.CMOF_Element;
function MP_UML_Message_Signature_A_Message return AMF.Internals.CMOF_Element;
function MP_UML_Message_End_Message_A_Message_End return AMF.Internals.CMOF_Element;
function MP_UML_Model_Viewpoint return AMF.Internals.CMOF_Element;
function MP_UML_Multiplicity_Element_Is_Ordered return AMF.Internals.CMOF_Element;
function MP_UML_Multiplicity_Element_Is_Unique return AMF.Internals.CMOF_Element;
function MP_UML_Multiplicity_Element_Lower return AMF.Internals.CMOF_Element;
function MP_UML_Multiplicity_Element_Lower_Value_A_Owning_Lower return AMF.Internals.CMOF_Element;
function MP_UML_Multiplicity_Element_Upper return AMF.Internals.CMOF_Element;
function MP_UML_Multiplicity_Element_Upper_Value_A_Owning_Upper return AMF.Internals.CMOF_Element;
function MP_UML_Named_Element_Client_Dependency_Dependency_Client return AMF.Internals.CMOF_Element;
function MP_UML_Named_Element_Name return AMF.Internals.CMOF_Element;
function MP_UML_Named_Element_Name_Expression_A_Named_Element return AMF.Internals.CMOF_Element;
function MP_UML_Named_Element_Namespace_Namespace_Owned_Member return AMF.Internals.CMOF_Element;
function MP_UML_Named_Element_Qualified_Name return AMF.Internals.CMOF_Element;
function MP_UML_Named_Element_Visibility return AMF.Internals.CMOF_Element;
function MP_UML_Namespace_Element_Import_Element_Import_Importing_Namespace return AMF.Internals.CMOF_Element;
function MP_UML_Namespace_Imported_Member_A_Namespace return AMF.Internals.CMOF_Element;
function MP_UML_Namespace_Member_A_Member_Namespace return AMF.Internals.CMOF_Element;
function MP_UML_Namespace_Owned_Member_Named_Element_Namespace return AMF.Internals.CMOF_Element;
function MP_UML_Namespace_Owned_Rule_Constraint_Context return AMF.Internals.CMOF_Element;
function MP_UML_Namespace_Package_Import_Package_Import_Importing_Namespace return AMF.Internals.CMOF_Element;
function MP_UML_Node_Nested_Node_A_Node return AMF.Internals.CMOF_Element;
function MP_UML_Object_Flow_Is_Multicast return AMF.Internals.CMOF_Element;
function MP_UML_Object_Flow_Is_Multireceive return AMF.Internals.CMOF_Element;
function MP_UML_Object_Flow_Selection_A_Object_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Object_Flow_Transformation_A_Object_Flow return AMF.Internals.CMOF_Element;
function MP_UML_Object_Node_In_State_A_Object_Node return AMF.Internals.CMOF_Element;
function MP_UML_Object_Node_Is_Control_Type return AMF.Internals.CMOF_Element;
function MP_UML_Object_Node_Ordering return AMF.Internals.CMOF_Element;
function MP_UML_Object_Node_Selection_A_Object_Node return AMF.Internals.CMOF_Element;
function MP_UML_Object_Node_Upper_Bound_A_Object_Node return AMF.Internals.CMOF_Element;
function MP_UML_Occurrence_Specification_Covered_A_Events return AMF.Internals.CMOF_Element;
function MP_UML_Occurrence_Specification_To_After_General_Ordering_Before return AMF.Internals.CMOF_Element;
function MP_UML_Occurrence_Specification_To_Before_General_Ordering_After return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Action_Body return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Action_Input_Value_A_Opaque_Action return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Action_Language return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Action_Output_Value_A_Opaque_Action return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Behavior_Body return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Behavior_Language return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Expression_Behavior_A_Opaque_Expression return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Expression_Body return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Expression_Language return AMF.Internals.CMOF_Element;
function MP_UML_Opaque_Expression_Result_A_Opaque_Expression return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Body_Condition_A_Body_Context return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Class_Class_Owned_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Datatype_Data_Type_Owned_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Interface_Interface_Owned_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Is_Ordered return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Is_Query return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Is_Unique return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Lower return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Owned_Parameter_Parameter_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Postcondition_A_Post_Context return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Precondition_A_Pre_Context return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Raised_Exception_A_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Redefined_Operation_A_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Template_Parameter_Operation_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Type_A_Operation return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Upper return AMF.Internals.CMOF_Element;
function MP_UML_Operation_Template_Parameter_Parametered_Element_Operation_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Package_URI return AMF.Internals.CMOF_Element;
function MP_UML_Package_Nested_Package_Package_Nesting_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Nesting_Package_Package_Nested_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Owned_Stereotype_A_Owning_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Owned_Type_Type_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Package_Merge_Package_Merge_Receiving_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Packaged_Element_A_Owning_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Profile_Application_Profile_Application_Applying_Package return AMF.Internals.CMOF_Element;
function MP_UML_Package_Import_Imported_Package_A_Package_Import return AMF.Internals.CMOF_Element;
function MP_UML_Package_Import_Importing_Namespace_Namespace_Package_Import return AMF.Internals.CMOF_Element;
function MP_UML_Package_Import_Visibility return AMF.Internals.CMOF_Element;
function MP_UML_Package_Merge_Merged_Package_A_Package_Merge return AMF.Internals.CMOF_Element;
function MP_UML_Package_Merge_Receiving_Package_Package_Package_Merge return AMF.Internals.CMOF_Element;
function MP_UML_Packageable_Element_Visibility return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Default return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Default_Value_A_Owning_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Direction return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Effect return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Is_Exception return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Is_Stream return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Operation_Operation_Owned_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Parameter_Set_Parameter_Set_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Set_Condition_A_Parameter_Set return AMF.Internals.CMOF_Element;
function MP_UML_Parameter_Set_Parameter_Parameter_Parameter_Set return AMF.Internals.CMOF_Element;
function MP_UML_Parameterable_Element_Owning_Template_Parameter_Template_Parameter_Owned_Parametered_Element return AMF.Internals.CMOF_Element;
function MP_UML_Parameterable_Element_Template_Parameter_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MP_UML_Pin_Is_Control return AMF.Internals.CMOF_Element;
function MP_UML_Port_Is_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_Port_Is_Conjugated return AMF.Internals.CMOF_Element;
function MP_UML_Port_Is_Service return AMF.Internals.CMOF_Element;
function MP_UML_Port_Protocol_A_Port return AMF.Internals.CMOF_Element;
function MP_UML_Port_Provided_A_Port return AMF.Internals.CMOF_Element;
function MP_UML_Port_Redefined_Port_A_Port return AMF.Internals.CMOF_Element;
function MP_UML_Port_Required_A_Port return AMF.Internals.CMOF_Element;
function MP_UML_Profile_Metaclass_Reference_A_Profile return AMF.Internals.CMOF_Element;
function MP_UML_Profile_Metamodel_Reference_A_Profile return AMF.Internals.CMOF_Element;
function MP_UML_Profile_Application_Applied_Profile_A_Profile_Application return AMF.Internals.CMOF_Element;
function MP_UML_Profile_Application_Applying_Package_Package_Profile_Application return AMF.Internals.CMOF_Element;
function MP_UML_Profile_Application_Is_Strict return AMF.Internals.CMOF_Element;
function MP_UML_Property_Aggregation return AMF.Internals.CMOF_Element;
function MP_UML_Property_Association_Association_Member_End return AMF.Internals.CMOF_Element;
function MP_UML_Property_Association_End_Property_Qualifier return AMF.Internals.CMOF_Element;
function MP_UML_Property_Class_Class_Owned_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_Property_Datatype_Data_Type_Owned_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_Property_Default return AMF.Internals.CMOF_Element;
function MP_UML_Property_Default_Value_A_Owning_Property return AMF.Internals.CMOF_Element;
function MP_UML_Property_Interface_Interface_Owned_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_Property_Is_Composite return AMF.Internals.CMOF_Element;
function MP_UML_Property_Is_Derived return AMF.Internals.CMOF_Element;
function MP_UML_Property_Is_Derived_Union return AMF.Internals.CMOF_Element;
function MP_UML_Property_Is_ID return AMF.Internals.CMOF_Element;
function MP_UML_Property_Is_Read_Only return AMF.Internals.CMOF_Element;
function MP_UML_Property_Opposite_A_Property return AMF.Internals.CMOF_Element;
function MP_UML_Property_Owning_Association_Association_Owned_End return AMF.Internals.CMOF_Element;
function MP_UML_Property_Qualifier_Property_Association_End return AMF.Internals.CMOF_Element;
function MP_UML_Property_Redefined_Property_A_Property return AMF.Internals.CMOF_Element;
function MP_UML_Property_Subsetted_Property_A_Property return AMF.Internals.CMOF_Element;
function MP_UML_Protocol_Conformance_General_Machine_A_Protocol_Conformance return AMF.Internals.CMOF_Element;
function MP_UML_Protocol_Conformance_Specific_Machine_Protocol_State_Machine_Conformance return AMF.Internals.CMOF_Element;
function MP_UML_Protocol_State_Machine_Conformance_Protocol_Conformance_Specific_Machine return AMF.Internals.CMOF_Element;
function MP_UML_Protocol_Transition_Post_Condition_A_Owning_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Protocol_Transition_Pre_Condition_A_Protocol_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Protocol_Transition_Referred_A_Protocol_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Pseudostate_Kind return AMF.Internals.CMOF_Element;
function MP_UML_Pseudostate_State_State_Connection_Point return AMF.Internals.CMOF_Element;
function MP_UML_Pseudostate_State_Machine_State_Machine_Connection_Point return AMF.Internals.CMOF_Element;
function MP_UML_Qualifier_Value_Qualifier_A_Qualifier_Value return AMF.Internals.CMOF_Element;
function MP_UML_Qualifier_Value_Value_A_Qualifier_Value return AMF.Internals.CMOF_Element;
function MP_UML_Raise_Exception_Action_Exception_A_Raise_Exception_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Extent_Action_Classifier_A_Read_Extent_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Extent_Action_Result_A_Read_Extent_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Is_Classified_Object_Action_Classifier_A_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Is_Classified_Object_Action_Is_Direct return AMF.Internals.CMOF_Element;
function MP_UML_Read_Is_Classified_Object_Action_Object_A_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Is_Classified_Object_Action_Result_A_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Action_Result_A_Read_Link_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Object_End_Action_End_A_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Object_End_Action_Object_A_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Object_End_Action_Result_A_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Object_End_Qualifier_Action_Object_A_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Object_End_Qualifier_Action_Qualifier_A_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Link_Object_End_Qualifier_Action_Result_A_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Self_Action_Result_A_Read_Self_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Structural_Feature_Action_Result_A_Read_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MP_UML_Read_Variable_Action_Result_A_Read_Variable_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reception_Signal_A_Reception return AMF.Internals.CMOF_Element;
function MP_UML_Reclassify_Object_Action_Is_Replace_All return AMF.Internals.CMOF_Element;
function MP_UML_Reclassify_Object_Action_New_Classifier_A_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reclassify_Object_Action_Object_A_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reclassify_Object_Action_Old_Classifier_A_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Redefinable_Element_Is_Leaf return AMF.Internals.CMOF_Element;
function MP_UML_Redefinable_Element_Redefined_Element_A_Redefinable_Element return AMF.Internals.CMOF_Element;
function MP_UML_Redefinable_Element_Redefinition_Context_A_Redefinable_Element return AMF.Internals.CMOF_Element;
function MP_UML_Redefinable_Template_Signature_Classifier_Classifier_Owned_Template_Signature return AMF.Internals.CMOF_Element;
function MP_UML_Redefinable_Template_Signature_Extended_Signature_A_Redefinable_Template_Signature return AMF.Internals.CMOF_Element;
function MP_UML_Redefinable_Template_Signature_Inherited_Parameter_A_Redefinable_Template_Signature return AMF.Internals.CMOF_Element;
function MP_UML_Reduce_Action_Collection_A_Reduce_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reduce_Action_Is_Ordered return AMF.Internals.CMOF_Element;
function MP_UML_Reduce_Action_Reducer_A_Reduce_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reduce_Action_Result_A_Reduce_Action return AMF.Internals.CMOF_Element;
function MP_UML_Region_Extended_Region_A_Region return AMF.Internals.CMOF_Element;
function MP_UML_Region_Redefinition_Context_A_Region return AMF.Internals.CMOF_Element;
function MP_UML_Region_State_State_Region return AMF.Internals.CMOF_Element;
function MP_UML_Region_State_Machine_State_Machine_Region return AMF.Internals.CMOF_Element;
function MP_UML_Region_Subvertex_Vertex_Container return AMF.Internals.CMOF_Element;
function MP_UML_Region_Transition_Transition_Container return AMF.Internals.CMOF_Element;
function MP_UML_Relationship_Related_Element_A_Relationship return AMF.Internals.CMOF_Element;
function MP_UML_Remove_Structural_Feature_Value_Action_Is_Remove_Duplicates return AMF.Internals.CMOF_Element;
function MP_UML_Remove_Structural_Feature_Value_Action_Remove_At_A_Remove_Structural_Feature_Value_Action return AMF.Internals.CMOF_Element;
function MP_UML_Remove_Variable_Value_Action_Is_Remove_Duplicates return AMF.Internals.CMOF_Element;
function MP_UML_Remove_Variable_Value_Action_Remove_At_A_Remove_Variable_Value_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reply_Action_Reply_To_Call_A_Reply_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reply_Action_Reply_Value_A_Reply_Action return AMF.Internals.CMOF_Element;
function MP_UML_Reply_Action_Return_Information_A_Reply_Action return AMF.Internals.CMOF_Element;
function MP_UML_Send_Object_Action_Request_A_Send_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Send_Object_Action_Target_A_Send_Object_Action return AMF.Internals.CMOF_Element;
function MP_UML_Send_Signal_Action_Signal_A_Send_Signal_Action return AMF.Internals.CMOF_Element;
function MP_UML_Send_Signal_Action_Target_A_Send_Signal_Action return AMF.Internals.CMOF_Element;
function MP_UML_Sequence_Node_Executable_Node_A_Sequence_Node return AMF.Internals.CMOF_Element;
function MP_UML_Signal_Owned_Attribute_A_Owning_Signal return AMF.Internals.CMOF_Element;
function MP_UML_Signal_Event_Signal_A_Signal_Event return AMF.Internals.CMOF_Element;
function MP_UML_Slot_Defining_Feature_A_Slot return AMF.Internals.CMOF_Element;
function MP_UML_Slot_Owning_Instance_Instance_Specification_Slot return AMF.Internals.CMOF_Element;
function MP_UML_Slot_Value_A_Owning_Slot return AMF.Internals.CMOF_Element;
function MP_UML_Start_Classifier_Behavior_Action_Object_A_Start_Classifier_Behavior_Action return AMF.Internals.CMOF_Element;
function MP_UML_Start_Object_Behavior_Action_Object_A_Start_Object_Behavior_Action return AMF.Internals.CMOF_Element;
function MP_UML_State_Connection_Connection_Point_Reference_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Connection_Point_Pseudostate_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Deferrable_Trigger_A_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Do_Activity_A_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Entry_A_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Exit_A_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Is_Composite return AMF.Internals.CMOF_Element;
function MP_UML_State_Is_Orthogonal return AMF.Internals.CMOF_Element;
function MP_UML_State_Is_Simple return AMF.Internals.CMOF_Element;
function MP_UML_State_Is_Submachine_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Redefined_State_A_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Redefinition_Context_A_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Region_Region_State return AMF.Internals.CMOF_Element;
function MP_UML_State_State_Invariant_A_Owning_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Submachine_State_Machine_Submachine_State return AMF.Internals.CMOF_Element;
function MP_UML_State_Invariant_Covered_A_State_Invariant return AMF.Internals.CMOF_Element;
function MP_UML_State_Invariant_Invariant_A_State_Invariant return AMF.Internals.CMOF_Element;
function MP_UML_State_Machine_Connection_Point_Pseudostate_State_Machine return AMF.Internals.CMOF_Element;
function MP_UML_State_Machine_Extended_State_Machine_A_State_Machine return AMF.Internals.CMOF_Element;
function MP_UML_State_Machine_Region_Region_State_Machine return AMF.Internals.CMOF_Element;
function MP_UML_State_Machine_Submachine_State_State_Submachine return AMF.Internals.CMOF_Element;
function MP_UML_Stereotype_Icon_A_Stereotype return AMF.Internals.CMOF_Element;
function MP_UML_Stereotype_Profile_A_Stereotype return AMF.Internals.CMOF_Element;
function MP_UML_String_Expression_Owning_Expression_String_Expression_Sub_Expression return AMF.Internals.CMOF_Element;
function MP_UML_String_Expression_Sub_Expression_String_Expression_Owning_Expression return AMF.Internals.CMOF_Element;
function MP_UML_Structural_Feature_Is_Read_Only return AMF.Internals.CMOF_Element;
function MP_UML_Structural_Feature_Action_Object_A_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MP_UML_Structural_Feature_Action_Structural_Feature_A_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Activity_Activity_Structured_Node return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Edge_Activity_Edge_In_Structured_Node return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Must_Isolate return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Node_Activity_Node_In_Structured_Node return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Structured_Node_Input_A_Structured_Activity_Node return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Structured_Node_Output_A_Structured_Activity_Node return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Activity_Node_Variable_Variable_Scope return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Classifier_Owned_Attribute_A_Structured_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Classifier_Owned_Connector_A_Structured_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Classifier_Part_A_Structured_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Structured_Classifier_Role_A_Structured_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_Substitution_Contract_A_Substitution return AMF.Internals.CMOF_Element;
function MP_UML_Substitution_Substituting_Classifier_Classifier_Substitution return AMF.Internals.CMOF_Element;
function MP_UML_Template_Binding_Bound_Element_Templateable_Element_Template_Binding return AMF.Internals.CMOF_Element;
function MP_UML_Template_Binding_Parameter_Substitution_Template_Parameter_Substitution_Template_Binding return AMF.Internals.CMOF_Element;
function MP_UML_Template_Binding_Signature_A_Template_Binding return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Default_A_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Owned_Default_A_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Owned_Parametered_Element_Parameterable_Element_Owning_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Parametered_Element_Parameterable_Element_Template_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Signature_Template_Signature_Owned_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Substitution_Actual_A_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Substitution_Formal_A_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Substitution_Owned_Actual_A_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MP_UML_Template_Parameter_Substitution_Template_Binding_Template_Binding_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MP_UML_Template_Signature_Owned_Parameter_Template_Parameter_Signature return AMF.Internals.CMOF_Element;
function MP_UML_Template_Signature_Parameter_A_Template_Signature return AMF.Internals.CMOF_Element;
function MP_UML_Template_Signature_Template_Templateable_Element_Owned_Template_Signature return AMF.Internals.CMOF_Element;
function MP_UML_Templateable_Element_Owned_Template_Signature_Template_Signature_Template return AMF.Internals.CMOF_Element;
function MP_UML_Templateable_Element_Template_Binding_Template_Binding_Bound_Element return AMF.Internals.CMOF_Element;
function MP_UML_Test_Identity_Action_First_A_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MP_UML_Test_Identity_Action_Result_A_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MP_UML_Test_Identity_Action_Second_A_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MP_UML_Time_Constraint_First_Event return AMF.Internals.CMOF_Element;
function MP_UML_Time_Constraint_Specification_A_Time_Constraint return AMF.Internals.CMOF_Element;
function MP_UML_Time_Event_Is_Relative return AMF.Internals.CMOF_Element;
function MP_UML_Time_Event_When_A_Time_Event return AMF.Internals.CMOF_Element;
function MP_UML_Time_Expression_Expr_A_Time_Expression return AMF.Internals.CMOF_Element;
function MP_UML_Time_Expression_Observation_A_Time_Expression return AMF.Internals.CMOF_Element;
function MP_UML_Time_Interval_Max_A_Time_Interval return AMF.Internals.CMOF_Element;
function MP_UML_Time_Interval_Min_A_Time_Interval return AMF.Internals.CMOF_Element;
function MP_UML_Time_Observation_Event_A_Time_Observation return AMF.Internals.CMOF_Element;
function MP_UML_Time_Observation_First_Event return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Container_Region_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Effect_A_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Guard_A_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Kind return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Redefined_Transition_A_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Redefinition_Context_A_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Source_Vertex_Outgoing return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Target_Vertex_Incoming return AMF.Internals.CMOF_Element;
function MP_UML_Transition_Trigger_A_Transition return AMF.Internals.CMOF_Element;
function MP_UML_Trigger_Event_A_Trigger return AMF.Internals.CMOF_Element;
function MP_UML_Trigger_Port_A_Trigger return AMF.Internals.CMOF_Element;
function MP_UML_Type_Package_Package_Owned_Type return AMF.Internals.CMOF_Element;
function MP_UML_Typed_Element_Type_A_Typed_Element return AMF.Internals.CMOF_Element;
function MP_UML_Unmarshall_Action_Object_A_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MP_UML_Unmarshall_Action_Result_A_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MP_UML_Unmarshall_Action_Unmarshall_Type_A_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MP_UML_Use_Case_Extend_Extend_Extension return AMF.Internals.CMOF_Element;
function MP_UML_Use_Case_Extension_Point_Extension_Point_Use_Case return AMF.Internals.CMOF_Element;
function MP_UML_Use_Case_Include_Include_Including_Case return AMF.Internals.CMOF_Element;
function MP_UML_Use_Case_Subject_Classifier_Use_Case return AMF.Internals.CMOF_Element;
function MP_UML_Value_Pin_Value_A_Value_Pin return AMF.Internals.CMOF_Element;
function MP_UML_Value_Specification_Action_Result_A_Value_Specification_Action return AMF.Internals.CMOF_Element;
function MP_UML_Value_Specification_Action_Value_A_Value_Specification_Action return AMF.Internals.CMOF_Element;
function MP_UML_Variable_Activity_Scope_Activity_Variable return AMF.Internals.CMOF_Element;
function MP_UML_Variable_Scope_Structured_Activity_Node_Variable return AMF.Internals.CMOF_Element;
function MP_UML_Variable_Action_Variable_A_Variable_Action return AMF.Internals.CMOF_Element;
function MP_UML_Vertex_Container_Region_Subvertex return AMF.Internals.CMOF_Element;
function MP_UML_Vertex_Incoming_Transition_Target return AMF.Internals.CMOF_Element;
function MP_UML_Vertex_Outgoing_Transition_Source return AMF.Internals.CMOF_Element;
function MP_UML_Write_Structural_Feature_Action_Result_A_Write_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MP_UML_Write_Structural_Feature_Action_Value_A_Write_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MP_UML_Write_Variable_Action_Value_A_Write_Variable_Action return AMF.Internals.CMOF_Element;
function MP_UML_A_Value_Pin_Value_Pin_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Value_Specification_Action_Value_Specification_Action_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Write_Structural_Feature_Action_Write_Structural_Feature_Action_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Write_Variable_Action_Write_Variable_Action_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Variable_Action_Variable_Action_Variable return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Edge_Activity_Edge_Weight return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Event_Time_Event_When return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Execution_Specification_Action_Execution_Specification_Action return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Interaction_Action return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Use_Interaction_Use_Actual_Gate return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Parameter_Substitution_Template_Parameter_Substitution_Actual return AMF.Internals.CMOF_Element;
function MP_UML_A_Include_Include_Addition return AMF.Internals.CMOF_Element;
function MP_UML_A_Comment_Comment_Annotated_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Profile_Application_Profile_Application_Applied_Profile return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Use_Interaction_Use_Argument return AMF.Internals.CMOF_Element;
function MP_UML_A_Invocation_Action_Invocation_Action_Argument return AMF.Internals.CMOF_Element;
function MP_UML_A_Message_Message_Argument return AMF.Internals.CMOF_Element;
function MP_UML_A_Clear_Association_Action_Clear_Association_Action_Association return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Execution_Specification_Behavior_Execution_Specification_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_A_Call_Behavior_Action_Call_Behavior_Action_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_A_Opaque_Expression_Opaque_Expression_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_A_Body_Context_Operation_Body_Condition return AMF.Internals.CMOF_Element;
function MP_UML_A_Clause_Clause_Body_Output return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Body_Output return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Body_Part return AMF.Internals.CMOF_Element;
function MP_UML_A_Clause_Clause_Body return AMF.Internals.CMOF_Element;
function MP_UML_A_Combined_Fragment_Combined_Fragment_Cfragment_Gate return AMF.Internals.CMOF_Element;
function MP_UML_A_Change_Event_Change_Event_Change_Expression return AMF.Internals.CMOF_Element;
function MP_UML_A_Behaviored_Classifier_Behaviored_Classifier_Classifier_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_A_Create_Object_Action_Create_Object_Action_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Enumeration_Literal_Enumeration_Literal_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Instance_Specification_Instance_Specification_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Extent_Action_Read_Extent_Action_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Is_Classified_Object_Action_Read_Is_Classified_Object_Action_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Conditional_Node_Conditional_Node_Clause return AMF.Internals.CMOF_Element;
function MP_UML_A_Collaboration_Collaboration_Collaboration_Role return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_Collaboration_Use return AMF.Internals.CMOF_Element;
function MP_UML_A_Reduce_Action_Reduce_Action_Collection return AMF.Internals.CMOF_Element;
function MP_UML_A_Extend_Extend_Condition return AMF.Internals.CMOF_Element;
function MP_UML_A_Parameter_Set_Parameter_Set_Condition return AMF.Internals.CMOF_Element;
function MP_UML_A_Message_Message_Connector return AMF.Internals.CMOF_Element;
function MP_UML_A_Constraint_Constraint_Constrained_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Template_Parameter_Classifier_Template_Parameter_Constraining_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Action_Context return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Behavior_Context return AMF.Internals.CMOF_Element;
function MP_UML_A_Connector_Connector_Contract return AMF.Internals.CMOF_Element;
function MP_UML_A_Interface_Realization_Interface_Realization_Contract return AMF.Internals.CMOF_Element;
function MP_UML_A_Substitution_Substitution_Contract return AMF.Internals.CMOF_Element;
function MP_UML_A_Information_Flow_Information_Flow_Conveyed return AMF.Internals.CMOF_Element;
function MP_UML_A_Events_Occurrence_Specification_Covered return AMF.Internals.CMOF_Element;
function MP_UML_A_State_Invariant_State_Invariant_Covered return AMF.Internals.CMOF_Element;
function MP_UML_A_Clause_Clause_Decider return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Decider return AMF.Internals.CMOF_Element;
function MP_UML_A_Decision_Node_Decision_Node_Decision_Input_Flow return AMF.Internals.CMOF_Element;
function MP_UML_A_Decision_Node_Decision_Node_Decision_Input return AMF.Internals.CMOF_Element;
function MP_UML_A_Lifeline_Lifeline_Decomposed_As return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Parameter_Parameter_Default_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Property_Property_Default_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Parameter_Template_Parameter_Default return AMF.Internals.CMOF_Element;
function MP_UML_A_State_State_Deferrable_Trigger return AMF.Internals.CMOF_Element;
function MP_UML_A_Connector_End_Connector_End_Defining_End return AMF.Internals.CMOF_Element;
function MP_UML_A_Slot_Slot_Defining_Feature return AMF.Internals.CMOF_Element;
function MP_UML_A_Deployment_Deployment_Deployed_Artifact return AMF.Internals.CMOF_Element;
function MP_UML_A_Deployment_Target_Deployment_Target_Deployed_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_End_Destruction_Data_Link_End_Destruction_Data_Destroy_At return AMF.Internals.CMOF_Element;
function MP_UML_A_State_State_Do_Activity return AMF.Internals.CMOF_Element;
function MP_UML_A_Transition_Transition_Effect return AMF.Internals.CMOF_Element;
function MP_UML_A_Create_Link_Action_Create_Link_Action_End_Data return AMF.Internals.CMOF_Element;
function MP_UML_A_Destroy_Link_Action_Destroy_Link_Action_End_Data return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_Action_Link_Action_End_Data return AMF.Internals.CMOF_Element;
function MP_UML_A_Association_Association_End_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Connector_Connector_End return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_End_Data_Link_End_Data_End return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Object_End_Action_Read_Link_Object_End_Action_End return AMF.Internals.CMOF_Element;
function MP_UML_A_Connection_Point_Reference_Connection_Point_Reference_Entry return AMF.Internals.CMOF_Element;
function MP_UML_A_State_State_Entry return AMF.Internals.CMOF_Element;
function MP_UML_A_Duration_Observation_Duration_Observation_Event return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Observation_Time_Observation_Event return AMF.Internals.CMOF_Element;
function MP_UML_A_Trigger_Trigger_Event return AMF.Internals.CMOF_Element;
function MP_UML_A_Exception_Handler_Exception_Handler_Exception_Input return AMF.Internals.CMOF_Element;
function MP_UML_A_Exception_Handler_Exception_Handler_Exception_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Raise_Exception_Action_Raise_Exception_Action_Exception return AMF.Internals.CMOF_Element;
function MP_UML_A_Sequence_Node_Sequence_Node_Executable_Node return AMF.Internals.CMOF_Element;
function MP_UML_A_Execution_Occurrence_Specification_Execution_Occurrence_Specification_Execution return AMF.Internals.CMOF_Element;
function MP_UML_A_Connection_Point_Reference_Connection_Point_Reference_Exit return AMF.Internals.CMOF_Element;
function MP_UML_A_State_State_Exit return AMF.Internals.CMOF_Element;
function MP_UML_A_Duration_Duration_Expr return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Expression_Time_Expression_Expr return AMF.Internals.CMOF_Element;
function MP_UML_A_Extend_Extend_Extended_Case return AMF.Internals.CMOF_Element;
function MP_UML_A_Region_Region_Extended_Region return AMF.Internals.CMOF_Element;
function MP_UML_A_Redefinable_Template_Signature_Redefinable_Template_Signature_Extended_Signature return AMF.Internals.CMOF_Element;
function MP_UML_A_State_Machine_State_Machine_Extended_State_Machine return AMF.Internals.CMOF_Element;
function MP_UML_A_Extension_Extend_Extension_Location return AMF.Internals.CMOF_Element;
function MP_UML_A_Execution_Specification_Execution_Specification_Finish return AMF.Internals.CMOF_Element;
function MP_UML_A_Test_Identity_Action_Test_Identity_Action_First return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Interaction_Formal_Gate return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Parameter_Substitution_Template_Parameter_Substitution_Formal return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Input_Pin_Action_Input_Pin_From_Action return AMF.Internals.CMOF_Element;
function MP_UML_A_Protocol_Conformance_Protocol_Conformance_General_Machine return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Fragment_Interaction_Fragment_General_Ordering return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_General return AMF.Internals.CMOF_Element;
function MP_UML_A_Generalization_Generalization_General return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Edge_Activity_Edge_Guard return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Operand_Interaction_Operand_Guard return AMF.Internals.CMOF_Element;
function MP_UML_A_Transition_Transition_Guard return AMF.Internals.CMOF_Element;
function MP_UML_A_Exception_Handler_Exception_Handler_Handler_Body return AMF.Internals.CMOF_Element;
function MP_UML_A_Stereotype_Stereotype_Icon return AMF.Internals.CMOF_Element;
function MP_UML_A_Element_Import_Element_Import_Imported_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Namespace_Namespace_Imported_Member return AMF.Internals.CMOF_Element;
function MP_UML_A_Package_Import_Package_Import_Imported_Package return AMF.Internals.CMOF_Element;
function MP_UML_A_Object_Node_Object_Node_In_State return AMF.Internals.CMOF_Element;
function MP_UML_A_Information_Flow_Information_Flow_Information_Source return AMF.Internals.CMOF_Element;
function MP_UML_A_Information_Flow_Information_Flow_Information_Target return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_Inherited_Member return AMF.Internals.CMOF_Element;
function MP_UML_A_Redefinable_Template_Signature_Redefinable_Template_Signature_Inherited_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_Action_Link_Action_Input_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Opaque_Action_Opaque_Action_Input_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Action_Input return AMF.Internals.CMOF_Element;
function MP_UML_A_Add_Structural_Feature_Value_Action_Add_Structural_Feature_Value_Action_Insert_At return AMF.Internals.CMOF_Element;
function MP_UML_A_Add_Variable_Value_Action_Add_Variable_Value_Action_Insert_At return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_End_Creation_Data_Link_End_Creation_Data_Insert_At return AMF.Internals.CMOF_Element;
function MP_UML_A_Instance_Value_Instance_Value_Instance return AMF.Internals.CMOF_Element;
function MP_UML_A_State_Invariant_State_Invariant_Invariant return AMF.Internals.CMOF_Element;
function MP_UML_A_Join_Node_Join_Node_Join_Spec return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Action_Local_Postcondition return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Action_Local_Precondition return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Loop_Variable_Input return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Loop_Variable return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Lower_Multiplicity_Element_Lower_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Artifact_Artifact_Manifestation return AMF.Internals.CMOF_Element;
function MP_UML_A_Abstraction_Abstraction_Mapping return AMF.Internals.CMOF_Element;
function MP_UML_A_Duration_Interval_Duration_Interval_Max return AMF.Internals.CMOF_Element;
function MP_UML_A_Interval_Interval_Max return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Interval_Time_Interval_Max return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Constraint_Interaction_Constraint_Maxint return AMF.Internals.CMOF_Element;
function MP_UML_A_Member_Namespace_Namespace_Member return AMF.Internals.CMOF_Element;
function MP_UML_A_Package_Merge_Package_Merge_Merged_Package return AMF.Internals.CMOF_Element;
function MP_UML_A_Consider_Ignore_Fragment_Consider_Ignore_Fragment_Message return AMF.Internals.CMOF_Element;
function MP_UML_A_Message_End_Message_End_Message return AMF.Internals.CMOF_Element;
function MP_UML_A_Profile_Profile_Metaclass_Reference return AMF.Internals.CMOF_Element;
function MP_UML_A_Profile_Profile_Metamodel_Reference return AMF.Internals.CMOF_Element;
function MP_UML_A_Duration_Interval_Duration_Interval_Min return AMF.Internals.CMOF_Element;
function MP_UML_A_Interval_Interval_Min return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Interval_Time_Interval_Min return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Constraint_Interaction_Constraint_Minint return AMF.Internals.CMOF_Element;
function MP_UML_A_Named_Element_Named_Element_Name_Expression return AMF.Internals.CMOF_Element;
function MP_UML_A_Association_Association_Navigable_Owned_End return AMF.Internals.CMOF_Element;
function MP_UML_A_Artifact_Artifact_Nested_Artifact return AMF.Internals.CMOF_Element;
function MP_UML_A_Class_Class_Nested_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Interface_Interface_Nested_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Node_Node_Nested_Node return AMF.Internals.CMOF_Element;
function MP_UML_A_Reclassify_Object_Action_Reclassify_Object_Action_New_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Clear_Association_Action_Clear_Association_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Is_Classified_Object_Action_Read_Is_Classified_Object_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Object_End_Action_Read_Link_Object_End_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Object_End_Qualifier_Action_Read_Link_Object_End_Qualifier_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Reclassify_Object_Action_Reclassify_Object_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Start_Classifier_Behavior_Action_Start_Classifier_Behavior_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Start_Object_Behavior_Action_Start_Object_Behavior_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Structural_Feature_Action_Structural_Feature_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Unmarshall_Action_Unmarshall_Action_Object return AMF.Internals.CMOF_Element;
function MP_UML_A_Duration_Duration_Observation return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Expression_Time_Expression_Observation return AMF.Internals.CMOF_Element;
function MP_UML_A_Reclassify_Object_Action_Reclassify_Object_Action_Old_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Invocation_Action_Invocation_Action_On_Port return AMF.Internals.CMOF_Element;
function MP_UML_A_Combined_Fragment_Combined_Fragment_Operand return AMF.Internals.CMOF_Element;
function MP_UML_A_Expression_Expression_Operand return AMF.Internals.CMOF_Element;
function MP_UML_A_Call_Event_Call_Event_Operation return AMF.Internals.CMOF_Element;
function MP_UML_A_Call_Operation_Action_Call_Operation_Action_Operation return AMF.Internals.CMOF_Element;
function MP_UML_A_Property_Property_Opposite return AMF.Internals.CMOF_Element;
function MP_UML_A_Opaque_Action_Opaque_Action_Output_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Action_Action_Output return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Parameter_Substitution_Template_Parameter_Substitution_Owned_Actual return AMF.Internals.CMOF_Element;
function MP_UML_A_Artifact_Artifact_Owned_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Signal_Signal_Owned_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_A_Structured_Classifier_Structured_Classifier_Owned_Attribute return AMF.Internals.CMOF_Element;
function MP_UML_A_Behaviored_Classifier_Behaviored_Classifier_Owned_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Element_Element_Owned_Comment return AMF.Internals.CMOF_Element;
function MP_UML_A_Structured_Classifier_Structured_Classifier_Owned_Connector return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Parameter_Template_Parameter_Owned_Default return AMF.Internals.CMOF_Element;
function MP_UML_A_Extension_Extension_Owned_End return AMF.Internals.CMOF_Element;
function MP_UML_A_Artifact_Artifact_Owned_Operation return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Behavior_Owned_Parameter_Set return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavioral_Feature_Behavioral_Feature_Owned_Parameter_Set return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Behavior_Owned_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_A_Owner_Formal_Param_Behavioral_Feature_Owned_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_A_Encapsulated_Classifier_Encapsulated_Classifier_Owned_Port return AMF.Internals.CMOF_Element;
function MP_UML_A_Class_Class_Owned_Reception return AMF.Internals.CMOF_Element;
function MP_UML_A_Interface_Interface_Owned_Reception return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Package_Package_Owned_Stereotype return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_Owned_Use_Case return AMF.Internals.CMOF_Element;
function MP_UML_A_Component_Component_Packaged_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Package_Package_Packaged_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Parameter_Node_Activity_Parameter_Node_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Signature_Template_Signature_Parameter return AMF.Internals.CMOF_Element;
function MP_UML_A_Connector_End_Connector_End_Part_With_Port return AMF.Internals.CMOF_Element;
function MP_UML_A_Structured_Classifier_Structured_Classifier_Part return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Activity_Partition return AMF.Internals.CMOF_Element;
function MP_UML_A_Trigger_Trigger_Port return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Transition_Protocol_Transition_Post_Condition return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Behavior_Postcondition return AMF.Internals.CMOF_Element;
function MP_UML_A_Post_Context_Operation_Postcondition return AMF.Internals.CMOF_Element;
function MP_UML_A_Protocol_Transition_Protocol_Transition_Pre_Condition return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Behavior_Precondition return AMF.Internals.CMOF_Element;
function MP_UML_A_Pre_Context_Operation_Precondition return AMF.Internals.CMOF_Element;
function MP_UML_A_Stereotype_Stereotype_Profile return AMF.Internals.CMOF_Element;
function MP_UML_A_Interface_Interface_Protocol return AMF.Internals.CMOF_Element;
function MP_UML_A_Port_Port_Protocol return AMF.Internals.CMOF_Element;
function MP_UML_A_Component_Component_Provided return AMF.Internals.CMOF_Element;
function MP_UML_A_Port_Port_Provided return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_End_Data_Link_End_Data_Qualifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Qualifier_Value_Qualifier_Value_Qualifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Object_End_Qualifier_Action_Read_Link_Object_End_Qualifier_Action_Qualifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavioral_Feature_Behavioral_Feature_Raised_Exception return AMF.Internals.CMOF_Element;
function MP_UML_A_Operation_Operation_Raised_Exception return AMF.Internals.CMOF_Element;
function MP_UML_A_Abstraction_Information_Flow_Realization return AMF.Internals.CMOF_Element;
function MP_UML_A_Information_Flow_Information_Flow_Realizing_Activity_Edge return AMF.Internals.CMOF_Element;
function MP_UML_A_Component_Realization_Component_Realization_Realizing_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Information_Flow_Information_Flow_Realizing_Connector return AMF.Internals.CMOF_Element;
function MP_UML_A_Information_Flow_Information_Flow_Realizing_Message return AMF.Internals.CMOF_Element;
function MP_UML_A_End_Message_Message_Receive_Event return AMF.Internals.CMOF_Element;
function MP_UML_A_Behavior_Behavior_Redefined_Behavior return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_Redefined_Classifier return AMF.Internals.CMOF_Element;
function MP_UML_A_Connector_Connector_Redefined_Connector return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Edge_Activity_Edge_Redefined_Edge return AMF.Internals.CMOF_Element;
function MP_UML_A_Redefinable_Element_Redefinable_Element_Redefined_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Interface_Interface_Redefined_Interface return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Node_Activity_Node_Redefined_Node return AMF.Internals.CMOF_Element;
function MP_UML_A_Operation_Operation_Redefined_Operation return AMF.Internals.CMOF_Element;
function MP_UML_A_Port_Port_Redefined_Port return AMF.Internals.CMOF_Element;
function MP_UML_A_Property_Property_Redefined_Property return AMF.Internals.CMOF_Element;
function MP_UML_A_State_State_Redefined_State return AMF.Internals.CMOF_Element;
function MP_UML_A_Transition_Transition_Redefined_Transition return AMF.Internals.CMOF_Element;
function MP_UML_A_Redefinable_Element_Redefinable_Element_Redefinition_Context return AMF.Internals.CMOF_Element;
function MP_UML_A_Region_Region_Redefinition_Context return AMF.Internals.CMOF_Element;
function MP_UML_A_State_State_Redefinition_Context return AMF.Internals.CMOF_Element;
function MP_UML_A_Transition_Transition_Redefinition_Context return AMF.Internals.CMOF_Element;
function MP_UML_A_Reduce_Action_Reduce_Action_Reducer return AMF.Internals.CMOF_Element;
function MP_UML_A_Protocol_Transition_Protocol_Transition_Referred return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Use_Interaction_Use_Refers_To return AMF.Internals.CMOF_Element;
function MP_UML_A_Relationship_Relationship_Related_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Remove_Structural_Feature_Value_Action_Remove_Structural_Feature_Value_Action_Remove_At return AMF.Internals.CMOF_Element;
function MP_UML_A_Remove_Variable_Value_Action_Remove_Variable_Value_Action_Remove_At return AMF.Internals.CMOF_Element;
function MP_UML_A_Reply_Action_Reply_Action_Reply_To_Call return AMF.Internals.CMOF_Element;
function MP_UML_A_Reply_Action_Reply_Action_Reply_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Classifier_Classifier_Representation return AMF.Internals.CMOF_Element;
function MP_UML_A_Representation_Information_Item_Represented return AMF.Internals.CMOF_Element;
function MP_UML_A_Activity_Partition_Activity_Partition_Represents return AMF.Internals.CMOF_Element;
function MP_UML_A_Lifeline_Lifeline_Represents return AMF.Internals.CMOF_Element;
function MP_UML_A_Send_Object_Action_Send_Object_Action_Request return AMF.Internals.CMOF_Element;
function MP_UML_A_Component_Component_Required return AMF.Internals.CMOF_Element;
function MP_UML_A_Port_Port_Required return AMF.Internals.CMOF_Element;
function MP_UML_A_Accept_Event_Action_Accept_Event_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Call_Action_Call_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Clear_Structural_Feature_Action_Clear_Structural_Feature_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Conditional_Node_Conditional_Node_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Create_Link_Object_Action_Create_Link_Object_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Create_Object_Action_Create_Object_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Opaque_Expression_Opaque_Expression_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Extent_Action_Read_Extent_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Is_Classified_Object_Action_Read_Is_Classified_Object_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Action_Read_Link_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Object_End_Action_Read_Link_Object_End_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Link_Object_End_Qualifier_Action_Read_Link_Object_End_Qualifier_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Self_Action_Read_Self_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Structural_Feature_Action_Read_Structural_Feature_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Read_Variable_Action_Read_Variable_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Reduce_Action_Reduce_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Test_Identity_Action_Test_Identity_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Unmarshall_Action_Unmarshall_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Value_Specification_Action_Value_Specification_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Write_Structural_Feature_Action_Write_Structural_Feature_Action_Result return AMF.Internals.CMOF_Element;
function MP_UML_A_Accept_Call_Action_Accept_Call_Action_Return_Information return AMF.Internals.CMOF_Element;
function MP_UML_A_Reply_Action_Reply_Action_Return_Information return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Use_Interaction_Use_Return_Value_Recipient return AMF.Internals.CMOF_Element;
function MP_UML_A_Interaction_Use_Interaction_Use_Return_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Collaboration_Use_Collaboration_Use_Role_Binding return AMF.Internals.CMOF_Element;
function MP_UML_A_Structured_Classifier_Structured_Classifier_Role return AMF.Internals.CMOF_Element;
function MP_UML_A_Test_Identity_Action_Test_Identity_Action_Second return AMF.Internals.CMOF_Element;
function MP_UML_A_Object_Flow_Object_Flow_Selection return AMF.Internals.CMOF_Element;
function MP_UML_A_Object_Node_Object_Node_Selection return AMF.Internals.CMOF_Element;
function MP_UML_A_Lifeline_Lifeline_Selector return AMF.Internals.CMOF_Element;
function MP_UML_A_End_Message_Message_Send_Event return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Setup_Part return AMF.Internals.CMOF_Element;
function MP_UML_A_Broadcast_Signal_Action_Broadcast_Signal_Action_Signal return AMF.Internals.CMOF_Element;
function MP_UML_A_Reception_Reception_Signal return AMF.Internals.CMOF_Element;
function MP_UML_A_Send_Signal_Action_Send_Signal_Action_Signal return AMF.Internals.CMOF_Element;
function MP_UML_A_Signal_Event_Signal_Event_Signal return AMF.Internals.CMOF_Element;
function MP_UML_A_Message_Message_Signature return AMF.Internals.CMOF_Element;
function MP_UML_A_Template_Binding_Template_Binding_Signature return AMF.Internals.CMOF_Element;
function MP_UML_A_Directed_Relationship_Directed_Relationship_Source return AMF.Internals.CMOF_Element;
function MP_UML_A_Duration_Constraint_Duration_Constraint_Specification return AMF.Internals.CMOF_Element;
function MP_UML_A_Interval_Constraint_Interval_Constraint_Specification return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Constraint_Constraint_Specification return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Instance_Spec_Instance_Specification_Specification return AMF.Internals.CMOF_Element;
function MP_UML_A_Time_Constraint_Time_Constraint_Specification return AMF.Internals.CMOF_Element;
function MP_UML_A_Execution_Specification_Execution_Specification_Start return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_State_State_State_Invariant return AMF.Internals.CMOF_Element;
function MP_UML_A_Structural_Feature_Action_Structural_Feature_Action_Structural_Feature return AMF.Internals.CMOF_Element;
function MP_UML_A_Structured_Activity_Node_Structured_Activity_Node_Structured_Node_Input return AMF.Internals.CMOF_Element;
function MP_UML_A_Structured_Activity_Node_Structured_Activity_Node_Structured_Node_Output return AMF.Internals.CMOF_Element;
function MP_UML_A_Property_Property_Subsetted_Property return AMF.Internals.CMOF_Element;
function MP_UML_A_Class_Class_Super_Class return AMF.Internals.CMOF_Element;
function MP_UML_A_Supplier_Dependency_Dependency_Supplier return AMF.Internals.CMOF_Element;
function MP_UML_A_Call_Operation_Action_Call_Operation_Action_Target return AMF.Internals.CMOF_Element;
function MP_UML_A_Destroy_Object_Action_Destroy_Object_Action_Target return AMF.Internals.CMOF_Element;
function MP_UML_A_Directed_Relationship_Directed_Relationship_Target return AMF.Internals.CMOF_Element;
function MP_UML_A_Send_Object_Action_Send_Object_Action_Target return AMF.Internals.CMOF_Element;
function MP_UML_A_Send_Signal_Action_Send_Signal_Action_Target return AMF.Internals.CMOF_Element;
function MP_UML_A_Clause_Clause_Test return AMF.Internals.CMOF_Element;
function MP_UML_A_Loop_Node_Loop_Node_Test return AMF.Internals.CMOF_Element;
function MP_UML_A_Object_Flow_Object_Flow_Transformation return AMF.Internals.CMOF_Element;
function MP_UML_A_Accept_Event_Action_Accept_Event_Action_Trigger return AMF.Internals.CMOF_Element;
function MP_UML_A_Transition_Transition_Trigger return AMF.Internals.CMOF_Element;
function MP_UML_A_Collaboration_Use_Collaboration_Use_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Connector_Connector_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Extension_End_Extension_End_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Operation_Operation_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Typed_Element_Typed_Element_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Unmarshall_Action_Unmarshall_Action_Unmarshall_Type return AMF.Internals.CMOF_Element;
function MP_UML_A_Object_Node_Object_Node_Upper_Bound return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Upper_Multiplicity_Element_Upper_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Manifestation_Manifestation_Utilized_Element return AMF.Internals.CMOF_Element;
function MP_UML_A_Link_End_Data_Link_End_Data_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Owning_Slot_Slot_Value return AMF.Internals.CMOF_Element;
function MP_UML_A_Qualifier_Value_Qualifier_Value_Value return AMF.Internals.CMOF_Element;
function MA_UML_Value_Pin_Value_Value_Pin return AMF.Internals.CMOF_Element;
function MA_UML_Value_Specification_Action_Value_Value_Specification_Action return AMF.Internals.CMOF_Element;
function MA_UML_Write_Structural_Feature_Action_Value_Write_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MA_UML_Write_Variable_Action_Value_Write_Variable_Action return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Variable_Activity_Scope return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Activity_Node_Variable_Scope return AMF.Internals.CMOF_Element;
function MA_UML_Variable_Action_Variable_Variable_Action return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Edge_Weight_Activity_Edge return AMF.Internals.CMOF_Element;
function MA_UML_Time_Event_When_Time_Event return AMF.Internals.CMOF_Element;
function MA_UML_Action_Execution_Specification_Action_Action_Execution_Specification return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Action_Interaction return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Use_Actual_Gate_Interaction_Use return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Substitution_Actual_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MA_UML_Include_Addition_Include return AMF.Internals.CMOF_Element;
function MA_UML_Comment_Annotated_Element_Comment return AMF.Internals.CMOF_Element;
function MA_UML_Profile_Application_Applied_Profile_Profile_Application return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Use_Argument_Interaction_Use return AMF.Internals.CMOF_Element;
function MA_UML_Invocation_Action_Argument_Invocation_Action return AMF.Internals.CMOF_Element;
function MA_UML_Message_Argument_Message return AMF.Internals.CMOF_Element;
function MA_UML_Clear_Association_Action_Association_Clear_Association_Action return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Attribute_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_General_Ordering_Before_To_After return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Execution_Specification_Behavior_Behavior_Execution_Specification return AMF.Internals.CMOF_Element;
function MA_UML_Call_Behavior_Action_Behavior_Call_Behavior_Action return AMF.Internals.CMOF_Element;
function MA_UML_Opaque_Expression_Behavior_Opaque_Expression return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Body_Condition_Body_Context return AMF.Internals.CMOF_Element;
function MA_UML_Clause_Body_Output_Clause return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Body_Output_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Body_Part_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Clause_Body_Clause return AMF.Internals.CMOF_Element;
function MA_UML_Combined_Fragment_Cfragment_Gate_Combined_Fragment return AMF.Internals.CMOF_Element;
function MA_UML_Change_Event_Change_Expression_Change_Event return AMF.Internals.CMOF_Element;
function MA_UML_Behaviored_Classifier_Classifier_Behavior_Behaviored_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Create_Object_Action_Classifier_Create_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Enumeration_Literal_Classifier_Enumeration_Literal return AMF.Internals.CMOF_Element;
function MA_UML_Instance_Specification_Classifier_Instance_Specification return AMF.Internals.CMOF_Element;
function MA_UML_Read_Extent_Action_Classifier_Read_Extent_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Is_Classified_Object_Action_Classifier_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MA_UML_Conditional_Node_Clause_Conditional_Node return AMF.Internals.CMOF_Element;
function MA_UML_Named_Element_Client_Dependency_Client return AMF.Internals.CMOF_Element;
function MA_UML_Collaboration_Collaboration_Role_Collaboration return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Collaboration_Use_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Reduce_Action_Collection_Reduce_Action return AMF.Internals.CMOF_Element;
function MA_UML_Extend_Condition_Extend return AMF.Internals.CMOF_Element;
function MA_UML_Parameter_Set_Condition_Parameter_Set return AMF.Internals.CMOF_Element;
function MA_UML_Deployment_Configuration_Deployment return AMF.Internals.CMOF_Element;
function MA_UML_Protocol_State_Machine_Conformance_Specific_Machine return AMF.Internals.CMOF_Element;
function MA_UML_Connectable_Element_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MA_UML_State_Connection_Point_State return AMF.Internals.CMOF_Element;
function MA_UML_State_Machine_Connection_Point_State_Machine return AMF.Internals.CMOF_Element;
function MA_UML_State_Connection_State return AMF.Internals.CMOF_Element;
function MA_UML_Message_Connector_Message return AMF.Internals.CMOF_Element;
function MA_UML_Constraint_Constrained_Element_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Template_Parameter_Constraining_Classifier_Classifier_Template_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Group_Contained_Edge_In_Group return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Group_Contained_Node_In_Group return AMF.Internals.CMOF_Element;
function MA_UML_Action_Context_Action return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Context_Behavior return AMF.Internals.CMOF_Element;
function MA_UML_Connector_Contract_Connector return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Realization_Contract_Interface_Realization return AMF.Internals.CMOF_Element;
function MA_UML_Substitution_Contract_Substitution return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Conveyed_Information_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Fragment_Covered_Covered_By return AMF.Internals.CMOF_Element;
function MA_UML_Occurrence_Specification_Covered_Events return AMF.Internals.CMOF_Element;
function MA_UML_State_Invariant_Covered_State_Invariant return AMF.Internals.CMOF_Element;
function MA_UML_Clause_Decider_Clause return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Decider_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Decision_Node_Decision_Input_Flow_Decision_Node return AMF.Internals.CMOF_Element;
function MA_UML_Decision_Node_Decision_Input_Decision_Node return AMF.Internals.CMOF_Element;
function MA_UML_Lifeline_Decomposed_As_Lifeline return AMF.Internals.CMOF_Element;
function MA_UML_Parameter_Default_Value_Owning_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_Property_Default_Value_Owning_Property return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Default_Template_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_State_Deferrable_Trigger_State return AMF.Internals.CMOF_Element;
function MA_UML_Connector_End_Defining_End_Connector_End return AMF.Internals.CMOF_Element;
function MA_UML_Slot_Defining_Feature_Slot return AMF.Internals.CMOF_Element;
function MA_UML_Deployment_Deployed_Artifact_Deployment return AMF.Internals.CMOF_Element;
function MA_UML_Deployment_Target_Deployed_Element_Deployment_Target return AMF.Internals.CMOF_Element;
function MA_UML_Deployment_Target_Deployment_Location return AMF.Internals.CMOF_Element;
function MA_UML_Link_End_Destruction_Data_Destroy_At_Link_End_Destruction_Data return AMF.Internals.CMOF_Element;
function MA_UML_State_Do_Activity_State return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Edge_Activity return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Partition_Edge_In_Partition return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Activity_Node_Edge_In_Structured_Node return AMF.Internals.CMOF_Element;
function MA_UML_Transition_Effect_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Namespace_Element_Import_Importing_Namespace return AMF.Internals.CMOF_Element;
function MA_UML_Create_Link_Action_End_Data_Create_Link_Action return AMF.Internals.CMOF_Element;
function MA_UML_Destroy_Link_Action_End_Data_Destroy_Link_Action return AMF.Internals.CMOF_Element;
function MA_UML_Link_Action_End_Data_Link_Action return AMF.Internals.CMOF_Element;
function MA_UML_Association_End_Type_Association return AMF.Internals.CMOF_Element;
function MA_UML_Connector_End_Connector return AMF.Internals.CMOF_Element;
function MA_UML_Link_End_Data_End_Link_End_Data return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Object_End_Action_End_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MA_UML_Connectable_Element_End_Role return AMF.Internals.CMOF_Element;
function MA_UML_Connection_Point_Reference_Entry_Connection_Point_Reference return AMF.Internals.CMOF_Element;
function MA_UML_State_Entry_State return AMF.Internals.CMOF_Element;
function MA_UML_Duration_Observation_Event_Duration_Observation return AMF.Internals.CMOF_Element;
function MA_UML_Time_Observation_Event_Time_Observation return AMF.Internals.CMOF_Element;
function MA_UML_Trigger_Event_Trigger return AMF.Internals.CMOF_Element;
function MA_UML_Exception_Handler_Exception_Input_Exception_Handler return AMF.Internals.CMOF_Element;
function MA_UML_Exception_Handler_Exception_Type_Exception_Handler return AMF.Internals.CMOF_Element;
function MA_UML_Raise_Exception_Action_Exception_Raise_Exception_Action return AMF.Internals.CMOF_Element;
function MA_UML_Sequence_Node_Executable_Node_Sequence_Node return AMF.Internals.CMOF_Element;
function MA_UML_Execution_Occurrence_Specification_Execution_Execution_Occurrence_Specification return AMF.Internals.CMOF_Element;
function MA_UML_Connection_Point_Reference_Exit_Connection_Point_Reference return AMF.Internals.CMOF_Element;
function MA_UML_State_Exit_State return AMF.Internals.CMOF_Element;
function MA_UML_Duration_Expr_Duration return AMF.Internals.CMOF_Element;
function MA_UML_Time_Expression_Expr_Time_Expression return AMF.Internals.CMOF_Element;
function MA_UML_Use_Case_Extend_Extension return AMF.Internals.CMOF_Element;
function MA_UML_Extend_Extended_Case_Extend return AMF.Internals.CMOF_Element;
function MA_UML_Region_Extended_Region_Region return AMF.Internals.CMOF_Element;
function MA_UML_Redefinable_Template_Signature_Extended_Signature_Redefinable_Template_Signature return AMF.Internals.CMOF_Element;
function MA_UML_State_Machine_Extended_State_Machine_State_Machine return AMF.Internals.CMOF_Element;
function MA_UML_Extend_Extension_Location_Extension return AMF.Internals.CMOF_Element;
function MA_UML_Use_Case_Extension_Point_Use_Case return AMF.Internals.CMOF_Element;
function MA_UML_Class_Extension_Metaclass return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Feature_Featuring_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Execution_Specification_Finish_Execution_Specification return AMF.Internals.CMOF_Element;
function MA_UML_Test_Identity_Action_First_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Formal_Gate_Interaction return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Substitution_Formal_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Fragment_Enclosing_Interaction return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Operand_Fragment_Enclosing_Operand return AMF.Internals.CMOF_Element;
function MA_UML_Action_Input_Pin_From_Action_Action_Input_Pin return AMF.Internals.CMOF_Element;
function MA_UML_Protocol_Conformance_General_Machine_Protocol_Conformance return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Fragment_General_Ordering_Interaction_Fragment return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_General_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Generalization_General_Generalization return AMF.Internals.CMOF_Element;
function MA_UML_Generalization_Generalization_Set_Generalization return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Generalization_Specific return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Group_In_Activity return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Edge_Guard_Activity_Edge return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Operand_Guard_Interaction_Operand return AMF.Internals.CMOF_Element;
function MA_UML_Transition_Guard_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Exception_Handler_Handler_Body_Exception_Handler return AMF.Internals.CMOF_Element;
function MA_UML_Executable_Node_Handler_Protected_Node return AMF.Internals.CMOF_Element;
function MA_UML_Stereotype_Icon_Stereotype return AMF.Internals.CMOF_Element;
function MA_UML_Element_Import_Imported_Element_Element_Import return AMF.Internals.CMOF_Element;
function MA_UML_Namespace_Imported_Member_Namespace return AMF.Internals.CMOF_Element;
function MA_UML_Package_Import_Imported_Package_Package_Import return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Node_In_Interruptible_Region_Node return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Node_In_Partition_Node return AMF.Internals.CMOF_Element;
function MA_UML_Object_Node_In_State_Object_Node return AMF.Internals.CMOF_Element;
function MA_UML_Use_Case_Include_Including_Case return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Node_Incoming_Target return AMF.Internals.CMOF_Element;
function MA_UML_Vertex_Incoming_Target return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Information_Source_Information_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Information_Target_Information_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Inherited_Member_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Redefinable_Template_Signature_Inherited_Parameter_Redefinable_Template_Signature return AMF.Internals.CMOF_Element;
function MA_UML_Expansion_Region_Input_Element_Region_As_Input return AMF.Internals.CMOF_Element;
function MA_UML_Link_Action_Input_Value_Link_Action return AMF.Internals.CMOF_Element;
function MA_UML_Opaque_Action_Input_Value_Opaque_Action return AMF.Internals.CMOF_Element;
function MA_UML_Action_Input_Action return AMF.Internals.CMOF_Element;
function MA_UML_Add_Structural_Feature_Value_Action_Insert_At_Add_Structural_Feature_Value_Action return AMF.Internals.CMOF_Element;
function MA_UML_Add_Variable_Value_Action_Insert_At_Add_Variable_Value_Action return AMF.Internals.CMOF_Element;
function MA_UML_Link_End_Creation_Data_Insert_At_Link_End_Creation_Data return AMF.Internals.CMOF_Element;
function MA_UML_Instance_Value_Instance_Instance_Value return AMF.Internals.CMOF_Element;
function MA_UML_Behaviored_Classifier_Interface_Realization_Implementing_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Interruptible_Activity_Region_Interrupting_Edge_Interrupts return AMF.Internals.CMOF_Element;
function MA_UML_State_Invariant_Invariant_State_Invariant return AMF.Internals.CMOF_Element;
function MA_UML_Join_Node_Join_Spec_Join_Node return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Lifeline_Interaction return AMF.Internals.CMOF_Element;
function MA_UML_Action_Local_Postcondition_Action return AMF.Internals.CMOF_Element;
function MA_UML_Action_Local_Precondition_Action return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Loop_Variable_Input_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Loop_Variable_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Multiplicity_Element_Lower_Value_Owning_Lower return AMF.Internals.CMOF_Element;
function MA_UML_Artifact_Manifestation_Artifact return AMF.Internals.CMOF_Element;
function MA_UML_Abstraction_Mapping_Abstraction return AMF.Internals.CMOF_Element;
function MA_UML_Duration_Interval_Max_Duration_Interval return AMF.Internals.CMOF_Element;
function MA_UML_Interval_Max_Interval return AMF.Internals.CMOF_Element;
function MA_UML_Time_Interval_Max_Time_Interval return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Constraint_Maxint_Interaction_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Association_Member_End_Association return AMF.Internals.CMOF_Element;
function MA_UML_Namespace_Member_Member_Namespace return AMF.Internals.CMOF_Element;
function MA_UML_Package_Merge_Merged_Package_Package_Merge return AMF.Internals.CMOF_Element;
function MA_UML_Consider_Ignore_Fragment_Message_Consider_Ignore_Fragment return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Message_Interaction return AMF.Internals.CMOF_Element;
function MA_UML_Message_End_Message_Message_End return AMF.Internals.CMOF_Element;
function MA_UML_Profile_Metaclass_Reference_Profile return AMF.Internals.CMOF_Element;
function MA_UML_Profile_Metamodel_Reference_Profile return AMF.Internals.CMOF_Element;
function MA_UML_Behavioral_Feature_Method_Specification return AMF.Internals.CMOF_Element;
function MA_UML_Duration_Interval_Min_Duration_Interval return AMF.Internals.CMOF_Element;
function MA_UML_Interval_Min_Interval return AMF.Internals.CMOF_Element;
function MA_UML_Time_Interval_Min_Time_Interval return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Constraint_Minint_Interaction_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Named_Element_Name_Expression_Named_Element return AMF.Internals.CMOF_Element;
function MA_UML_Association_Navigable_Owned_End_Association return AMF.Internals.CMOF_Element;
function MA_UML_Artifact_Nested_Artifact_Artifact return AMF.Internals.CMOF_Element;
function MA_UML_Class_Nested_Classifier_Class return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Nested_Classifier_Interface return AMF.Internals.CMOF_Element;
function MA_UML_Node_Nested_Node_Node return AMF.Internals.CMOF_Element;
function MA_UML_Package_Nested_Package_Nesting_Package return AMF.Internals.CMOF_Element;
function MA_UML_Reclassify_Object_Action_New_Classifier_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Node_Activity return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Activity_Node_Node_In_Structured_Node return AMF.Internals.CMOF_Element;
function MA_UML_Clear_Association_Action_Object_Clear_Association_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Is_Classified_Object_Action_Object_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Object_End_Action_Object_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Object_End_Qualifier_Action_Object_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MA_UML_Reclassify_Object_Action_Object_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Start_Classifier_Behavior_Action_Object_Start_Classifier_Behavior_Action return AMF.Internals.CMOF_Element;
function MA_UML_Start_Object_Behavior_Action_Object_Start_Object_Behavior_Action return AMF.Internals.CMOF_Element;
function MA_UML_Structural_Feature_Action_Object_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MA_UML_Unmarshall_Action_Object_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MA_UML_Duration_Observation_Duration return AMF.Internals.CMOF_Element;
function MA_UML_Time_Expression_Observation_Time_Expression return AMF.Internals.CMOF_Element;
function MA_UML_Reclassify_Object_Action_Old_Classifier_Reclassify_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Invocation_Action_On_Port_Invocation_Action return AMF.Internals.CMOF_Element;
function MA_UML_Combined_Fragment_Operand_Combined_Fragment return AMF.Internals.CMOF_Element;
function MA_UML_Expression_Operand_Expression return AMF.Internals.CMOF_Element;
function MA_UML_Call_Event_Operation_Call_Event return AMF.Internals.CMOF_Element;
function MA_UML_Call_Operation_Action_Operation_Call_Operation_Action return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Template_Parameter_Parametered_Element return AMF.Internals.CMOF_Element;
function MA_UML_Property_Opposite_Property return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Node_Outgoing_Source return AMF.Internals.CMOF_Element;
function MA_UML_Vertex_Outgoing_Source return AMF.Internals.CMOF_Element;
function MA_UML_Expansion_Region_Output_Element_Region_As_Output return AMF.Internals.CMOF_Element;
function MA_UML_Opaque_Action_Output_Value_Opaque_Action return AMF.Internals.CMOF_Element;
function MA_UML_Action_Output_Action return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Substitution_Owned_Actual_Template_Parameter_Substitution return AMF.Internals.CMOF_Element;
function MA_UML_Artifact_Owned_Attribute_Artifact return AMF.Internals.CMOF_Element;
function MA_UML_Class_Owned_Attribute_Class return AMF.Internals.CMOF_Element;
function MA_UML_Data_Type_Owned_Attribute_Datatype return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Owned_Attribute_Interface return AMF.Internals.CMOF_Element;
function MA_UML_Signal_Owned_Attribute_Owning_Signal return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Classifier_Owned_Attribute_Structured_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Behaviored_Classifier_Owned_Behavior_Behaviored_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Element_Owned_Comment_Owning_Element return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Classifier_Owned_Connector_Structured_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Owned_Default_Template_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_Element_Owned_Element_Owner return AMF.Internals.CMOF_Element;
function MA_UML_Extension_Owned_End_Extension return AMF.Internals.CMOF_Element;
function MA_UML_Association_Owned_End_Owning_Association return AMF.Internals.CMOF_Element;
function MA_UML_Enumeration_Owned_Literal_Enumeration return AMF.Internals.CMOF_Element;
function MA_UML_Namespace_Owned_Member_Namespace return AMF.Internals.CMOF_Element;
function MA_UML_Artifact_Owned_Operation_Artifact return AMF.Internals.CMOF_Element;
function MA_UML_Class_Owned_Operation_Class return AMF.Internals.CMOF_Element;
function MA_UML_Data_Type_Owned_Operation_Datatype return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Owned_Operation_Interface return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Owned_Parameter_Set_Behavior return AMF.Internals.CMOF_Element;
function MA_UML_Behavioral_Feature_Owned_Parameter_Set_Behavioral_Feature return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Owned_Parameter_Behavior return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Owned_Parameter_Operation return AMF.Internals.CMOF_Element;
function MA_UML_Behavioral_Feature_Owned_Parameter_Owner_Formal_Param return AMF.Internals.CMOF_Element;
function MA_UML_Template_Signature_Owned_Parameter_Signature return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Owned_Parametered_Element_Owning_Template_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_Encapsulated_Classifier_Owned_Port_Encapsulated_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Class_Owned_Reception_Class return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Owned_Reception_Interface return AMF.Internals.CMOF_Element;
function MA_UML_Namespace_Owned_Rule_Context return AMF.Internals.CMOF_Element;
function MA_UML_Package_Owned_Stereotype_Owning_Package return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Owned_Template_Signature_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Templateable_Element_Owned_Template_Signature_Template return AMF.Internals.CMOF_Element;
function MA_UML_Package_Owned_Type_Package return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Owned_Use_Case_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Namespace_Package_Import_Importing_Namespace return AMF.Internals.CMOF_Element;
function MA_UML_Package_Package_Merge_Receiving_Package return AMF.Internals.CMOF_Element;
function MA_UML_Component_Packaged_Element_Component return AMF.Internals.CMOF_Element;
function MA_UML_Package_Packaged_Element_Owning_Package return AMF.Internals.CMOF_Element;
function MA_UML_Parameter_Parameter_Set_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_Template_Binding_Parameter_Substitution_Template_Binding return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Parameter_Node_Parameter_Activity_Parameter_Node return AMF.Internals.CMOF_Element;
function MA_UML_Template_Signature_Parameter_Template_Signature return AMF.Internals.CMOF_Element;
function MA_UML_Template_Parameter_Parametered_Element_Template_Parameter return AMF.Internals.CMOF_Element;
function MA_UML_Connector_End_Part_With_Port_Connector_End return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Classifier_Part_Structured_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Partition_Activity return AMF.Internals.CMOF_Element;
function MA_UML_Trigger_Port_Trigger return AMF.Internals.CMOF_Element;
function MA_UML_Protocol_Transition_Post_Condition_Owning_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Postcondition_Behavior return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Postcondition_Post_Context return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Powertype_Extent_Powertype return AMF.Internals.CMOF_Element;
function MA_UML_Protocol_Transition_Pre_Condition_Protocol_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Precondition_Behavior return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Precondition_Pre_Context return AMF.Internals.CMOF_Element;
function MA_UML_Clause_Predecessor_Clause_Successor_Clause return AMF.Internals.CMOF_Element;
function MA_UML_Package_Profile_Application_Applying_Package return AMF.Internals.CMOF_Element;
function MA_UML_Stereotype_Profile_Stereotype return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Protocol_Interface return AMF.Internals.CMOF_Element;
function MA_UML_Port_Protocol_Port return AMF.Internals.CMOF_Element;
function MA_UML_Component_Provided_Component return AMF.Internals.CMOF_Element;
function MA_UML_Port_Provided_Port return AMF.Internals.CMOF_Element;
function MA_UML_Property_Qualifier_Association_End return AMF.Internals.CMOF_Element;
function MA_UML_Link_End_Data_Qualifier_Link_End_Data return AMF.Internals.CMOF_Element;
function MA_UML_Qualifier_Value_Qualifier_Qualifier_Value return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Object_End_Qualifier_Action_Qualifier_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MA_UML_Behavioral_Feature_Raised_Exception_Behavioral_Feature return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Raised_Exception_Operation return AMF.Internals.CMOF_Element;
function MA_UML_Component_Realization_Abstraction return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Realization_Abstraction return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Realizing_Activity_Edge_Information_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Component_Realization_Realizing_Classifier_Component_Realization return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Realizing_Connector_Information_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Information_Flow_Realizing_Message_Information_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Message_Receive_Event_End_Message return AMF.Internals.CMOF_Element;
function MA_UML_Behavior_Redefined_Behavior_Behavior return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Redefined_Classifier_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Connector_Redefined_Connector_Connector return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Edge_Redefined_Edge_Activity_Edge return AMF.Internals.CMOF_Element;
function MA_UML_Redefinable_Element_Redefined_Element_Redefinable_Element return AMF.Internals.CMOF_Element;
function MA_UML_Interface_Redefined_Interface_Interface return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Node_Redefined_Node_Activity_Node return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Redefined_Operation_Operation return AMF.Internals.CMOF_Element;
function MA_UML_Port_Redefined_Port_Port return AMF.Internals.CMOF_Element;
function MA_UML_Property_Redefined_Property_Property return AMF.Internals.CMOF_Element;
function MA_UML_State_Redefined_State_State return AMF.Internals.CMOF_Element;
function MA_UML_Transition_Redefined_Transition_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Redefinable_Element_Redefinition_Context_Redefinable_Element return AMF.Internals.CMOF_Element;
function MA_UML_Region_Redefinition_Context_Region return AMF.Internals.CMOF_Element;
function MA_UML_State_Redefinition_Context_State return AMF.Internals.CMOF_Element;
function MA_UML_Transition_Redefinition_Context_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Reduce_Action_Reducer_Reduce_Action return AMF.Internals.CMOF_Element;
function MA_UML_Protocol_Transition_Referred_Protocol_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Use_Refers_To_Interaction_Use return AMF.Internals.CMOF_Element;
function MA_UML_State_Region_State return AMF.Internals.CMOF_Element;
function MA_UML_State_Machine_Region_State_Machine return AMF.Internals.CMOF_Element;
function MA_UML_Relationship_Related_Element_Relationship return AMF.Internals.CMOF_Element;
function MA_UML_Remove_Structural_Feature_Value_Action_Remove_At_Remove_Structural_Feature_Value_Action return AMF.Internals.CMOF_Element;
function MA_UML_Remove_Variable_Value_Action_Remove_At_Remove_Variable_Value_Action return AMF.Internals.CMOF_Element;
function MA_UML_Reply_Action_Reply_To_Call_Reply_Action return AMF.Internals.CMOF_Element;
function MA_UML_Reply_Action_Reply_Value_Reply_Action return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Representation_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Information_Item_Represented_Representation return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Partition_Represents_Activity_Partition return AMF.Internals.CMOF_Element;
function MA_UML_Lifeline_Represents_Lifeline return AMF.Internals.CMOF_Element;
function MA_UML_Send_Object_Action_Request_Send_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Component_Required_Component return AMF.Internals.CMOF_Element;
function MA_UML_Port_Required_Port return AMF.Internals.CMOF_Element;
function MA_UML_Accept_Event_Action_Result_Accept_Event_Action return AMF.Internals.CMOF_Element;
function MA_UML_Call_Action_Result_Call_Action return AMF.Internals.CMOF_Element;
function MA_UML_Clear_Structural_Feature_Action_Result_Clear_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MA_UML_Conditional_Node_Result_Conditional_Node return AMF.Internals.CMOF_Element;
function MA_UML_Create_Link_Object_Action_Result_Create_Link_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Create_Object_Action_Result_Create_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Result_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Opaque_Expression_Result_Opaque_Expression return AMF.Internals.CMOF_Element;
function MA_UML_Read_Extent_Action_Result_Read_Extent_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Is_Classified_Object_Action_Result_Read_Is_Classified_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Action_Result_Read_Link_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Object_End_Action_Result_Read_Link_Object_End_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Link_Object_End_Qualifier_Action_Result_Read_Link_Object_End_Qualifier_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Self_Action_Result_Read_Self_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Structural_Feature_Action_Result_Read_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MA_UML_Read_Variable_Action_Result_Read_Variable_Action return AMF.Internals.CMOF_Element;
function MA_UML_Reduce_Action_Result_Reduce_Action return AMF.Internals.CMOF_Element;
function MA_UML_Test_Identity_Action_Result_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MA_UML_Unmarshall_Action_Result_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MA_UML_Value_Specification_Action_Result_Value_Specification_Action return AMF.Internals.CMOF_Element;
function MA_UML_Write_Structural_Feature_Action_Result_Write_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MA_UML_Accept_Call_Action_Return_Information_Accept_Call_Action return AMF.Internals.CMOF_Element;
function MA_UML_Reply_Action_Return_Information_Reply_Action return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Use_Return_Value_Recipient_Interaction_Use return AMF.Internals.CMOF_Element;
function MA_UML_Interaction_Use_Return_Value_Interaction_Use return AMF.Internals.CMOF_Element;
function MA_UML_Collaboration_Use_Role_Binding_Collaboration_Use return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Classifier_Role_Structured_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Test_Identity_Action_Second_Test_Identity_Action return AMF.Internals.CMOF_Element;
function MA_UML_Object_Flow_Selection_Object_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Object_Node_Selection_Object_Node return AMF.Internals.CMOF_Element;
function MA_UML_Lifeline_Selector_Lifeline return AMF.Internals.CMOF_Element;
function MA_UML_Message_Send_Event_End_Message return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Setup_Part_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Broadcast_Signal_Action_Signal_Broadcast_Signal_Action return AMF.Internals.CMOF_Element;
function MA_UML_Reception_Signal_Reception return AMF.Internals.CMOF_Element;
function MA_UML_Send_Signal_Action_Signal_Send_Signal_Action return AMF.Internals.CMOF_Element;
function MA_UML_Signal_Event_Signal_Signal_Event return AMF.Internals.CMOF_Element;
function MA_UML_Message_Signature_Message return AMF.Internals.CMOF_Element;
function MA_UML_Template_Binding_Signature_Template_Binding return AMF.Internals.CMOF_Element;
function MA_UML_Instance_Specification_Slot_Owning_Instance return AMF.Internals.CMOF_Element;
function MA_UML_Directed_Relationship_Source_Directed_Relationship return AMF.Internals.CMOF_Element;
function MA_UML_Duration_Constraint_Specification_Duration_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Interval_Constraint_Specification_Interval_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Constraint_Specification_Owning_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Instance_Specification_Specification_Owning_Instance_Spec return AMF.Internals.CMOF_Element;
function MA_UML_Time_Constraint_Specification_Time_Constraint return AMF.Internals.CMOF_Element;
function MA_UML_Execution_Specification_Start_Execution_Specification return AMF.Internals.CMOF_Element;
function MA_UML_State_State_Invariant_Owning_State return AMF.Internals.CMOF_Element;
function MA_UML_Structural_Feature_Action_Structural_Feature_Structural_Feature_Action return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Activity_Node_Structured_Node_Input_Structured_Activity_Node return AMF.Internals.CMOF_Element;
function MA_UML_Structured_Activity_Node_Structured_Node_Output_Structured_Activity_Node return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Structured_Node_Activity return AMF.Internals.CMOF_Element;
function MA_UML_String_Expression_Sub_Expression_Owning_Expression return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Group_Subgroup_Super_Group return AMF.Internals.CMOF_Element;
function MA_UML_Use_Case_Subject_Use_Case return AMF.Internals.CMOF_Element;
function MA_UML_State_Machine_Submachine_State_Submachine return AMF.Internals.CMOF_Element;
function MA_UML_Activity_Partition_Subpartition_Super_Partition return AMF.Internals.CMOF_Element;
function MA_UML_Property_Subsetted_Property_Property return AMF.Internals.CMOF_Element;
function MA_UML_Classifier_Substitution_Substituting_Classifier return AMF.Internals.CMOF_Element;
function MA_UML_Region_Subvertex_Container return AMF.Internals.CMOF_Element;
function MA_UML_Class_Super_Class_Class return AMF.Internals.CMOF_Element;
function MA_UML_Dependency_Supplier_Supplier_Dependency return AMF.Internals.CMOF_Element;
function MA_UML_Call_Operation_Action_Target_Call_Operation_Action return AMF.Internals.CMOF_Element;
function MA_UML_Destroy_Object_Action_Target_Destroy_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Directed_Relationship_Target_Directed_Relationship return AMF.Internals.CMOF_Element;
function MA_UML_Send_Object_Action_Target_Send_Object_Action return AMF.Internals.CMOF_Element;
function MA_UML_Send_Signal_Action_Target_Send_Signal_Action return AMF.Internals.CMOF_Element;
function MA_UML_Templateable_Element_Template_Binding_Bound_Element return AMF.Internals.CMOF_Element;
function MA_UML_Clause_Test_Clause return AMF.Internals.CMOF_Element;
function MA_UML_Loop_Node_Test_Loop_Node return AMF.Internals.CMOF_Element;
function MA_UML_Occurrence_Specification_To_Before_After return AMF.Internals.CMOF_Element;
function MA_UML_Object_Flow_Transformation_Object_Flow return AMF.Internals.CMOF_Element;
function MA_UML_Region_Transition_Container return AMF.Internals.CMOF_Element;
function MA_UML_Accept_Event_Action_Trigger_Accept_Event_Action return AMF.Internals.CMOF_Element;
function MA_UML_Transition_Trigger_Transition return AMF.Internals.CMOF_Element;
function MA_UML_Collaboration_Use_Type_Collaboration_Use return AMF.Internals.CMOF_Element;
function MA_UML_Connector_Type_Connector return AMF.Internals.CMOF_Element;
function MA_UML_Extension_End_Type_Extension_End return AMF.Internals.CMOF_Element;
function MA_UML_Operation_Type_Operation return AMF.Internals.CMOF_Element;
function MA_UML_Typed_Element_Type_Typed_Element return AMF.Internals.CMOF_Element;
function MA_UML_Unmarshall_Action_Unmarshall_Type_Unmarshall_Action return AMF.Internals.CMOF_Element;
function MA_UML_Object_Node_Upper_Bound_Object_Node return AMF.Internals.CMOF_Element;
function MA_UML_Multiplicity_Element_Upper_Value_Owning_Upper return AMF.Internals.CMOF_Element;
function MA_UML_Manifestation_Utilized_Element_Manifestation return AMF.Internals.CMOF_Element;
function MA_UML_Link_End_Data_Value_Link_End_Data return AMF.Internals.CMOF_Element;
function MA_UML_Slot_Value_Owning_Slot return AMF.Internals.CMOF_Element;
function MA_UML_Qualifier_Value_Value_Qualifier_Value return AMF.Internals.CMOF_Element;
function MB_UML return AMF.Internals.AMF_Element;
function ML_UML return AMF.Internals.AMF_Element;
private
Base : AMF.Internals.CMOF_Element := 0;
end AMF.Internals.Tables.UML_Metamodel;
|
jscparker/math_packages | Ada | 12,744 | adb |
-- Spline_tst2 tests spline calculations on a subset of the Data_Vector.
with Text_IO; use Text_IO;
with Ada.Numerics.Generic_Elementary_Functions;
with Spline;
procedure Spline_tst_2 is
type Real is digits 15;
package Math is new Ada.Numerics.Generic_Elementary_Functions (Real);
use Math;
package flio is new Float_IO (Real);
use flio;
type Index is range 1 .. 128;
type Data_Vector is array(Index) of Real;
package Sin_Spline is new Spline (Real, Index, Data_Vector);
use Sin_Spline;
X_Data, Y_Data : Data_Vector := (others => 0.0);
S : Spline_Coefficients;
-- tst2 tests spline calculations on a subset of the Data_Vector:
I_start : constant Index := Index'First + 2;
I_finish : constant Index := Index'Last - 2;
Pii : constant Real := Ada.Numerics.Pi;
DeltaX : Real := Pii / (Real (I_finish) - Real (I_start));
X, Y : Real;
Y_true : Real;
dY, ddY : Real;
DeltaX1, DeltaX2, DeltaX3 : Real;
Integral_of_Sin, Err : Real;
Bound_First, Bound_Last : Boundary;
X_Stuff : X_Structure;
-- Requires Text_IO.
procedure Pause (s1,s2,s3,s4,s5,s6 : string := " ") is
Continuation : Character := ' ';
begin
Text_IO.New_Line;
if S1 /= " " then put_line (S1); end if;
if S2 /= " " then put_line (S2); end if;
if S3 /= " " then put_line (S3); end if;
if S4 /= " " then put_line (S4); end if;
if S5 /= " " then put_line (S5); end if;
if S6 /= " " then put_line (S6); end if;
Text_IO.New_Line;
begin
Text_IO.Put ("Type a character to continue: ");
Text_IO.Get_Immediate (Continuation);
exception
when others => null;
end;
Text_IO.New_Line;
end pause;
begin
-- Start by making natural splines
DeltaX := Pii / (Real (I_finish) - Real (I_start));
for I in Index loop
X := DeltaX * (Real (I) - Real(Index'First));
X_Data(I) := X;
Y_Data(I) := Sin (X);
end loop;
-- Natural boundary conditions:
Bound_First := (Alpha => 1.0, Beta => 0.0, Boundary_Val => 0.0);
Bound_Last := (Alpha => 1.0, Beta => 0.0, Boundary_Val => 0.0);
Prepare_X_Data (X_Stuff, X_Data, I_start, I_finish,
Bound_First, Bound_Last);
Get_Spline (S, X_Stuff, Y_Data);
-- Check that Spline is continuous
Pause
("Test 1: Check that the Spline is continuous at the knots.",
"Recall that the spline equations were derived via this assumption",
"(along with the assumption that the first 2 derivatives of the curve",
"are also continuous at the knots.)");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
Y := Y_Data(I) + S.F(1)(I)*DeltaX1 + S.F(2)(I)*DeltaX2 + S.F(3)(I)*DeltaX3;
-- This is the Y at I+1 due to spline starting at point I.
-- Compare with Y at I+1 = Y_Data(I+1)
Put (Y - Y_Data(I+1)); New_Line;
end loop;
-- Check that derivative is continuous
Pause ("Verify that the derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
dY := S.F(1)(I) + 2.0*S.F(2)(I)*DeltaX1 + 3.0*S.F(3)(I)*DeltaX2;
-- This is the dY at I+1 due to spline starting at point I.
-- Compare with dY at I+1 = S.F(1)(I+1)
Put (dY - S.F(1)(I+1)); New_Line;
end loop;
-- Check that 2nd derivative is continuous
Pause ("Verify that the 2nd derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
ddY := 2.0*S.F(2)(I) + 6.0*S.F(3)(I)*DeltaX1;
-- This is the ddY at I+1 due to spline starting at point I.
-- Compare with ddY at I+1 = 2.0*S.F(2)(I+1)
Put (ddY - 2.0*S.F(2)(I+1)); New_Line;
end loop;
Pause ("Subtract Spline prediction from true value.");
for I in I_start .. I_finish-1 loop
X := X_Data(I) + DeltaX/2.0;
Y := Value_At (X, X_Data, Y_Data, S);
Y_true := Sin (X);
Put (Y - Y_true); New_Line;
end loop;
New_line;
-- Check quadrature:
Pause
("Test 1b: Check numerical integration of area under the curve.");
Integral_of_Sin := -(Cos (X_Data(I_finish)) - Cos (X_Data(I_start)));
Err := Abs (Integral_of_Sin - Integral (X_Data, Y_Data, S));
New_Line;
Put ("Error in numerical quadrature ="); Put (Err);
--Put (Integral_of_Sin); Put (Integral (X_Data, Y_Data, S));
New_Line;
-- make natural splines, test Cos.
DeltaX := Pii / (Real (I_finish) - Real (I_start));
for I in I_start .. I_finish loop
X := DeltaX * (Real (I) - Real(I_start));
X_Data(I) := X;
Y_Data(I) := Cos (X);
end loop;
-- Natural boundary conditions:
Bound_First := (Alpha => 1.0, Beta => 0.0, Boundary_Val => -1.0);
Bound_Last := (Alpha => 1.0, Beta => 0.0, Boundary_Val => 1.0);
Prepare_X_Data (X_Stuff, X_Data, I_start, I_finish,
Bound_First, Bound_Last);
Get_Spline (S, X_Stuff, Y_Data);
--Check that Spline is continuous
Pause
("Test 1c: Check that the Spline is continuous at the knots.",
"In this test the boundary conditions are given by values of",
"the second derivative at the end points, but this second derivative",
"is not 0.0 as in the case of true natural splines.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
Y := Y_Data(I) + S.F(1)(I)*DeltaX1 + S.F(2)(I)*DeltaX2 + S.F(3)(I)*DeltaX3;
-- This is the Y at I+1 due to spline starting at point I.
-- Compare with Y at I+1 = Y_Data(I+1)
Put (Y - Y_Data(I+1)); New_Line;
end loop;
-- Check that derivative is continuous
Pause ("Verify that the derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
dY := S.F(1)(I) + 2.0*S.F(2)(I)*DeltaX1 + 3.0*S.F(3)(I)*DeltaX2;
-- This is the dY at I+1 due to spline starting at point I.
-- Compare with dY at I+1 = S.F(1)(I+1)
Put (dY - S.F(1)(I+1)); New_Line;
end loop;
-- Check that 2nd derivative is continuous
Pause ("Verify that the 2nd derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
ddY := 2.0*S.F(2)(I) + 6.0*S.F(3)(I)*DeltaX1;
-- This is the ddY at I+1 due to spline starting at point I.
-- Compare with ddY at I+1 = 2.0*S.F(2)(I+1)
Put (ddY - 2.0*S.F(2)(I+1)); New_Line;
end loop;
Pause ("Subtract Spline prediction from true value.");
for I in I_start .. I_finish-1 loop
X := X_Data(I) + DeltaX/2.0;
Y := Value_At (X, X_Data, Y_Data, S);
Y_true := Cos (X);
Put (Y - Y_true); New_Line;
end loop;
New_line;
-- Make mixed splines: natural at one end, clamped at the other.
DeltaX := 1.5 * Pii / (Real (I_finish) - Real (I_start));
for I in I_start .. I_finish loop
X := DeltaX * (Real (I) - Real(I_start));
X_Data(I) := X;
Y_Data(I) := Sin (X);
end loop;
-- Natural:
Bound_First := (Alpha => 1.0, Beta => 0.0, Boundary_Val => 0.0);
-- Clamped with derivative = 0.0:
Bound_Last := (Alpha => 0.0, Beta => 1.0, Boundary_Val => 0.0);
Prepare_X_Data (X_Stuff, X_Data, I_start, I_finish,
Bound_First, Bound_Last);
Get_Spline (S, X_Stuff, Y_Data);
-- Check that Spline is continuous:
Pause
("Test 2: Check that the mixed-boundary Spline is continuous at the knots.",
"Recall that the spline equations were derived via this assumption",
"(along with the assumption that the first 2 derivatives of the curve",
"are also continuous at the knots.)");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
Y := Y_Data(I) + S.F(1)(I)*DeltaX1 + S.F(2)(I)*DeltaX2 + S.F(3)(I)*DeltaX3;
-- This is the Y at I+1 due to spline starting at point I.
-- Compare with Y at I+1 = Y_Data(I+1)
Put (Y - Y_Data(I+1)); New_Line;
end loop;
-- Check that derivative is continuous
Pause ("Make sure that the derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
dY := S.F(1)(I) + 2.0*S.F(2)(I)*DeltaX1 + 3.0*S.F(3)(I)*DeltaX2;
-- This is the dY at I+1 due to spline starting at point I.
-- Compare with dY at I+1 = S.F(1)(I+1)
Put (dY - S.F(1)(I+1)); New_Line;
end loop;
-- Check that 2nd derivative is continuous
Pause ("Make sure that the 2nd derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
ddY := 2.0*S.F(2)(I) + 6.0*S.F(3)(I)*DeltaX1;
-- This is the ddY at I+1 due to spline starting at point I.
-- Compare with ddY at I+1 = 2.0*S.F(2)(I+1)
Put (ddY - 2.0*S.F(2)(I+1)); New_Line;
end loop;
Pause ("Subtract Spline prediction from true value.");
for I in I_start .. I_finish-1 loop
X := X_Data(I) + DeltaX/2.0;
Y := Value_At (X, X_Data, Y_Data, S);
Y_true := Sin (X);
Put (Y - Y_true); New_Line;
end loop;
New_line;
-- Make mixed splines: natural at one end, clamped at the other.
-- This time we get them wrong.
DeltaX := 1.5 * Pii / (Real (I_finish) - Real (I_start));
for I in I_start .. I_finish loop
X := DeltaX * (Real (I) - Real(I_start));
X_Data(I) := X;
Y_Data(I) := Sin (X);
end loop;
-- Now we have the boundary conditions wrong for the Sin curve:
-- Natural:
Bound_First := (Alpha => 0.0, Beta => 1.0, Boundary_Val => 0.0);
-- Clamped with derivative = 1.0:
Bound_Last := (Alpha => 1.0, Beta => 0.0, Boundary_Val => 0.0);
Prepare_X_Data (X_Stuff, X_Data, I_start, I_finish,
Bound_First, Bound_Last);
Get_Spline (S, X_Stuff, Y_Data);
--Check that Spline is continuous
Pause
("Test 3: Make sure the mixed-boundary Spline is continuous at the knots.",
"Recall that the spline equations were derived via this assumption",
"(along with the assumption that the first 2 derivatives of the curve",
"are also continuous at the knots.)");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
Y := Y_Data(I) + S.F(1)(I)*DeltaX1 + S.F(2)(I)*DeltaX2 + S.F(3)(I)*DeltaX3;
-- This is the Y at I+1 due to spline starting at point I.
-- Compare with Y at I+1 = Y_Data(I+1)
Put (Y - Y_Data(I+1)); New_Line;
end loop;
-- Check that derivative is continuous
Pause ("Make sure that the derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
dY := S.F(1)(I) + 2.0*S.F(2)(I)*DeltaX1 + 3.0*S.F(3)(I)*DeltaX2;
-- This is the dY at I+1 due to spline starting at point I.
-- Compare with dY at I+1 = S.F(1)(I+1)
Put (dY - S.F(1)(I+1)); New_Line;
end loop;
-- Check that 2nd derivative is continuous
Pause ("Make sure that the 2nd derivative of the spline is continuous.");
for I in I_start .. I_finish-1 loop
DeltaX1 := X_Data(I+1) - X_Data(I);
DeltaX2 := DeltaX1*DeltaX1;
DeltaX3 := DeltaX1*DeltaX2;
ddY := 2.0*S.F(2)(I) + 6.0*S.F(3)(I)*DeltaX1;
-- This is the ddY at I+1 due to spline starting at point I.
-- Compare with ddY at I+1 = 2.0*S.F(2)(I+1)
Put (ddY - 2.0*S.F(2)(I+1)); New_Line;
end loop;
Pause
("Subtract Spline prediction from true value.",
"In this test we deliberately made the Boundary conditions",
"wrong, so the answers should be bad at the end points.");
for I in I_start .. I_finish-1 loop
X := X_Data(I) + DeltaX/2.0;
Y := Value_At (X, X_Data, Y_Data, S);
Y_true := Sin (X);
Put (Y - Y_true); New_Line;
end loop;
New_line;
end;
|
JeremyGrosser/clock3 | Ada | 4,343 | ads | with HAL; use HAL;
with Circular_Queue;
package Board is
-- Clock is incremented by SysTick every 1ms, wraps around after 24.855 days
type Time is new Natural;
Clock : Time := Time'First;
pragma Volatile (Clock);
type Pins is
(LED_1, LED_2, MISO, MOSI, SCK, RX, TX, SCL, SDA, USB_DP, USB_DM,
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13,
A0, A1, A2, A3, A4, A5);
type Pin_Modes is (Input, Output, Alternate);
subtype Analog_Value is Integer range 0 .. 1000;
type Analog_References is (Internal, External);
Pin_Type_Error : exception;
procedure Initialize;
-- Wait for a number of milliseconds. It is up to you to make sure the
-- watchdog is disabled. Don't call this before Initialize
procedure Wait (Milliseconds : Time);
procedure Watchdog_Enable;
procedure Watchdog_Reload;
procedure Watchdog_Disable;
procedure Pin_Mode
(Pin : Pins;
Mode : Pin_Modes);
procedure Digital_Write
(Pin : Pins;
State : Boolean);
procedure Digital_Read
(Pin : Pins;
State : out Boolean);
--procedure Analog_Write
-- (Pin : Pins;
-- Value : Analog_Value);
--procedure Analog_Read
-- (Pin : Pins;
-- Value : out Analog_Value);
--procedure Analog_Reference
-- (Ref : Analog_References);
package Byte_Queue is new Circular_Queue
(Element_Type => UInt8,
Size => 512);
use Byte_Queue;
Serial_Buffer : Byte_Queue.Queue;
type Serial_Status is (No_Data, Ok);
procedure Serial_Write
(Data : UInt8_Array);
function Serial_Get
return UInt8;
function Serial_Get_Line
(S : String := "")
return String;
procedure SPI_Begin;
procedure SPI_Transfer
(Data : in out HAL.UInt8);
procedure SPI_End;
subtype Unique_Id_Type is HAL.UInt32_Array (1 .. 4);
function Unique_Id
return Unique_Id_Type;
--procedure Pulse_In
-- (Pin : in Pins;
-- State : in Boolean;
-- Timeout : Ada.Real_Time.Time_Span := Ada.Real_Time.Milliseconds (1000));
--
--type Bit_Orders is (MSB_First, LSB_First);
--procedure Shift_In
-- (Data_Pin : in Pins;
-- Clock_Pin : in Pins;
-- Bit_Order : in Bit_Orders;
-- Value : out Interfaces.Unsigned_8);
--procedure Shift_Out
-- (Data_Pin : in Pins;
-- Clock_Pin : in Pins;
-- Bit_Order : in Bit_Orders;
-- Value : in Interfaces.Unsigned_8);
--
procedure Wait_For_Interrupt;
subtype External_Interrupt_Numbers is Integer range 0 .. 15;
type Interrupt_Procedure is access procedure;
type Interrupt_Triggers is (Rising_Edge, Falling_Edge, Both_Edges, High_Level, Low_Level);
procedure Attach_Interrupt
(Interrupt : External_Interrupt_Numbers;
Handler : Interrupt_Procedure;
Trigger : Interrupt_Triggers);
procedure Detach_Interrupt
(Interrupt : External_Interrupt_Numbers);
procedure Set_RTC (Hour, Minute, Second : Natural);
procedure Get_RTC (Hour, Minute, Second : out Natural);
subtype Interrupt_Number is Natural range 0 .. 27;
procedure Enable_Interrupt
(IRQn : Interrupt_Number);
procedure Disable_Interrupt
(IRQn : Interrupt_Number);
procedure Enable_PPS;
private
subtype Hertz is Natural;
System_Clock_Frequency : Hertz := 1_000_000;
pragma Volatile (System_Clock_Frequency);
Interrupt_Handlers : array (External_Interrupt_Numbers) of Interrupt_Procedure := (others => null);
procedure SysTick_Handler;
pragma Export (C, SysTick_Handler, "SysTick_Handler");
pragma Linker_Section (SysTick_Handler, ".text");
procedure WDT_Handler;
pragma Export (C, WDT_Handler, "WDT_Handler");
pragma Linker_Section (WDT_Handler, ".text");
procedure EIC_Handler;
pragma Export (C, EIC_Handler, "EIC_Handler");
pragma Linker_Section (EIC_Handler, ".text");
procedure SERCOM2_Handler;
pragma Export (C, SERCOM2_Handler, "SERCOM2_Handler");
pragma Linker_Section (SERCOM2_Handler, ".text");
procedure RTC_Handler;
pragma Export (C, RTC_Handler, "RTC_Handler");
pragma Linker_Section (RTC_Handler, ".text");
end Board;
|
reznikmm/matreshka | Ada | 3,949 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Fo_Margin_Attributes;
package Matreshka.ODF_Fo.Margin_Attributes is
type Fo_Margin_Attribute_Node is
new Matreshka.ODF_Fo.Abstract_Fo_Attribute_Node
and ODF.DOM.Fo_Margin_Attributes.ODF_Fo_Margin_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Fo_Margin_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Fo_Margin_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Fo.Margin_Attributes;
|
charlie5/cBound | Ada | 1,585 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_render_query_pict_formats_request_t is
-- Item
--
type Item is record
major_opcode : aliased Interfaces.Unsigned_8;
minor_opcode : aliased Interfaces.Unsigned_8;
length : aliased Interfaces.Unsigned_16;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_render_query_pict_formats_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_query_pict_formats_request_t.Item,
Element_Array => xcb.xcb_render_query_pict_formats_request_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_render_query_pict_formats_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_query_pict_formats_request_t.Pointer,
Element_Array =>
xcb.xcb_render_query_pict_formats_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_render_query_pict_formats_request_t;
|
97kovacspeter/ADA | Ada | 1,674 | adb | with Card_Dir;
use Card_Dir;
with Coords;
use Coords;
with Ada.Numerics.Discrete_Random;
package body Aircraft is
procedure Ascend(A: in out Aircraft_Type) is
begin
A.Is_In_The_Air:=true;
end Ascend;
procedure Land(A: in out Aircraft_Type) is
begin
A.Is_In_The_Air:=false;
end Land;
function Get_Is_In_The_Air(A:Aircraft_Type) return Boolean is
begin
return A.Is_In_The_Air;
end Get_Is_In_The_Air;
function Get_Coord(A:Aircraft_Type) return Coord is
begin
return A.Position;
end Get_Coord;
procedure Set_Coord(A: in out Aircraft_Type; C:Coord) is
begin
A.Position:=C;
end Set_Coord;
procedure Set_Card_Dir_Coord(A: in out Aircraft_Type; C: Cardinal_Direction) is
begin
Change_To_Direction(A.Position, C);
end Set_Card_Dir_Coord;
--random coordiantes
procedure Start(A: in out Aircraft_Type) is
--type Rand_Range is range 0..100; --for ranged random
package Rand_Int is new Ada.Numerics.Discrete_Random(Integer);
use Rand_Int;
seed: Generator;
C: Coord;
begin
Rand_Int.Reset(seed);
Set_X(C,Random(seed));
Set_Y(C,Random(seed));
Set_Coord(A,C);
end Start;
function Compare(A1:Aircraft_Type;A2:Aircraft_Type) return Boolean is
begin
if(A2.Name > A1.Name) then
return true;
else
return false;
end if;
end Compare;
function Get_Distance(A1:Aircraft_Type;A2:Aircraft_Type) return Integer is
begin
return Get_Distance(A1.Position, A2.Position);
end Get_Distance;
procedure Action(A: in out Aircraft_Type) is
begin
ActionHelp(A.Name, A.Position, A.Is_In_The_Air);
end Action;
function GetName(A: Aircraft_Type) return Id is
begin
return A.Name;
end GetName;
end Aircraft; |
reznikmm/matreshka | Ada | 3,694 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Smil_Values_Attributes is
pragma Preelaborate;
type ODF_Smil_Values_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Smil_Values_Attribute_Access is
access all ODF_Smil_Values_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Smil_Values_Attributes;
|
AaronC98/PlaneSystem | Ada | 3,274 | adb | ------------------------------------------------------------------------------
-- Templates Parser --
-- --
-- Copyright (C) 2003-2012, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library is distributed in the hope that it will be --
-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
------------------------------------------------------------------------------
package body Templates_Parser.Query is
---------------
-- Composite --
---------------
function Composite
(Association : Templates_Parser.Association)
return Tag is
begin
if Association.Kind = Composite then
return Association.Comp_Value;
else
raise Constraint_Error
with Variable (Association) & " is not a composite tag.";
end if;
end Composite;
----------
-- Kind --
----------
function Kind
(Association : Templates_Parser.Association)
return Association_Kind is
begin
return Association.Kind;
end Kind;
------------------
-- Nested_Level --
------------------
function Nested_Level (T : Tag) return Positive is
begin
return T.Data.Nested_Level;
end Nested_Level;
--------------
-- Variable --
--------------
function Variable
(Association : Templates_Parser.Association)
return String is
begin
return To_String (Association.Variable);
end Variable;
end Templates_Parser.Query;
|
charlie5/lace | Ada | 186 | ads | with Ahven.Framework;
package math_Tests
is
type Test is new Ahven.Framework.Test_Case with null record;
overriding
procedure Initialize (T : in out Test);
end math_Tests;
|
Fabien-Chouteau/Ada_Drivers_Library | Ada | 5,184 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with nRF51.GPIO; use nRF51.GPIO;
with nRF51.RTC; use nRF51.RTC;
with NRF51_SVD.RTC;
with nRF51.TWI; use nRF51.TWI;
with NRF51_SVD.TWI;
with nRF51.SPI_Master; use nRF51.SPI_Master;
with NRF51_SVD.SPI;
with nRF51.Timers; use nRF51.Timers;
with NRF51_SVD.TIMER;
with nRF51.UART; use nRF51.UART;
with NRF51_SVD.UART;
package nRF51.Device is
P00 : aliased GPIO_Point := (Pin => 00);
P01 : aliased GPIO_Point := (Pin => 01);
P02 : aliased GPIO_Point := (Pin => 02);
P03 : aliased GPIO_Point := (Pin => 03);
P04 : aliased GPIO_Point := (Pin => 04);
P05 : aliased GPIO_Point := (Pin => 05);
P06 : aliased GPIO_Point := (Pin => 06);
P07 : aliased GPIO_Point := (Pin => 07);
P08 : aliased GPIO_Point := (Pin => 08);
P09 : aliased GPIO_Point := (Pin => 09);
P10 : aliased GPIO_Point := (Pin => 10);
P11 : aliased GPIO_Point := (Pin => 11);
P12 : aliased GPIO_Point := (Pin => 12);
P13 : aliased GPIO_Point := (Pin => 13);
P14 : aliased GPIO_Point := (Pin => 14);
P15 : aliased GPIO_Point := (Pin => 15);
P16 : aliased GPIO_Point := (Pin => 16);
P17 : aliased GPIO_Point := (Pin => 17);
P18 : aliased GPIO_Point := (Pin => 18);
P19 : aliased GPIO_Point := (Pin => 19);
P20 : aliased GPIO_Point := (Pin => 20);
P21 : aliased GPIO_Point := (Pin => 21);
P22 : aliased GPIO_Point := (Pin => 22);
P23 : aliased GPIO_Point := (Pin => 23);
P24 : aliased GPIO_Point := (Pin => 24);
P25 : aliased GPIO_Point := (Pin => 25);
P26 : aliased GPIO_Point := (Pin => 26);
P27 : aliased GPIO_Point := (Pin => 27);
P28 : aliased GPIO_Point := (Pin => 28);
P29 : aliased GPIO_Point := (Pin => 29);
P30 : aliased GPIO_Point := (Pin => 30);
P31 : aliased GPIO_Point := (Pin => 31);
RTC_0 : aliased Real_Time_Counter (NRF51_SVD.RTC.RTC0_Periph'Access);
RTC_1 : aliased Real_Time_Counter (NRF51_SVD.RTC.RTC1_Periph'Access);
-- Be carefull of shared resources between the TWI and SPI controllers.
-- TWI_O and SPI_Master_0 cannot be used at the same time.
-- TWI_1 and SPI_Master_1 cannot be used at the same time.
--
-- See nRF51 Series Reference Manual, chapter Memory.Instantiation.
TWI_0 : aliased TWI_Master (NRF51_SVD.TWI.TWI0_Periph'Access);
TWI_1 : aliased TWI_Master (NRF51_SVD.TWI.TWI1_Periph'Access);
SPI_Master_0 : aliased nRF51.SPI_Master.SPI_Master (NRF51_SVD.SPI.SPI0_Periph'Access);
SPI_Master_1 : aliased nRF51.SPI_Master.SPI_Master (NRF51_SVD.SPI.SPI1_Periph'Access);
Timer_0 : aliased Timer (NRF51_SVD.TIMER.TIMER0_Periph'Access);
Timer_1 : aliased Timer (NRF51_SVD.TIMER.TIMER1_Periph'Access);
Timer_2 : aliased Timer (NRF51_SVD.TIMER.TIMER2_Periph'Access);
UART_0 : aliased UART_Device (NRF51_SVD.UART.UART0_Periph'Access);
end nRF51.Device;
|
AdaCore/spat | Ada | 1,599 | ads | ------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. ([email protected])
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
------------------------------------------------------------------------------
--
-- SPARK Proof Analysis Tool
--
-- S.P.A.T. - String tables
--
-- Supports table like output of strings
--
------------------------------------------------------------------------------
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Ada.Text_IO;
generic
Columns : in Positive;
package SPAT.String_Tables is
type Row is array (1 .. Columns) of Ada.Strings.Unbounded.Unbounded_String;
package Row_Vectors is new Ada.Containers.Vectors (Index_Type => Positive,
Element_Type => Row,
"=" => "=");
---------------------------------------------------------------------------
-- Put
--
-- Print given table as formatted output into given text file.
---------------------------------------------------------------------------
procedure Put (File : in Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output;
Item : in Row_Vectors.Vector);
end SPAT.String_Tables;
|
pchapin/acrypto | Ada | 1,546 | ads | ---------------------------------------------------------------------------
-- FILE : aco-crypto-algorithms-sha1.ads
-- SUBJECT : Specification of a package holding the raw SHA1 hash algorithm.
-- AUTHOR : (C) Copyright 2014 by Peter Chapin
--
-- Please send comments or bug reports to
--
-- Peter Chapin <[email protected]>
---------------------------------------------------------------------------
pragma SPARK_Mode(On);
package ACO.Crypto.Algorithms.SHA1 is
type State is private;
-- These types define the input blocks.
type Block_Index is range 0 .. 15;
type Message_Block is array(Block_Index) of ACO.Quadruple_Octet;
subtype Message_Bit_Count is Natural range 0 .. 512;
-- These types define the hash result.
type Hash_Index is range 0 .. 4;
type Hash_Array is array(Hash_Index) of ACO.Quadruple_Octet;
procedure Prepare(S : out State)
with
Depends => (S => null);
procedure Update_Hash(S : in out State; M : in out Message_Block; Number_Of_Bits : in Message_Bit_Count)
with
Depends => ((S, M) => (S, M, Number_Of_Bits));
procedure Partake(S : in out State; Result : out Hash_Array)
with
Depends => ((S, Result) => S);
private
type State is
record
Total_Bit_Count : ACO.Octuple_Octet; -- Total number of bits hashed so far.
H : Hash_Array; -- Current estimate of hash value.
Active : Boolean; -- True when this object can accept more data.
end record;
end ACO.Crypto.Algorithms.SHA1;
|
reznikmm/matreshka | Ada | 3,674 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Elements;
package ODF.DOM.Db_Update_Table_Elements is
pragma Preelaborate;
type ODF_Db_Update_Table is limited interface
and XML.DOM.Elements.DOM_Element;
type ODF_Db_Update_Table_Access is
access all ODF_Db_Update_Table'Class
with Storage_Size => 0;
end ODF.DOM.Db_Update_Table_Elements;
|
Fabien-Chouteau/shoot-n-loot | Ada | 9,524 | adb | -- Shoot'n'loot
-- Copyright (c) 2020 Fabien Chouteau
with Interfaces;
with VirtAPU; use VirtAPU;
with PyGamer.Audio; use PyGamer.Audio;
with Music_2;
package body Sound is
C_32nd : constant Command := (Wait_Ticks, 1);
C_16th : constant Command := (Wait_Ticks, C_32nd.Ticks * 2);
C_8th : constant Command := (Wait_Ticks, C_16th.Ticks * 2);
C_Quarter : constant Command := (Wait_Ticks, C_8th.Ticks * 2);
C_Half : constant Command := (Wait_Ticks, C_Quarter.Ticks * 2);
C_Whole : constant Command := (Wait_Ticks, C_Half.Ticks * 2);
C_Double : constant Command := (Wait_Ticks, C_Whole.Ticks * 2);
Coin_Seq : aliased constant Command_Array :=
((Set_Decay, 10),
(Set_Mode, Pulse),
(Set_Width, 25),
(Set_Sweep, None, 1, 0),
B4,
(Wait_Ticks, 3),
E5,
(Wait_Ticks, 5),
Off
);
Monster_Dead_Seq : aliased constant Command_Array :=
((Set_Decay, 20),
(Set_Mode, Pulse),
(Set_Width, 25),
(Set_Sweep, Down, 10, 1),
C3, C_Quarter, Off
);
Game_Over_Seq : aliased constant Command_Array :=
((Set_Decay, 20),
(Set_Mode, Pulse),
(Set_Width, 25),
Fs3, C_Quarter, Off,
C_Half,
Cs3, C_8th, Off, C_8th,
C_Quarter,
C3, Off, C_8th,
Cs3, Off, C_8th,
C3, C_Half, Off
);
Exit_Open_Seq : aliased constant Command_Array :=
((Set_Decay, 20),
(Set_Mode, Pulse),
(Set_Width, 25),
(Set_Sweep, None, 1, 0),
C4, C_16th, Off, C_16th,
Ds4, C_16th, Off, C_16th,
G4, C_16th, Off, C_16th,
As4, C_16th, Off
);
Exit_Taken_Seq : aliased constant Command_Array :=
((Set_Decay, 20),
(Set_Mode, Pulse),
(Set_Width, 25),
(Set_Sweep, None, 1, 0),
As4, C_16th, Off, C_16th,
G4, C_16th, Off, C_16th,
Ds4, C_16th, Off, C_16th,
C4, C_16th, Off
);
Victory_Seq : aliased constant Command_Array :=
((Set_Decay, 20),
(Set_Mode, Pulse),
(Set_Width, 25),
C_Double,
C4, C_16th, Off, C_16th,
Ds4, C_16th, Off, C_16th,
G4, C_16th, Off, C_16th,
As4, C_16th, Off, C_16th,
As4, C_16th, Off, C_16th,
As4, C_16th, Off, C_16th,
Ds5, C_16th, Off, C_16th,
As4, C_16th, Off, C_16th
);
Jump_Seq : aliased constant Command_Array :=
((Set_Decay, 20),
(Set_Mode, Pulse),
(Set_Sweep, Up, 7, 2),
(Note_On, 220.0),
C_8th,
Off
);
Gun_Seq : aliased constant Command_Array :=
((Set_Mode, Noise_1),
(Set_Decay, 15),
(Set_Sweep, Up, 13, 0),
(Set_Mode, Noise_1),
(Note_On, 2000.0),
Off
);
Kick : aliased constant Command_Array :=
((Set_Decay, 6),
(Set_Sweep, Up, 7, 0),
(Set_Mode, Noise_2),
(Note_On, 150.0),
Off
);
Snare : aliased constant Command_Array :=
((Set_Decay, 6),
(Set_Mode, Noise_1),
(Note_On, 2000.0),
Off
);
Hi_Hat : aliased constant Command_Array :=
((Set_Decay, 2),
(Set_Mode, Noise_1),
(Note_On, 10000.0),
Off
);
Beat_1 : constant Command_Array :=
Kick & C_Half &
Hi_Hat & C_Half &
Snare & C_Half &
Hi_Hat & C_Half &
Kick & C_Half &
Hi_Hat & C_Half &
Snare & C_Half &
Hi_Hat & C_Half;
Beat_2 : constant Command_Array :=
Kick & C_Half &
Hi_Hat & C_Half &
Snare & C_Half &
Hi_Hat & C_Half &
Kick & C_Half &
Hi_Hat & C_Half &
Snare & C_Half &
Snare & C_Half;
Beat_3 : constant Command_Array :=
Kick & C_Half &
Hi_Hat & C_Half &
Snare & C_Half &
Hi_Hat & C_Half &
Kick & C_Half &
Hi_Hat & C_Half &
Snare & C_Half &
Snare & C_Quarter &
Snare & C_Quarter;
Drums_Seq : aliased constant Command_Array :=
Beat_1 & Beat_2 & Beat_3 & Beat_2;
Bass_1 : constant Command_Array :=
C2 & C_Half & Off &
C_Half &
C2 & C_Half & Off &
C_Half &
C2 & C_Half & Off &
Ds2 & C_Half & Off &
C_Half &
Gs2 & C_Half & Off;
Bass_2 : constant Command_Array :=
C_Half &
Ds2 & C_Half & Off &
C_Half &
Fs2 & C_Half & Off &
C_Half &
Ds2 & C_Half & Off &
Fs2 & C_Half & Off &
Ds2 & C_Half & Off;
Bass_3 : constant Command_Array :=
C_Half &
Ds2 & C_Half & Off &
C_Half &
Fs2 & C_Half & Off &
C_Half &
Gs2 & C_Half & Off &
Fs2 & C_Half & Off &
C_Half;
Bass_Seq : aliased constant Command_Array :=
Bass_1 & Bass_2 & Bass_1 & Bass_3;
Lead_1 : constant Command_Array :=
C4 & Off &
C_Whole & C_Whole & C_Half &
Ds4 & Off &
C_Whole &
G4 & Off &
C_Whole & C_Whole & C_Whole &
Fs4 & Off &
C_Half &
Gs4 & Off &
C_Half &
Ds4 & Off &
C_Half;
Lead_2 : constant Command_Array :=
C4 & Off &
C_Whole & C_Whole & C_Half &
Ds4 & Off &
C_Whole &
Gs3 & Off &
C_Whole & C_Whole & C_Whole &
G3 & Off &
C_Half &
As3 & Off &
C_Half &
B3 & Off &
C_Half;
Lead_3 : constant Command_Array :=
C4 & Off &
C_Whole & C_Whole & C_Half &
G4 & Off &
C_Half &
As4 & Off &
C_Half &
Fs4 & Off &
C_Whole & C_Whole & C_Whole &
Gs4 & Off &
C_Half &
G4 & Off &
C_Half &
Ds4 & Off &
C_Half;
Lead_Seq : aliased constant Command_Array :=
Lead_1 & Lead_2 & Lead_3 & Lead_2;
Sample_Rate : constant Sample_Rate_Kind := SR_22050;
APU : VirtAPU.Instance (5, 22_050);
Player_FX : constant VirtAPU.Channel_ID := 1;
World_FX : constant VirtAPU.Channel_ID := 2;
Drums : constant VirtAPU.Channel_ID := 3;
Bass : constant VirtAPU.Channel_ID := 4;
Lead : constant VirtAPU.Channel_ID := 5;
procedure Next_Samples is new VirtAPU.Next_Samples_UInt
(Interfaces.Unsigned_16, PyGamer.Audio.Data_Array);
procedure Audio_Callback (Left, Right : out PyGamer.Audio.Data_Array);
--------------------
-- Audio_Callback --
--------------------
procedure Audio_Callback (Left, Right : out PyGamer.Audio.Data_Array) is
begin
Next_Samples (APU, Left);
Right := Left;
end Audio_Callback;
----------
-- Tick --
----------
procedure Tick is
begin
APU.Tick;
end Tick;
---------------
-- Play_Coin --
---------------
procedure Play_Coin is
begin
APU.Run (World_FX, Coin_Seq'Access);
end Play_Coin;
-----------------------
-- Play_Monster_Dead --
-----------------------
procedure Play_Monster_Dead is
begin
APU.Run (World_FX, Monster_Dead_Seq'Access);
end Play_Monster_Dead;
--------------
-- Play_Gun --
--------------
procedure Play_Gun is
begin
APU.Run (Player_FX, Gun_Seq'Access);
end Play_Gun;
---------------
-- Play_Jump --
---------------
procedure Play_Jump is
begin
APU.Run (Player_FX, Jump_Seq'Access);
end Play_Jump;
--------------------
-- Play_Exit_Open --
--------------------
procedure Play_Exit_Open is
begin
APU.Run (World_FX, Exit_Open_Seq'Access);
end Play_Exit_Open;
---------------------
-- Play_Exit_Taken --
---------------------
procedure Play_Exit_Taken is
begin
APU.Run (World_FX, Exit_Taken_Seq'Access);
end Play_Exit_Taken;
-------------------
-- Play_Gameover --
-------------------
procedure Play_Gameover is
begin
APU.Set_Volume (Drums, 0);
APU.Note_Off (Bass);
APU.Run (Bass, Empty_Seq, Looping => False);
APU.Set_Volume (Bass, 0);
APU.Note_Off (Bass);
APU.Run (Bass, Empty_Seq, Looping => False);
APU.Set_Volume (Lead, 50);
APU.Run (Lead, Game_Over_Seq'Access, Looping => False);
end Play_Gameover;
------------------
-- Play_Victory --
------------------
procedure Play_Victory is
begin
APU.Set_Volume (Drums, 0);
APU.Note_Off (Bass);
APU.Run (Bass, Empty_Seq, Looping => False);
APU.Set_Volume (Bass, 0);
APU.Note_Off (Bass);
APU.Run (Bass, Empty_Seq, Looping => False);
APU.Set_Volume (Lead, 50);
APU.Run (Lead, Victory_Seq'Access, Looping => False);
end Play_Victory;
---------------------
-- Play_Main_Theme --
---------------------
procedure Play_Main_Theme is
begin
APU.Run (Drums, Drums_Seq'Access, Looping => True);
APU.Set_Volume (Drums, 50);
APU.Set_Mode (Bass, Triangle);
APU.Set_Decay (Bass, 7);
APU.Set_Volume (Bass, 50);
APU.Run (Bass, Bass_Seq'Access, Looping => True);
APU.Set_Mode (Lead, Pulse);
APU.Set_Decay (Lead, 40);
APU.Set_Width (Lead, 25);
APU.Set_Volume (Lead, 50);
APU.Run (Lead, Lead_Seq'Access, Looping => True);
end Play_Main_Theme;
-------------------
-- Play_Gameplay --
-------------------
procedure Play_Gameplay is
begin
APU.Run (Drums, Music_2.Drums'Access, Looping => True);
APU.Set_Volume (Drums, 50);
APU.Set_Mode (Bass, Triangle);
APU.Set_Decay (Bass, 7);
APU.Set_Volume (Bass, 50);
APU.Run (Bass, Music_2.Bass'Access, Looping => True);
APU.Set_Volume (Lead, 0);
APU.Note_Off (Lead);
APU.Run (Lead, Empty_Seq, Looping => False);
end Play_Gameplay;
begin
PyGamer.Audio.Set_Callback (Audio_Callback'Access, Sample_Rate);
APU.Set_Rhythm (120, 60);
end Sound;
|
reznikmm/matreshka | Ada | 4,679 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Draw.Extrusion_Shininess_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Draw_Extrusion_Shininess_Attribute_Node is
begin
return Self : Draw_Extrusion_Shininess_Attribute_Node do
Matreshka.ODF_Draw.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Draw_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Draw_Extrusion_Shininess_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Extrusion_Shininess_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Draw_URI,
Matreshka.ODF_String_Constants.Extrusion_Shininess_Attribute,
Draw_Extrusion_Shininess_Attribute_Node'Tag);
end Matreshka.ODF_Draw.Extrusion_Shininess_Attributes;
|
zhmu/ananas | Ada | 114 | adb | package body Array27_Pkg is
function F return Inner_Type is
begin
return "123";
end;
end Array27_Pkg;
|
AdaCore/libadalang | Ada | 127 | ads | package Foo is
type T is private;
private
type T is null record;
pragma Pack (T);
pragma Test_Statement;
end Foo;
|
onox/orka | Ada | 3,418 | adb | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2018 onox <[email protected]>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with System;
with GL.API;
with GL.Enums.Getter;
with GL.Low_Level;
with GL.Types.Indirect;
package body GL.Compute is
Indices : constant array (Index_3D) of UInt := (X => 0, Y => 1, Z => 2);
procedure Dispatch_Compute (X, Y, Z : UInt := 1) is
begin
API.Dispatch_Compute.Ref (X, Y, Z);
end Dispatch_Compute;
procedure Dispatch_Compute_Group_Size
(Group_Size : Dimension_Size_Array;
X, Y, Z : UInt := 1) is
begin
API.Dispatch_Compute_Group_Size.Ref
(X, Y, Z,
UInt (Group_Size (Orka.X)), UInt (Group_Size (Orka.Y)), UInt (Group_Size (Orka.Z)));
end Dispatch_Compute_Group_Size;
procedure Dispatch_Compute_Indirect (Offset : Size := 0) is
use GL.Types.Indirect;
Offset_In_Bytes : constant Size
:= Offset * Dispatch_Indirect_Command'Size / System.Storage_Unit;
begin
API.Dispatch_Compute_Indirect.Ref (Low_Level.IntPtr (Offset_In_Bytes));
end Dispatch_Compute_Indirect;
function Max_Compute_Shared_Memory_Size return Size is
Value : Size := 0;
begin
API.Get_Size.Ref (Enums.Getter.Max_Compute_Shared_Memory_Size, Value);
return Value;
end Max_Compute_Shared_Memory_Size;
function Max_Compute_Work_Group_Invocations (Kind : Work_Group_Kind) return Size is
Value : Size := 0;
begin
case Kind is
when Fixed =>
API.Get_Size.Ref (Enums.Getter.Max_Compute_Fixed_Group_Invocations, Value);
when Variable =>
API.Get_Size.Ref (Enums.Getter.Max_Compute_Variable_Group_Invocations, Value);
end case;
return Value;
end Max_Compute_Work_Group_Invocations;
function Max_Compute_Work_Group_Count return Dimension_Size_Array is
Values : Dimension_Size_Array := (others => 0);
begin
for Dimension in Values'Range loop
API.Get_Size_I.Ref (Enums.Getter.Max_Compute_Work_Group_Count,
Indices (Dimension), Values (Dimension));
end loop;
return Values;
end Max_Compute_Work_Group_Count;
function Max_Compute_Work_Group_Size (Kind : Work_Group_Kind) return Dimension_Size_Array is
Values : Dimension_Size_Array := (others => 0);
begin
case Kind is
when Fixed =>
for Dimension in Values'Range loop
API.Get_Size_I.Ref (Enums.Getter.Max_Compute_Fixed_Group_Size,
Indices (Dimension), Values (Dimension));
end loop;
when Variable =>
for Dimension in Values'Range loop
API.Get_Size_I.Ref (Enums.Getter.Max_Compute_Variable_Group_Size,
Indices (Dimension), Values (Dimension));
end loop;
end case;
return Values;
end Max_Compute_Work_Group_Size;
end GL.Compute;
|
godunko/adagl | Ada | 6,125 | ads | ------------------------------------------------------------------------------
-- --
-- Ada binding for OpenGL/WebGL --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2018, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
private with GLFW;
with OpenGL.Functions;
package OpenGL.Contexts is
pragma Preelaborate;
type OpenGL_Context is tagged limited private;
type OpenGL_Context_Access is access all OpenGL_Context'Class;
function Create
(Self : in out OpenGL_Context'Class)
return Boolean;
-- Attempts to create the OpenGL context. Returns False on failure.
procedure Create
(Self : in out OpenGL_Context'Class);
-- Attempts to create the OpenGL context. Raise Program_Error on failure.
function Functions
(Self : in out OpenGL_Context'Class)
return access OpenGL.Functions.OpenGL_Functions'Class;
-- Returns the OpenGL_Functions implementation for this context.
procedure Make_Current (Self : in out OpenGL_Context'Class);
-- Makes the context current.
function Current_Context return OpenGL_Context_Access;
-- Returns the last context which called makeCurrent, or null, if no
-- context is current.
private
------------------
-- My_Functions --
------------------
package My_Functions is
type My_Functions is
limited new OpenGL.Functions.OpenGL_Functions with record
null;
end record;
overriding procedure Blend_Func
(Self : My_Functions;
Source_Factor : OpenGL.GLenum;
Destination_Factor : OpenGL.GLenum);
overriding procedure Clear
(Self : My_Functions;
Mask : OpenGL.Clear_Buffer_Mask);
overriding procedure Clear_Color
(Self : My_Functions;
Red : OpenGL.GLfloat;
Green : OpenGL.GLfloat;
Blue : OpenGL.GLfloat;
Alpha : OpenGL.GLfloat);
procedure Clear_Depth
(Self : My_Functions;
Depth : OpenGL.GLfloat);
overriding procedure Depth_Func
(Self : My_Functions;
Func : OpenGL.GLenum);
overriding procedure Disable
(Self : My_Functions;
Capability : OpenGL.GLenum);
overriding procedure Draw_Arrays
(Self : My_Functions;
Mode : OpenGL.GLenum;
First : OpenGL.GLint;
Count : OpenGL.GLsizei);
procedure Draw_Elements
(Self : My_Functions;
Mode : OpenGL.GLenum;
Count : OpenGL.GLsizei;
Data_Type : OpenGL.GLenum;
Offset : OpenGL.GLintptr);
overriding procedure Enable
(Self : My_Functions;
Capability : OpenGL.GLenum);
overriding procedure Finish (Self : My_Functions);
overriding procedure Flush (Self : My_Functions);
overriding procedure Viewport
(Self : My_Functions;
X : OpenGL.GLint;
Y : OpenGL.GLint;
Width : OpenGL.GLsizei;
Height : OpenGL.GLsizei);
end My_Functions;
--------------------
-- OpenGL_Context --
--------------------
type OpenGL_Context is tagged limited record
Functions : aliased My_Functions.My_Functions;
Window : GLFW.GLFWwindow_Access;
end record;
end OpenGL.Contexts;
|
fnarenji/BoiteMaker | Ada | 16,043 | adb | with ada.characters.latin_1;
with point_list;
use point_list;
with point;
use point;
with logger;
use logger;
-- ATTENTION: dans ce fichier, le terme "queue" est équivalent à "queue et encoche"
-- exemple: la fonction add_queues ajoue queues ET encoches.
package body halfbox_panel is
function get_bottom_panel(halfbox_info : halfbox_info_t) return halfbox_panel_t is
-- Petit poucet pour tracer la face
poucet : petit_poucet_t := get_petit_poucet((0.0, 0.0));
-- espace dispo pour les encoches en longueur
l_queue_space : constant integer := halfbox_info.length - 2 * halfbox_info.thickness;
-- nombre d'encoches à mettre en longueur
l_raw_queue_count : constant integer := l_queue_space / halfbox_info.queue_length;
-- nombre d'encoches à mettre en longueur ramené à l'impair inférieur
l_queue_count : constant integer := l_raw_queue_count - (l_raw_queue_count + 1) mod 2;
-- marge à répartir pour centrer les encoches en longueur
l_queue_margin : constant integer := l_queue_space - l_queue_count * halfbox_info.queue_length;
-- espace dispo pour les encoches en largeur
w_queue_space : constant integer := halfbox_info.width - 2 * halfbox_info.thickness;
-- nombre d'encoches à mettre en largeur
w_raw_queue_count : constant integer := w_queue_space / halfbox_info.queue_length;
-- nombre d'encoches à mettre en largeur ramené à l'impair inférieur
w_queue_count : integer := w_raw_queue_count - (w_raw_queue_count + 1) mod 2;
-- marge à répartir pour centrer les encoches en largeur
w_queue_margin : integer := w_queue_space - w_queue_count * halfbox_info.queue_length;
begin
debug("Génération de la face du fond");
debug("Marge calculée en longueur: " & integer'image(l_queue_margin));
debug("Marge calculée en largeur: " & integer'image(w_queue_margin));
-- Si possible, réduction du nombre d'encoches à mettre en largeur
-- pour éviter des "cassures" physiques du coin d'une face
if halfbox_info.width = 2 * halfbox_info.thickness + w_queue_count * halfbox_info.queue_length and w_queue_count >= 3 then
debug("Réduction du nombre d'encoches en largeur de 2");
w_queue_count := w_queue_count - 2;
-- L'espace manquant est compensé dans la marge
w_queue_margin := w_queue_margin + 2 * halfbox_info.queue_length;
end if;
-- Bord haut de la face
-- Marge de t à gauche pour les encoches
-- + la moitié de la marge de centrage des encoches en longueur
mv_r(poucet, float(halfbox_info.thickness) + float(l_queue_margin) / 2.0);
-- Ajout des queues et des encoches en longueur
add_queues(poucet, halfbox_info.queue_length, halfbox_info.thickness, l_queue_count, mv_r_ptr, mv_u_ptr, mv_d_ptr, false);
-- Marge de t à droite pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en longueur
mv_r(poucet, float(halfbox_info.thickness) + float(l_queue_margin) / 2.0);
-- Bord droit de la face
-- Marge de t en haut pour les encoches
-- + la moitié de la marge de centrage des encoches en largeur
mv_d(poucet, float(halfbox_info.thickness) + float(w_queue_margin) / 2.0);
-- Ajout des queues et des encoches en largeur
add_queues(poucet, halfbox_info.queue_length, halfbox_info.thickness, w_queue_count, mv_d_ptr, mv_r_ptr, mv_l_ptr, false);
-- Marge de t en bas pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en largeur
mv_d(poucet, float(halfbox_info.thickness) + float(w_queue_margin) / 2.0);
-- Bord bas de la face
-- Marge de t à droite pour les encoches
-- + la moitié de la marge de centrage des encoches en longueur
mv_l(poucet, float(halfbox_info.thickness) + float(l_queue_margin) / 2.0);
-- Ajout des queues et des encoches en longueur
add_queues(poucet, halfbox_info.queue_length, halfbox_info.thickness, l_queue_count, mv_l_ptr, mv_d_ptr, mv_u_ptr, false);
-- Marge de t à gauche pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en longueur
mv_l(poucet, float(halfbox_info.thickness) + float(l_queue_margin) / 2.0);
-- Bord gauche de la face
-- Marge de t en bas pour les encoches
-- + la moitié de la marge de centrage des encoches en largeur
mv_u(poucet, float(halfbox_info.thickness) + float(w_queue_margin) / 2.0);
-- Ajout des queues et des encoches en largeur
add_queues(poucet, halfbox_info.queue_length, halfbox_info.thickness, w_queue_count, mv_u_ptr, mv_l_ptr, mv_r_ptr, false);
-- Marge de t en haut pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en largeur
mv_u(poucet, float(halfbox_info.thickness) + float(w_queue_margin) / 2.0);
-- On doit être revenu pos. 0,0
return (polygon => get_points(poucet));
end;
function get_back_panel(halfbox_info : halfbox_info_t) return halfbox_panel_t is
begin
debug("Génération de la face de derrière");
return get_front_and_back_panel(halfbox_info.length, halfbox_info.height, halfbox_info.thickness, halfbox_info.queue_length);
end;
function get_front_panel(halfbox_info : halfbox_info_t) return halfbox_panel_t is
begin
debug("Génération de la face de devant");
return get_front_and_back_panel(halfbox_info.length, halfbox_info.height, halfbox_info.thickness, halfbox_info.queue_length);
end;
function get_right_panel(halfbox_info : halfbox_info_t) return halfbox_panel_t is
begin
debug("Génération de la face de droite");
return get_right_and_left_panel(halfbox_info.width, halfbox_info.height, halfbox_info.thickness, halfbox_info.queue_length);
end;
function get_left_panel(halfbox_info : halfbox_info_t) return halfbox_panel_t is
begin
debug("Génération de la face de gauche");
return get_right_and_left_panel(halfbox_info.width, halfbox_info.height, halfbox_info.thickness, halfbox_info.queue_length);
end;
function get_front_and_back_panel(length, width, thickness, queue_length : integer) return halfbox_panel_t is
-- poucet de tracer de la face
-- commence directement à 0;t
poucet : petit_poucet_t := get_petit_poucet((0.0, float(thickness)));
-- espace dispo pour les encoches en longueur
l_queue_space : constant integer := length - 2 * thickness;
-- nombre d'encoches à mettre en longueur
l_raw_queue_count : constant integer := l_queue_space / queue_length;
-- nombre d'encoches à mettre en longueur ramené à l'impair inférieur
l_queue_count : constant integer := l_raw_queue_count - (l_raw_queue_count + 1) mod 2;
-- marge à répartir pour centrer les encoches en longueur
l_queue_margin : constant integer := l_queue_space - l_queue_count * queue_length;
-- espace dispo pour les encoches en largeur
w_queue_space : constant integer := width - 2 * thickness;
-- nombre d'encoches à mettre en largeur
w_raw_queue_count : constant integer := w_queue_space / queue_length;
-- nombre d'encoches à mettre en largeur ramené à l'impair inférieur
w_queue_count : constant integer := w_raw_queue_count - (w_raw_queue_count + 1) mod 2;
-- marge à répartir pour centrer les encoches en largeur
w_queue_margin : constant integer := w_queue_space - w_queue_count * queue_length;
begin
debug("Marge calculée en longueur: " & integer'image(l_queue_margin));
debug("Marge calculée en largeur: " & integer'image(w_queue_margin));
-- Bord haut de la face
-- Marge de t à gauche pour les encoches
-- + la moitié de la marge de centrage des encoches en longueur
mv_r(poucet, float(thickness) + float(l_queue_margin) / 2.0);
-- Ajout des queues et des encoches en longueur
add_queues(poucet, queue_length, thickness, l_queue_count, mv_r_ptr, mv_u_ptr, mv_d_ptr, true);
-- Marge de t à droite pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en longueur
mv_r(poucet, float(thickness) + float(l_queue_margin) / 2.0);
-- Bord droit de la face
-- Marge de t en haut pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en largeur
mv_d(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- Ajout des queues et des encoches en largeur
add_queues(poucet, queue_length, thickness, w_queue_count, mv_d_ptr, mv_r_ptr, mv_l_ptr, false);
-- Marge de t en bas pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en largeur
mv_d(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- Bord bas de la face
-- Le bord bas est un bord droit ("lisse")
mv_l(poucet, float(length));
-- Bord gauche de la face
-- Marge de t en bas pour les encoches
-- + la moitié de la marge de centrage des encoches en largeur
mv_u(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- Ajout des queues et des encoches en largeur
add_queues(poucet, queue_length, thickness, w_queue_count, mv_u_ptr, mv_l_ptr, mv_r_ptr, false);
-- Marge de t en haut pour les encoches
-- + la moitié de la marge de centrage des encoches en largeur
mv_u(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- On doit être revenu pos. 0,t
return (polygon => get_points(poucet));
end;
function get_right_and_left_panel(length, width, thickness, queue_length : integer) return halfbox_panel_t is
-- poucet de tracer de la face
-- commence directement à t;t
poucet : petit_poucet_t := get_petit_poucet((float(thickness), float(thickness)));
-- espace dispo pour les encoches en longueur
l_queue_space : constant integer := length - 2 * thickness;
-- nombre d'encoches à mettre en longueur
l_raw_queue_count : constant integer := l_queue_space / queue_length;
-- nombre d'encoches à mettre en longueur ramené à l'impair inférieur
l_queue_count : integer := l_raw_queue_count - (l_raw_queue_count + 1) mod 2;
-- marge à répartir pour centrer les encoches en longueur
l_queue_margin : integer := l_queue_space - l_queue_count * queue_length;
-- espace dispo pour les encoches en largeur
w_queue_space : constant integer := width - 2 * thickness;
-- nombre d'encoches à mettre en largeur
w_raw_queue_count : constant integer := w_queue_space / queue_length;
-- nombre d'encoches à mettre en largeur ramené à l'impair inférieur
w_queue_count : constant integer := w_raw_queue_count - (w_raw_queue_count + 1) mod 2;
-- marge à répartir pour centrer les encoches en largeur
w_queue_margin : constant integer := w_queue_space - w_queue_count * queue_length;
begin
debug("Marge calculée en longueur: " & integer'image(l_queue_margin));
debug("Marge calculée en largeur: " & integer'image(w_queue_margin));
-- Si possible, réduction du nombre d'encoches à mettre sur la face du haut
-- pour éviter des "cassures" physiques du coin de la face inférieure
if length = 2 * thickness + l_queue_count * queue_length and l_queue_count >= 3 then
l_queue_count := l_queue_count - 2;
-- L'espace manquant est compensé dans la marge
l_queue_margin := l_queue_margin + 2 * queue_length;
end if;
-- Bord haut de la face
-- Marge de t à gauche pour les encoches
-- + la moitié de la marge de centrage des encoches en longueur
mv_r(poucet, float(thickness) + float(l_queue_margin) / 2.0);
-- Ajout des queues et des encoches en longueur
add_queues(poucet, queue_length, thickness, l_queue_count, mv_r_ptr, mv_u_ptr, mv_d_ptr, true);
-- Marge de t à droite pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en longueur
mv_r(poucet, float(thickness) + float(l_queue_margin) / 2.0);
-- Bord droit de la face
-- Marge de t en haut pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en largeur
mv_d(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- Ajout des queues et des encoches en largeur
add_queues(poucet, queue_length, thickness, w_queue_count, mv_d_ptr, mv_r_ptr, mv_l_ptr, true);
-- Marge de t en bas pour les encoches
-- + l'autre moitié de la marge de centrage des encoches en largeur
mv_d(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- Bord bas de la face
-- Le bord bas est un bord droit ("lisse")
mv_l(poucet, float(length));
-- Bord gauche de la face
-- Marge de t en bas pour les encoches
-- + la moitié de la marge de centrage des encoches en largeur
mv_u(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- Ajout des queues et des encoches en largeur
add_queues(poucet, queue_length, thickness, w_queue_count, mv_u_ptr, mv_l_ptr, mv_r_ptr, true);
-- Marge de t en haut pour les encoches
-- + la moitié de la marge de centrage des encoches en largeur
mv_u(poucet, float(thickness) + float(w_queue_margin) / 2.0);
-- On doit être revenu pos. t,t
return (polygon => get_points(poucet));
end;
-- Ajoute les queues et les encoches
-- poucet : le petit poucet !
-- queue_length : longueur des queues
-- queue_width : largeur des queues
-- queue_count : le nombre de queues
-- mv_line : fonction de mouvement formant la grande ligne entre une queue et une encoche (et inversement)
-- mv_queue : fonction de mouvement pour une queue
-- mv_encoche : fonction de mouvement pour une encoche
-- queue_first : si on commence par une queue
procedure add_queues(poucet : in out petit_poucet_t; queue_length, queue_width, queue_count : integer; mv_line, mv_queue, mv_socket : mv_poucet_ptr; queue_first : boolean) is
begin
debug("Ajout des queues et des encoches.");
debug("Commence queue: " & boolean'image(queue_first) & ". Nombre:" & integer'image(queue_count));
for i in 1 .. queue_count loop
-- permet de commencer par une encoche ou une queue
if i mod 2 = boolean'pos(queue_first) mod 2 then
mv_queue(poucet, float(queue_width));
mv_line(poucet, float(queue_length));
else -- les pairs sont des queues
mv_socket(poucet, float(queue_width));
mv_line(poucet, float(queue_length));
end if;
end loop;
if queue_first then
mv_socket(poucet, float(queue_width));
else
mv_queue(poucet, float(queue_width));
end if;
end;
procedure destroy(panel : in out halfbox_panel_t) is
begin
point_list.destroy(panel.polygon);
end;
function to_string(panel : halfbox_panel_t) return string is
lf : constant character := ada.characters.latin_1.LF;
begin
-- le to_string en pointeur de fonction est celui du point
return "[" & lf & to_string(panel.polygon, to_string'access) & "]";
end;
end halfbox_panel;
|
Gabriel-Degret/adalib | Ada | 716 | ads | -- Standard Ada library specification
-- Copyright (c) 2003-2018 Maxim Reznik <[email protected]>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
with Ada.Containers;
generic
with package Bounded is
new Ada.Strings.Bounded.Generic_Bounded_Length (<>);
function Ada.Strings.Bounded.Hash (Key : in Bounded.Bounded_String)
return Containers.Hash_Type;
pragma Preelaborate (Hash);
|
jorge-real/TTS-Ravenscar | Ada | 205 | adb | package body Epoch_Support is
Init_Time : constant Time := Clock + Milliseconds (500);
-----------
-- Epoch --
-----------
function Epoch return Time is (Init_Time);
end Epoch_Support;
|
stcarrez/ada-util | Ada | 3,985 | adb | -----------------------------------------------------------------------
-- util-events-channel -- Event Channels
-- Copyright (C) 2001, 2002, 2003, 2009, 2010, 2018 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Strings;
package body Util.Events.Channels is
use Containers;
use Ada.Strings.Unbounded;
use Util.Strings;
type Factory_Line is record
Name : Name_Access;
Creator : Channel_Creator;
end record;
type Factory_Table is array (Natural range <>) of Factory_Line;
DIRECT_NAME : aliased constant String := "direct";
Factory : constant Factory_Table (1 .. 1) :=
(1 => (Name => DIRECT_NAME'Access,
Creator => Create_Direct_Channel'Access));
-- -----------------------
-- Get the name of this event channel.
-- -----------------------
function Get_Name (C : Channel) return String is
begin
return To_String (C.Name);
end Get_Name;
-- -----------------------
-- Post an event and dispatch it immediately.
-- -----------------------
procedure Post (To : in out Channel;
Item : in Event'Class) is
Iter : Cursor := First (To.Clients);
begin
-- Dispatch_One makes the connection between the common implementation
-- and the generics
while Has_Element (Iter) loop
declare
Client : constant Subscriber_Access := Element (Iter);
begin
Client.Receive_Event (Item);
end;
Iter := Next (Iter);
end loop;
end Post;
-- -----------------------
-- Subscribe to events sent on the event channel.
-- -----------------------
procedure Subscribe (To : in out Channel;
Client : in Subscriber_Access) is
begin
pragma Assert (Client /= null, "Client subscriber must not be null");
Append (To.Clients, Client);
end Subscribe;
-- -----------------------
-- Unsubscribe to events sent on the event channel.
-- -----------------------
procedure Unsubscribe (To : in out Channel;
Client : in Subscriber_Access) is
Iter : Cursor := First (To.Clients);
begin
while Has_Element (Iter) loop
if Element (Iter) = Client then
Delete (To.Clients, Iter);
return;
end if;
Iter := Next (Iter);
end loop;
end Unsubscribe;
-- -----------------------
-- Create an event channel with the given name. The type of channel
-- is controlled by <b>Kind</b>.
-- -----------------------
function Create (Name : String;
Kind : String)
return Channel_Access is
begin
for I in Factory'Range loop
if Factory (I).Name.all = Kind then
return Factory (I).Creator (Name);
end if;
end loop;
return Create_Direct_Channel (Name);
end Create;
-- -----------------------
-- Create an event channel that post the event immediately.
-- -----------------------
function Create_Direct_Channel (Name : String) return Channel_Access is
Result : constant Channel_Access := new Channel;
begin
Result.Name := To_Unbounded_String (Name);
return Result;
end Create_Direct_Channel;
end Util.Events.Channels;
|
SSOCsoft/Log_Reporter | Ada | 5,644 | adb | With
Ada.Unchecked_Conversion,
Ada.IO_Exceptions;
Package Body NSO.Types is
Use Ada.Streams;
-------------------
-- INITALIZERS --
-------------------
Function From_String( Text : String ) return String_Stream
with Inline, Pure_Function;
Function Buffer ( Length : Natural ) return String_Stream
with Inline, Pure_Function;
--------------
-- R E A D --
--------------
Procedure Read
(Stream : in out String_Stream;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset) is
Use Ada.IO_Exceptions, Ada.Streams;
Begin
-- When there is a read of zero, do nothing.
-- When there is a read beyond the buffer's bounds, raise an exception.
-- Note: I've used two cases here-
-- 1) when the read is greater than the buffer,
-- 2) when the read would go beyond the buffer.
-- Finally, read the given amount of data and update the position.
if Item'Length = 0 then
null;
elsif Item'Length > Stream.Data'Length then
Raise End_Error with "Request is larger than the buffer's size.";
elsif Stream_Element_Offset'Pred(Stream.Position)+Item'Length > Stream.Data'Length then
Raise End_Error with "Buffer will over-read.";
else
Declare
Subtype Selection is Stream_Element_Offset range
Stream.Position..Stream.Position+Stream_Element_Offset'Pred(Item'Length);
Begin
Item(Item'Range):= Stream.Data(Selection);
Stream.Position:= Stream_Element_Offset'Succ(Selection'Last);
Last:= Selection'Last;--Stream.Position;
End;
end if;
End Read;
-----------------
-- W R I T E --
-----------------
Procedure Write
(Stream : in out String_Stream;
Item : Ada.Streams.Stream_Element_Array) is
Begin
Declare
Subtype Selection is Stream_Element_Offset range
Stream.Position..Stream.Position+Stream_Element_Offset'Pred(Item'Length);
Begin
Stream.Data(Selection):= Item(Item'Range);
Stream.Position:= Stream_Element_Offset'Succ(Selection'Last);
End;
End Write;
----------------------------------
-- INITALIZER IMPLEMENTATIONS --
----------------------------------
-- Create a buffer of the given length, zero-filled.
Function Buffer( Length : Natural ) return String_Stream is
Len : Constant Ada.Streams.Stream_Element_Offset :=
Ada.Streams.Stream_Element_Offset(Length);
Begin
Return Result : Constant String_Stream:=
(Root_Stream_Type with
Position => 1,
Data => (1..Len => 0),
Length => Len
);
End Buffer;
-- Create a buffer from the given string.
Function From_String( Text : String ) return String_Stream is
Use Ada.Streams;
Subtype Element_Range is Stream_Element_Offset range
Stream_Element_Offset(Text'First)..Stream_Element_Offset(Text'Last);
Subtype Constrained_Array is Stream_Element_Array(Element_Range);
Subtype Constrained_String is String(Text'Range);
Function Convert is new Ada.Unchecked_Conversion(
Source => Constrained_String,
Target => Constrained_Array
);
Begin
Return Result : Constant String_Stream:=
(Root_Stream_Type with
Position => Element_Range'First,
Data => Convert( Text ),
Length => Text'Length
);
End From_String;
-- Classwide returning renames, for consistancy/overload.
Function To_Stream( Text : String ) return Root_Stream_Class is
( From_String(Text) ) with Inline, Pure_Function;
Function To_Stream( Length : Natural ) return Root_Stream_Class is
( Buffer(Length) ) with Inline, Pure_Function;
----------------------------
-- CONVERSION OPERATORS --
----------------------------
-- Allocating / access-returning initalizing operations.
Function "+"( Length : Natural ) return not null access Root_Stream_Class is
( New Root_Stream_Class'(To_Stream(Length)) );
Function "+"( Text : String ) return not null access Root_Stream_Class is
( New Root_Stream_Class'(To_Stream(Text)) );
-- Conversion from text or integer to a stream; renaming of the initalizers.
Function "+"( Text : String ) return String_Stream renames From_String;
Function "+"( Length : Natural ) return String_Stream renames Buffer;
-- Convert a given Stream_Element_Array to a String.
Function "-"( Data : Ada.Streams.Stream_Element_Array ) Return String is
Subtype Element_Range is Natural range
Natural(Data'First)..Natural(Data'Last);
Subtype Constrained_Array is Stream_Element_Array(Data'Range);
Subtype Constrained_String is String(Element_Range);
Function Convert is new Ada.Unchecked_Conversion(
Source => Constrained_Array,
Target => Constrained_String
);
Begin
Return Convert( Data );
End "-";
----------------------
-- DATA RETRIEVAL --
----------------------
Function "-"( Stream : String_Stream ) return String is
Begin
Return -Stream.Data(Stream.Position..Stream.Length);
End "-";
Function Data(Stream : String_Stream ) return String is
Begin
Return -Stream.Data;
End Data;
End NSO.Types;
|
stcarrez/ada-asf | Ada | 4,975 | adb | -----------------------------------------------------------------------
-- asf-converters-sizes -- Size converter
-- Copyright (C) 2012, 2022 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Exceptions;
with Ada.Strings.Unbounded;
with Util.Locales;
with Util.Strings;
with Util.Properties.Bundles;
with ASF.Locales;
with ASF.Utils;
with ASF.Applications.Main;
package body ASF.Converters.Sizes is
ONE_KB : constant Long_Long_Integer := 1_024;
ONE_MB : constant Long_Long_Integer := ONE_KB * 1_024;
ONE_GB : constant Long_Long_Integer := ONE_MB * 1_024;
UNIT_GB : aliased constant String := "size_giga_bytes";
UNIT_MB : aliased constant String := "size_mega_bytes";
UNIT_KB : aliased constant String := "size_kilo_bytes";
UNIT_B : aliased constant String := "size_bytes";
-- ------------------------------
-- Convert the object value into a string. The object value is associated
-- with the specified component.
-- If the string cannot be converted, the Invalid_Conversion exception should be raised.
-- ------------------------------
overriding
function To_String (Convert : in Size_Converter;
Context : in ASF.Contexts.Faces.Faces_Context'Class;
Component : in ASF.Components.Base.UIComponent'Class;
Value : in Util.Beans.Objects.Object) return String is
pragma Unreferenced (Convert);
Bundle : ASF.Locales.Bundle;
Locale : constant Util.Locales.Locale := Context.Get_Locale;
begin
begin
ASF.Applications.Main.Load_Bundle (Context.Get_Application.all,
Name => "sizes",
Locale => Util.Locales.To_String (Locale),
Bundle => Bundle);
exception
when E : Util.Properties.Bundles.NO_BUNDLE =>
Component.Log_Error ("Cannot localize sizes: {0}",
Ada.Exceptions.Exception_Message (E));
end;
-- Convert the value as an integer here so that we can raise
-- the Invalid_Conversion exception.
declare
Size : constant Long_Long_Integer := Util.Beans.Objects.To_Long_Long_Integer (Value);
Val : Integer;
Values : ASF.Utils.Object_Array (1 .. 1);
Result : Ada.Strings.Unbounded.Unbounded_String;
Unit : Util.Strings.Name_Access;
begin
if Size >= ONE_GB then
Val := Integer ((Size + ONE_GB / 2) / ONE_GB);
Unit := UNIT_GB'Access;
elsif Size >= ONE_MB then
Val := Integer ((Size + ONE_MB / 2) / ONE_MB);
Unit := UNIT_MB'Access;
elsif Size >= ONE_KB then
Val := Integer ((Size + ONE_KB / 2) / ONE_KB);
Unit := UNIT_KB'Access;
else
Val := Integer (Size);
Unit := UNIT_B'Access;
end if;
Values (1) := Util.Beans.Objects.To_Object (Val);
ASF.Utils.Formats.Format (Bundle.Get (Unit.all), Values, Result);
return Ada.Strings.Unbounded.To_String (Result);
end;
exception
when E : others =>
raise ASF.Converters.Invalid_Conversion with Ada.Exceptions.Exception_Message (E);
end To_String;
-- ------------------------------
-- Convert the date string into an object for the specified component.
-- If the string cannot be converted, the Invalid_Conversion exception should be raised.
-- ------------------------------
overriding
function To_Object (Convert : in Size_Converter;
Context : in ASF.Contexts.Faces.Faces_Context'Class;
Component : in ASF.Components.Base.UIComponent'Class;
Value : in String) return Util.Beans.Objects.Object is
pragma Unreferenced (Convert, Context, Value);
begin
Component.Log_Error ("Conversion of string to a size is not implemented");
raise ASF.Converters.Invalid_Conversion with "Not implemented";
return Util.Beans.Objects.Null_Object;
end To_Object;
end ASF.Converters.Sizes;
|
MinimSecure/unum-sdk | Ada | 873 | adb | -- Copyright 2018-2019 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Pck;
procedure PB16_063 is
My_Item : Pck.T;
Ignored : Boolean;
begin
My_Item := Pck.Null_T;
Ignored := Pck.Break_Me (My_Item);
end PB16_063;
|
AdaCore/libadalang | Ada | 358 | adb | procedure Simple_Aggregate is
type Integer is range 1 .. 10;
type Rec is record
A, B : Integer;
end record;
R : Rec;
function Foo return Integer;
function Foo return Float;
begin
R := (1, 2);
pragma Test_Statement;
R := (1, 2.0);
pragma Test_Statement;
R := (1, Foo);
pragma Test_Statement;
end Simple_Aggregate;
|
zhmu/ananas | Ada | 4,547 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASK_PRIMITIVES.OPERATIONS.REGISTER_FOREIGN_THREAD --
-- --
-- B o d y --
-- --
-- Copyright (C) 2002-2022, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
with System.Multiprocessors;
with System.Soft_Links;
with System.Task_Info;
separate (System.Task_Primitives.Operations)
function Register_Foreign_Thread
(Thread : Thread_Id;
Sec_Stack_Size : Size_Type := Unspecified_Size)
return Task_Id
is
Local_ATCB : aliased Ada_Task_Control_Block (0);
Self_Id : Task_Id;
Succeeded : Boolean;
begin
-- This section is tricky. We must not call anything that might require
-- an ATCB, until the new ATCB is in place. In order to get an ATCB
-- immediately, we fake one, so that it is then possible to e.g allocate
-- memory (which might require accessing self).
-- Record this as the Task_Id for the thread
Local_ATCB.Common.LL.Thread := Thread;
Local_ATCB.Common.Current_Priority := System.Priority'First;
Local_ATCB.Common.Global_Task_Lock_Nesting := 0;
Specific.Set (Local_ATCB'Unchecked_Access);
-- It is now safe to use an allocator
Self_Id := new Ada_Task_Control_Block (0);
-- Finish initialization
Lock_RTS;
System.Tasking.Initialize_ATCB
(Self_Id, null, Null_Address, Null_Task,
Foreign_Task_Elaborated'Access,
System.Priority'First, System.Multiprocessors.Not_A_Specific_CPU, null,
Task_Info.Unspecified_Task_Info, 0, Self_Id, Succeeded);
Unlock_RTS;
pragma Assert (Succeeded);
Self_Id.Master_Of_Task := 0;
Self_Id.Master_Within := Self_Id.Master_Of_Task + 1;
for L in Self_Id.Entry_Calls'Range loop
Self_Id.Entry_Calls (L).Self := Self_Id;
Self_Id.Entry_Calls (L).Level := L;
end loop;
Self_Id.Common.State := Runnable;
Self_Id.Awake_Count := 1;
Self_Id.Common.Task_Image (1 .. 14) := "foreign thread";
Self_Id.Common.Task_Image_Len := 14;
-- Since this is not an ordinary Ada task, we will start out undeferred
Self_Id.Deferral_Level := 0;
-- We do not provide an alternate stack for foreign threads
Self_Id.Common.Task_Alternate_Stack := Null_Address;
-- Create the TSD for the task
System.Soft_Links.Create_TSD
(Self_Id.Common.Compiler_Data, null, Sec_Stack_Size);
Enter_Task (Self_Id);
return Self_Id;
end Register_Foreign_Thread;
|
reznikmm/matreshka | Ada | 3,052 | ads | -- Copyright (c) 1990 Regents of the University of California.
-- All rights reserved.
--
-- The primary authors of ayacc were David Taback and Deepak Tolani.
-- Enhancements were made by Ronald J. Schmalz.
--
-- Send requests for ayacc information to [email protected]
-- Send bug reports for ayacc to [email protected]
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and that any documentation,
-- advertising materials, and other materials related to such
-- distribution and use acknowledge that the software was developed
-- by the University of California, Irvine. The name of the
-- University may not be used to endorse or promote products derived
-- from this software without specific prior written permission.
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-- Module : lalr_symbol_info.ada
-- Component of : ayacc
-- Version : 1.2
-- Date : 11/21/86 12:29:48
-- SCCS File : disk21~/rschm/hasee/sccs/ayacc/sccs/sxlalr_symbol_info.ada
-- $Header: lalr_symbol_info.a,v 0.1 86/04/01 15:04:35 ada Exp $
-- $Log: lalr_symbol_info.a,v $
-- Revision 0.1 86/04/01 15:04:35 ada
-- This version fixes some minor bugs with empty grammars
-- and $$ expansion. It also uses vads5.1b enhancements
-- such as pragma inline.
--
--
-- Revision 0.0 86/02/19 18:36:38 ada
--
-- These files comprise the initial version of Ayacc
-- designed and implemented by David Taback and Deepak Tolani.
-- Ayacc has been compiled and tested under the Verdix Ada compiler
-- version 4.06 on a vax 11/750 running Unix 4.2BSD.
--
-- --
-- Authors : David Taback , Deepak Tolani --
-- Copyright : 1987, University of California Irvine --
-- --
-- If you --
-- modify the source code or if you have any suggestions or questions --
-- regarding ayacc, we would like to hear from you. Our mailing --
-- addresses are : --
-- [email protected] --
-- [email protected] --
-- --
with LR0_Machine, Ragged, Rule_Table, Symbol_Table, Symbol_Info, Set_Pack,
Stack_Pack;
use LR0_Machine, Rule_Table, Symbol_Table, Symbol_Info;
with Text_IO; use Text_IO;
package LALR_Symbol_Info is
procedure Make_LALR_Sets;
procedure Get_LA(State_ID : Parse_State;
Item_ID : Item;
Look_Aheads : in out Grammar_Symbol_Set);
end LALR_Symbol_Info;
|
danieagle/ASAP-Modular_Hashing | Ada | 18,618 | adb | ------------------------------------------------------------------------------
-- --
-- Modular Hash Infrastructure --
-- --
-- SHA2 (224) --
-- --
-- - "Reference" Implementation - --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2019-2021, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Ensi Martini (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. --
-- --
------------------------------------------------------------------------------
package body Modular_Hashing.SHA224 is
------------------
-- Digest_Chunk --
------------------
-- This procedure is the internal digest that allows for a 512-bit block to
-- be processed without finishing the hash (padding)
--
-- This is the bulk of the SHA224 algorithm, missing only the addition of
-- message size with padding, which is handed by the Digest subprogram
procedure Digest_Chunk (Engine : in out SHA224_Engine) with Inline is
A, B, C, D, E, F, G, H, S0, S1, Ch, Maj, Temp_1, Temp_2: Unsigned_32;
Word_Sequence : array (1 .. 64) of Unsigned_32;
begin
-- Break the chunk into 16 32-bit words, assign to Word_Sequence
for I in 1 .. 16 loop
Word_Sequence(I) :=
Shift_Left(Value => Unsigned_32
(Engine.Buffer(Stream_Element_Offset((I * 4) - 3))),
Amount => 24)
+ Shift_Left(Value => Unsigned_32
(Engine.Buffer(Stream_Element_Offset((I * 4) - 2))),
Amount => 16)
+ Shift_Left(Value => Unsigned_32
(Engine.Buffer(Stream_Element_Offset((I * 4) - 1))),
Amount => 8)
+ Unsigned_32(Engine.Buffer(Stream_Element_Offset(I * 4)));
end loop;
-- Create the values for the rest of Word_Sequence
for I in 17 .. 64 loop
S0 := Rotate_Right (Value => Word_Sequence(I - 15), Amount => 7) xor
Rotate_Right (Value => Word_Sequence(I - 15), Amount => 18) xor
Shift_Right (Value => Word_Sequence(I - 15), Amount => 3);
S1 := Rotate_Right (Value => Word_Sequence(I - 2), Amount => 17) xor
Rotate_Right (Value => Word_Sequence(I - 2), Amount => 19) xor
Shift_Right (Value => Word_Sequence(I - 2), Amount => 10);
Word_Sequence(I) := Word_Sequence(I - 16) + S0 +
Word_Sequence(I - 7) + S1;
end loop;
A := Engine.H0;
B := Engine.H1;
C := Engine.H2;
D := Engine.H3;
E := Engine.H4;
F := Engine.H5;
G := Engine.H6;
H := Engine.H7;
for I in 1 .. 64 loop
S1 := Rotate_Right(Value => E, Amount => 6) xor
Rotate_Right(Value => E, Amount => 11) xor
Rotate_Right(Value => E, Amount => 25);
Ch := (E and F) xor ( (not E) and G );
Temp_1 := H + S1 + Ch + K(I) + Word_Sequence(I);
S0 := Rotate_Right(Value => A, Amount => 2) xor
Rotate_Right(Value => A, Amount => 13) xor
Rotate_Right(Value => A, Amount => 22);
Maj := (A and B) xor (A and C) xor (B and C);
Temp_2 := S0 + Maj;
H := G;
G := F;
F := E;
E := D + Temp_1;
D := C;
C := B;
B := A;
A := Temp_1 + Temp_2;
end loop;
Engine.H0 := Engine.H0 + A;
Engine.H1 := Engine.H1 + B;
Engine.H2 := Engine.H2 + C;
Engine.H3 := Engine.H3 + D;
Engine.H4 := Engine.H4 + E;
Engine.H5 := Engine.H5 + F;
Engine.H6 := Engine.H6 + G;
Engine.H7 := Engine.H7 + H;
Engine.Last_Element_Index := 0;
end Digest_Chunk;
---------
-- "<" --
---------
function "<" (Left, Right: SHA224_Hash) return Boolean is
begin
-- Even though our numbers are split into arrays of Unsigned_32,
-- comparison operators can work on each section individually,
-- as the lower indices have more significance (big endian)
for I in Message_Digest'Range loop
if Left.Digest(I) < Right.Digest(I) then
return True;
elsif Left.Digest(I) > Right.Digest(I) then
return False;
end if;
end loop;
-- The only way we get here is when Left = Right
return False;
end "<";
---------
-- ">" --
---------
function ">" (Left, Right: SHA224_Hash) return Boolean is
begin
-- Even though our numbers are split into arrays of Unsigned_32,
-- comparison operators can work on each section individually,
-- as the lower indices have more significance (big endian)
for I in Message_Digest'Range loop
if Left.Digest(I) > Right.Digest(I) then
return True;
elsif Left.Digest(I) < Right.Digest(I) then
return False;
end if;
end loop;
-- The only way we get here is when Left = Right
return False;
end ">";
---------
-- "=" --
---------
function "=" (Left, Right: SHA224_Hash) return Boolean is
begin
for I in Message_Digest'Range loop
if Left.Digest(I) /= Right.Digest(I) then
return False;
end if;
end loop;
return True;
end "=";
------------
-- Binary --
------------
function Binary (Value: SHA224_Hash) return Hash_Binary_Value is
I: Positive;
Register: Unsigned_32;
begin
-- SHA 224 simply omits H7
return Output: Hash_Binary_Value (1 .. SHA224_Hash_Bytes) do
I := Output'First;
for CI in reverse Value.Digest'First .. Value.Digest'Last - 1 loop
Register := Value.Digest(CI);
for J in 1 .. 4 loop -- Four bytes per digest chunk
Output(I) := Unsigned_8 (Register and 16#FF#);
Register := Shift_Right (Register, 8);
I := I + 1;
end loop;
end loop;
end return;
end Binary;
-----------
-- Write --
-----------
procedure Write (Stream : in out SHA224_Engine;
Item : in Stream_Element_Array)
is
Last_In: Stream_Element_Offset;
begin
-- Check for a null range of Item and discard
if Item'Length = 0 then
return;
end if;
Last_In := Item'First - 1;
-- Finally, we can go ahead and add the message length to the Engine now,
-- since there are early-ending code-paths below, and so we can avoid
-- duplicating code. The only way this can really go wrong is if the
-- entire message is larger than the Message_Size, which SHA224 limits to a
-- 64-bit signed integer. Therefore a message of 16 exabytes will cause
-- an invalid hash, due to a wrap-around of the Message_Size.
-- That's a risk we are willing to take.
Stream.Message_Length
:= Stream.Message_Length + (Stream_Element'Size * Item'Length);
-- Our buffer has a size of 512 (the size of a "chunk" of processing for
-- the SHA-2 algorithm).
-- Our write should be automated so that as soon as that buffer is full
-- (no matter how much of the Item array is written already), the chunk is
-- processed
-- In order to take advantage of any processor vector copy features, we
-- will explicitly copy Item in chunks that are either the full size of
-- Item, 64 elements, or the remaining space in the hash Buffer, whichever
-- is largest
while Last_In < Item'Last loop
declare
subtype Buffer_Slice is Stream_Element_Offset range
Stream.Last_Element_Index + 1 .. Stream.Buffer'Last;
Buffer_Slice_Length: Stream_Element_Offset
:= Buffer_Slice'Last - Buffer_Slice'First + 1;
subtype Item_Slice is Stream_Element_Offset range
Last_In + 1 .. Item'Last;
Item_Slice_Length: Stream_Element_Offset
:= Item_Slice'Last - Item_Slice'First + 1;
begin
if Buffer_Slice_Length > Item_Slice_Length then
-- We can fit the rest in the buffer, with space left-over
declare
-- Set-up a specific slice in the Buffer which can accommodate
-- the remaining elements of Item
subtype Target_Slice is Stream_Element_Offset range
Buffer_Slice'First .. Buffer_Slice'First +
(Item_Slice'Last - Item_Slice'First);
begin
-- Here is the block copy
Stream.Buffer(Target_Slice'Range):= Item (Item_Slice'Range);
Stream.Last_Element_Index := Target_Slice'Last;
end;
-- That's it, we've absorbed the entire Item, no need to waste
-- time updating Last_In.
return;
else
-- This means the buffer space is either equal to or smaller than
-- the remaining Item elements, this means we need process the
-- chunk (digest the buffer) no matter what
-- First step is to copy in as much of the remaining Item
-- elements as possible
declare
subtype Source_Slice is Stream_Element_Offset range
Item_Slice'First
.. Item_Slice'First + Buffer_Slice_Length - 1;
begin
-- Block copy
Stream.Buffer(Buffer_Slice'Range)
:= Item (Source_Slice'Range);
Stream.Last_Element_Index := Buffer_Slice'Last;
Last_In := Source_Slice'Last;
end;
-- Now we digest the currently full buffer
Digest_Chunk (Stream);
end if;
end;
end loop;
end Write;
-----------
-- Reset --
-----------
procedure Reset (Engine : in out SHA224_Engine) is
begin
Engine.Last_Element_Index := 0;
Engine.Message_Length := 0;
Engine.H0 := H0_Initial;
Engine.H1 := H1_Initial;
Engine.H2 := H2_Initial;
Engine.H3 := H3_Initial;
Engine.H4 := H4_Initial;
Engine.H5 := H5_Initial;
Engine.H6 := H6_Initial;
Engine.H7 := H7_Initial;
end Reset;
------------
-- Digest --
------------
function Digest (Engine : in out SHA224_Engine)
return Hash'Class
is
-- The core of the message digest algorithm occurs in-line with stream
-- writes through the Digest_Chunk procedure. The role of this function
-- is to append the message size and padding, and then execute the final
-- Digest_Chunk before returning the digest.
-- We work with the data in the Buffer in chunks of 512 bits
-- Once we get to the last section that is < 512 bits, we append
-- the 64 bit length and padding 0's
-- In most cases, this 64 bit + padding will all be in the last section
-- of the buffer
-- We pad up until the 448th bit (56th byte) and then add the length
-- However, we must also keep in mind the fringe case where the data ends
-- at bit position 448 or later (byte 56 or later)
-- In that case, the approach to take is to pad the final chunk, then add
-- a new one that is ONLY padding and the 64 bit length
Message_Length_Spliced : Stream_Element_Array(1 .. 8);
Special_Case_Index : Stream_Element_Offset := 0;
begin
-- Splitting the 64-bit message length into array of bytes
for I in 1 .. 8 loop
Message_Length_Spliced(Stream_Element_Offset(I)) :=
Stream_Element
(Unsigned_8(Shift_Right(Value => Engine.Message_Length,
Amount => 8 * (8 - I)) and 16#ff#));
end loop;
-- This is a while loop but we use an exit condition to make sure that it
-- executes at least once (for the case of empty hash message)
loop
if Special_Case_Index /= 0 then
if Special_Case_Index = 1 then
Engine.Buffer(1) := 2#10000000#;
else
Engine.Buffer(1) := 2#00000000#;
end if;
Engine.Buffer(2 .. 56) := (others => 2#00000000#);
Engine.Buffer(57 .. 64) := Message_Length_Spliced;
Special_Case_Index := 0;
-- If there is less than 512 bits left in the Buffer
else
-- The case where one chunk will hold Buffer + padding + 64 bits
if Engine.Last_Element_Index < 56 then
-- Add the correct amount of padding
Engine.Buffer(Engine.Last_Element_Index + 1) := 2#10000000#;
Engine.Buffer(Engine.Last_Element_Index + 2 .. 56) :=
(others => 2#00000000#);
-- Finish it off with Message_Length
Engine.Buffer(57 .. 64) := Message_Length_Spliced;
-- The case where one chunk will hold Buffer + padding, and
-- another will hold padding + 64 bit message length
else
-- Put what we can of the padding in the current chunk
Engine.Buffer(Engine.Last_Element_Index + 1) := 2#10000000#;
Engine.Buffer(Engine.Last_Element_Index + 2 .. 64) :=
(others => 2#00000000#);
-- Save where we left off in the padding for the next chunk
Special_Case_Index := 65 - Engine.Last_Element_Index;
end if;
end if;
Digest_Chunk (Engine);
exit when Engine.Last_Element_Index = 0 and Special_Case_Index = 0;
end loop;
return Result: SHA224_Hash do
Result.Digest := (1 => Engine.H0,
2 => Engine.H1,
3 => Engine.H2,
4 => Engine.H3,
5 => Engine.H4,
6 => Engine.H5,
7 => Engine.H6,
8 => Engine.H7);
Engine.Reset;
end return;
end Digest;
end Modular_Hashing.SHA224;
|
zhmu/ananas | Ada | 41,967 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- R E P I N F O - I N P U T --
-- --
-- B o d y --
-- --
-- Copyright (C) 2018-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Alloc;
with Csets; use Csets;
with Hostparm; use Hostparm;
with Namet; use Namet;
with Output; use Output;
with Snames; use Snames;
with Table;
with Ttypes;
package body Repinfo.Input is
SSU : Pos renames Ttypes.System_Storage_Unit;
-- Value for Storage_Unit
type JSON_Entity_Kind is (JE_Record_Type, JE_Array_Type, JE_Other);
-- Kind of an entity
type JSON_Entity_Node (Kind : JSON_Entity_Kind := JE_Other) is record
Esize : Node_Ref_Or_Val;
RM_Size : Node_Ref_Or_Val;
case Kind is
when JE_Record_Type => Variant : Nat;
when JE_Array_Type => Component_Size : Node_Ref_Or_Val;
when JE_Other => Dummy : Boolean;
end case;
end record;
pragma Unchecked_Union (JSON_Entity_Node);
-- Record to represent an entity
package JSON_Entity_Table is new Table.Table (
Table_Component_Type => JSON_Entity_Node,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Rep_JSON_Table_Initial,
Table_Increment => Alloc.Rep_JSON_Table_Increment,
Table_Name => "JSON_Entity_Table");
-- Table of entities
type JSON_Component_Node is record
Bit_Offset : Node_Ref_Or_Val;
Esize : Node_Ref_Or_Val;
end record;
-- Record to represent a component
package JSON_Component_Table is new Table.Table (
Table_Component_Type => JSON_Component_Node,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Rep_JSON_Table_Initial,
Table_Increment => Alloc.Rep_JSON_Table_Increment,
Table_Name => "JSON_Component_Table");
-- Table of components
type JSON_Variant_Node is record
Present : Node_Ref_Or_Val;
Variant : Nat;
Next : Nat;
end record;
-- Record to represent a variant
package JSON_Variant_Table is new Table.Table (
Table_Component_Type => JSON_Variant_Node,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Rep_JSON_Table_Initial,
Table_Increment => Alloc.Rep_JSON_Table_Increment,
Table_Name => "JSON_Variant_Table");
-- Table of variants
-------------------------------------
-- Get_JSON_Component_Bit_Offset --
-------------------------------------
function Get_JSON_Component_Bit_Offset
(Name : String;
Record_Name : String) return Node_Ref_Or_Val
is
Namid : constant Valid_Name_Id := Name_Find (Record_Name & '.' & Name);
Index : constant Int := Get_Name_Table_Int (Namid);
begin
-- Return No_Uint if no information is available for the component
if Index = 0 then
return No_Uint;
end if;
return JSON_Component_Table.Table (Index).Bit_Offset;
end Get_JSON_Component_Bit_Offset;
-------------------------------
-- Get_JSON_Component_Size --
-------------------------------
function Get_JSON_Component_Size (Name : String) return Node_Ref_Or_Val is
Namid : constant Valid_Name_Id := Name_Find (Name);
Index : constant Int := Get_Name_Table_Int (Namid);
begin
-- Return No_Uint if no information is available for the component
if Index = 0 then
return No_Uint;
end if;
return JSON_Entity_Table.Table (Index).Component_Size;
end Get_JSON_Component_Size;
----------------------
-- Get_JSON_Esize --
----------------------
function Get_JSON_Esize (Name : String) return Node_Ref_Or_Val is
Namid : constant Valid_Name_Id := Name_Find (Name);
Index : constant Int := Get_Name_Table_Int (Namid);
begin
-- Return No_Uint if no information is available for the entity
if Index = 0 then
return No_Uint;
end if;
return JSON_Entity_Table.Table (Index).Esize;
end Get_JSON_Esize;
----------------------
-- Get_JSON_Esize --
----------------------
function Get_JSON_Esize
(Name : String;
Record_Name : String) return Node_Ref_Or_Val
is
Namid : constant Valid_Name_Id := Name_Find (Record_Name & '.' & Name);
Index : constant Int := Get_Name_Table_Int (Namid);
begin
-- Return No_Uint if no information is available for the entity
if Index = 0 then
return No_Uint;
end if;
return JSON_Component_Table.Table (Index).Esize;
end Get_JSON_Esize;
------------------------
-- Get_JSON_RM_Size --
------------------------
function Get_JSON_RM_Size (Name : String) return Node_Ref_Or_Val is
Namid : constant Valid_Name_Id := Name_Find (Name);
Index : constant Int := Get_Name_Table_Int (Namid);
begin
-- Return No_Uint if no information is available for the entity
if Index = 0 then
return No_Uint;
end if;
return JSON_Entity_Table.Table (Index).RM_Size;
end Get_JSON_RM_Size;
-----------------------
-- Read_JSON_Stream --
-----------------------
procedure Read_JSON_Stream (Text : Text_Buffer; File_Name : String) is
type Text_Position is record
Index : Text_Ptr := 0;
Line : Natural := 0;
Column : Natural := 0;
end record;
-- Record to represent position in the text
type Token_Kind is
(J_NULL,
J_TRUE,
J_FALSE,
J_NUMBER,
J_INTEGER,
J_STRING,
J_ARRAY,
J_OBJECT,
J_ARRAY_END,
J_OBJECT_END,
J_COMMA,
J_COLON,
J_EOF);
-- JSON token kind. Note that in ECMA 404 there is no notion of integer.
-- Only numbers are supported. In our implementation we return J_INTEGER
-- if there is no decimal part in the number. The semantic is that this
-- is a J_NUMBER token that might be represented as an integer. Special
-- token J_EOF means that end of stream has been reached.
function Decode_Integer (Lo, Hi : Text_Ptr) return Uint;
-- Decode and return the integer in Text (Lo .. Hi)
function Decode_Name (Lo, Hi : Text_Ptr) return Valid_Name_Id;
-- Decode and return the name in Text (Lo .. Hi)
function Decode_Symbol (Lo, Hi : Text_Ptr) return TCode;
-- Decode and return the expression symbol in Text (Lo .. Hi)
procedure Error (Msg : String);
pragma No_Return (Error);
-- Print an error message and raise an exception
procedure Read_Entity;
-- Read an entity
function Read_Name return Valid_Name_Id;
-- Read a name
function Read_Name_With_Prefix return Valid_Name_Id;
-- Read a name and prepend a prefix
function Read_Number return Uint;
-- Read a number
function Read_Numerical_Expr return Node_Ref_Or_Val;
-- Read a numerical expression
procedure Read_Record;
-- Read a record
function Read_String return Valid_Name_Id;
-- Read a string
procedure Read_Token
(Kind : out Token_Kind;
Token_Start : out Text_Position;
Token_End : out Text_Position);
-- Read a token and return it (this is a standard JSON lexer)
procedure Read_Token_And_Error
(TK : Token_Kind;
Token_Start : out Text_Position;
Token_End : out Text_Position);
pragma Inline (Read_Token_And_Error);
-- Read a specified token and error out on failure
function Read_Variant_Part return Nat;
-- Read a variant part
procedure Skip_Value;
-- Skip a value
Pos : Text_Position := (Text'First, 1, 1);
-- The current position in the text buffer
Name_Buffer : Bounded_String (4 * Max_Name_Length);
-- The buffer used to build full qualifed names
Prefix_Len : Natural := 0;
-- The length of the prefix present in Name_Buffer
----------------------
-- Decode_Integer --
----------------------
function Decode_Integer (Lo, Hi : Text_Ptr) return Uint is
Len : constant Nat := Int (Hi) - Int (Lo) + 1;
begin
-- Decode up to 9 characters manually, otherwise call into Uint
if Len < 10 then
declare
Val : Int := 0;
begin
for J in Lo .. Hi loop
Val := Val * 10
+ Character'Pos (Text (J)) - Character'Pos ('0');
end loop;
return UI_From_Int (Val);
end;
else
declare
Val : Uint := Uint_0;
begin
for J in Lo .. Hi loop
Val := Val * 10
+ Character'Pos (Text (J)) - Character'Pos ('0');
end loop;
return Val;
end;
end if;
end Decode_Integer;
-------------------
-- Decode_Name --
-------------------
function Decode_Name (Lo, Hi : Text_Ptr) return Valid_Name_Id is
begin
-- Names are stored in lower case so fold them if need be
if Is_Upper_Case_Letter (Text (Lo)) then
declare
S : String (Integer (Lo) .. Integer (Hi));
begin
for J in Lo .. Hi loop
S (Integer (J)) := Fold_Lower (Text (J));
end loop;
return Name_Find (S);
end;
else
declare
S : String (Integer (Lo) .. Integer (Hi));
for S'Address use Text (Lo)'Address;
begin
return Name_Find (S);
end;
end if;
end Decode_Name;
---------------------
-- Decode_Symbol --
---------------------
function Decode_Symbol (Lo, Hi : Text_Ptr) return TCode is
function Cmp12 (A, B : Character) return Boolean;
pragma Inline (Cmp12);
-- Compare Text (Lo + 1 .. Lo + 2) with A & B.
-------------
-- Cmp12 --
-------------
function Cmp12 (A, B : Character) return Boolean is
begin
return Text (Lo + 1) = A and then Text (Lo + 2) = B;
end Cmp12;
Len : constant Nat := Int (Hi) - Int (Lo) + 1;
-- Start of processing for Decode_Symbol
begin
case Len is
when 1 =>
case Text (Lo) is
when '+' =>
return Plus_Expr;
when '-' =>
return Minus_Expr; -- or Negate_Expr
when '*' =>
return Mult_Expr;
when '<' =>
return Lt_Expr;
when '>' =>
return Gt_Expr;
when '&' =>
return Bit_And_Expr;
when '#' =>
return Discrim_Val;
when others =>
null;
end case;
when 2 =>
if Text (Lo) = '/' then
case Text (Lo + 1) is
when 't' =>
return Trunc_Div_Expr;
when 'c' =>
return Ceil_Div_Expr;
when 'f' =>
return Floor_Div_Expr;
when 'e' =>
return Exact_Div_Expr;
when others =>
null;
end case;
elsif Text (Lo + 1) = '=' then
case Text (Lo) is
when '<' =>
return Le_Expr;
when '>' =>
return Ge_Expr;
when '=' =>
return Eq_Expr;
when '!' =>
return Ne_Expr;
when others =>
null;
end case;
elsif Text (Lo) = 'o' and then Text (Lo + 1) = 'r' then
return Truth_Or_Expr;
end if;
when 3 =>
case Text (Lo) is
when '?' =>
if Cmp12 ('<', '>') then
return Cond_Expr;
end if;
when 'a' =>
if Cmp12 ('b', 's') then
return Abs_Expr;
elsif Cmp12 ('n', 'd') then
return Truth_And_Expr;
end if;
when 'm' =>
if Cmp12 ('a', 'x') then
return Max_Expr;
elsif Cmp12 ('i', 'n') then
return Min_Expr;
end if;
when 'n' =>
if Cmp12 ('o', 't') then
return Truth_Not_Expr;
end if;
when 'x' =>
if Cmp12 ('o', 'r') then
return Truth_Xor_Expr;
end if;
when 'v' =>
if Cmp12 ('a', 'r') then
return Dynamic_Val;
end if;
when others =>
null;
end case;
when 4 =>
if Text (Lo) = 'm'
and then Text (Lo + 1) = 'o'
and then Text (Lo + 2) = 'd'
then
case Text (Lo + 3) is
when 't' =>
return Trunc_Mod_Expr;
when 'c' =>
return Ceil_Mod_Expr;
when 'f' =>
return Floor_Mod_Expr;
when others =>
null;
end case;
end if;
pragma Annotate
(CodePeer, Intentional,
"condition predetermined", "Error called as defensive code");
when others =>
null;
end case;
Error ("unknown symbol");
end Decode_Symbol;
-----------
-- Error --
-----------
procedure Error (Msg : String) is
L : constant String := Pos.Line'Img;
C : constant String := Pos.Column'Img;
begin
Set_Standard_Error;
Write_Eol;
Write_Str (File_Name);
Write_Char (':');
Write_Str (L (L'First + 1 .. L'Last));
Write_Char (':');
Write_Str (C (C'First + 1 .. C'Last));
Write_Char (':');
Write_Line (Msg);
raise Invalid_JSON_Stream;
end Error;
------------------
-- Read_Entity --
------------------
procedure Read_Entity is
Ent : JSON_Entity_Node;
Nam : Name_Id := No_Name;
Siz : Node_Ref_Or_Val;
Token_Start : Text_Position;
Token_End : Text_Position;
TK : Token_Kind;
begin
Ent.Esize := No_Uint;
Ent.RM_Size := No_Uint;
Ent.Component_Size := No_Uint;
-- Read the members as string : value pairs
loop
case Read_String is
when Name_Name =>
Nam := Read_Name;
when Name_Record =>
if Nam = No_Name then
Error ("name expected");
end if;
Ent.Variant := 0;
Prefix_Len := Natural (Length_Of_Name (Nam));
Name_Buffer.Chars (1 .. Prefix_Len) := Get_Name_String (Nam);
Read_Record;
when Name_Variant =>
Ent.Variant := Read_Variant_Part;
when Name_Size =>
Siz := Read_Numerical_Expr;
Ent.Esize := Siz;
Ent.RM_Size := Siz;
when Name_Object_Size =>
Ent.Esize := Read_Numerical_Expr;
when Name_Value_Size =>
Ent.RM_Size := Read_Numerical_Expr;
when Name_Component_Size =>
Ent.Component_Size := Read_Numerical_Expr;
when others =>
Skip_Value;
end case;
Read_Token (TK, Token_Start, Token_End);
if TK = J_OBJECT_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
end loop;
-- Store the entity into the table
JSON_Entity_Table.Append (Ent);
-- Associate the name with the entity
if Nam = No_Name then
Error ("name expected");
end if;
Set_Name_Table_Int (Nam, JSON_Entity_Table.Last);
end Read_Entity;
-----------------
-- Read_Name --
-----------------
function Read_Name return Valid_Name_Id is
Token_Start : Text_Position;
Token_End : Text_Position;
begin
-- Read a single string
Read_Token_And_Error (J_STRING, Token_Start, Token_End);
return Decode_Name (Token_Start.Index + 1, Token_End.Index - 1);
end Read_Name;
-----------------------------
-- Read_Name_With_Prefix --
-----------------------------
function Read_Name_With_Prefix return Valid_Name_Id is
Len : Natural;
Lo, Hi : Text_Ptr;
Token_Start : Text_Position;
Token_End : Text_Position;
begin
-- Read a single string
Read_Token_And_Error (J_STRING, Token_Start, Token_End);
Lo := Token_Start.Index + 1;
Hi := Token_End.Index - 1;
-- Prepare for the concatenation with the prefix
Len := Integer (Hi) - Integer (Lo) + 1;
if Prefix_Len + 1 + Len > Name_Buffer.Max_Length then
Error ("Name buffer too small");
end if;
Name_Buffer.Length := Prefix_Len + 1 + Len;
Name_Buffer.Chars (Prefix_Len + 1) := '.';
-- Names are stored in lower case so fold them if need be
if Is_Upper_Case_Letter (Text (Lo)) then
for J in Lo .. Hi loop
Name_Buffer.Chars (Prefix_Len + 2 + Integer (J - Lo)) :=
Fold_Lower (Text (J));
end loop;
else
declare
S : String (Integer (Lo) .. Integer (Hi));
for S'Address use Text (Lo)'Address;
begin
Name_Buffer.Chars (Prefix_Len + 2 .. Prefix_Len + 1 + Len) := S;
end;
end if;
return Name_Find (Name_Buffer);
end Read_Name_With_Prefix;
------------------
-- Read_Number --
------------------
function Read_Number return Uint is
Token_Start : Text_Position;
Token_End : Text_Position;
begin
-- Only integers are to be expected here
Read_Token_And_Error (J_INTEGER, Token_Start, Token_End);
return Decode_Integer (Token_Start.Index, Token_End.Index);
end Read_Number;
--------------------------
-- Read_Numerical_Expr --
--------------------------
function Read_Numerical_Expr return Node_Ref_Or_Val is
Code : TCode;
Nop : Integer;
Ops : array (1 .. 3) of Node_Ref_Or_Val;
TK : Token_Kind;
Token_Start : Text_Position;
Token_End : Text_Position;
begin
-- Read either an integer or an expression
Read_Token (TK, Token_Start, Token_End);
if TK = J_INTEGER then
return Decode_Integer (Token_Start.Index, Token_End.Index);
elsif TK = J_OBJECT then
-- Read the code of the expression and decode it
if Read_String /= Name_Code then
Error ("name expected");
end if;
Read_Token_And_Error (J_STRING, Token_Start, Token_End);
Code := Decode_Symbol (Token_Start.Index + 1, Token_End.Index - 1);
Read_Token_And_Error (J_COMMA, Token_Start, Token_End);
-- Read the array of operands
if Read_String /= Name_Operands then
Error ("operands expected");
end if;
Read_Token_And_Error (J_ARRAY, Token_Start, Token_End);
Nop := 0;
Ops := (others => No_Uint);
loop
Nop := Nop + 1;
Ops (Nop) := Read_Numerical_Expr;
Read_Token (TK, Token_Start, Token_End);
if TK = J_ARRAY_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
end loop;
Read_Token_And_Error (J_OBJECT_END, Token_Start, Token_End);
-- Resolve the ambiguity for '-' now
if Code = Minus_Expr and then Nop = 1 then
Code := Negate_Expr;
end if;
return Create_Node (Code, Ops (1), Ops (2), Ops (3));
else
Error ("numerical expression expected");
end if;
end Read_Numerical_Expr;
-------------------
-- Read_Record --
-------------------
procedure Read_Record is
Comp : JSON_Component_Node;
First_Bit : Node_Ref_Or_Val := No_Uint;
Is_First : Boolean := True;
Nam : Name_Id := No_Name;
Position : Node_Ref_Or_Val := No_Uint;
TK : Token_Kind;
Token_Start : Text_Position;
Token_End : Text_Position;
begin
-- Read a possibly empty array of components
Read_Token_And_Error (J_ARRAY, Token_Start, Token_End);
loop
Read_Token (TK, Token_Start, Token_End);
if Is_First and then TK = J_ARRAY_END then
exit;
elsif TK /= J_OBJECT then
Error ("object expected");
end if;
-- Read the members as string : value pairs
loop
case Read_String is
when Name_Name =>
Nam := Read_Name_With_Prefix;
when Name_Discriminant =>
Skip_Value;
when Name_Position =>
Position := Read_Numerical_Expr;
when Name_First_Bit =>
First_Bit := Read_Number;
when Name_Size =>
Comp.Esize := Read_Numerical_Expr;
when others =>
Error ("invalid component");
end case;
Read_Token (TK, Token_Start, Token_End);
if TK = J_OBJECT_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
end loop;
-- Compute Component_Bit_Offset from Position and First_Bit,
-- either symbolically or literally depending on Position.
if No (Position) or else No (First_Bit) then
Error ("bit offset expected");
end if;
if Position < Uint_0 then
declare
Bit_Position : constant Node_Ref_Or_Val :=
Create_Node (Mult_Expr, Position, UI_From_Int (SSU));
begin
if First_Bit = Uint_0 then
Comp.Bit_Offset := Bit_Position;
else
Comp.Bit_Offset :=
Create_Node (Plus_Expr, Bit_Position, First_Bit);
end if;
end;
else
Comp.Bit_Offset := Position * SSU + First_Bit;
end if;
-- Store the component into the table
JSON_Component_Table.Append (Comp);
-- Associate the name with the component
if Nam = No_Name then
Error ("name expected");
end if;
Set_Name_Table_Int (Nam, JSON_Component_Table.Last);
Read_Token (TK, Token_Start, Token_End);
if TK = J_ARRAY_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
Is_First := False;
end loop;
end Read_Record;
------------------
-- Read_String --
------------------
function Read_String return Valid_Name_Id is
Token_Start : Text_Position;
Token_End : Text_Position;
Nam : Valid_Name_Id;
begin
-- Read the string and the following colon
Read_Token_And_Error (J_STRING, Token_Start, Token_End);
Nam := Decode_Name (Token_Start.Index + 1, Token_End.Index - 1);
Read_Token_And_Error (J_COLON, Token_Start, Token_End);
return Nam;
end Read_String;
------------------
-- Read_Token --
------------------
procedure Read_Token
(Kind : out Token_Kind;
Token_Start : out Text_Position;
Token_End : out Text_Position)
is
procedure Next_Char;
-- Update Pos to point to next char
function Is_Whitespace return Boolean;
pragma Inline (Is_Whitespace);
-- Return True of current character is a whitespace
function Is_Structural_Token return Boolean;
pragma Inline (Is_Structural_Token);
-- Return True if current character is one of the structural tokens
function Is_Token_Sep return Boolean;
pragma Inline (Is_Token_Sep);
-- Return True if current character is a token separator
procedure Delimit_Keyword (Kw : String);
-- Helper function to parse tokens such as null, false and true
---------------
-- Next_Char --
---------------
procedure Next_Char is
begin
if Pos.Index > Text'Last then
Pos.Column := Pos.Column + 1;
elsif Text (Pos.Index) = ASCII.LF then
Pos.Column := 1;
Pos.Line := Pos.Line + 1;
else
Pos.Column := Pos.Column + 1;
end if;
Pos.Index := Pos.Index + 1;
end Next_Char;
-------------------
-- Is_Whitespace --
-------------------
function Is_Whitespace return Boolean is
begin
return
Pos.Index <= Text'Last
and then
(Text (Pos.Index) = ASCII.LF
or else
Text (Pos.Index) = ASCII.CR
or else
Text (Pos.Index) = ASCII.HT
or else
Text (Pos.Index) = ' ');
end Is_Whitespace;
-------------------------
-- Is_Structural_Token --
-------------------------
function Is_Structural_Token return Boolean is
begin
return
Pos.Index <= Text'Last
and then
(Text (Pos.Index) = '['
or else
Text (Pos.Index) = ']'
or else
Text (Pos.Index) = '{'
or else
Text (Pos.Index) = '}'
or else
Text (Pos.Index) = ','
or else
Text (Pos.Index) = ':');
end Is_Structural_Token;
------------------
-- Is_Token_Sep --
------------------
function Is_Token_Sep return Boolean is
begin
return
Pos.Index > Text'Last
or else
Is_Whitespace
or else
Is_Structural_Token;
end Is_Token_Sep;
---------------------
-- Delimit_Keyword --
---------------------
procedure Delimit_Keyword (Kw : String) is
pragma Unreferenced (Kw);
begin
while not Is_Token_Sep loop
Token_End := Pos;
Next_Char;
end loop;
end Delimit_Keyword;
CC : Character;
Can_Be_Integer : Boolean := True;
-- Start of processing for Read_Token
begin
-- Skip leading whitespaces
while Is_Whitespace loop
Next_Char;
end loop;
-- Initialize token delimiters
Token_Start := Pos;
Token_End := Pos;
-- End of stream reached
if Pos.Index > Text'Last then
Kind := J_EOF;
return;
end if;
CC := Text (Pos.Index);
if CC = '[' then
Next_Char;
Kind := J_ARRAY;
return;
elsif CC = ']' then
Next_Char;
Kind := J_ARRAY_END;
return;
elsif CC = '{' then
Next_Char;
Kind := J_OBJECT;
return;
elsif CC = '}' then
Next_Char;
Kind := J_OBJECT_END;
return;
elsif CC = ',' then
Next_Char;
Kind := J_COMMA;
return;
elsif CC = ':' then
Next_Char;
Kind := J_COLON;
return;
elsif CC = 'n' then
Delimit_Keyword ("null");
Kind := J_NULL;
return;
elsif CC = 'f' then
Delimit_Keyword ("false");
Kind := J_FALSE;
return;
elsif CC = 't' then
Delimit_Keyword ("true");
Kind := J_TRUE;
return;
elsif CC = '"' then
-- We expect a string
-- Just scan till the end the of the string but do not attempt
-- to decode it. This means that even if we get a string token
-- it might not be a valid string from the ECMA 404 point of
-- view.
Next_Char;
while Pos.Index <= Text'Last and then Text (Pos.Index) /= '"' loop
if Text (Pos.Index) in ASCII.NUL .. ASCII.US then
Error ("control character not allowed in string");
end if;
if Text (Pos.Index) = '\' then
Next_Char;
if Pos.Index > Text'Last then
Error ("non terminated string token");
end if;
case Text (Pos.Index) is
when 'u' =>
for Idx in 1 .. 4 loop
Next_Char;
if Pos.Index > Text'Last
or else (Text (Pos.Index) not in 'a' .. 'f'
and then
Text (Pos.Index) not in 'A' .. 'F'
and then
Text (Pos.Index) not in '0' .. '9')
then
Error ("invalid unicode escape sequence");
end if;
end loop;
when '\' | '/' | '"' | 'b' | 'f' | 'n' | 'r' | 't' =>
null;
when others =>
Error ("invalid escape sequence");
end case;
end if;
Next_Char;
end loop;
-- No quote found report and error
if Pos.Index > Text'Last then
Error ("non terminated string token");
end if;
Token_End := Pos;
-- Go to next char and ensure that this is separator. Indeed
-- construction such as "string1""string2" are not allowed
Next_Char;
if not Is_Token_Sep then
Error ("invalid syntax");
end if;
Kind := J_STRING;
return;
elsif CC = '-' or else CC in '0' .. '9' then
-- We expect a number
if CC = '-' then
Next_Char;
end if;
if Pos.Index > Text'Last then
Error ("invalid number");
end if;
-- Parse integer part of a number. Superfluous leading zeros are
-- not allowed.
if Text (Pos.Index) = '0' then
Token_End := Pos;
Next_Char;
elsif Text (Pos.Index) in '1' .. '9' then
Token_End := Pos;
Next_Char;
while Pos.Index <= Text'Last
and then Text (Pos.Index) in '0' .. '9'
loop
Token_End := Pos;
Next_Char;
end loop;
else
Error ("invalid number");
end if;
if Is_Token_Sep then
-- Valid integer number
Kind := J_INTEGER;
return;
elsif Text (Pos.Index) /= '.'
and then Text (Pos.Index) /= 'e'
and then Text (Pos.Index) /= 'E'
then
Error ("invalid number");
end if;
-- Check for a fractional part
if Text (Pos.Index) = '.' then
Can_Be_Integer := False;
Token_End := Pos;
Next_Char;
if Pos.Index > Text'Last
or else Text (Pos.Index) not in '0' .. '9'
then
Error ("invalid number");
end if;
while Pos.Index <= Text'Last
and then Text (Pos.Index) in '0' .. '9'
loop
Token_End := Pos;
Next_Char;
end loop;
end if;
-- Check for exponent part
if Pos.Index <= Text'Last
and then (Text (Pos.Index) = 'e' or else Text (Pos.Index) = 'E')
then
Token_End := Pos;
Next_Char;
if Pos.Index > Text'Last then
Error ("invalid number");
end if;
if Text (Pos.Index) = '-' then
-- Also a few corner cases can lead to an integer, assume
-- that the number is not an integer.
Can_Be_Integer := False;
end if;
if Text (Pos.Index) = '-' or else Text (Pos.Index) = '+' then
Next_Char;
end if;
if Pos.Index > Text'Last
or else Text (Pos.Index) not in '0' .. '9'
then
Error ("invalid number");
end if;
while Pos.Index <= Text'Last
and then Text (Pos.Index) in '0' .. '9'
loop
Token_End := Pos;
Next_Char;
end loop;
end if;
if Is_Token_Sep then
-- Valid decimal number
if Can_Be_Integer then
Kind := J_INTEGER;
else
Kind := J_NUMBER;
end if;
return;
else
Error ("invalid number");
end if;
elsif CC = EOF then
Kind := J_EOF;
else
Error ("Unexpected character");
end if;
end Read_Token;
----------------------------
-- Read_Token_And_Error --
----------------------------
procedure Read_Token_And_Error
(TK : Token_Kind;
Token_Start : out Text_Position;
Token_End : out Text_Position)
is
Kind : Token_Kind;
begin
-- Read a token and errout out if not of the expected kind
Read_Token (Kind, Token_Start, Token_End);
if Kind /= TK then
Error ("specific token expected");
end if;
end Read_Token_And_Error;
-------------------------
-- Read_Variant_Part --
-------------------------
function Read_Variant_Part return Nat is
Next : Nat := 0;
TK : Token_Kind;
Token_Start : Text_Position;
Token_End : Text_Position;
Var : JSON_Variant_Node;
begin
-- Read a nonempty array of components
Read_Token_And_Error (J_ARRAY, Token_Start, Token_End);
loop
Read_Token_And_Error (J_OBJECT, Token_Start, Token_End);
Var.Variant := 0;
-- Read the members as string : value pairs
loop
case Read_String is
when Name_Present =>
Var.Present := Read_Numerical_Expr;
when Name_Record =>
Read_Record;
when Name_Variant =>
Var.Variant := Read_Variant_Part;
when others =>
Error ("invalid variant");
end case;
Read_Token (TK, Token_Start, Token_End);
if TK = J_OBJECT_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
end loop;
-- Chain the variant and store it into the table
Var.Next := Next;
JSON_Variant_Table.Append (Var);
Next := JSON_Variant_Table.Last;
Read_Token (TK, Token_Start, Token_End);
if TK = J_ARRAY_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
end loop;
return Next;
end Read_Variant_Part;
------------------
-- Skip_Value --
------------------
procedure Skip_Value is
Array_Depth : Natural := 0;
Object_Depth : Natural := 0;
TK : Token_Kind;
Token_Start : Text_Position;
Token_End : Text_Position;
begin
-- Read a value without recursing
loop
Read_Token (TK, Token_Start, Token_End);
case TK is
when J_STRING | J_INTEGER | J_NUMBER =>
null;
when J_ARRAY =>
Array_Depth := Array_Depth + 1;
when J_ARRAY_END =>
Array_Depth := Array_Depth - 1;
when J_OBJECT =>
Object_Depth := Object_Depth + 1;
when J_OBJECT_END =>
Object_Depth := Object_Depth - 1;
when J_COLON | J_COMMA =>
if Array_Depth = 0 and then Object_Depth = 0 then
Error ("value expected");
end if;
when others =>
Error ("value expected");
end case;
exit when Array_Depth = 0 and then Object_Depth = 0;
end loop;
end Skip_Value;
Token_Start : Text_Position;
Token_End : Text_Position;
TK : Token_Kind;
Is_First : Boolean := True;
-- Start of processing for Read_JSON_Stream
begin
-- Read a possibly empty array of entities
Read_Token_And_Error (J_ARRAY, Token_Start, Token_End);
loop
Read_Token (TK, Token_Start, Token_End);
if Is_First and then TK = J_ARRAY_END then
exit;
elsif TK /= J_OBJECT then
Error ("object expected");
end if;
Read_Entity;
Read_Token (TK, Token_Start, Token_End);
if TK = J_ARRAY_END then
exit;
elsif TK /= J_COMMA then
Error ("comma expected");
end if;
Is_First := False;
end loop;
end Read_JSON_Stream;
end Repinfo.Input;
|
burratoo/Acton | Ada | 18,266 | adb | ------------------------------------------------------------------------------------------
-- --
-- OAK CORE SUPPORT PACKAGE --
-- ARM CORTEX M4F --
-- --
-- OAK.CORE_SUPPORT_PACKAGE.INTERRUPTS --
-- --
-- Copyright (C) 2014-2021, Patrick Bernardi --
-- --
------------------------------------------------------------------------------------------
with Oak.Agent; use Oak.Agent;
with Oak.Agent.Kernel; use Oak.Agent.Kernel;
with Oak.Agent.Oak_Agent; use Oak.Agent.Oak_Agent;
with Oak.Core; use Oak.Core;
with Oak.Core_Support_Package.Clock; use Oak.Core_Support_Package.Clock;
with Oak.Processor_Support_Package.Interrupts;
use Oak.Processor_Support_Package.Interrupts;
with ISA; use ISA;
with ISA.ARM.Cortex_M4; use ISA.ARM.Cortex_M4;
with ISA.ARM.Cortex_M4.FPU; use ISA.ARM.Cortex_M4.FPU;
with ISA.ARM.Cortex_M4.SCB; use ISA.ARM.Cortex_M4.SCB;
with ISA.ARM.Cortex_M4.SysTick; use ISA.ARM.Cortex_M4.SysTick;
with Interfaces; use Interfaces;
with System.Machine_Code; use System.Machine_Code;
-- Note that the full context save for a non-kernel agent looks like this:
--
-- ------------ ---
-- | xPSR |
-- | PC |
-- | LR |
-- | r12/ip | <-- Automatically saved (32 bytes)
-- | r3 |
-- | r2 |
-- | r1 |
-- | r0 |
-- ------------ ---
-- | r11 |
-- | | | <-- Manually saved (32 bytes)
-- | r4 |
-- ------------ ---
-- | Ex_Return|
-- ------------ ---
-- While a voluntary agent yield and kernel only stores:
--
-- ------------ ---
-- | xPSR |
-- | PC |
-- | LR |
-- | r12/ip | <-- Automatically saved (32 bytes)
-- | r3 |
-- | r2 |
-- | r1 |
-- | r0 |
-- ------------ ---
-- | Ex_Return| <-- Not used for the kernel
-- ------------ ---
--
-- An agent that uses the FPU will look like this
--
-- ------------ ---
-- | FPSCR |
-- | s15 | <-- Automatically saved (68 bytes)
-- | | |
-- | s0 |
-- ------------ ---
-- | xPSR |
-- | PC |
-- | LR |
-- | r12/ip | <-- Automatically saved (32 bytes)
-- | r3 |
-- | r2 |
-- | r1 |
-- | r0 |
-- ------------ ---
-- | r11 |
-- | | | <-- Manually saved (32 bytes)
-- | r4 |
-- ------------ ---
-- | s31 |
-- | | | <-- Manually saved (64 bytes)
-- | s16 |
-- ------------ ---
-- | Ex_Return|
-- ------------ ---
-- Note that any change to the stack frame will require changes to
-- Call_Stack.Ops
package body Oak.Core_Support_Package.Interrupts is
-- Suppress all checks since they get in the way and cause unpredictable
-- problems.
pragma Suppress (All_Checks);
Floating_Point_Return : constant Unsigned_32 := 16#FFFF_FFED#;
-----------------------
-- Set_Up_Interrupts --
-----------------------
procedure Set_Up_Interrupts is
begin
-- Core specific interupt setup code;
Vector_Table_Offset_Register := Exception_Vector_Table'Address;
Configuration_And_Control_Register :=
(Stack_Alignment => Eight_Bytes,
Flault_Handlers_Ignore_BusFault => False,
Trap_Divide_By_0 => True,
Trap_Unaligned_Access => False,
Unpriviledged_Soft_Intr_Trigger => True,
Thread_Mode_Access => Any_Level);
System_Handler_Control_And_State_Register :=
(Usage_Fault => Enable,
Bus_Fault => Enable,
Mem_Manage => Enable,
others => False);
-- Oak makes use of the Cortex's NVIC subpriorities rather than its
-- group priorities. This way interrupts do not need to be explicitly
-- disabled while switching to Oak to handle an exception.
Application_Interrupt_And_Reset_Control_Register :=
(Veckey => Write,
Endianness => Little,
Priority_Group => 0,
System_Reset_Request => False);
-- Set the priority of the svc and timer interrupts to 0.
System_Handler_Priority_Register (Exceptions.SVCall) := 0;
System_Handler_Priority_Register (Exceptions.SysTick) := 0;
-- Setup SysTick. Disable the timer just in case.
ARM.Cortex_M4.SysTick.Control_And_Status_Register :=
(Counter => Disable,
Interrupt => Disable,
Clock_Source => Processor,
Count_Flag => False);
ARM.Cortex_M4.SysTick.Reload_Value_Register := Time_Base_Tick;
ARM.Cortex_M4.SysTick.Current_Value_Register := 0;
ARM.Cortex_M4.SysTick.Control_And_Status_Register :=
(Counter => Enable,
Interrupt => Enable,
Clock_Source => Processor,
Count_Flag => False);
-- Setup FPU for correct context switching operation
FPU.Floating_Point_Context_Control_Register :=
(Automatic_State_Preservation => Enable,
Lazy_State_Preservation => Enable,
others => False);
Agent_With_FPR_To_Save := No_Agent;
-- Processor specific initialisation routines
Oak.Processor_Support_Package.Interrupts.Initialise_Interrupts;
end Set_Up_Interrupts;
---------------------------
-- Decrementer_Interrupt --
---------------------------
procedure Decrementer_Interrupt is
begin
-- Push interrupted agent's registers onto its call stack and load the
-- reason for Oak to run into r1 which Oak will later pull out.
Asm
-- load the banked stack pointer for the agent
("mrs r1, psp" & ASCII.LF & ASCII.HT &
"stmfd r1!, {r4 - r11}" & ASCII.LF & ASCII.HT &
"mov r4, %0",
Inputs => Run_Reason'Asm_Input ("i", Timer),
Volatile => True);
Full_Context_Switch_To_Oak;
end Decrementer_Interrupt;
--------------------------------
-- External_Interrupt_Handler --
--------------------------------
procedure IRQ_Interrupt_Handler is
begin
-- At this point r0 – r3, r12, lr, pc and xPSR have been pushed onto
-- the stack. Now we push the remaining registers and place the reason
-- for Oak to run in r4.
Asm
-- load the banked stack pointer for the agent
("mrs r1, psp" & ASCII.LF & ASCII.HT &
"stmfd r1!, {r4 - r11}" & ASCII.LF & ASCII.HT &
"mov r4, %0",
Inputs => Run_Reason'Asm_Input ("i", External_Interrupt),
Volatile => True);
Current_IRQ := Exceptions.Current_IRQ;
Full_Context_Switch_To_Oak;
end IRQ_Interrupt_Handler;
--------------------------------------------
-- Full_Context_Switch_To_Agent_Interrupt --
--------------------------------------------
procedure Full_Context_Switch_To_Agent_Interrupt is
Task_Stack_Pointer : Address;
Hardware_Priority : Exception_Priority;
begin
-- Ensure this code does not modify the stack pointer. Can modify any
-- other register.
-- Update SWI address
SVC_Vector := SVC_Return_Vector;
-- Load the current agents stack pointer
Task_Stack_Pointer := Stack_Pointer (Current_Agent (This_Oak_Kernel));
Hardware_Priority := To_Cortex_Priority
(Current_Priority (This_Oak_Kernel));
-- Set base priority, restore agent's exc_return value and load its
-- stack address into the banked psp register.
Asm ("ldmfd %0!, {lr}",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
-- Handle lazy stacking of floating point registers
if Current_Agent (This_Oak_Kernel) = No_Agent then
-- Sleep agent does not use fpu
null;
elsif Current_Agent (This_Oak_Kernel) = Agent_With_FPR_To_Save then
-- No need to save registers since we are switching back to the
-- same agent. Delete space reserved for them.
Asm ("add %0, #64",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
elsif Current_Agent (This_Oak_Kernel) in Task_Id then
if Agent_With_FPR_To_Save /= No_Agent then
Asm ("add r0, %0, #4" & ASCII.LF & ASCII.HT &
"vstmia r0, {s16 - s31}",
Inputs => Address'Asm_Input ("r",
Stack_Pointer (Agent_With_FPR_To_Save)),
Clobber => "r0",
Volatile => True);
Agent_With_FPR_To_Save := No_Agent;
end if;
-- Restore fp registers if needed
Asm ("tst lr, #0x10" & ASCII.LF & ASCII.HT &
"it eq" & ASCII.LF & ASCII.HT &
"vldmiaeq %0!, {s16 - s31}",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
end if;
Asm ("ldmfd %0!, {r4 - r11}" & ASCII.LF & ASCII.HT &
"msr psp, %0" & ASCII.LF & ASCII.HT &
"msr basepri, %1" & ASCII.LF & ASCII.HT &
"bx lr", -- lr holds the exc_return value
Inputs => (Address'Asm_Input ("r", Task_Stack_Pointer),
Exception_Priority'Asm_Input ("r", Hardware_Priority)),
Clobber => "r3",
Volatile => True);
end Full_Context_Switch_To_Agent_Interrupt;
--------------------------------
-- Full_Context_Switch_To_Oak --
--------------------------------
procedure Full_Context_Switch_To_Oak is
Task_Stack_Pointer : Address;
Ex_Return : Unsigned_32;
begin
-- This procedure should have been entered with all registers saved on
-- the stack and r4 holding the reason for run. All that is left is to
-- do is save the exc_return value that is in lr. Note that r1 holds the
-- stack address and is the expected register for the output
Asm ("mov %0, r1" & ASCII.LF & ASCII.HT &
"mov %1, lr",
Outputs => (Address'Asm_Output ("=r", Task_Stack_Pointer),
Unsigned_32'Asm_Output ("=r", Ex_Return)),
Volatile => True);
if Ex_Return = Floating_Point_Return then
Agent_With_FPR_To_Save := Current_Agent (This_Oak_Kernel);
-- Create space for the floating point register
Asm ("sub %0, #64",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
end if;
Asm ("stmfd %0!, {lr}",
-- Save the stack pointer
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Clobber => "r4, r5", -- For the protection of these variables
Volatile => True);
Set_Stack_Pointer (Current_Agent (This_Oak_Kernel), Task_Stack_Pointer);
-- Return to Oak, setting lr := 16#FFFF_FFF9# (stay in thread mode, use
-- main stack pointer). Set base priority.
Asm ("mov r0, %0" & ASCII.LF & ASCII.HT &
"msr basepri, r0" & ASCII.LF & ASCII.HT &
"mvn lr, #0x6" & ASCII.LF & ASCII.HT &
"bx lr",
Inputs => Any_Priority'Asm_Input ("i", Oak_Mask_Priority),
Volatile => True);
end Full_Context_Switch_To_Oak;
------------------------------------------------
-- In_Place_Context_Switch_To_Agent_Interrupt --
------------------------------------------------
procedure In_Place_Context_Switch_To_Agent_Interrupt is
begin
-- Just return at this point. Since the Cortex-M4 supports a MMU this
-- code should be updated to support it.
Asm ("bx lr", Volatile => True);
end In_Place_Context_Switch_To_Agent_Interrupt;
----------------------------------------------
-- In_Place_Context_Switch_To_Oak_Interrupt --
----------------------------------------------
procedure In_Place_Context_Switch_To_Oak_Interrupt is
begin
-- See above.
Asm ("bx lr", Volatile => True);
end In_Place_Context_Switch_To_Oak_Interrupt;
-----------------------------------------------
-- Request_Context_Switch_To_Agent_Interrupt --
-----------------------------------------------
procedure Request_Context_Switch_To_Agent_Interrupt is
Task_Stack_Pointer : Address;
Hardware_Priority : Exception_Priority;
begin
-- Ensure this code does not modify the stack pointer. Can modify any
-- other register.
-- Update SVC address
SVC_Vector := SVC_Return_Vector;
-- Load the current agents stack pointer
Task_Stack_Pointer := Stack_Pointer (Current_Agent (This_Oak_Kernel));
if Current_Agent (This_Oak_Kernel) in Scheduler_Id then
Hardware_Priority := Oak_Mask_Priority;
else
Hardware_Priority := To_Cortex_Priority
(Current_Priority (This_Oak_Kernel));
end if;
-- Set base priority, restore agent's exc_return value and load its
-- stack address into the banked psp register.
Asm ("ldmfd %0!, {lr}",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
-- Handle lazy stacking of floating point registers
if Current_Agent (This_Oak_Kernel) = No_Agent then
-- Sleep agent does not use fpu
null;
elsif Current_Agent (This_Oak_Kernel) = Agent_With_FPR_To_Save then
-- No need to save registers since we are switching back to the
-- same agent. Delete space reserved for them.
Asm ("add %0, #64",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
elsif Current_Agent (This_Oak_Kernel) in Task_Id then
if Agent_With_FPR_To_Save /= No_Agent then
Asm ("add r0, %0, #4" & ASCII.LF & ASCII.HT &
"vstmia r0, {s16 - s31}",
Inputs => Address'Asm_Input ("r",
Stack_Pointer (Agent_With_FPR_To_Save)),
Clobber => "r0",
Volatile => True);
Agent_With_FPR_To_Save := No_Agent;
end if;
-- Restore fp registers if needed
Asm ("tst lr, #0x10" & ASCII.LF & ASCII.HT &
"it eq" & ASCII.LF & ASCII.HT &
"vldmiaeq %0!, {s16 - s31}",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
end if;
Asm ("msr psp, %0" & ASCII.LF & ASCII.HT &
"msr basepri, %1" & ASCII.LF & ASCII.HT &
"bx lr", -- r3 holds the exc_return value
Inputs => (Address'Asm_Input ("r", Task_Stack_Pointer),
Exception_Priority'Asm_Input ("r", Hardware_Priority)),
Volatile => True);
end Request_Context_Switch_To_Agent_Interrupt;
---------------------------------------------
-- Request_Context_Switch_To_Oak_Interrupt --
---------------------------------------------
procedure Request_Context_Switch_To_Oak_Interrupt is
Task_Stack_Pointer : Address;
Ex_Return : Unsigned_32;
begin
-- Store the agent's exc_return value by first grabing its stack pointer
Asm ("mrs %0, psp" & ASCII.LF & ASCII.HT &
"mov %1, lr",
Outputs => (Address'Asm_Output ("=r", Task_Stack_Pointer),
Unsigned_32'Asm_Output ("=r", Ex_Return)),
Volatile => True);
if Ex_Return = Floating_Point_Return then
Agent_With_FPR_To_Save := Current_Agent (This_Oak_Kernel);
-- Create space for the floating point register
Asm ("sub %0, #64",
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Volatile => True);
end if;
Asm ("stmfd %0!, {lr}",
-- Save the stack pointer
Outputs => Address'Asm_Output ("+r", Task_Stack_Pointer),
Clobber => "r4, r5", -- For the protection of these variables
Volatile => True);
Set_Stack_Pointer (Current_Agent (This_Oak_Kernel), Task_Stack_Pointer);
-- Return to Oak, setting lr := 16#FFFF_FFF9# (stay in thread mode, use
-- main stack pointer). Set base priority.
Asm ("mov r0, %0" & ASCII.LF & ASCII.HT &
"msr basepri, r0" & ASCII.LF & ASCII.HT &
"mvn lr, #0x6" & ASCII.LF & ASCII.HT &
"bx lr",
Inputs => Any_Priority'Asm_Input ("i", Oak_Mask_Priority),
Volatile => True);
end Request_Context_Switch_To_Oak_Interrupt;
procedure SVCall_Handler is
begin
Asm ("bx %0",
Inputs => Address'Asm_Input ("r", SVC_Vector),
Volatile => True);
end SVCall_Handler;
end Oak.Core_Support_Package.Interrupts;
|
AdaCore/langkit | Ada | 1,143 | adb | with Ada.Text_IO; use Ada.Text_IO;
with GNATCOLL.GMP.Integers;
with Libfoolang.Analysis; use Libfoolang.Analysis;
procedure Main is
procedure Dump (Label : String; S : My_Struct);
Unit : constant Analysis_Unit := Create_Context.Get_From_Buffer
(Filename => "main.txt", Buffer => "example");
E : Example;
S : My_Struct;
procedure Dump (Label : String; S : My_Struct) is
begin
Put_Line (Label & ":");
Put_Line ("Entity_Field = " & Entity_Field (S).Image);
Put_Line ("Array_Field:");
for Item of Array_Field (S) loop
Put_Line (" " & Item.Image);
end loop;
Put_Line ("Bigint_Field = " & Bigint_Field (S).Image);
New_Line;
end Dump;
begin
if Unit.Has_Diagnostics then
raise Program_Error;
end if;
E := Unit.Root.Child (1).As_Example;
S := E.P_Get_Struct;
Dump ("First struct", S);
S := E.P_Struct_Identity
(Create_My_Struct (Entity_Field => Unit.Root,
Array_Field => (1 .. 0 => <>),
Bigint_Field => GNATCOLL.GMP.Integers.Make ("2")));
Dump ("Second struct:", S);
end Main;
|
DrenfongWong/tkm-rpc | Ada | 1,978 | ads | --
-- Copyright (C) 2013 Reto Buerki <[email protected]>
-- Copyright (C) 2013 Adrian-Ken Rueegsegger <[email protected]>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- 2. Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- 3. Neither the name of the University 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 REGENTS 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 REGENTS 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 Ahven.Framework;
package Tkmrpc_Response_Tests
is
type Testcase is new Ahven.Framework.Test_Case with null record;
procedure Initialize (T : in out Testcase);
-- Initialize testcase.
procedure Stream_Conversion;
-- Verify response data to/from stream conversions.
end Tkmrpc_Response_Tests;
|
AdaCore/Ada_Drivers_Library | Ada | 15,322 | ads | -- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA
--
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without modification,
-- are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice, this
-- list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form, except as embedded into a Nordic
-- Semiconductor ASA integrated circuit in a product or a software update for
-- such product, 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 Nordic Semiconductor ASA nor the names of its
-- contributors may be used to endorse or promote products derived from this
-- software without specific prior written permission.
--
-- 4. This software, with or without modification, must only be used with a
-- Nordic Semiconductor ASA integrated circuit.
--
-- 5. Any software provided in binary form under this license must not be reverse
-- engineered, decompiled, modified and/or disassembled.
--
-- THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-- OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
-- DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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 spec has been automatically generated from nrf52.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NRF_SVD.FICR is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Description collection[0]: Device identifier
-- Description collection[0]: Device identifier
type DEVICEID_Registers is array (0 .. 1) of HAL.UInt32;
-- Description collection[0]: Encryption Root, word 0
-- Description collection[0]: Encryption Root, word 0
type ER_Registers is array (0 .. 3) of HAL.UInt32;
-- Description collection[0]: Identity Root, word 0
-- Description collection[0]: Identity Root, word 0
type IR_Registers is array (0 .. 3) of HAL.UInt32;
-- Device address type
type DEVICEADDRTYPE_DEVICEADDRTYPE_Field is
(-- Public address
Public,
-- Random address
Random)
with Size => 1;
for DEVICEADDRTYPE_DEVICEADDRTYPE_Field use
(Public => 0,
Random => 1);
-- Device address type
type DEVICEADDRTYPE_Register is record
-- Read-only. Device address type
DEVICEADDRTYPE : DEVICEADDRTYPE_DEVICEADDRTYPE_Field;
-- unspecified
Reserved_1_31 : HAL.UInt31;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DEVICEADDRTYPE_Register use record
DEVICEADDRTYPE at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- Description collection[0]: Device address 0
-- Description collection[0]: Device address 0
type DEVICEADDR_Registers is array (0 .. 1) of HAL.UInt32;
------------------------------
-- INFO cluster's Registers --
------------------------------
-- Description collection[0]: Unspecified
-- Description collection[0]: Unspecified
type UNUSED0_INFO_Registers is array (0 .. 2) of HAL.UInt32;
-- Device info
type INFO_Cluster is record
-- Part code
PART : aliased HAL.UInt32;
-- Part Variant, Hardware version and Production configuration
VARIANT : aliased HAL.UInt32;
-- Package option
PACKAGE_k : aliased HAL.UInt32;
-- RAM variant
RAM : aliased HAL.UInt32;
-- Flash variant
FLASH : aliased HAL.UInt32;
-- Description collection[0]: Unspecified
UNUSED0 : aliased UNUSED0_INFO_Registers;
end record
with Size => 256;
for INFO_Cluster use record
PART at 16#0# range 0 .. 31;
VARIANT at 16#4# range 0 .. 31;
PACKAGE_k at 16#8# range 0 .. 31;
RAM at 16#C# range 0 .. 31;
FLASH at 16#10# range 0 .. 31;
UNUSED0 at 16#14# range 0 .. 95;
end record;
------------------------------
-- TEMP cluster's Registers --
------------------------------
subtype A_A_Field is HAL.UInt12;
-- Slope definition A0.
type A_Register is record
-- Read-only. A (slope definition) register.
A : A_A_Field;
-- unspecified
Reserved_12_31 : HAL.UInt20;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for A_Register use record
A at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype B_B_Field is HAL.UInt14;
-- y-intercept B0.
type B_Register is record
-- Read-only. B (y-intercept)
B : B_B_Field;
-- unspecified
Reserved_14_31 : HAL.UInt18;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for B_Register use record
B at 0 range 0 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype T_T_Field is HAL.UInt8;
-- Segment end T0.
type T_Register is record
-- Read-only. T (segment end)register.
T : T_T_Field;
-- unspecified
Reserved_8_31 : HAL.UInt24;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for T_Register use record
T at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- Registers storing factory TEMP module linearization coefficients
type TEMP_Cluster is record
-- Slope definition A0.
A0 : aliased A_Register;
-- Slope definition A1.
A1 : aliased A_Register;
-- Slope definition A2.
A2 : aliased A_Register;
-- Slope definition A3.
A3 : aliased A_Register;
-- Slope definition A4.
A4 : aliased A_Register;
-- Slope definition A5.
A5 : aliased A_Register;
-- y-intercept B0.
B0 : aliased B_Register;
-- y-intercept B1.
B1 : aliased B_Register;
-- y-intercept B2.
B2 : aliased B_Register;
-- y-intercept B3.
B3 : aliased B_Register;
-- y-intercept B4.
B4 : aliased B_Register;
-- y-intercept B5.
B5 : aliased B_Register;
-- Segment end T0.
T0 : aliased T_Register;
-- Segment end T1.
T1 : aliased T_Register;
-- Segment end T2.
T2 : aliased T_Register;
-- Segment end T3.
T3 : aliased T_Register;
-- Segment end T4.
T4 : aliased T_Register;
end record
with Size => 544;
for TEMP_Cluster use record
A0 at 16#0# range 0 .. 31;
A1 at 16#4# range 0 .. 31;
A2 at 16#8# range 0 .. 31;
A3 at 16#C# range 0 .. 31;
A4 at 16#10# range 0 .. 31;
A5 at 16#14# range 0 .. 31;
B0 at 16#18# range 0 .. 31;
B1 at 16#1C# range 0 .. 31;
B2 at 16#20# range 0 .. 31;
B3 at 16#24# range 0 .. 31;
B4 at 16#28# range 0 .. 31;
B5 at 16#2C# range 0 .. 31;
T0 at 16#30# range 0 .. 31;
T1 at 16#34# range 0 .. 31;
T2 at 16#38# range 0 .. 31;
T3 at 16#3C# range 0 .. 31;
T4 at 16#40# range 0 .. 31;
end record;
-----------------------------
-- NFC cluster's Registers --
-----------------------------
subtype TAGHEADER0_NFC_MFGID_Field is HAL.UInt8;
-- TAGHEADER0_NFC_UD array element
subtype TAGHEADER0_NFC_UD_Element is HAL.UInt8;
-- TAGHEADER0_NFC_UD array
type TAGHEADER0_NFC_UD_Field_Array is array (1 .. 3)
of TAGHEADER0_NFC_UD_Element
with Component_Size => 8, Size => 24;
-- Type definition for TAGHEADER0_NFC_UD
type TAGHEADER0_NFC_UD_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- UD as a value
Val : HAL.UInt24;
when True =>
-- UD as an array
Arr : TAGHEADER0_NFC_UD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 24;
for TAGHEADER0_NFC_UD_Field use record
Val at 0 range 0 .. 23;
Arr at 0 range 0 .. 23;
end record;
-- Default header for NFC Tag. Software can read these values to populate
-- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
type TAGHEADER0_NFC_Register is record
-- Read-only. Default Manufacturer ID: Nordic Semiconductor ASA has ICM
-- 0x5F
MFGID : TAGHEADER0_NFC_MFGID_Field;
-- Read-only. Unique identifier byte 1
UD : TAGHEADER0_NFC_UD_Field;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TAGHEADER0_NFC_Register use record
MFGID at 0 range 0 .. 7;
UD at 0 range 8 .. 31;
end record;
-- TAGHEADER1_NFC_UD array element
subtype TAGHEADER1_NFC_UD_Element is HAL.UInt8;
-- TAGHEADER1_NFC_UD array
type TAGHEADER1_NFC_UD_Field_Array is array (4 .. 7)
of TAGHEADER1_NFC_UD_Element
with Component_Size => 8, Size => 32;
-- Default header for NFC Tag. Software can read these values to populate
-- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
type TAGHEADER1_NFC_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- UD as a value
Val : HAL.UInt32;
when True =>
-- UD as an array
Arr : TAGHEADER1_NFC_UD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TAGHEADER1_NFC_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- TAGHEADER2_NFC_UD array element
subtype TAGHEADER2_NFC_UD_Element is HAL.UInt8;
-- TAGHEADER2_NFC_UD array
type TAGHEADER2_NFC_UD_Field_Array is array (8 .. 11)
of TAGHEADER2_NFC_UD_Element
with Component_Size => 8, Size => 32;
-- Default header for NFC Tag. Software can read these values to populate
-- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
type TAGHEADER2_NFC_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- UD as a value
Val : HAL.UInt32;
when True =>
-- UD as an array
Arr : TAGHEADER2_NFC_UD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TAGHEADER2_NFC_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- TAGHEADER3_NFC_UD array element
subtype TAGHEADER3_NFC_UD_Element is HAL.UInt8;
-- TAGHEADER3_NFC_UD array
type TAGHEADER3_NFC_UD_Field_Array is array (12 .. 15)
of TAGHEADER3_NFC_UD_Element
with Component_Size => 8, Size => 32;
-- Default header for NFC Tag. Software can read these values to populate
-- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
type TAGHEADER3_NFC_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- UD as a value
Val : HAL.UInt32;
when True =>
-- UD as an array
Arr : TAGHEADER3_NFC_UD_Field_Array;
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for TAGHEADER3_NFC_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-- Unspecified
type NFC_Cluster is record
-- Default header for NFC Tag. Software can read these values to
-- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
TAGHEADER0 : aliased TAGHEADER0_NFC_Register;
-- Default header for NFC Tag. Software can read these values to
-- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
TAGHEADER1 : aliased TAGHEADER1_NFC_Register;
-- Default header for NFC Tag. Software can read these values to
-- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
TAGHEADER2 : aliased TAGHEADER2_NFC_Register;
-- Default header for NFC Tag. Software can read these values to
-- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.
TAGHEADER3 : aliased TAGHEADER3_NFC_Register;
end record
with Size => 128;
for NFC_Cluster use record
TAGHEADER0 at 16#0# range 0 .. 31;
TAGHEADER1 at 16#4# range 0 .. 31;
TAGHEADER2 at 16#8# range 0 .. 31;
TAGHEADER3 at 16#C# range 0 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Factory Information Configuration Registers
type FICR_Peripheral is record
-- Code memory page size
CODEPAGESIZE : aliased HAL.UInt32;
-- Code memory size
CODESIZE : aliased HAL.UInt32;
-- Description collection[0]: Device identifier
DEVICEID : aliased DEVICEID_Registers;
-- Description collection[0]: Encryption Root, word 0
ER : aliased ER_Registers;
-- Description collection[0]: Identity Root, word 0
IR : aliased IR_Registers;
-- Device address type
DEVICEADDRTYPE : aliased DEVICEADDRTYPE_Register;
-- Description collection[0]: Device address 0
DEVICEADDR : aliased DEVICEADDR_Registers;
-- Device info
INFO : aliased INFO_Cluster;
-- Registers storing factory TEMP module linearization coefficients
TEMP : aliased TEMP_Cluster;
-- Unspecified
NFC : aliased NFC_Cluster;
end record
with Volatile;
for FICR_Peripheral use record
CODEPAGESIZE at 16#10# range 0 .. 31;
CODESIZE at 16#14# range 0 .. 31;
DEVICEID at 16#60# range 0 .. 63;
ER at 16#80# range 0 .. 127;
IR at 16#90# range 0 .. 127;
DEVICEADDRTYPE at 16#A0# range 0 .. 31;
DEVICEADDR at 16#A4# range 0 .. 63;
INFO at 16#100# range 0 .. 255;
TEMP at 16#404# range 0 .. 543;
NFC at 16#450# range 0 .. 127;
end record;
-- Factory Information Configuration Registers
FICR_Periph : aliased FICR_Peripheral
with Import, Address => FICR_Base;
end NRF_SVD.FICR;
|
zhmu/ananas | Ada | 3,628 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ B O O L --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Boolean'Image
-- Preconditions in this unit are meant for analysis only, not for run-time
-- checking, so that the expected exceptions are raised. This is enforced by
-- setting the corresponding assertion policy to Ignore. Postconditions and
-- contract cases should not be executed at runtime as well, in order not to
-- slow down the execution of these functions.
pragma Assertion_Policy (Pre => Ignore,
Post => Ignore,
Contract_Cases => Ignore,
Ghost => Ignore);
with System.Val_Bool;
package System.Img_Bool
with SPARK_Mode, Preelaborate
is
procedure Image_Boolean
(V : Boolean;
S : in out String;
P : out Natural)
with
Pre => S'First = 1
and then (if V then S'Length >= 4 else S'Length >= 5),
Post => (if V then P = 4 else P = 5)
and then System.Val_Bool.Is_Boolean_Image_Ghost (S (1 .. P))
and then System.Val_Bool.Value_Boolean (S (1 .. P)) = V;
-- Computes Boolean'Image (V) and stores the result in S (1 .. P)
-- setting the resulting value of P. The caller guarantees that S
-- is long enough to hold the result, and that S'First is 1.
end System.Img_Bool;
|
reznikmm/matreshka | Ada | 4,688 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Visitors;
with ODF.DOM.Xforms_Model_Elements;
package Matreshka.ODF_Xforms.Model_Elements is
type Xforms_Model_Element_Node is
new Matreshka.ODF_Xforms.Abstract_Xforms_Element_Node
and ODF.DOM.Xforms_Model_Elements.ODF_Xforms_Model
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters)
return Xforms_Model_Element_Node;
overriding function Get_Local_Name
(Self : not null access constant Xforms_Model_Element_Node)
return League.Strings.Universal_String;
overriding procedure Enter_Node
(Self : not null access Xforms_Model_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Leave_Node
(Self : not null access Xforms_Model_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Visit_Node
(Self : not null access Xforms_Model_Element_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
end Matreshka.ODF_Xforms.Model_Elements;
|
zhmu/ananas | Ada | 1,457 | ads | with System;
package Init8 is
type Nested1 is record
C1 : Integer;
C2 : Integer;
C3 : Integer;
end record;
for Nested1'Bit_Order use System.High_Order_First;
for Nested1'Scalar_Storage_Order use System.High_Order_First;
for Nested1 use record
C1 at 0 range 0 .. 31;
C2 at 4 range 0 .. 31;
C3 at 8 range 0 .. 31;
end record;
type R1 is record
I : Integer;
N : Nested1;
end record;
for R1'Bit_Order use System.Low_Order_First;
for R1'Scalar_Storage_Order use System.Low_Order_First;
for R1 use record
I at 0 range 0 .. 31;
N at 4 range 0 .. 95;
end record;
type Nested2 is record
C1 : Integer;
C2 : Integer;
C3 : Integer;
end record;
for Nested2'Bit_Order use System.Low_Order_First;
for Nested2'Scalar_Storage_Order use System.Low_Order_First;
for Nested2 use record
C1 at 0 range 0 .. 31;
C2 at 4 range 0 .. 31;
C3 at 8 range 0 .. 31;
end record;
type R2 is record
I : Integer;
N : Nested2;
end record;
for R2'Bit_Order use System.High_Order_First;
for R2'Scalar_Storage_Order use System.High_Order_First;
for R2 use record
I at 0 range 0 .. 31;
N at 4 range 0 .. 95;
end record;
My_R1 : constant R1 := (I => 16#12345678#,
N => (16#AB0012#, 16#CD0034#, 16#EF0056#));
My_R2 : constant R2 := (I => 16#12345678#,
N => (16#AB0012#, 16#CD0034#, 16#EF0056#));
end Init8;
|
reznikmm/matreshka | Ada | 4,772 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Visitors;
with ODF.DOM.Text_Sender_Lastname_Elements;
package Matreshka.ODF_Text.Sender_Lastname_Elements is
type Text_Sender_Lastname_Element_Node is
new Matreshka.ODF_Text.Abstract_Text_Element_Node
and ODF.DOM.Text_Sender_Lastname_Elements.ODF_Text_Sender_Lastname
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters)
return Text_Sender_Lastname_Element_Node;
overriding function Get_Local_Name
(Self : not null access constant Text_Sender_Lastname_Element_Node)
return League.Strings.Universal_String;
overriding procedure Enter_Node
(Self : not null access Text_Sender_Lastname_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Leave_Node
(Self : not null access Text_Sender_Lastname_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Visit_Node
(Self : not null access Text_Sender_Lastname_Element_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
end Matreshka.ODF_Text.Sender_Lastname_Elements;
|
AdaCore/training_material | Ada | 3,720 | adb | -----------------------------------------------------------------------
-- Ada Labs --
-- --
-- Copyright (C) 2008-2012, AdaCore --
-- --
-- Labs 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. You should have received --
-- a copy of the GNU General Public License along with this program; --
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
-----------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Real_Time; use Ada.Real_Time;
with Display; use Display;
with Display.Basic; use Display.Basic;
with Libm_Single; use Libm_Single;
procedure Main is
-- define type Bodies_Enum_T as an enumeration of Sun, Earth, Moon, Satellite
type Bodies_Enum_T is (Sun, Earth, Moon, Satellite);
-- define a type Body_T to store every information about a body
-- X, Y, Distance, Speed, Angle, Color type is RGBA_T, Radius
-- define type Bodies_Array_T as an array of Body_T indexed by bodies
-- declare variable Bodies which is an array of Body_T
-- declare a variable Next of type Time to store the Next step time
Next : Time;
-- declare a constant Period of 40 milliseconds of type Time_Span defining the loop period
Period : constant Time_Span := Milliseconds (40);
-- reference to the application window
Window : Window_ID;
-- reference to the graphical canvas associated with the application window
Canvas : Canvas_ID;
begin
-- Create a window 240x320
Window :=
Create_Window (Width => 240, Height => 320, Name => "Solar System");
-- Retrieve the graphical canvas from the window
Canvas := Get_Canvas (Window);
-- initialize Bodies variable with parameters for each body using an aggregate
-- Sun Distance = 0.0, Angle = 0.0, Speed = 0.0, Radius = 20.0, Color = Yellow
-- Earth Distance = 50.0, Angle = 0.0, Speed = 0.02, Radius = 5.0, Color = Blue
-- Moon Distance = 15.0, Angle = 0.0, Speed = 0.04, Radius = 2.0, Color = White
-- Satellite Distance = 8.0, Angle = 0.0, Speed = 0.1, Radius = 1.0, Color = Red
-- initialize the Next step time begin the current time (Clock) + the period
Next := Clock + Period;
while not Is_Killed loop
-- create a loop to update each body position and angles
-- the position of an object around (0,0) at distance d with an angle a
-- is (d*cos(a), d*sin(a))
-- update angle parameter of each body adding speed to the previous angle
-- create a loop to draw every objects
-- use the Draw_Sphere procedure to do it
-- update the screen using procedure Swap_Buffers
Swap_Buffers (Window);
-- wait until Next
delay until Next;
-- update the Next time adding the period for the next step
Next := Next + Period;
end loop;
end Main;
|
glencornell/ada-socketcan | Ada | 11,269 | adb | -- MIT License
--
-- Copyright (c) 2021 Glen Cornell <[email protected]>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
with Interfaces.C;
with Ada.Io_Exceptions;
-- Suppress warning generated by referencing internal GNAT packages.
pragma Warnings (Off, """*"" is an internal GNAT unit");
with Gnat.Sockets.Thin;
with Gnat.Sockets.Thin_Common;
with Sockets.Os_Constants;
with System.Os_Constants;
pragma Warnings (On, """*"" is an internal GNAT unit");
with Sockets.Can_Thin;
package body Sockets.Can is
package C renames Interfaces.C;
use type C.Int;
use type C.Unsigned;
-- Conversion of Ada typed objects to typeless C types:
type Family_To_C_Type is array (Family_Type) of C.Int;
type Mode_To_C_Type is array (Mode_Type) of C.Int;
type Protocol_To_C_Type is array (Protocol_Type) of C.Int;
Family_To_C : constant Family_To_C_Type :=
(Family_Can => Sockets.Os_Constants.Af_Can);
Mode_To_C : constant Mode_To_C_Type :=
(Socket_Dgram => System.Os_Constants.Sock_Dgram,
Socket_Raw => Sockets.Os_Constants.Sock_Raw);
Protocol_To_C : constant Protocol_To_C_Type :=
(Can_Raw => Sockets.Os_Constants.Can_Raw,
Can_Bcm => Sockets.Os_Constants.Can_Bcm);
----------------------
-- If_Name_To_Index --
----------------------
function If_Name_To_Index (If_Name : String) return Natural is
If_Index : C.Unsigned;
begin
If_Index := Sockets.Can_Thin.If_Nametoindex(C.To_C(If_Name));
if If_Index = 0 then
Raise_Socket_Error (sockets.can_thin.socket_errno);
end if;
return Natural (If_Index);
end If_Name_To_Index;
--------------------------
-- Enable_CAN_FD_Frames --
--------------------------
procedure Enable_CAN_FD_Frames
(Socket : Socket_Type;
Is_Enabled : Boolean) is
Res : C.int;
Enable : C.Int := (if Is_Enabled then 1 else 0);
begin
Res := Gnat.Sockets.Thin.C_Setsockopt
(S => C.Int(Gnat.Sockets.To_C(Socket)),
Level => Sockets.Os_Constants.SOL_CAN_RAW,
Optname => Sockets.Os_Constants.CAN_RAW_FD_FRAMES,
Optval => Enable'Address,
Optlen => Enable'Size / 8);
if Res = Gnat.Sockets.Thin_Common.Failure then
Raise_Socket_Error (Sockets.Can_Thin.Socket_Errno);
return;
end if;
end Enable_CAN_FD_Frames;
-------------------
-- Create_Socket --
-------------------
procedure Create_Socket
(Socket : out Socket_Type;
Family : in Family_Type := Family_Can;
Mode : in Mode_Type := Socket_Raw;
Protocol : in Protocol_Type := Can_Raw) is
Res : C.int;
begin
Res := Gnat.Sockets.Thin.C_Socket (Family_To_C(Family),
Mode_To_C(Mode),
Protocol_To_C(Protocol));
if Res = Gnat.Sockets.Thin_Common.Failure then
Raise_Socket_Error (Sockets.Can_Thin.Socket_Errno);
return;
end if;
Socket := Gnat.Sockets.To_Ada (Integer(Res));
end Create_Socket;
--------------------
-- Connect_Socket --
--------------------
procedure Connect_Socket
(Socket : Socket_Type;
Address : Sock_Addr_Type) is
Res : C.int;
Addr : aliased Sockets.Can_Thin.Sockaddr_Can;
Sizeof_Addr : constant C.Int := (Sockets.Can_Thin.Sockaddr_Can'Size + 7) / 8;
begin
Addr.Can_Family := Sockets.Os_Constants.Af_Can;
Addr.Can_Ifindex := C.Unsigned (Address.If_Index);
Addr.Can_Addr := (Rx_Id => 0, Tx_Id => 0);
Res := Gnat.Sockets.Thin.C_Connect (C.Int(Gnat.Sockets.To_C(Socket)),
Addr'Address,
Sizeof_Addr);
if Res = Gnat.Sockets.Thin_Common.Failure then
Raise_Socket_Error (sockets.can_thin.socket_errno);
return;
end if;
end Connect_Socket;
-----------------
-- Bind_Socket --
-----------------
procedure Bind_Socket
(Socket : Socket_Type;
Address : Sock_Addr_Type) is
Res : C.int;
Addr : aliased Sockets.Can_Thin.Sockaddr_Can;
Sizeof_Addr : constant C.Int := (Sockets.Can_Thin.Sockaddr_Can'Size + 7) / 8;
begin
Addr.Can_Family := Sockets.Os_Constants.Af_Can;
Addr.Can_Ifindex := C.Unsigned (Address.If_Index);
Addr.Can_Addr := (Rx_Id => 0, Tx_Id => 0);
Res := Gnat.Sockets.Thin.C_Bind (C.Int(Gnat.Sockets.To_C(Socket)),
Addr'Address,
Sizeof_Addr);
if Res = Gnat.Sockets.Thin_Common.Failure then
Raise_Socket_Error (sockets.can_thin.socket_errno);
return;
end if;
end Bind_Socket;
-------------------
-- Apply_Filters --
-------------------
procedure Apply_Filters
(Socket : Socket_Type;
Filters : Can_Filter_Array_Type;
Are_Can_Fd_Frames_Enabled : Boolean := False) is
Res : C.int;
begin
Res := Gnat.Sockets.Thin.C_Setsockopt
(S => C.Int(Gnat.Sockets.To_C(Socket)),
Level => Sockets.Os_Constants.SOL_CAN_RAW,
Optname => Sockets.Os_Constants.CAN_RAW_FILTER,
Optval => Filters'Address,
Optlen => Filters'Size / 8);
if Res = Gnat.Sockets.Thin_Common.Failure then
Raise_Socket_Error (Sockets.Can_Thin.Socket_Errno);
return;
end if;
Enable_Can_Fd_Frames (Socket, Are_Can_Fd_Frames_Enabled);
end Apply_Filters;
----------
-- Open --
----------
function Open (If_Name : String) return Socket_Type is
Socket : Socket_Type;
Address : Sock_Addr_Type;
begin
Create_Socket(Socket);
Address.If_Index := If_Name_To_Index(If_Name);
Bind_Socket(Socket, Address);
return Socket;
end Open;
--------------------
-- Receive_Socket --
--------------------
procedure Receive_Socket
(Socket : Socket_Type;
Item : out Sockets.Can_Frame.Can_Frame) is
Sizeof_Frame : constant Integer := (Sockets.Can_Frame.Can_Frame'Size + 7) / 8;
Buf : aliased Ada.Streams.Stream_Element_Array (1 .. Ada.Streams.Stream_Element_Offset(Sizeof_Frame));
for Buf'Address use Item'Address;
pragma Import (Ada, Buf);
Unused_Last : Ada.Streams.Stream_Element_Offset;
begin
Gnat.Sockets.Receive_Socket(Socket, Buf, Unused_Last);
end Receive_Socket;
-----------------
-- Send_Socket --
-----------------
procedure Send_Socket
(Socket : Socket_Type;
Item : Sockets.Can_Frame.Can_Frame) is
Sizeof_Frame : constant Integer := (Sockets.Can_Frame.Can_Frame'Size + 7) / 8;
Buf : aliased Ada.Streams.Stream_Element_Array (1 .. Ada.Streams.Stream_Element_Offset(Sizeof_Frame));
for Buf'Address use Item'Address;
pragma Import (Ada, Buf);
Unused_Last : Ada.Streams.Stream_Element_Offset;
begin
Gnat.Sockets.Send_Socket(Socket, Buf, Unused_Last);
end Send_Socket;
-------------------
-- Create_Stream --
-------------------
procedure Create_Stream (Stream : in out Can_Stream; Socket : Socket_Type) is
begin
Stream.Socket := Socket;
Stream.Read_Offset := Read_Buffer_End;
Stream.Write_Offset := Write_Buffer_First;
end Create_Stream;
----------
-- Open --
----------
procedure Open (Stream : in out Can_Stream; If_Name : in String) is
begin
Stream.Socket := Open (If_Name);
Stream.Read_Offset := Read_Buffer_End;
Stream.Write_Offset := Write_Buffer_First;
end Open;
----------
-- Read --
----------
procedure Read (Stream : in out Can_Stream;
Item : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset) is
Requested_Size : Ada.Streams.Stream_Element_Offset := Item'Length;
Remainaing_Size_Of_Read_Buffer : Ada.Streams.Stream_Element_Offset := Stream.Read_Buffer'Last - Stream.Read_Offset + 1;
begin
if Remainaing_Size_Of_Read_Buffer <= 0 then
Gnat.Sockets.Receive_Socket(Stream.Socket, Stream.Read_Buffer, Remainaing_Size_Of_Read_Buffer);
Stream.Read_Offset := Read_Buffer_First;
end if;
if Requested_Size > Remainaing_Size_Of_Read_Buffer then
Requested_Size := Remainaing_Size_Of_Read_Buffer;
end if;
Item (Item'First .. Requested_Size) := Stream.Read_Buffer (Stream.Read_Offset .. Stream.Read_Offset + Requested_Size - 1);
Stream.Read_Offset := Stream.Read_Offset + Requested_Size;
Last := Item'First + Requested_Size - 1;
end Read;
-----------
-- Write --
-----------
procedure Write (Stream : in out Can_Stream;
Item : Ada.Streams.Stream_Element_Array) is
Last : Ada.Streams.Stream_Element_Offset := Stream.Write_Offset + Item'Length - 1;
begin
if Last > Write_Buffer_Last then
raise Ada.Io_Exceptions.End_Error;
end if;
Stream.Write_Buffer (Stream.Write_Offset .. Last) := Item;
Stream.Write_Offset := Stream.Write_Offset + Item'Length;
if Last = Sizeof_Frame then
Gnat.Sockets.Send_Socket (Stream.Socket, Stream.Write_Buffer, Last);
Stream.Write_Offset := Write_Buffer_First;
end if;
end Write;
----------------
-- Flush_Read --
----------------
procedure Flush_Read (Stream : in out Can_Stream) is
begin
Stream.Read_Offset := Read_Buffer_End;
end Flush_Read;
-----------------
-- Flush_Write --
-----------------
procedure Flush_Write (Stream : in out Can_Stream) is
Unused_Last : Ada.Streams.Stream_Element_Offset;
begin
if Stream.Write_Offset > Write_Buffer_First then
Gnat.Sockets.Send_Socket (Stream.Socket, Stream.Write_Buffer, Unused_Last);
Stream.Write_Offset := Write_Buffer_First;
end if;
end Flush_Write;
------------------------
-- Raise_Socket_Error --
------------------------
procedure Raise_Socket_Error (Error : Integer) is
begin
raise Socket_Error with
Err_Code_Image (Error) & Sockets.Can_Thin.Socket_Error_Message (Error);
end Raise_Socket_Error;
--------------------
-- Err_Code_Image --
--------------------
function Err_Code_Image (E : Integer) return String is
Msg : String := E'Img & "] ";
begin
Msg (Msg'First) := '[';
return Msg;
end Err_Code_Image;
end Sockets.Can;
|
reznikmm/matreshka | Ada | 6,183 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2015, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
pragma Restrictions (No_Elaboration_Code);
-- GNAT: enforce generation of preinitialized data section instead of
-- generation of elaboration code.
package Matreshka.Internals.Unicode.Ucd.Core_0101 is
pragma Preelaborate;
Group_0101 : aliased constant Core_Second_Stage
:= (16#00# .. 16#02# => -- 010100 .. 010102
(Other_Punctuation, Neutral,
Other, Other, Other, Break_After,
(Grapheme_Base => True,
others => False)),
16#03# .. 16#06# => -- 010103 .. 010106
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#07# .. 16#33# => -- 010107 .. 010133
(Other_Number, Neutral,
Other, Other, Other, Alphabetic,
(Grapheme_Base => True,
others => False)),
16#34# .. 16#36# => -- 010134 .. 010136
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#40# .. 16#74# => -- 010140 .. 010174
(Letter_Number, Neutral,
Other, A_Letter, O_Letter, Alphabetic,
(Alphabetic
| Grapheme_Base
| ID_Continue
| ID_Start
| XID_Continue
| XID_Start => True,
others => False)),
16#75# .. 16#78# => -- 010175 .. 010178
(Other_Number, Neutral,
Other, Other, Other, Alphabetic,
(Grapheme_Base => True,
others => False)),
16#8A# .. 16#8B# => -- 01018A .. 01018B
(Other_Number, Neutral,
Other, Other, Other, Alphabetic,
(Grapheme_Base => True,
others => False)),
16#8D# .. 16#8F# => -- 01018D .. 01018F
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#9C# .. 16#9F# => -- 01019C .. 01019F
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#A1# .. 16#CF# => -- 0101A1 .. 0101CF
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
16#FD# => -- 0101FD
(Nonspacing_Mark, Neutral,
Extend, Extend, Extend, Combining_Mark,
(Case_Ignorable
| Grapheme_Extend
| ID_Continue
| XID_Continue => True,
others => False)),
16#FE# .. 16#FF# => -- 0101FE .. 0101FF
(Unassigned, Neutral,
Other, Other, Other, Unknown,
(others => False)),
others =>
(Other_Symbol, Neutral,
Other, Other, Other, Alphabetic,
(Grapheme_Base => True,
others => False)));
end Matreshka.Internals.Unicode.Ucd.Core_0101;
|
jacksonpugh/ece432 | Ada | 1,961 | ads | <ADSWorkspace Revision="1" Version="100">
<Workspace Name="">
<Library Name="1xEV" />
<Library Name="3GPPFDD" />
<Library Name="3GPPFDD_10_99" />
<Library Name="Antennas_and_Propagation" />
<Library Name="CDMA" />
<Library Name="CMMB" />
<Library Name="Circuit_Cosimulation" />
<Library Name="Controllers" />
<Library Name="DTMB" />
<Library Name="DTV" />
<Library Name="EDGE" />
<Library Name="GSM" />
<Library Name="HDL_Blocks" />
<Library Name="HSDPA" />
<Library Name="HSUPA" />
<Library Name="Instruments" />
<Library Name="Interactive_Controls_and_Displays" />
<Library Name="LTE" />
<Library Name="Numeric" />
<Library Name="Obsolete" />
<Library Name="Signal_Converters" />
<Library Name="Simulation_Sequencing" />
<Library Name="Sinks" />
<Library Name="TDSCDMA" />
<Library Name="Timed" />
<Library Name="UMB" />
<Library Name="UWB" />
<Library Name="WLAN" />
<Library Name="WLAN_11n" />
<Library Name="WMAN" />
<Library Name="WMAN_16e" />
<Library Name="ads_behavioral" />
<Library Name="ads_common_cmps" />
<Library Name="ads_datacmps" />
<Library Name="ads_designs" />
<Library Name="ads_rflib" />
<Library Name="ads_schematic_layers" />
<Library Name="ads_simulation" />
<Library Name="ads_sources" />
<Library Name="ads_standard_layers" />
<Library Name="ads_textfonts" />
<Library Name="ads_tlines" />
<Library Name="adstechlib" />
<Library Name="cdma2000" />
<Library Name="lab2_lib" />
<Dataset Name="data.ds" />
<Dataset Name="FETData.ds" />
<Preferences Name="layout.prf" />
<Preferences Name="schematic.prf" />
</Workspace>
</ADSWorkspace>
|
reznikmm/matreshka | Ada | 3,806 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.XML_Schema.AST.Attribute_Uses;
package body XML.Schema.Objects.Attribute_Uses.Internals is
------------
-- Create --
------------
function Create
(Node : Matreshka.XML_Schema.AST.Attribute_Use_Access)
return XS_Attribute_Use is
begin
return
(Ada.Finalization.Controlled with
Node => Matreshka.XML_Schema.AST.Object_Access (Node));
end Create;
end XML.Schema.Objects.Attribute_Uses.Internals;
|
zhmu/ananas | Ada | 2,806 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . F O R E _ D E C I M A L _ 3 2 --
-- --
-- S p e c --
-- --
-- Copyright (C) 2020-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the routine used for the 'Fore attribute for decimal
-- fixed point types up to 32-bit mantissa.
with Interfaces;
with System.Fore_D;
package System.Fore_Decimal_32 is
pragma Pure;
subtype Int32 is Interfaces.Integer_32;
package Impl is new Fore_D (Int32);
function Fore_Decimal32 (Lo, Hi : Int32; Scale : Integer) return Natural
renames Impl.Fore_Decimal;
end System.Fore_Decimal_32;
|
reznikmm/matreshka | Ada | 3,755 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package Matreshka.ODF_Attributes.FO.Wrap_Option is
type FO_Wrap_Option_Node is
new Matreshka.ODF_Attributes.FO.FO_Node_Base with null record;
type FO_Wrap_Option_Access is access all FO_Wrap_Option_Node'Class;
overriding function Get_Local_Name
(Self : not null access constant FO_Wrap_Option_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Attributes.FO.Wrap_Option;
|
charlie5/aIDE | Ada | 1,100 | ads | with
AdaM.Any,
Ada.Containers.Vectors,
Ada.Streams;
package AdaM.Compilation
is
type Item is new Any.item with private;
-- View
--
type View is access all Item'Class;
procedure View_write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : in View);
procedure View_read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Self : out View);
for View'write use View_write;
for View'read use View_read;
-- Vector
--
package Vectors is new ada.Containers.Vectors (Positive, View);
subtype Vector is Vectors.Vector;
-- Forge
--
function new_Subprogram return Compilation.view;
procedure free (Self : in out Compilation.view);
procedure destruct (Self : in out Compilation.item);
-- Attributes
--
overriding
function Id (Self : access Item) return AdaM.Id;
private
type Item is new Any.item with
record
null;
end record;
end AdaM.Compilation;
|
davidkristola/vole | Ada | 1,012 | ads | with Ada.Strings.Unbounded;
package kv.avm.Code_Buffers is
type Buffer_Type is tagged private;
procedure Put_Meta
(Self : in out Buffer_Type;
Data : in String);
procedure Put_Instruction
(Self : in out Buffer_Type;
Data : in String);
procedure Put_Comment
(Self : in out Buffer_Type;
Data : in String);
procedure Append
(Self : in out Buffer_Type;
Data : in Buffer_Type);
function Code_Count(Self : Buffer_Type) return Natural;
procedure Print
(Self : in Buffer_Type);
procedure Process_Lines
(Self : in Buffer_Type;
Processor : access procedure(Line : String));
private
subtype String_Type is Ada.Strings.Unbounded.Unbounded_String;
type String_Array is array (1..1024) of String_Type;
type Buffer_Type is tagged
record
Buffer : String_Array;
Count : Natural := 0;
Code : Natural := 0;
end record;
end kv.avm.Code_Buffers;
|
rtice3/AdaFractalLib | Ada | 879 | ads | generic
type Real is private;
with function "*" (Left, Right : Real) return Real is <>;
with function "/" (Left, Right : Real) return Real is <>;
with function To_Real (V : Integer) return Real is <>;
with function F_To_Real (V : Float) return Real is <>;
with function To_Integer (V : Real) return Integer is <>;
with function To_Float (V : Real) return Float is <>;
with function Image (V : Real) return String is <>;
with function "+" (Left, Right : Real) return Real is <>;
with function "-" (Left, Right : Real) return Real is <>;
with function ">" (Left, Right : Real) return Boolean is <>;
with function "<" (Left, Right : Real) return Boolean is <>;
with function "<=" (Left, Right : Real) return Boolean is <>;
with function ">=" (Left, Right : Real) return Boolean is <>;
package Computation_Type is
end Computation_Type;
|
stcarrez/stm32-ui | Ada | 2,990 | adb | -----------------------------------------------------------------------
-- cosin -- Generate a sinus/cosinus table
-- Copyright (C) 2018 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Text_IO;
with Ada.Numerics.Generic_Elementary_Functions;
procedure Cosin is
type Float_Type is digits 15 range 0.0 .. 655336.0;
package F_IO is new Ada.Text_IO.Float_IO (Float_Type);
package Maths is new Ada.Numerics.Generic_Elementary_Functions (Float_Type);
To_Rad : constant Float_Type := Ada.Numerics.Pi / 180.0;
Angle : Float_Type;
Value : Float_Type;
Scale : constant Float_Type := 65536.0;
begin
Ada.Text_IO.Put_Line ("package Cosin_Table is");
Ada.Text_IO.Put_Line (" type Cosin_Value is new Integer;");
Ada.Text_IO.Put_Line (" type Cosin_Array is array (0 .. 179) of Cosin_Value;");
Ada.Text_IO.Put_Line (" Factor : constant Cosin_Value := 65536;");
Ada.Text_IO.Put_Line (" Sin_Table : constant array (0 .. 179) of Cosin_Value := (");
Ada.Text_IO.Put (" ");
for I in 0 .. 89 loop
Angle := To_Rad * Float_Type (I);
Value := Scale * Maths.Sin (Angle);
Ada.Text_IO.Put (Integer'Image (Integer (Value)));
Ada.Text_IO.Put (",");
Angle := Angle + To_Rad / 2.0;
Value := Scale * Maths.Sin (Angle);
Ada.Text_IO.Put (Integer'Image (Integer (Value)));
if (I mod 4) = 3 then
Ada.Text_IO.Put_Line (",");
Ada.Text_IO.Put (" ");
elsif I /= 89 then
Ada.Text_IO.Put (",");
end if;
end loop;
Ada.Text_IO.Put_Line (");");
Ada.Text_IO.New_Line;
Ada.Text_IO.Put_Line (" Cos_Table : constant array (0 .. 179) of Cosin_Value := (");
Ada.Text_IO.Put (" ");
for I in 0 .. 89 loop
Angle := To_Rad * Float_Type (I);
Value := Scale * Maths.Cos (Angle);
Ada.Text_IO.Put (Integer'Image (Integer (Value)));
Ada.Text_IO.Put (",");
Angle := Angle + To_Rad / 2.0;
Value := Scale * Maths.Cos (Angle);
Ada.Text_IO.Put (Integer'Image (Integer (Value)));
if (I mod 4) = 3 then
Ada.Text_IO.Put_Line (",");
Ada.Text_IO.Put (" ");
elsif I /= 89 then
Ada.Text_IO.Put (",");
end if;
end loop;
Ada.Text_IO.Put_Line (");");
Ada.Text_IO.Put_Line ("end Cosin_Table;");
end Cosin;
|
sungyeon/drake | Ada | 2,819 | adb | package body Ada.Streams.Overlaps_Storage_IO is
use type System.Storage_Elements.Storage_Offset;
function Create (
Address : System.Address;
Size : System.Storage_Elements.Storage_Count)
return Overlay is
begin
return (Address, Size, 1);
end Create;
procedure Reset (Object : in out Overlay) is
begin
Object.Index := 1;
end Reset;
function Stream (Object : Overlay)
return not null access Root_Stream_Type'Class is
begin
return Object'Unrestricted_Access;
end Stream;
overriding procedure Read (
Object : in out Overlay;
Item : out Stream_Element_Array;
Last : out Stream_Element_Offset)
is
Rest : constant System.Storage_Elements.Storage_Count :=
Object.Size - Object.Index + 1;
Size : System.Storage_Elements.Storage_Count := Item'Length;
begin
if Size > Rest then
Size := Rest;
if Size = 0 and then Item'First = Stream_Element_Offset'First then
raise Constraint_Error; -- AARM 13.13.1(11/2)
end if;
end if;
Last := Item'First + (Stream_Element_Offset (Size) - 1);
declare
Source : Stream_Element_Array (1 .. Stream_Element_Offset (Size));
for Source'Address use Object.Address + Object.Index - 1;
begin
Item (Item'First .. Last) := Source;
end;
Object.Index := Object.Index + Size;
end Read;
overriding procedure Write (
Object : in out Overlay;
Item : Stream_Element_Array)
is
Size : constant System.Storage_Elements.Storage_Count := Item'Length;
Next_Index : constant System.Storage_Elements.Storage_Offset :=
Object.Index + Size;
begin
if Next_Index > Object.Size + 1 then
raise Storage_Error;
end if;
declare
Target : Stream_Element_Array (1 .. Stream_Element_Offset (Size));
for Target'Address use Object.Address + Object.Index - 1;
begin
Target := Item;
end;
Object.Index := Next_Index;
end Write;
overriding procedure Set_Index (
Object : in out Overlay;
To : Stream_Element_Positive_Count)
is
To_Index : constant System.Storage_Elements.Storage_Offset :=
System.Storage_Elements.Storage_Offset (To);
begin
if To_Index not in 1 .. Object.Size + 1 then
raise Constraint_Error;
end if;
Object.Index := To_Index;
end Set_Index;
overriding function Index (Object : Overlay)
return Stream_Element_Positive_Count is
begin
return Stream_Element_Offset (Object.Index);
end Index;
overriding function Size (Object : Overlay)
return Stream_Element_Count is
begin
return Stream_Element_Offset (Object.Size);
end Size;
end Ada.Streams.Overlaps_Storage_IO;
|
reznikmm/matreshka | Ada | 5,807 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.CMOF.Constraints.Collections;
with AMF.CMOF.Element_Imports.Collections;
with AMF.CMOF.Named_Elements.Collections;
with AMF.CMOF.Namespaces;
with AMF.CMOF.Package_Imports.Collections;
with AMF.CMOF.Packageable_Elements.Collections;
with AMF.Internals.CMOF_Named_Elements;
generic
type Named_Element_Proxy is
abstract new AMF.Internals.CMOF_Named_Elements.CMOF_Named_Element_Proxy
with private;
package AMF.Internals.CMOF_Namespaces is
type CMOF_Namespace_Proxy is
abstract limited new Named_Element_Proxy
and AMF.CMOF.Namespaces.CMOF_Namespace with null record;
overriding function Get_Element_Import
(Self : not null access constant CMOF_Namespace_Proxy)
return AMF.CMOF.Element_Imports.Collections.Set_Of_CMOF_Element_Import;
-- Getter of Namespace::elementImport.
--
-- References the ElementImports owned by the Namespace.
overriding function Get_Imported_Member
(Self : not null access constant CMOF_Namespace_Proxy)
return AMF.CMOF.Packageable_Elements.Collections.Set_Of_CMOF_Packageable_Element;
-- Getter of Namespace::importedMember.
--
-- References the PackageableElements that are members of this Namespace
-- as a result of either PackageImports or ElementImports.
overriding function Get_Member
(Self : not null access constant CMOF_Namespace_Proxy)
return AMF.CMOF.Named_Elements.Collections.Set_Of_CMOF_Named_Element;
-- Getter of Namespace::member.
--
-- A collection of NamedElements identifiable within the Namespace, either
-- by being owned or by being introduced by importing or inheritance.
overriding function Get_Owned_Member
(Self : not null access constant CMOF_Namespace_Proxy)
return AMF.CMOF.Named_Elements.Collections.Set_Of_CMOF_Named_Element;
-- Getter of Namespace::ownedMember.
--
-- A collection of NamedElements owned by the Namespace.
overriding function Get_Owned_Rule
(Self : not null access constant CMOF_Namespace_Proxy)
return AMF.CMOF.Constraints.Collections.Set_Of_CMOF_Constraint;
-- Getter of Namespace::ownedRule.
overriding function Get_Package_Import
(Self : not null access constant CMOF_Namespace_Proxy)
return AMF.CMOF.Package_Imports.Collections.Set_Of_CMOF_Package_Import;
-- Getter of Namespace::packageImport.
--
-- References the PackageImports owned by the Namespace.
end AMF.Internals.CMOF_Namespaces;
|
reznikmm/matreshka | Ada | 3,679 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Svg_Bbox_Attributes is
pragma Preelaborate;
type ODF_Svg_Bbox_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Svg_Bbox_Attribute_Access is
access all ODF_Svg_Bbox_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Svg_Bbox_Attributes;
|
reznikmm/matreshka | Ada | 5,824 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A destroy object action is an action that destroys objects.
------------------------------------------------------------------------------
with AMF.UML.Actions;
limited with AMF.UML.Input_Pins;
package AMF.UML.Destroy_Object_Actions is
pragma Preelaborate;
type UML_Destroy_Object_Action is limited interface
and AMF.UML.Actions.UML_Action;
type UML_Destroy_Object_Action_Access is
access all UML_Destroy_Object_Action'Class;
for UML_Destroy_Object_Action_Access'Storage_Size use 0;
not overriding function Get_Is_Destroy_Links
(Self : not null access constant UML_Destroy_Object_Action)
return Boolean is abstract;
-- Getter of DestroyObjectAction::isDestroyLinks.
--
-- Specifies whether links in which the object participates are destroyed
-- along with the object.
not overriding procedure Set_Is_Destroy_Links
(Self : not null access UML_Destroy_Object_Action;
To : Boolean) is abstract;
-- Setter of DestroyObjectAction::isDestroyLinks.
--
-- Specifies whether links in which the object participates are destroyed
-- along with the object.
not overriding function Get_Is_Destroy_Owned_Objects
(Self : not null access constant UML_Destroy_Object_Action)
return Boolean is abstract;
-- Getter of DestroyObjectAction::isDestroyOwnedObjects.
--
-- Specifies whether objects owned by the object are destroyed along with
-- the object.
not overriding procedure Set_Is_Destroy_Owned_Objects
(Self : not null access UML_Destroy_Object_Action;
To : Boolean) is abstract;
-- Setter of DestroyObjectAction::isDestroyOwnedObjects.
--
-- Specifies whether objects owned by the object are destroyed along with
-- the object.
not overriding function Get_Target
(Self : not null access constant UML_Destroy_Object_Action)
return AMF.UML.Input_Pins.UML_Input_Pin_Access is abstract;
-- Getter of DestroyObjectAction::target.
--
-- The input pin providing the object to be destroyed.
not overriding procedure Set_Target
(Self : not null access UML_Destroy_Object_Action;
To : AMF.UML.Input_Pins.UML_Input_Pin_Access) is abstract;
-- Setter of DestroyObjectAction::target.
--
-- The input pin providing the object to be destroyed.
end AMF.UML.Destroy_Object_Actions;
|
shintakezou/drake | Ada | 996 | adb | with Ada.Containers.Murmur_Hash_3;
function Ada.Strings.Generic_Hash (Key : String_Type)
return Containers.Hash_Type
is
State : Containers.Murmur_Hash_3.State :=
Containers.Murmur_Hash_3.Initialize (0);
Count : Containers.Count_Type := 0;
Result : Containers.Hash_Type;
Last : Natural := Key'First - 1;
begin
while Last < Key'Last loop
declare
Code : Wide_Wide_Character;
Is_Illegal_Sequence : Boolean; -- ignore
begin
-- get single unicode character
Get (
Key (Last + 1 .. Key'Last),
Last,
Code,
Is_Illegal_Sequence);
Count := Count + 1;
-- update
Containers.Murmur_Hash_3.Update (
State,
Containers.Hash_Type'(Wide_Wide_Character'Pos (Code)));
end;
end loop;
Containers.Murmur_Hash_3.Update (State, Count);
Containers.Murmur_Hash_3.Finalize (State, Result);
return Result;
end Ada.Strings.Generic_Hash;
|
optikos/oasis | Ada | 2,665 | ads | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Element_Vectors;
with Program.Elements.Clauses;
with Program.Elements.Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Simple_Expression_Ranges;
package Program.Elements.Component_Clauses is
pragma Pure (Program.Elements.Component_Clauses);
type Component_Clause is
limited interface and Program.Elements.Clauses.Clause;
type Component_Clause_Access is access all Component_Clause'Class
with Storage_Size => 0;
not overriding function Clause_Name
(Self : Component_Clause)
return not null Program.Elements.Identifiers.Identifier_Access
is abstract;
not overriding function Position
(Self : Component_Clause)
return not null Program.Elements.Expressions.Expression_Access
is abstract;
not overriding function Clause_Range
(Self : Component_Clause)
return not null Program.Elements.Simple_Expression_Ranges
.Simple_Expression_Range_Access is abstract;
type Component_Clause_Text is limited interface;
type Component_Clause_Text_Access is access all Component_Clause_Text'Class
with Storage_Size => 0;
not overriding function To_Component_Clause_Text
(Self : aliased in out Component_Clause)
return Component_Clause_Text_Access is abstract;
not overriding function At_Token
(Self : Component_Clause_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Range_Token
(Self : Component_Clause_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Semicolon_Token
(Self : Component_Clause_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
type Component_Clause_Vector is
limited interface and Program.Element_Vectors.Element_Vector;
type Component_Clause_Vector_Access is
access all Component_Clause_Vector'Class with Storage_Size => 0;
overriding function Element
(Self : Component_Clause_Vector;
Index : Positive)
return not null Program.Elements.Element_Access is abstract
with Post'Class => Element'Result.Is_Component_Clause;
function To_Component_Clause
(Self : Component_Clause_Vector'Class;
Index : Positive)
return not null Component_Clause_Access
is (Self.Element (Index).To_Component_Clause);
end Program.Elements.Component_Clauses;
|
KLOC-Karsten/ada_projects | Ada | 4,775 | adb | -- Copyright (c) 2021, Karsten Lueth ([email protected])
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- 1. Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- 2. Redistributions in binary form must reproduce the above copyright notice,
-- this list of conditions and the following disclaimer in the documentation
-- and/or other materials provided with the distribution.
--
-- 3. Neither the name of the copyright holder nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-- WHETHER IN CONTRACT, STRICT LIABILITY,
-- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-- USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
--
-- Initial contribution by:
-- AdaCore
-- Ada Drivers Library (https://github.com/AdaCore/Ada_Drivers_Library)
-- Package: MMA8653
with Ada.Unchecked_Conversion;
package body BMX055 is
function Read_Register (This : BMX055_Accelerometer'Class;
Addr : Register_Addresss) return UInt8;
procedure Write_Register (This : BMX055_Accelerometer'Class;
Addr : Register_Addresss;
Val : UInt8);
-------------------
-- Read_Register --
-------------------
function Read_Register (This : BMX055_Accelerometer'Class;
Addr : Register_Addresss) return UInt8
is
Data : I2C_Data (1 .. 1);
Status : I2C_Status;
begin
This.Port.Mem_Read (Addr => Device_Address,
Mem_Addr => UInt16 (Addr),
Mem_Addr_Size => Memory_Size_8b,
Data => Data,
Status => Status);
if Status /= Ok then
-- No error handling...
raise Program_Error;
end if;
return Data (Data'First);
end Read_Register;
--------------------
-- Write_Register --
--------------------
procedure Write_Register (This : BMX055_Accelerometer'Class;
Addr : Register_Addresss;
Val : UInt8)
is
Status : I2C_Status;
begin
This.Port.Mem_Write (Addr => Device_Address,
Mem_Addr => UInt16 (Addr),
Mem_Addr_Size => Memory_Size_8b,
Data => (1 => Val),
Status => Status);
if Status /= Ok then
-- No error handling...
raise Program_Error;
end if;
end Write_Register;
-------------
-- Reset --
-------------
procedure Soft_Reset (This : BMX055_Accelerometer) is
begin
Write_Register(This, BGW_SOFTRESET, 16#B6#);
end Soft_Reset;
-----------------------
-- Check_Device_Id --
-----------------------
function Check_Device_Id (This : BMX055_Accelerometer) return Boolean is
Data : I2C_Data (1 .. 1);
Status : I2C_Status;
begin
This.Port.Mem_Read (Addr => Device_Address,
Mem_Addr => UInt16 (Who_Am_I),
Mem_Addr_Size => Memory_Size_8b,
Data => Data,
Status => Status);
if Status = Ok then
return Data (1) = Device_Id;
else
return False;
end if;
end Check_Device_Id;
------------------------
-- Read_Temperature --
------------------------
function To_Temperature is new Ada.Unchecked_Conversion (UInt8, Integer_8);
function Read_Temperature
(This : BMX055_Accelerometer) return Temp_Celsius is
Data : UInt8;
begin
Data := Read_Register (This, ACCD_TEMP);
return 23 + (To_Temperature (Data) / 2);
end Read_Temperature;
end BMX055;
|
reznikmm/matreshka | Ada | 6,797 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.UML.Classes;
with AMF.Visitors.Standard_Profile_L2_Iterators;
with AMF.Visitors.Standard_Profile_L2_Visitors;
package body AMF.Internals.Standard_Profile_L2_Utilities is
--------------------
-- Get_Base_Class --
--------------------
overriding function Get_Base_Class
(Self : not null access constant Standard_Profile_L2_Utility_Proxy)
return AMF.UML.Classes.UML_Class_Access is
begin
return
AMF.UML.Classes.UML_Class_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Base_Class
(Self.Element)));
end Get_Base_Class;
--------------------
-- Set_Base_Class --
--------------------
overriding procedure Set_Base_Class
(Self : not null access Standard_Profile_L2_Utility_Proxy;
To : AMF.UML.Classes.UML_Class_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Base_Class
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Base_Class;
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant Standard_Profile_L2_Utility_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.Standard_Profile_L2_Visitors.Standard_Profile_L2_Visitor'Class then
AMF.Visitors.Standard_Profile_L2_Visitors.Standard_Profile_L2_Visitor'Class
(Visitor).Enter_Utility
(AMF.Standard_Profile_L2.Utilities.Standard_Profile_L2_Utility_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant Standard_Profile_L2_Utility_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.Standard_Profile_L2_Visitors.Standard_Profile_L2_Visitor'Class then
AMF.Visitors.Standard_Profile_L2_Visitors.Standard_Profile_L2_Visitor'Class
(Visitor).Leave_Utility
(AMF.Standard_Profile_L2.Utilities.Standard_Profile_L2_Utility_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant Standard_Profile_L2_Utility_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.Standard_Profile_L2_Iterators.Standard_Profile_L2_Iterator'Class then
AMF.Visitors.Standard_Profile_L2_Iterators.Standard_Profile_L2_Iterator'Class
(Iterator).Visit_Utility
(Visitor,
AMF.Standard_Profile_L2.Utilities.Standard_Profile_L2_Utility_Access (Self),
Control);
end if;
end Visit_Element;
end AMF.Internals.Standard_Profile_L2_Utilities;
|
zhmu/ananas | Ada | 414 | adb | -- { dg-do compile }
package body Sync_Iface_Test is
protected body Buffer is
procedure Dummy is begin null; end;
end;
function First (Obj : Buffer) return Natural is
begin
return 0;
end;
procedure Do_Test (Dummy : Natural; Item : Buffer)
is
Position1 : Natural := First (Item);
Position2 : Natural := Item.First; -- Problem here
begin
null;
end;
end;
|
reznikmm/matreshka | Ada | 5,196 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Function_Behaviors.Collections is
pragma Preelaborate;
package UML_Function_Behavior_Collections is
new AMF.Generic_Collections
(UML_Function_Behavior,
UML_Function_Behavior_Access);
type Set_Of_UML_Function_Behavior is
new UML_Function_Behavior_Collections.Set with null record;
Empty_Set_Of_UML_Function_Behavior : constant Set_Of_UML_Function_Behavior;
type Ordered_Set_Of_UML_Function_Behavior is
new UML_Function_Behavior_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Function_Behavior : constant Ordered_Set_Of_UML_Function_Behavior;
type Bag_Of_UML_Function_Behavior is
new UML_Function_Behavior_Collections.Bag with null record;
Empty_Bag_Of_UML_Function_Behavior : constant Bag_Of_UML_Function_Behavior;
type Sequence_Of_UML_Function_Behavior is
new UML_Function_Behavior_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Function_Behavior : constant Sequence_Of_UML_Function_Behavior;
private
Empty_Set_Of_UML_Function_Behavior : constant Set_Of_UML_Function_Behavior
:= (UML_Function_Behavior_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Function_Behavior : constant Ordered_Set_Of_UML_Function_Behavior
:= (UML_Function_Behavior_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Function_Behavior : constant Bag_Of_UML_Function_Behavior
:= (UML_Function_Behavior_Collections.Bag with null record);
Empty_Sequence_Of_UML_Function_Behavior : constant Sequence_Of_UML_Function_Behavior
:= (UML_Function_Behavior_Collections.Sequence with null record);
end AMF.UML.Function_Behaviors.Collections;
|
reznikmm/matreshka | Ada | 26,378 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UMLDI_Iterators;
with AMF.Visitors.UMLDI_Visitors;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body AMF.Internals.UMLDI_UML_Profile_Diagrams is
-----------------
-- Get_Heading --
-----------------
overriding function Get_Heading
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access is
begin
return
AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Heading
(Self.Element)));
end Get_Heading;
-----------------
-- Set_Heading --
-----------------
overriding procedure Set_Heading
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.UMLDI.UML_Labels.UMLDI_UML_Label_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Heading
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Heading;
------------------
-- Get_Is_Frame --
------------------
overriding function Get_Is_Frame
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Frame
(Self.Element);
end Get_Is_Frame;
------------------
-- Set_Is_Frame --
------------------
overriding procedure Set_Is_Frame
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : Boolean) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Frame
(Self.Element, To);
end Set_Is_Frame;
----------------
-- Get_Is_Iso --
----------------
overriding function Get_Is_Iso
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Iso
(Self.Element);
end Get_Is_Iso;
----------------
-- Set_Is_Iso --
----------------
overriding procedure Set_Is_Iso
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : Boolean) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Iso
(Self.Element, To);
end Set_Is_Iso;
-----------------
-- Get_Is_Icon --
-----------------
overriding function Get_Is_Icon
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Icon
(Self.Element);
end Get_Is_Icon;
-----------------
-- Set_Is_Icon --
-----------------
overriding procedure Set_Is_Icon
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : Boolean) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Icon
(Self.Element, To);
end Set_Is_Icon;
---------------------
-- Get_Local_Style --
---------------------
overriding function Get_Local_Style
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access is
begin
return
AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style
(Self.Element)));
end Get_Local_Style;
---------------------
-- Set_Local_Style --
---------------------
overriding procedure Set_Local_Style
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.UMLDI.UML_Styles.UMLDI_UML_Style_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Local_Style;
-----------------------
-- Get_Model_Element --
-----------------------
overriding function Get_Model_Element
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element is
begin
raise Program_Error;
return X : AMF.UML.Elements.Collections.Set_Of_UML_Element;
-- return
-- AMF.UML.Elements.Collections.Wrap
-- (AMF.Internals.Element_Collections.Wrap
-- (AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element
-- (Self.Element)));
end Get_Model_Element;
-----------------------
-- Get_Model_Element --
-----------------------
overriding function Get_Model_Element
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.CMOF.Elements.CMOF_Element_Access is
begin
return
AMF.CMOF.Elements.CMOF_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Model_Element
(Self.Element)));
end Get_Model_Element;
---------------------
-- Get_Local_Style --
---------------------
overriding function Get_Local_Style
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.DI.Styles.DI_Style_Access is
begin
return
AMF.DI.Styles.DI_Style_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Style
(Self.Element)));
end Get_Local_Style;
---------------------
-- Set_Local_Style --
---------------------
overriding procedure Set_Local_Style
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.DI.Styles.DI_Style_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Local_Style
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Local_Style;
--------------
-- Get_Name --
--------------
overriding function Get_Name
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return League.Strings.Universal_String is
begin
null;
return
League.Strings.Internals.Create
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Name (Self.Element));
end Get_Name;
--------------
-- Set_Name --
--------------
overriding procedure Set_Name
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : League.Strings.Universal_String) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name
(Self.Element,
League.Strings.Internals.Internal (To));
end Set_Name;
-----------------------
-- Get_Documentation --
-----------------------
overriding function Get_Documentation
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return League.Strings.Universal_String is
begin
null;
return
League.Strings.Internals.Create
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Documentation (Self.Element));
end Get_Documentation;
-----------------------
-- Set_Documentation --
-----------------------
overriding procedure Set_Documentation
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : League.Strings.Universal_String) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Documentation
(Self.Element,
League.Strings.Internals.Internal (To));
end Set_Documentation;
--------------------
-- Get_Resolution --
--------------------
overriding function Get_Resolution
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.Real is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Resolution
(Self.Element);
end Get_Resolution;
--------------------
-- Set_Resolution --
--------------------
overriding procedure Set_Resolution
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.Real) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Resolution
(Self.Element, To);
end Set_Resolution;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
begin
return
AMF.UML.Dependencies.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
(Self.Element)));
end Get_Client_Dependency;
--------------
-- Get_Name --
--------------
overriding function Get_Name
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.Optional_String is
begin
declare
use type Matreshka.Internals.Strings.Shared_String_Access;
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= AMF.Internals.Tables.UML_Attributes.Internal_Get_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end;
end Get_Name;
--------------
-- Set_Name --
--------------
overriding procedure Set_Name
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.Optional_String) is
begin
if To.Is_Empty then
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name
(Self.Element, null);
else
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name
(Self.Element,
League.Strings.Internals.Internal (To.Value));
end if;
end Set_Name;
-------------------------
-- Get_Name_Expression --
-------------------------
overriding function Get_Name_Expression
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access is
begin
return
AMF.UML.String_Expressions.UML_String_Expression_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
(Self.Element)));
end Get_Name_Expression;
-------------------------
-- Set_Name_Expression --
-------------------------
overriding procedure Set_Name_Expression
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Name_Expression;
-------------------
-- Get_Namespace --
-------------------
overriding function Get_Namespace
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
return
AMF.UML.Namespaces.UML_Namespace_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
(Self.Element)));
end Get_Namespace;
------------------------
-- Get_Qualified_Name --
------------------------
overriding function Get_Qualified_Name
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.Optional_String is
begin
declare
use type Matreshka.Internals.Strings.Shared_String_Access;
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end;
end Get_Qualified_Name;
-----------------------
-- Get_Owned_Comment --
-----------------------
overriding function Get_Owned_Comment
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Comments.Collections.Set_Of_UML_Comment is
begin
return
AMF.UML.Comments.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Comment
(Self.Element)));
end Get_Owned_Comment;
-----------------------
-- Get_Owned_Element --
-----------------------
overriding function Get_Owned_Element
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element is
begin
return
AMF.UML.Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owned_Element
(Self.Element)));
end Get_Owned_Element;
---------------
-- Get_Owner --
---------------
overriding function Get_Owner
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Elements.UML_Element_Access is
begin
return
AMF.UML.Elements.UML_Element_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owner
(Self.Element)));
end Get_Owner;
-----------------------------------
-- Get_Owning_Template_Parameter --
-----------------------------------
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
begin
return
AMF.UML.Template_Parameters.UML_Template_Parameter_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter
(Self.Element)));
end Get_Owning_Template_Parameter;
-----------------------------------
-- Set_Owning_Template_Parameter --
-----------------------------------
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Owning_Template_Parameter;
----------------------------
-- Get_Template_Parameter --
----------------------------
overriding function Get_Template_Parameter
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
begin
return
AMF.UML.Template_Parameters.UML_Template_Parameter_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
(Self.Element)));
end Get_Template_Parameter;
----------------------------
-- Set_Template_Parameter --
----------------------------
overriding procedure Set_Template_Parameter
(Self : not null access UMLDI_UML_Profile_Diagram_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Template_Parameter;
--------------------
-- All_Namespaces --
--------------------
overriding function All_Namespaces
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Namespaces.Collections.Ordered_Set_Of_UML_Namespace is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Namespaces unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.All_Namespaces";
return All_Namespaces (Self);
end All_Namespaces;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.All_Owning_Packages";
return All_Owning_Packages (Self);
end All_Owning_Packages;
-----------------------------
-- Is_Distinguishable_From --
-----------------------------
overriding function Is_Distinguishable_From
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.Is_Distinguishable_From";
return Is_Distinguishable_From (Self, N, Ns);
end Is_Distinguishable_From;
---------------
-- Namespace --
---------------
overriding function Namespace
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.Namespace";
return Namespace (Self);
end Namespace;
--------------------
-- Qualified_Name --
--------------------
overriding function Qualified_Name
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return League.Strings.Universal_String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Qualified_Name unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.Qualified_Name";
return Qualified_Name (Self);
end Qualified_Name;
---------------
-- Separator --
---------------
overriding function Separator
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return League.Strings.Universal_String is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Separator unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.Separator";
return Separator (Self);
end Separator;
------------------------
-- All_Owned_Elements --
------------------------
overriding function All_Owned_Elements
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return AMF.UML.Elements.Collections.Set_Of_UML_Element is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owned_Elements unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.All_Owned_Elements";
return All_Owned_Elements (Self);
end All_Owned_Elements;
------------------------
-- Is_Compatible_With --
------------------------
overriding function Is_Compatible_With
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.Is_Compatible_With";
return Is_Compatible_With (Self, P);
end Is_Compatible_With;
---------------------------
-- Is_Template_Parameter --
---------------------------
overriding function Is_Template_Parameter
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented");
raise Program_Error with "Unimplemented procedure UMLDI_UML_Profile_Diagram_Proxy.Is_Template_Parameter";
return Is_Template_Parameter (Self);
end Is_Template_Parameter;
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then
AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class
(Visitor).Enter_UML_Profile_Diagram
(AMF.UMLDI.UML_Profile_Diagrams.UMLDI_UML_Profile_Diagram_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class then
AMF.Visitors.UMLDI_Visitors.UMLDI_Visitor'Class
(Visitor).Leave_UML_Profile_Diagram
(AMF.UMLDI.UML_Profile_Diagrams.UMLDI_UML_Profile_Diagram_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UMLDI_UML_Profile_Diagram_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class then
AMF.Visitors.UMLDI_Iterators.UMLDI_Iterator'Class
(Iterator).Visit_UML_Profile_Diagram
(Visitor,
AMF.UMLDI.UML_Profile_Diagrams.UMLDI_UML_Profile_Diagram_Access (Self),
Control);
end if;
end Visit_Element;
end AMF.Internals.UMLDI_UML_Profile_Diagrams;
|
reznikmm/matreshka | Ada | 3,774 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Svg_Strikethrough_Thickness_Attributes is
pragma Preelaborate;
type ODF_Svg_Strikethrough_Thickness_Attribute is limited interface
and XML.DOM.Attributes.DOM_Attribute;
type ODF_Svg_Strikethrough_Thickness_Attribute_Access is
access all ODF_Svg_Strikethrough_Thickness_Attribute'Class
with Storage_Size => 0;
end ODF.DOM.Svg_Strikethrough_Thickness_Attributes;
|
persan/A-gst | Ada | 5,929 | ads | pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtsptransport_h;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h;
with glib;
with glib.Values;
with System;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
with glib;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspurl_h is
GST_RTSP_DEFAULT_PORT : constant := 554; -- gst/rtsp/gstrtspurl.h:59
-- unsupported macro: GST_TYPE_RTSP_URL (gst_rtsp_url_get_type())
-- GStreamer
-- * Copyright (C) <2005,2006> Wim Taymans <[email protected]>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
-- * Unless otherwise indicated, Source Code is licensed under MIT license.
-- * See further explanation attached in License Statement (distributed in the file
-- * LICENSE).
-- *
-- * 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.
--
--*
-- * GST_RTSP_DEFAULT_PORT:
-- *
-- * The default RTSP port to connect to.
--
type GstRTSPUrl;
--subtype GstRTSPUrl is u_GstRTSPUrl; -- gst/rtsp/gstrtspurl.h:63
--*
-- * GstRTSPUrl:
-- * @transports: the transports allowed
-- * @family: the family
-- * @user: the user
-- * @passwd: the password
-- * @host: the host
-- * @port: the port
-- * @abspath: the absolute path
-- * @query: additional query parameters
-- *
-- * This structure contains the result of a parsed RTSP URL
--
type GstRTSPUrl is record
transports : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtsptransport_h.GstRTSPLowerTrans; -- gst/rtsp/gstrtspurl.h:79
family : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPFamily; -- gst/rtsp/gstrtspurl.h:80
user : access GLIB.gchar; -- gst/rtsp/gstrtspurl.h:81
passwd : access GLIB.gchar; -- gst/rtsp/gstrtspurl.h:82
host : access GLIB.gchar; -- gst/rtsp/gstrtspurl.h:83
port : aliased GLIB.guint16; -- gst/rtsp/gstrtspurl.h:84
abspath : access GLIB.gchar; -- gst/rtsp/gstrtspurl.h:85
query : access GLIB.gchar; -- gst/rtsp/gstrtspurl.h:86
end record;
pragma Convention (C_Pass_By_Copy, GstRTSPUrl); -- gst/rtsp/gstrtspurl.h:78
function gst_rtsp_url_get_type return GLIB.GType; -- gst/rtsp/gstrtspurl.h:89
pragma Import (C, gst_rtsp_url_get_type, "gst_rtsp_url_get_type");
function gst_rtsp_url_parse (urlstr : access GLIB.gchar; url : System.Address) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspurl.h:91
pragma Import (C, gst_rtsp_url_parse, "gst_rtsp_url_parse");
function gst_rtsp_url_copy (url : access constant GstRTSPUrl) return access GstRTSPUrl; -- gst/rtsp/gstrtspurl.h:92
pragma Import (C, gst_rtsp_url_copy, "gst_rtsp_url_copy");
procedure gst_rtsp_url_free (url : access GstRTSPUrl); -- gst/rtsp/gstrtspurl.h:93
pragma Import (C, gst_rtsp_url_free, "gst_rtsp_url_free");
function gst_rtsp_url_get_request_uri (url : access constant GstRTSPUrl) return access GLIB.gchar; -- gst/rtsp/gstrtspurl.h:94
pragma Import (C, gst_rtsp_url_get_request_uri, "gst_rtsp_url_get_request_uri");
function gst_rtsp_url_decode_path_components (url : access constant GstRTSPUrl) return System.Address; -- gst/rtsp/gstrtspurl.h:95
pragma Import (C, gst_rtsp_url_decode_path_components, "gst_rtsp_url_decode_path_components");
function gst_rtsp_url_set_port (url : access GstRTSPUrl; port : GLIB.guint16) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspurl.h:98
pragma Import (C, gst_rtsp_url_set_port, "gst_rtsp_url_set_port");
function gst_rtsp_url_get_port (url : access constant GstRTSPUrl; port : access GLIB.guint16) return GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspdefs_h.GstRTSPResult; -- gst/rtsp/gstrtspurl.h:99
pragma Import (C, gst_rtsp_url_get_port, "gst_rtsp_url_get_port");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_rtsp_gstrtspurl_h;
|
reznikmm/matreshka | Ada | 10,605 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.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_Gates is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Gate_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_Gate
(AMF.UML.Gates.UML_Gate_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Gate_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_Gate
(AMF.UML.Gates.UML_Gate_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Gate_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_Gate
(Visitor,
AMF.UML.Gates.UML_Gate_Access (Self),
Control);
end if;
end Visit_Element;
-----------------
-- Get_Message --
-----------------
overriding function Get_Message
(Self : not null access constant UML_Gate_Proxy)
return AMF.UML.Messages.UML_Message_Access is
begin
return
AMF.UML.Messages.UML_Message_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Message
(Self.Element)));
end Get_Message;
-----------------
-- Set_Message --
-----------------
overriding procedure Set_Message
(Self : not null access UML_Gate_Proxy;
To : AMF.UML.Messages.UML_Message_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Message
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Message;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UML_Gate_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_Gate_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_Gate_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_Gate_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_Gate_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;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UML_Gate_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_Gate_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_Gate_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_Gate_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_Gate_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_Gate_Proxy.Namespace";
return Namespace (Self);
end Namespace;
end AMF.Internals.UML_Gates;
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.