honki_tonks_zivilisationen_0.5.5305_cfbe2104/src/Logik/Einlesen/EinlesenAllgemeinesLogik.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
with Ada.Wide_Wide_Text_IO; use Ada.Wide_Wide_Text_IO;
with Ada.Directories; use Ada.Directories;
with Ada.Strings.Wide_Wide_Unbounded; use Ada.Strings.Wide_Wide_Unbounded;

with Sf.Graphics;

private with Sf;
private with Sf.Graphics.Texture;
private with Sf.System.Vector2;

with VerzeichnisKonstanten;

package EinlesenAllgemeinesLogik is
   pragma Elaborate_Body;

   function VorzeitigesDateienende
     (AktuelleDateiExtern : in File_Type;
      AktuelleZeileExtern : in Positive;
      DateinameExtern : in Wide_Wide_String)
      return Boolean
     with
       Pre => (
                 DateinameExtern'Length > 0
              );

   function TextEinlesen
     (DateiExtern : in File_Type;
      AktuelleZeileExtern : in Positive;
      DateinameExtern : in Wide_Wide_String)
      return Wide_Wide_String
     with
       Pre => (
                 DateinameExtern'Length > 0
              );

   function TextEinlesenUngebunden
     (DateiExtern : in File_Type;
      AktuelleZeileExtern : in Positive;
      DateinameExtern : in Wide_Wide_String)
      return Unbounded_Wide_Wide_String
     with
       Pre => (
                 DateinameExtern'Length > 0
              );

   function NamensprüfungWindows
     (NameExtern : in Wide_Wide_String)
      return Boolean
     with
       Pre => (
                 NameExtern'Length > 0
              );

   function LeeresVerzeichnis
     (VerzeichnisExtern : in String)
      return Boolean
     with
       Pre => (
                 VerzeichnisExtern'Length > VerzeichnisKonstanten.Sprachenordner'Length
              );

   function Texturenlimit
     (TexturenpfadExtern : in String)
      return Sf.Graphics.sfTexture_Ptr
     with
       Pre => (
                 TexturenpfadExtern'Length > 0
              );

   function VerboteneVerzeichnissnamen
     (NameExtern : in String)
      return Boolean
     with
       Pre => (
                 NameExtern'Length > 0
              );

private

   Prüfungssuche : Search_Type;

   Verzeichnisprüfung : Directory_Entry_Type;

   KleinsteOrdnergröße : constant File_Size := 0;

   MaximaleTexturengröße : constant Sf.sfUint32 := Sf.Graphics.Texture.getMaximumSize;

   Texturengröße : Sf.System.Vector2.sfVector2u;

end EinlesenAllgemeinesLogik;