// Extracted from a mail of Khaled (March 22, 2005)

module First {
    typedef boolean MyBoolean;
    typedef short MyShort;    
    typedef long MyLong;  
    typedef long long MyLongLong;
    typedef unsigned short MyUnsignedShort;
    typedef unsigned long MyUnsignedLong;  
    typedef unsigned long long MyUnsignedLongLong;
    typedef float MyFloat;                        
    typedef double MyDouble;
    typedef octet MyOctet;  
    typedef char MyCharacter;
    typedef wchar MyWideCharacter;
    typedef string MyString;      
    typedef wstring MyWideString;
    typedef Object MyObject;     
    typedef fixed <10,5> MyFixed;
                                 
    typedef double MyVector[4];  
    typedef double MyMatrix[4][4];
                                  
    typedef sequence <long> MySequence;
    typedef sequence <long,10> MyBoundedSequence;
                                                 
    interface MyInterface { };                   
                              
    enum MyEnum { Red, Green, Blue };
                                     
    union MyUnion switch (long) {    
        case 1: boolean boolean_value;
        case 2: short short_value;
        case 3: long long_value;
        case 4: long long long_long_value;
        case 5: unsigned short unsigned_short_value;
        case 6: unsigned long unsigned_long_value;
        case 7: unsigned long long unsigned_long_long_value;
        case 8: float float_value;
        case 9: double double_value;
        case 10: octet octet_value;
        case 11: char char_value;
        case 12: wchar wchar_value;
        case 13: string string_value;
       case 14: wstring wstring_value;
        case 15: Object object_value;         
        case 16: MyVector vector_value;          
        case 17: MyMatrix matrix_value;              
        case 18: MySequence sequence_value;     
        case 19: MyBoundedSequence bounded_sequence_value;
//PolyORB:WAidlac:
//        case 20: MyInterface interface_value;
        case 21: MyEnum enum_value;                        
        default: boolean unknown;      
    };
};

module Second {
    typedef First::MyBoolean MyBoolean;
    typedef MyBoolean AnotherBoolean;     

    typedef First::MyShort MyShort;
    typedef MyShort AnotherShort;

    typedef First::MyLong MyLong; 
    typedef MyLong AnotherLong;

    typedef First::MyLongLong MyLongLong;        
    typedef MyLongLong AnotherLongLong;                   
                                      
    typedef First::MyUnsignedShort MyUnsignedShort; 
    typedef MyUnsignedShort AnotherUnsignedShort; 

    typedef First::MyUnsignedLong MyUnsignedLong;
    typedef MyUnsignedLong AnotherUnsignedLong;              

    typedef First::MyUnsignedLongLong MyUnsignedLongLong;
    typedef MyUnsignedLongLong AnotherUnsignedLongLong; 

    typedef First::MyFloat MyFloat;
    typedef MyFloat AnotherFloat;

    typedef First::MyDouble MyDouble;
    typedef MyDouble AnotherDouble;  

    typedef First::MyOctet MyOctet;
    typedef MyOctet AnotherOctet;

    typedef First::MyCharacter MyCharacter;          
    typedef MyCharacter AnotherCharacter;            

    typedef First::MyWideCharacter MyWideCharacter;
    typedef MyWideCharacter AnotherWideCharacter;

    typedef First::MyString MyString;                      
    typedef MyString AnotherString;    

    typedef First::MyWideString MyWideString;
    typedef MyWideString AnotherWideString; 

//PolyORB:WAidlac:
//    typedef First::MyObject MyObject;   
//    typedef MyObject AnotherObject;

    typedef First::MyFixed MyFixed;
    typedef MyFixed AnotherFixed;  

    typedef First::MyVector MyVector;
    typedef MyVector AnotherVector; 

    typedef First::MyMatrix MyMatrix;
    typedef MyMatrix AnotherMatrix;   

    typedef First::MySequence MySequence;
    typedef MySequence AnotherSequence;  

    typedef First::MyBoundedSequence MyBoundedSequence;              
    typedef MyBoundedSequence AnotherBoundedSequence; 

    typedef First::MyInterface MyInterface;
    typedef MyInterface AnotherInterface;  

    typedef First::MyEnum MyEnum;
    typedef MyEnum AnotherEnum; 

    typedef First::MyUnion MyUnion;  
    typedef MyUnion AnotherUnion; 

    typedef MyBoolean MyBooleanArray[2];
    typedef MyBooleanArray AnotherBooleanArray;

    interface Foo {
        AnotherBoolean boolean_operation (inout AnotherBoolean
        boolean_value);
        AnotherShort short_operation (inout AnotherShort short_value);
        AnotherLong long_operation (inout AnotherLong long_value);
        AnotherLongLong long_long_operation (inout AnotherLong
        long_long_value);
        AnotherUnsignedShort unsigned_short_operation      
           (inout AnotherUnsignedShort unsigned_short_value);
        AnotherUnsignedLong unsigned_long_operation
           (inout AnotherUnsignedLong unsigned_long_value);
        AnotherUnsignedLongLong unsigned_long_long_operation
           (inout AnotherUnsignedLongLong unsigned_long_long_value);
        AnotherFloat float_operation (inout AnotherFloat float_value);
        AnotherDouble double_operation (inout AnotherDouble
        double_value);
        AnotherOctet octet_operation (inout AnotherOctet octet_value);
        AnotherCharacter character_operation
           (inout AnotherCharacter character_value);
        AnotherWideCharacter wide_character_operation
           (inout AnotherWideCharacter wide_character_value);
        AnotherString string_operation (inout AnotherString
        string_value);      
        AnotherWideString wide_string_operation                          
           (inout AnotherWideString wide_string_value);
//PolyORB:WAidlac:                                     
//        AnotherObject object_operation (inout AnotherObject object_value);   
        AnotherFixed fixed_operation (inout AnotherFixed fixed_value);
        AnotherMatrix matrix_operation (inout AnotherMatrix
        matrix_value);
        AnotherEnum enum_operation (inout AnotherEnum enum_value);
        AnotherSequence sequence_operation
           (inout AnotherSequence sequence_value);
        AnotherBoundedSequence bounded_sequence__operation
           (inout AnotherBoundedSequence bounded_sequence_value);
        AnotherInterface interface_operation                     
           (inout AnotherInterface interface_value);  
        AnotherVector vector_operation (inout AnotherVector
        vector_value);
        AnotherUnion union_operation (inout AnotherUnion union_value);

        MyBooleanArray boolean_array_operation (inout MyBooleanArray
        value);
        AnotherBooleanArray another_boolean_array_operation                 
           (inout AnotherBooleanArray value); 
    };                                      
};

module Third {

    typedef First::MyOctet MyOctet[2];
    typedef MyOctet OtherOctet;
    typedef MyOctet MyOctetArray[2];

    typedef First::MyInterface MyInterface[2];
    typedef MyInterface OtherInterface;
    typedef MyInterface MyInterfaceArray[2];

    typedef First::MyObject MyObject[2];
    typedef MyObject OtherObject;
    typedef MyObject MyObjectArray[2];

    interface Foo : Second::Foo {
        MyOctetArray x_octet_operation (inout MyOctetArray value);
        MyInterfaceArray x_interface_operation (inout MyInterfaceArray
        value);
        MyObjectArray x_object_operation (inout MyObjectArray value);
    };

};
