Specification of package Tgx.Posix







 ========================================================================= --
 ===                                                                   === --
 ===                 Top Graph'X CORBA Implementation                  === --
 ===                                                                   === --
 ===                 Copyright (c) 1996, Top Graph'X.                  === --
 ===                                                                   === --
 ===                     --- Copyright Notice ---                      === --
 ===                                                                   === --
 ===    This software is protected as an unpublished work under the    === --
 ===     Copyright Act of 1976.  All rights reserved.  Top Graph'X.    === --
 ===                                                                   === --
 ========================================================================= --

with Tgx.Posix_Types;
with Tgx.Lists;
with Ada.Strings.Unbounded;
package Tgx.Posix is

    *************
    Character set
    *************

   subtype Posix_Character is Character ;

    *******
    Strings
    *******

    Do we really need actual POSIX_String ?
    type POSIX_String is array  (Positive range <>) of POSIX_Character;
   type Posix_String is new String;

   function To_Posix_String (Str : in String) return Posix_String;
   function To_String (Str : in POSIX_String) return String;

   subtype Filename is Posix_String;

   function Is_Filename  (Str : in Posix_String) return Boolean;
   function Is_Pathname  (Str : in Posix_String) return Boolean;

   subtype Pathname is Posix_String;

    ************
    String Lists
    ************

    type POSIX_String_List is limited private; -- Standard Posix
   type POSIX_String_List is private;

   Empty_String_List: constant Posix_String_List;

   procedure Make_Empty  (List : in out Posix_String_List);

   procedure Append  (List : in out Posix_String_List;
                      Str  : in     Posix_String);

   generic
      with procedure Action (Item : in     Posix_String;
                             Quit : in out Boolean);
   procedure For_Every_Item  (List : in Posix_String_List);

   function Length  (List : in Posix_String_List) return Natural;

   function Value (List  : in Posix_String_List;
                   Index : in Positive) return Posix_String;

    **************
    Error handling
    **************

   POSIX_Error: exception;

private
   type String_Record is new Ada.Strings.Unbounded.Unbounded_String ;
   Null_String_Record : constant String_Record := String_Record
      (Ada.Strings.Unbounded.Null_Unbounded_String) ;
 
   function To_Record (Source : in String) return String_Record renames
      To_Unbounded_String ;
 
   package String_Lists is new Tgx.Lists.Editable_Lists
      (String_Record, Null_String_Record) ;
   subtype String_Array is String_Lists.Element_Array ;

   type Posix_String_List is new String_Lists.List ;
   Empty_String_List : constant Posix_String_List := Posix_String_List
      (String_Lists.Null_List) ;

end Tgx.Posix;



List of definition uses










This page was generated by PrismTech's ada2html on Friday Mai 12 2006 16:18