wl_lib_0.1.3_1c94dc7c/src/wl-random-names.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
private with Ada.Containers.Vectors;

package WL.Random.Names is

   type Name_Generator is private;

   procedure Load_Lexicon
     (Generator       :    out Name_Generator;
      Vowels_Path     : String;
      Consonants_Path : String);

   function Load_Lexicon
     (Vowels_Path     : String;
      Consonants_Path : String)
     return Name_Generator;

   function Random_Name
     (Generator : Name_Generator)
      return String;

private

   type Lexeme_Info is
      record
         Lexeme : String (1 .. 3) := (others => ' ');
         Can_Middle : Boolean := True;
         Can_Begin : Boolean := True;
         Can_End : Boolean := True;
      end record;

   package Lexeme_Info_Vectors is
     new Ada.Containers.Vectors (Positive, Lexeme_Info);

   type Name_Generator is
      record
         Vowels     : Lexeme_Info_Vectors.Vector;
         Consonants : Lexeme_Info_Vectors.Vector;
      end record;

end WL.Random.Names;