lace.events: Optimise.
This commit is contained in:
@@ -33,6 +33,9 @@ is
|
||||
private
|
||||
use ada.Strings.unbounded;
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
package Observer is new lace.make_Observer (Any.limited_item);
|
||||
package Deferred is new Observer.deferred (Observer.item);
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ is
|
||||
private
|
||||
use ada.Strings.unbounded;
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
package Observer is new make_Observer (Any.limited_item);
|
||||
|
||||
type Item is limited new Observer.item with
|
||||
|
||||
@@ -36,6 +36,9 @@ private
|
||||
|
||||
use ada.Strings.unbounded;
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
package Subject is new make_Subject (Any.limited_item);
|
||||
|
||||
type Item is limited new Subject.item with
|
||||
|
||||
@@ -39,6 +39,9 @@ is
|
||||
private
|
||||
use ada.Strings.unbounded;
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
package Subject is new make_Subject (Any.limited_item);
|
||||
package Observer is new make_Observer (Subject .item);
|
||||
package Deferred is new Observer.deferred (Observer .item);
|
||||
|
||||
@@ -36,6 +36,9 @@ is
|
||||
private
|
||||
use ada.Strings.unbounded;
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
package Subject is new make_Subject (Any.limited_item);
|
||||
package Observer is new make_Observer (Subject .item);
|
||||
|
||||
|
||||
@@ -56,6 +56,10 @@ is
|
||||
|
||||
|
||||
private
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
----------------------
|
||||
-- Event response maps
|
||||
--
|
||||
|
||||
@@ -58,6 +58,9 @@ is
|
||||
|
||||
private
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
|
||||
-------------------------
|
||||
-- Event observer vectors
|
||||
--
|
||||
|
||||
@@ -40,6 +40,8 @@ is
|
||||
|
||||
private
|
||||
|
||||
pragma Suppress (Container_Checks); -- Suppress expensive tamper checks.
|
||||
|
||||
----------------
|
||||
-- Event Vectors
|
||||
--
|
||||
|
||||
@@ -11,7 +11,7 @@ is
|
||||
-- Files
|
||||
--
|
||||
|
||||
function to_String (Filename : in forge.Filename) return String
|
||||
function File_to_String (Filename : in forge.Filename) return String
|
||||
is
|
||||
use ada.Characters,
|
||||
ada.Directories;
|
||||
@@ -47,15 +47,15 @@ is
|
||||
end loop;
|
||||
|
||||
return Result (1 .. i);
|
||||
end to_String;
|
||||
end File_to_String;
|
||||
|
||||
|
||||
|
||||
function to_Text (Filename : in forge.Filename) return Item
|
||||
function File_to_Text (Filename : in forge.Filename) return Item
|
||||
is
|
||||
begin
|
||||
return to_Text (to_String (Filename));
|
||||
end to_Text;
|
||||
return to_Text (File_to_String (Filename));
|
||||
end File_to_Text;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ is
|
||||
|
||||
type Filename is new String;
|
||||
|
||||
function to_String (Filename : in forge.Filename) return String; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||
function to_Text (Filename : in forge.Filename) return Item; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||
function File_to_String (Filename : in forge.Filename) return String; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||
function File_to_Text (Filename : in forge.Filename) return Item; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||
|
||||
|
||||
procedure store (Filename : in forge.Filename; the_String : in String);
|
||||
|
||||
Reference in New Issue
Block a user