// **********************************************************************
//
// Generated by the OmniBroker IDL-to-C++ Translator
//
// Copyright (c) 1997
// Object-Oriented Concepts, Inc.
// Billerica, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef __msg_h__
#define __msg_h__

//
// IDL:otMessage:1.0
//
class otMessage;
typedef otMessage* otMessage_ptr;
typedef otMessage* otMessageRef;
typedef OBObjVar< otMessage > otMessage_var;

//
// IDL:otMessage:1.0
//
class otMessage : virtual public CORBA_Object
{
    otMessage(const otMessage&);
    void operator=(const otMessage&);

protected:

    otMessage() { }

public:

    static inline otMessage_ptr
    _duplicate(otMessage_ptr p)
    {
        CORBA_Object::_duplicate(p);
        return p;
    }

    static inline otMessage_ptr
    _nil()
    {
        return 0;
    }

    static otMessage_ptr _narrow(CORBA_Object_ptr);
    virtual void* _OB_narrowHelp(const char*) const;
    virtual const char* _OB_typeId() const;

    friend void OBUnmarshal(otMessage_ptr&, const CORBA_Octet*&, bool);
    friend CORBA_Boolean operator>>=(const CORBA_Any&, otMessage_ptr&);

    //
    // IDL:otMessage/ElementKind:1.0
    //
    enum ElementKind
    {
        BegOfElement,
        EndOfElement,
        Integer,
        Boolean,
        BitString,
        HexString,
        OctetString,
        CharString
    };

    static const OBTypeCodeConst _tc_ElementKind;

    //
    // IDL:otMessage/Element:1.0
    //
    struct Element
    {
#ifdef OB_CLEAR_MEM
        Element();
#else
        Element() { }
#endif
        Element(const Element&);
        Element& operator=(const Element&);

        ElementKind kind;
        CORBA_String_var identifier;
        CORBA_String_var value;
        CORBA_Long number;
    };

    typedef OBVarVar< Element > Element_var;

    static const OBTypeCodeConst _tc_Element;

    //
    // IDL:otMessage/SerializedMessage:1.0
    //
    typedef OBVarSeq< Element > SerializedMessage;
    typedef OBSeqVar< OBVarSeq< Element > > SerializedMessage_var;
    static const OBTypeCodeConst _tc_SerializedMessage;

    //
    // IDL:otMessage/ParameterList:1.0
    //
    typedef OBVarSeq< SerializedMessage > ParameterList;
    typedef OBSeqVar< OBVarSeq< SerializedMessage > > ParameterList_var;
    static const OBTypeCodeConst _tc_ParameterList;

    //
    // IDL:otMessage/MessageList:1.0
    //
    typedef OBStrSeq MessageList;
    typedef OBSeqVar< OBStrSeq > MessageList_var;
    static const OBTypeCodeConst _tc_MessageList;

    //
    // IDL:otMessage/AlreadyConnected:1.0
    //
    struct AlreadyConnected : public CORBA_UserException
    {
        AlreadyConnected() { }
        AlreadyConnected(const AlreadyConnected&);
        AlreadyConnected& operator=(const AlreadyConnected&);

        static AlreadyConnected* _narrow(CORBA_Exception*);
#ifdef HAVE_NO_RTTI
        virtual void* _OB_narrowHelp(const char*) const;
#endif
        virtual const char* _OB_typeId() const;
        virtual CORBA_Exception* _OB_clone() const;
    };

    static const OBTypeCodeConst _tc_AlreadyConnected;

    //
    // IDL:otMessage/NotImplemented:1.0
    //
    struct NotImplemented : public CORBA_UserException
    {
        NotImplemented() { }
        NotImplemented(const NotImplemented&);
        NotImplemented& operator=(const NotImplemented&);

        static NotImplemented* _narrow(CORBA_Exception*);
#ifdef HAVE_NO_RTTI
        virtual void* _OB_narrowHelp(const char*) const;
#endif
        virtual const char* _OB_typeId() const;
        virtual CORBA_Exception* _OB_clone() const;
    };

    static const OBTypeCodeConst _tc_NotImplemented;

    //
    // IDL:otMessage/DecodeError:1.0
    //
    struct DecodeError : public CORBA_UserException
    {
        DecodeError() { }
        DecodeError(const DecodeError&);
        DecodeError& operator=(const DecodeError&);

        static DecodeError* _narrow(CORBA_Exception*);
#ifdef HAVE_NO_RTTI
        virtual void* _OB_narrowHelp(const char*) const;
#endif
        virtual const char* _OB_typeId() const;
        virtual CORBA_Exception* _OB_clone() const;
    };

    static const OBTypeCodeConst _tc_DecodeError;

    //
    // IDL:otMessage/send:1.0
    //
    virtual void send(const char* identifier,
                      const SerializedMessage& message);

    //
    // IDL:otMessage/sendTwoWay:1.0
    //
    virtual SerializedMessage* sendTwoWay(const char* identifier,
                                          const ParameterList& parameters);
};

extern const OBTypeCodeConst _tc_otMessage;

//
// IDL:otMessage:1.0
//
inline void
CORBA_release(otMessage_ptr p)
{
    CORBA_release((CORBA_Object_ptr)p);
}

inline CORBA_Boolean
CORBA_is_nil(otMessage_ptr p)
{
    return p == 0;
}

inline void
OBMarshal(otMessage_ptr p, CORBA_Octet*& oct)
{
    OBMarshal((CORBA_Object_ptr)p, oct);
}

inline void
OBMarshalCount(otMessage_ptr p, CORBA_ULong& count)
{
    OBMarshalCount((CORBA_Object_ptr)p, count);
}

void OBUnmarshal(otMessage_ptr&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, otMessage_ptr);
void operator<<=(CORBA_Any&, otMessage_ptr*);
CORBA_Boolean operator>>=(const CORBA_Any&, otMessage_ptr&);

inline void
operator<<=(CORBA_Any_var& any, otMessage_ptr val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, otMessage_ptr* val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, otMessage_ptr& val)
{
    return any.in() >>= val;
}

//
// IDL:otMessage/ElementKind:1.0
//
inline void
OBMarshal(otMessage::ElementKind val, CORBA_Octet*& oct)
{
    OBMarshal((CORBA_ULong)val, oct);
}

inline void
OBMarshalCount(otMessage::ElementKind, CORBA_ULong& count)
{
    OBMarshalCount(0L, count);
}

inline void
OBUnmarshal(otMessage::ElementKind& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_ULong v;
    OBUnmarshal(v, coct, swap);
    val = (otMessage::ElementKind)v;
}

void operator<<=(CORBA_Any&, otMessage::ElementKind);
CORBA_Boolean operator>>=(const CORBA_Any&, otMessage::ElementKind&);

//
// IDL:otMessage/Element:1.0
//
void OBMarshal(const otMessage::Element&, CORBA_Octet*&);
void OBMarshalCount(const otMessage::Element&, CORBA_ULong&);
void OBUnmarshal(otMessage::Element&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, otMessage::Element*);
void operator<<=(CORBA_Any&, const otMessage::Element&);
CORBA_Boolean operator>>=(const CORBA_Any&, otMessage::Element*&);

inline void
operator<<=(CORBA_Any_var& any, otMessage::Element* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const otMessage::Element& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, otMessage::Element*& val)
{
    return any.in() >>= val;
}

//
// IDL:otMessage/AlreadyConnected:1.0
//
void OBMarshal(const otMessage::AlreadyConnected&, CORBA_Octet*&);
void OBMarshalCount(const otMessage::AlreadyConnected&, CORBA_ULong&);
void OBUnmarshal(otMessage::AlreadyConnected&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, otMessage::AlreadyConnected*);
void operator<<=(CORBA_Any&, const otMessage::AlreadyConnected&);
CORBA_Boolean operator>>=(const CORBA_Any&, otMessage::AlreadyConnected*&);

inline void
operator<<=(CORBA_Any_var& any, otMessage::AlreadyConnected* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const otMessage::AlreadyConnected& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, otMessage::AlreadyConnected*& val)
{
    return any.in() >>= val;
}

//
// IDL:otMessage/NotImplemented:1.0
//
void OBMarshal(const otMessage::NotImplemented&, CORBA_Octet*&);
void OBMarshalCount(const otMessage::NotImplemented&, CORBA_ULong&);
void OBUnmarshal(otMessage::NotImplemented&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, otMessage::NotImplemented*);
void operator<<=(CORBA_Any&, const otMessage::NotImplemented&);
CORBA_Boolean operator>>=(const CORBA_Any&, otMessage::NotImplemented*&);

inline void
operator<<=(CORBA_Any_var& any, otMessage::NotImplemented* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const otMessage::NotImplemented& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, otMessage::NotImplemented*& val)
{
    return any.in() >>= val;
}

//
// IDL:otMessage/DecodeError:1.0
//
void OBMarshal(const otMessage::DecodeError&, CORBA_Octet*&);
void OBMarshalCount(const otMessage::DecodeError&, CORBA_ULong&);
void OBUnmarshal(otMessage::DecodeError&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, otMessage::DecodeError*);
void operator<<=(CORBA_Any&, const otMessage::DecodeError&);
CORBA_Boolean operator>>=(const CORBA_Any&, otMessage::DecodeError*&);

inline void
operator<<=(CORBA_Any_var& any, otMessage::DecodeError* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const otMessage::DecodeError& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, otMessage::DecodeError*& val)
{
    return any.in() >>= val;
}

//
// OBVarSeq< otMessage::Element >
//
#ifndef OB_use_OBVarSeq_otMessage_Element
#define OB_use_OBVarSeq_otMessage_Element
#define OB_use_OBVarSeq_otMessage_Element_from_msg_h

void OBMarshal(const OBVarSeq< otMessage::Element >&, CORBA_Octet*&);
void OBMarshalCount(const OBVarSeq< otMessage::Element >&, CORBA_ULong&);
void OBUnmarshal(OBVarSeq< otMessage::Element >&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, OBVarSeq< otMessage::Element >*);
void operator<<=(CORBA_Any&, const OBVarSeq< otMessage::Element >&);
CORBA_Boolean operator>>=(const CORBA_Any&, OBVarSeq< otMessage::Element >*&);

inline void
operator<<=(CORBA_Any_var& any, OBVarSeq< otMessage::Element >* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const OBVarSeq< otMessage::Element >& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, OBVarSeq< otMessage::Element >*& val)
{
    return any.in() >>= val;
}

#endif

//
// OBVarSeq< OBVarSeq< otMessage::Element > >
//
#ifndef OB_use_OBVarSeq_OBVarSeq_otMessage_Element
#define OB_use_OBVarSeq_OBVarSeq_otMessage_Element
#define OB_use_OBVarSeq_OBVarSeq_otMessage_Element_from_msg_h

void OBMarshal(const OBVarSeq< OBVarSeq< otMessage::Element > >&, CORBA_Octet*&);
void OBMarshalCount(const OBVarSeq< OBVarSeq< otMessage::Element > >&, CORBA_ULong&);
void OBUnmarshal(OBVarSeq< OBVarSeq< otMessage::Element > >&, const CORBA_Octet*&, bool);

void operator<<=(CORBA_Any&, OBVarSeq< OBVarSeq< otMessage::Element > >*);
void operator<<=(CORBA_Any&, const OBVarSeq< OBVarSeq< otMessage::Element > >&);
CORBA_Boolean operator>>=(const CORBA_Any&, OBVarSeq< OBVarSeq< otMessage::Element > >*&);

inline void
operator<<=(CORBA_Any_var& any, OBVarSeq< OBVarSeq< otMessage::Element > >* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const OBVarSeq< OBVarSeq< otMessage::Element > >& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, OBVarSeq< OBVarSeq< otMessage::Element > >*& val)
{
    return any.in() >>= val;
}

#endif

//
// OBStrSeq
//
#ifndef OB_use_OBStrSeq
#define OB_use_OBStrSeq
#define OB_use_OBStrSeq_from_msg_h

void operator<<=(CORBA_Any&, OBStrSeq*);
void operator<<=(CORBA_Any&, const OBStrSeq&);
CORBA_Boolean operator>>=(const CORBA_Any&, OBStrSeq*&);

inline void
operator<<=(CORBA_Any_var& any, OBStrSeq* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(CORBA_Any_var& any, const OBStrSeq& val)
{
    any.inout() <<= val;
}

inline CORBA_Boolean
operator>>=(const CORBA_Any_var& any, OBStrSeq*& val)
{
    return any.in() >>= val;
}

#endif

#endif
