// **********************************************************************
//
// Generated by the ORBacus IDL-to-C++ Translator
//
// Copyright (c) 2003
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

// Version: 4.1.3

#ifndef __OB_POACommon_h__
#define __OB_POACommon_h__

#ifndef OB_IMPORT
#   ifdef OB_DLL
#      define OB_IMPORT __declspec(dllimport)
#   else
#      define OB_IMPORT /**/
#   endif
#endif


#include <OB/POACommon_fwd.h>

#ifndef OB_INTEGER_VERSION
#   error No ORBacus version defined! Is <OB/CORBA.h> included?
#endif

#ifndef OB_NO_VERSION_CHECK
#   if (OB_INTEGER_VERSION != 4010300L)
#       error ORBacus version mismatch!
#   endif
#endif

namespace OBStubImpl_PortableServer
{

} // End of namespace OBStubImpl_PortableServer

namespace OBStubImpl_PortableServer
{

} // End of namespace OBStubImpl_PortableServer

//
// IDL:omg.org/PortableServer:2.3
//
namespace PortableServer
{

//
// IDL:omg.org/PortableServer/Servant:1.0
//
typedef OBNative_PortableServer::Servant Servant;

//
// IDL:omg.org/PortableServer/ObjectId:1.0
//
class OBUnique_ObjectId { };

typedef OB::FixSeq< ::CORBA::Octet, OBUnique_ObjectId > ObjectId;
typedef OB::SeqVar< OB::FixSeq< ::CORBA::Octet, OBUnique_ObjectId > > ObjectId_var;
typedef OB::SeqOut< OB::FixSeq< ::CORBA::Octet, OBUnique_ObjectId > > ObjectId_out;
OB_IMPORT extern OB::TypeCodeConst _tc_ObjectId;

struct OBInfo_ObjectId : public OB::ConstructedInfo
{
    OBInfo_ObjectId() { }

    virtual void free(void* p) const
    {
        delete (ObjectId*)p;
    }

    virtual void* dup(const void* p) const
    {
        return new ObjectId(*(const ObjectId*)p);
    }

    virtual void marshal(const void*, OB::OutputStreamImpl*) const;
    virtual void unmarshal(void*, OB::InputStreamImpl*) const;
};

//
// IDL:omg.org/PortableServer/ForwardRequest:1.0
//
struct ForwardRequest : public ::CORBA::UserException
{
    ForwardRequest() { }
    ForwardRequest(const ForwardRequest&);
    ForwardRequest& operator=(const ForwardRequest&);

    static ForwardRequest* _downcast(::CORBA::Exception*);
    static const ForwardRequest* _downcast(const ::CORBA::Exception*);
    virtual const char* _name() const;
    virtual void _raise() const { throw *this; }
    virtual const char* _rep_id() const;
    virtual char* _to_string() const;

    virtual ::CORBA::Exception* _OB_clone() const;
    virtual void _OB_insertInAny(::CORBA::Any&);

    ::CORBA::Object_var forward_reference;

    ForwardRequest(::CORBA::Object_ptr);

    virtual void _OB_marshal(OB::OutputStreamImpl*) const;
    static void _OB_unmarshal(ForwardRequest&, OB::InputStreamImpl*);
};

OB_IMPORT extern OB::TypeCodeConst _tc_ForwardRequest;

} // End of namespace PortableServer

//
// IDL:omg.org/PortableServer:2.3
//
namespace OBProxy_PortableServer
{

} // End of namespace OBProxy_PortableServer

//
// IDL:omg.org/PortableServer:2.3
//
namespace OBStubImpl_PortableServer
{

} // End of namespace OBStubImpl_PortableServer

//
// IDL:omg.org/PortableServer:2.3
//
namespace OBMarshalStubImpl_PortableServer
{

} // End of namespace OBMarshalStubImpl_PortableServer

//
// IDL:omg.org/PortableServer:2.3
//
namespace OBV_PortableServer
{

} // End of namespace OBV_PortableServer

//
// IDL:omg.org/PortableServer/ObjectId:1.0
//
void operator<<=(::CORBA::Any&, PortableServer::ObjectId*);
void operator<<=(::CORBA::Any&, const PortableServer::ObjectId&);
CORBA::Boolean operator>>=(const ::CORBA::Any&, const PortableServer::ObjectId*&);

inline void
operator<<=(::CORBA::Any_var& any, PortableServer::ObjectId* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(::CORBA::Any_var& any, const PortableServer::ObjectId& val)
{
    any.inout() <<= val;
}

inline ::CORBA::Boolean
operator>>=(const ::CORBA::Any_var& any, const PortableServer::ObjectId*& val)
{
    return any.in() >>= val;
}

//
// IDL:omg.org/PortableServer/ForwardRequest:1.0
//
void operator<<=(::CORBA::Any&, PortableServer::ForwardRequest*);
void operator<<=(::CORBA::Any&, const PortableServer::ForwardRequest&);
CORBA::Boolean operator>>=(const ::CORBA::Any&, const PortableServer::ForwardRequest*&);

inline void
operator<<=(::CORBA::Any_var& any, PortableServer::ForwardRequest* val)
{
    any.inout() <<= val;
}

inline void
operator<<=(::CORBA::Any_var& any, const PortableServer::ForwardRequest& val)
{
    any.inout() <<= val;
}

inline ::CORBA::Boolean
operator>>=(const ::CORBA::Any_var& any, const PortableServer::ForwardRequest*& val)
{
    return any.in() >>= val;
}

#endif
