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

#ifdef _PRE_3_0_COMPILER_
#pragma prefix "omg.org/CORBA"
#endif

    typedef sequence<any>                AnySeq;
    typedef sequence<boolean>            BooleanSeq;
    typedef sequence<char>               CharSeq;
    typedef sequence<wchar>              WCharSeq;
    typedef sequence<octet>              OctetSeq;
    typedef sequence<short>              ShortSeq;
    typedef sequence<unsigned short>     UShortSeq;
    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<long double>        LongDoubleSeq;
    typedef sequence<string>             StringSeq;
    typedef sequence<wstring>            WStringSeq;

    exception BadFixedValue {
        unsigned long offset;
    };

    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);
        void write_longdouble       (in long double         value);
        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);
        void write_long_double_array(
                                     in LongDoubleSeq       seq,
                                     in unsigned long       offset,
                                     in unsigned long       length);
        void write_fixed            (
                                     in any                 fixed_value
                                    ) raises (BadFixedValue);
        void write_fixed_array      (
                                     in AnySeq              seq,
                                     in unsigned long       offset,
                                     in unsigned long       length
                                    ) raises (BadFixedValue);
    };

    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();
        long double read_longdouble();
        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);
        void read_long_double_array(
                                    inout DoubleSeq     seq,
                                    in unsigned long    offset,
                                    in unsigned long    length);
        any read_fixed             (
                                    in unsigned short   digits,
                                    in short            scale
                                   ) raises (BadFixedValue);
        void read_fixed_array      (
                                    inout AnySeq        seq,
                                    in unsigned long    offset,
                                    in unsigned long    length,
                                    in unsigned short   digits,
                                    in short            scale
                                   ) raises (BadFixedValue);
    };
