Differences From Artifact [13af223639]:
- File
src/natools-constant_indefinite_ordered_maps.adb
— part of check-in
[bfb15a00ff]
at
2015-08-26 17:27:29
on branch trunk
— constant_indefinite_ordered_maps: work around a regression in newer GNAT versions
For some reason GNAT 5.2 can't find Constant_Reference anymore, so creating new primitive functions so user-defined indexing still works. (user: nat size: 32105)
To Artifact [eec6797eda]:
- File src/natools-constant_indefinite_ordered_maps.adb — part of check-in [e76c115fef] at 2017-06-20 21:40:53 on branch trunk — constant_indefinite_ordered_maps: add a Rank cursor primitive (user: nat size: 32328)
1 | ------------------------------------------------------------------------------ | | | 1 2 3 4 5 6 7 8 9 | ------------------------------------------------------------------------------ -- Copyright (c) 2014-2017, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- |
| ︙ | ︙ | |||
330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
Accessor : constant Backend_Refs.Accessor := Position.Backend.Query;
begin
Process.all
(Accessor.Data.Nodes (Position.Index).Key.all,
Accessor.Data.Nodes (Position.Index).Element.all);
end Query_Element;
-----------------------------
-- Non-Standard Operations --
-----------------------------
function Create (Source : Unsafe_Maps.Map) return Constant_Map is
| > > > > > > > > > | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
Accessor : constant Backend_Refs.Accessor := Position.Backend.Query;
begin
Process.all
(Accessor.Data.Nodes (Position.Index).Key.all,
Accessor.Data.Nodes (Position.Index).Element.all);
end Query_Element;
function Rank (Position : Cursor) return Ada.Containers.Count_Type is
begin
case Position.Is_Empty is
when True => return 0;
when False => return Position.Index;
end case;
end Rank;
-----------------------------
-- Non-Standard Operations --
-----------------------------
function Create (Source : Unsafe_Maps.Map) return Constant_Map is
|
| ︙ | ︙ |