Preparations for new Enclosing_Entity idea

This commit is contained in:
Alejandro R Mosteo
2018-05-02 17:21:38 +02:00
parent 6e66038458
commit 24bd7701f2
2 changed files with 48 additions and 0 deletions
+25
View File
@@ -13,6 +13,27 @@ package body Alire.Index is
Master_Entries : Name_Entry_Maps.Map;
type Reflected_Info (Pack_Len, Id_Len : Positive) is record
Package_Name : String (1 .. Pack_Len);
Identifier : String (1 .. Id_Len);
end record;
--------------
-- Identify --
--------------
function Identify (Enclosing : String) return Reflected_Info is
use Utils;
Identifier : constant String := -- Portion after last dot
Split (Enclosing, '.', Side => Tail, From => Tail);
Full_Name : constant String := -- Portion after Alire.Index.
Split (Enclosing, '.', Side => Tail, From => Head, Count => 2);
Pack_Name : constant String := -- Portion between Alire.Index. and .Identifier
Split (Full_Name, '.', Side => Head, From => Tail);
begin
return (Pack_Name'Length, Identifier'Length, Pack_Name, Identifier);
end Identify;
------------------------
-- Catalogued_Project --
------------------------
@@ -200,6 +221,10 @@ package body Alire.Index is
(Project => Extension.Project));
end Register;
function Base_Release return Release is (raise Program_Error);
function Derived_Release return Release is (raise Program_Error);
------------
-- Bypass --
------------
+23
View File
@@ -106,6 +106,29 @@ package Alire.Index is
-- A extension name is parent:name (e.g.: adayaml:server)
-- It inherits all properties (including project files)
------------------------------------------------------------------
-- NEW INDEXING FACILITIES USING Enclosing_Entity for the version
generic
Origin : Origins.Origin;
-- we force naming beyond this point with this ugly guard:
XXXXXXXXXXXXXX : Utils.XXX_XXX := Utils.XXX_XXX_XXX;
-- Optional
Notes : Description_String := "";
Dependencies : Release_Dependencies := No_Dependencies;
Properties : Release_Properties := No_Properties;
Private_Properties : Release_Properties := No_Properties;
Available_When : Release_Requisites := No_Requisites;
function Base_Release return Release;
-- Fulfills the same role as the first Register form above
generic
Extended_Release : Release;
function Derived_Release return Release;
-- Fulfills the same role as the second Register form above
------------------------------------------------------------------
function Bypass (-- Mandatory
This : Catalog_Entry;
Version : Semantic_Versioning.Version;