PreviousUpNext

15.3.462  src/lib/std/src/io/base-io.api

## base-io.api

# Compiled by:
#     src/lib/std/src/standard-core.sublib

# Included by:
#     src/lib/std/src/io/winix-base-io.api

stipulate
    package wt  =  winix_types;                         # winix_types           is from   src/lib/std/src/posix/winix-types.pkg
herein

    api Base_Io {
        #
        Element;
        Vector;
        Vector_Slice;
        Rw_Vector;
        Rw_Vector_Slice;

        eqtype File_Position;

        compare:  (File_Position, File_Position) -> Order;

        Reader =    READER
                      { name:        String, 
                        chunk_size:  Int,

                        read_vector:                Null_Or( Int -> Vector ),
                        read_rw_vector:             Null_Or( Rw_Vector_Slice -> Int ),
                        read_vector_nonblocking:    Null_Or( Int -> Null_Or( Vector ) ),
                        read_rw_vector_nonblocking: Null_Or( Rw_Vector_Slice -> Null_Or( Int ) ),

                        block:            Null_Or( Void -> Void ),
                        can_read:         Null_Or( Void -> Bool ),
                        avail:            Void -> Null_Or( Int ),

                        get_position:     Null_Or( Void -> File_Position ),
                        set_position:     Null_Or( File_Position -> Void ),
                        end_position:     Null_Or( Void -> File_Position ),
                        verify_position:  Null_Or( Void -> File_Position ),

                        close:            Void -> Void,
                        io_descriptor:    Null_Or( wt::io::Io_Descriptor )
                      };

        Writer =    WRITER
                      { name:          String,
                        chunk_size:    Int,

                        write_vector:                 Null_Or( Vector_Slice    -> Int ),
                        write_rw_vector:              Null_Or( Rw_Vector_Slice -> Int ),
                        write_vector_nonblocking:     Null_Or( Vector_Slice    -> Null_Or( Int ) ),
                        write_rw_vector_nonblocking:  Null_Or( Rw_Vector_Slice -> Null_Or( Int ) ),

                        block:              Null_Or( Void -> Void ),
                        can_output:         Null_Or( Void -> Bool ),

                        get_position:       Null_Or( Void -> File_Position  ),
                        set_position:       Null_Or( File_Position  -> Void ),
                        end_position:       Null_Or( Void -> File_Position  ),
                        verify_position:    Null_Or( Void -> File_Position  ),

                        close:              Void -> Void,
                        io_descriptor:      Null_Or( wt::io::Io_Descriptor )
                      };

         open_vector:  Vector -> Reader;

         null_reader:  Void -> Reader;
         null_writer:  Void -> Writer;

         augment_reader:  Reader -> Reader;
         augment_writer:  Writer -> Writer;

    };
end;

## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2011,
## released under Gnu Public Licence version 3.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext