--------------------------------
-- Ivan Levashew aka OCTAGRAM --
--              Barnaul, 2009 --
--------------------------------

with Interfaces; use Interfaces;
with Turbo_Private.Common; use Turbo_Private.Common;
with Ada.Finalization; use Ada.Finalization;
with System; use System;

package Turbo_Private.Strings is
   pragma Preelaborate;

   subtype Char_8 is Character;
--   subtype Char_16 is Wide_Character;
--   subtype Char_32 is Wide_Wide_Character;

   type N_String_8  is private; -- Native String
   type NC_String_8 is private; -- Native Constant String

--   type N_String_16  is private;
--   type NC_String_16 is private;

--   type N_String_32  is private;
--   type NC_String_32 is private;

   -- Linear Strings
   -- Strings longer than 2Gb? Use ropes, Luke
   type L_String_8  is array (Positive_32 range <>) of aliased Char_8;
--   type L_String_16 is array (Positive_32 range <>) of aliased Char_16;
--   type L_String_32 is array (Positive_32 range <>) of aliased Char_32;

   type String_8 is tagged private;
--   type String_16 is tagged private;
--   type String_32 is tagged private;

private

   type N_String_8  is access all Char_8;
   type NC_String_8 is access constant Char_8;

--   type N_String_16  is access all Char_16;
--   type NC_String_16 is access constant Char_16;

--   type N_String_32  is access all Char_32;
--   type NC_String_32 is access constant Char_32;
   
   type String_8  is new Controlled with record
      Item : Address := Null_Address;
   end record;

   overriding
   procedure Adjust (Object : in out String_8);
   overriding
   procedure Finalize (Object : in out String_8);

--   type String_16 is new Controlled with record
--      Item : Address := Null_Address;
--   end record;

--   overriding
--   procedure Adjust (Object : in out String_16);
--   overriding
--   procedure Finalize (Object : in out String_16);

--   type String_32 is new Controlled with record
--      Item : Address := Null_Address;
--   end record;

--   overriding
--   procedure Adjust (Object : in out String_32);
--   overriding
--   procedure Finalize (Object : in out String_32);

end Turbo_Private.Strings;
