Changeset 2643
- Timestamp:
- 03/15/08 09:51:32 (10 months ago)
- Files:
-
- trunk/tendra/src/producers/ada/libgela/gela-repository-dictionary-file.adb (added)
- trunk/tendra/src/producers/ada/libgela/gela-repository-dictionary-file.ads (added)
- trunk/tendra/src/producers/ada/libgela/gela-repository-dictionary.adb (added)
- trunk/tendra/src/producers/ada/libgela/gela-repository-dictionary.ads (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tendra/src/producers/ada/libgela/gela-repository-dictionary.ads
r2640 r2643 16 16 type ID is private; 17 17 18 subtype Code_Point is Wide_Wide_Character range19 Wide_Wide_Character'Val (0) .. Wide_Wide_Character'Val (16#10FFFF#);18 -- subtype Code_Point is Wide_Wide_Character range 19 -- Wide_Wide_Character'Val (0) .. Wide_Wide_Character'Val (16#10FFFF#); 20 20 21 type Code_Point_Array is array (Positive range <>) of Code_Point;21 subtype Code_Point_Array is Wide_Wide_String; 22 22 23 23 type Gela_Dictionary is abstract 24 24 new Ada.Finalization.Limited_Controlled with private; 25 25 26 function Get_ID 26 procedure Get_ID 27 (This : in out Gela_Dictionary; 28 Value : in Code_Point_Array; 29 Result : out ID); 30 31 function Get_Name 27 32 (This : in Gela_Dictionary; 28 Value : in Code_Point_Array) 29 return ID is abstract; 33 Value : in ID) 34 return Code_Point_Array; 35 36 procedure Marck 37 (This : in Gela_Dictionary; 38 Value : in ID); 39 40 procedure Clear 41 (This : in out Gela_Dictionary); 42 43 function Count 44 (This : in Gela_Dictionary) 45 return Natural; 46 47 Use_Error : exception; 30 48 31 49 private … … 33 51 type ID is new Gela.Hash.CRC.b16.CRC16; 34 52 53 type Code_Point_Array_Access is 54 access all Code_Point_Array; 55 56 type ID_Point is record 57 Num : ID := 0; 58 Data : Code_Point_Array_Access := null; 59 Used : Boolean := False; 60 end record; 61 62 type ID_Point_Array is 63 array (Positive range <>) of ID_Point; 64 65 type ID_Point_Array_Access is 66 access all ID_Point_Array; 67 35 68 type Gela_Dictionary is abstract 36 new Ada.Finalization.Limited_Controlled with null record; 69 new Ada.Finalization.Limited_Controlled 70 with record 71 Data : ID_Point_Array_Access := null; 72 Changed : Boolean := False; 73 end record; 74 75 procedure Finalize 76 (This : in out Gela_Dictionary); 77 78 function Find 79 (This : in Gela_Dictionary; 80 Num : in ID) 81 return Natural; 82 83 procedure Insert 84 (This : in out Gela_Dictionary; 85 Index : in Positive; 86 Point : in ID_Point); 87 88 procedure Delete 89 (This : in out Gela_Dictionary; 90 Index : in Positive); 91 92 procedure Free_Unused 93 (This : in out Gela_Dictionary); 94 95 procedure Redirect_Save 96 (This : in out Gela_Dictionary'Class); 97 98 procedure Save 99 (This : in out Gela_Dictionary); -- is null; 37 100 38 101 end Gela.Repository.Dictionary;