// File: CORBA_Stream.idl
// CORBA 2.3, Chapter 5

#ifndef _CORBA_Stream_IDL_
#define _CORBA_Stream_IDL_

#include "CORBA_ORB.idl"

#pragma prefix "omg.org"

module CORBA 
{
    typedef sequence<any> AnySeq;
    typedef sequence<boolean> BooleanSeq;
    typedef sequence<char> CharSeq;
    typedef sequence<wchar> WCharSeq;
    typedef sequence<short> ShortSeq;
    typedef sequence<long> LongSeq;
    typedef sequence<unsigned long> ULongSeq;
    typedef sequence<long long> LongLongSeq;
    typedef sequence<unsigned long long> ULongLongSeq;
    typedef sequence<float> FloatSeq;
    typedef sequence<double> DoubleSeq;
    typedef sequence<string> StringSeq;
    typedef sequence<wstring> WStringSeq;

    abstract valuetype DataOutputStream 
    {
        void write_any ( in any value );
        
        void write_boolean ( in boolean value );
        
        void write_char ( in char value );
        
        void write_wchar ( in wchar value );
        
        void write_octet ( in octet value );
        
        void write_short ( in short value );
        
        void write_ushort ( in unsigned short value );
        
        void write_long ( in long value );
        
        void write_ulong ( in unsigned long value );
        
        void write_longlong ( in long long value );
        
        void write_ulonglong ( in unsigned long long value );
        
        void write_float ( in float value );
        
        void write_double ( in double value );
        
#ifndef __IDL_TO_JAVA__
        // long double is currently not available in the java mapping.
        void write_longdouble ( in long double value );
#endif

        void write_string ( in string value );
        
        void write_wstring ( in wstring value );
        
        void write_Object ( in Object value );
        
        void write_Abstract ( in AbstractBase value );
        
        void write_Value ( in ValueBase value );
        
        void write_TypeCode ( in TypeCode value );
        
        void write_any_array ( in AnySeq seq,
                               in unsigned long offset,
                               in unsigned long length );
                               
        void write_boolean_array ( in BooleanSeq seq,
                                   in unsigned long offset,
                                   in unsigned long length );
                                   
        void write_char_array ( in CharSeq seq,
                                in unsigned long offset,
                                in unsigned long length );
                                
        void write_wchar_array ( in WCharSeq seq,
                                 in unsigned long offset,
                                 in unsigned long length );
                                 
        void write_octet_array ( in OctetSeq seq,
                                 in unsigned long offset,
                                 in unsigned long length );
                                 
        void write_short_array ( in ShortSeq seq,
                                 in unsigned long offset,
                                 in unsigned long length );
                                 
        void write_ushort_array ( in UShortSeq seq,
                                  in unsigned long offset,
                                  in unsigned long length );
                                  
        void write_long_array ( in LongSeq seq,
                                in unsigned long offset,
                                in unsigned long length );
                                
        void write_ulong_array ( in ULongSeq seq,
                                 in unsigned long offset,
                                 in unsigned long length );
                                 
        void write_ulonglong_array ( in ULongLongSeq seq,
                                     in unsigned long offset,
                                     in unsigned long length );
                                     
        void write_longlong_array ( in LongLongSeq seq,
                                    in unsigned long offset,
                                    in unsigned long length );
                                    
        void write_float_array ( in FloatSeq seq,
                                 in unsigned long offset,
                                 in unsigned long length );
                                 
        void write_double_array ( in DoubleSeq seq,
                                  in unsigned long offset,
                                  in unsigned long length );
    };

    abstract valuetype DataInputStream 
    {
        any read_any(); 
        
        boolean read_boolean();
        
        char read_char();
        
        wchar read_wchar();
        
        octet read_octet();
        
        short read_short();
        
        unsigned short read_ushort();
        
        long read_long();
        
        unsigned long read_ulong();
        
        long long read_longlong();
        
        unsigned long long read_ulonglong();
        
        float read_float();
        
        double read_double();
        
#ifndef __IDL_TO_JAVA__
        // long double is currently not available in the java mapping.
        long double read_longdouble();
#endif
        string read_string();
        
        wstring read_wstring();
        
        Object read_Object();
        
        AbstractBase read_Abstract();
        
        ValueBase read_Value();
        
        TypeCode read_TypeCode();

        void read_any_array( inout AnySeq seq,
                             in unsigned long offset,
                             in unsigned long length );
                             
        void read_boolean_array( inout BooleanSeq seq,
                                 in unsigned long offset,
                                 in unsigned long length );
                                 
        void read_char_array( inout CharSeq seq,
                              in unsigned long offset,
                              in unsigned long length );
                              
        void read_wchar_array( inout WCharSeq seq,
                               in unsigned long offset,
                               in unsigned long length );
                               
        void read_octet_array( inout OctetSeq seq,
                               in unsigned long offset,
                               in unsigned long length );
                               
        void read_short_array( inout ShortSeq seq,
                               in unsigned long offset,
                               in unsigned long length );
                               
        void read_ushort_array( inout UShortSeq seq,
                                in unsigned long offset,
                                in unsigned long length );
                                
        void read_long_array( inout LongSeq seq,
                              in unsigned long offset,
                              in unsigned long length );
                              
        void read_ulong_array( inout ULongSeq seq,
                               in unsigned long offset,
                               in unsigned long length );
                               
        void read_ulonglong_array( inout ULongLongSeq seq,
                                   in unsigned long offset,
                                   in unsigned long length );
                                   
        void read_longlong_array( inout LongLongSeq seq,
                                  in unsigned long offset,
                                  in unsigned long length );
                                  
        void read_float_array( inout FloatSeq seq,
                               in unsigned long offset,
                               in unsigned long length );
                               
        void read_double_array( inout DoubleSeq seq,
                                in unsigned long offset,
                                in unsigned long length );
    };
};

#endif // _CORBA_Stream_IDL_
