// **********************************************************************
//
// 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_POAServantLocator_h__
#define __OB_POAServantLocator_h__

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


#include <OB/POAServantManager.h>
#include <OB/POACommon.h>
#include <OB/POAServantLocator_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/ServantLocator:2.3
//
class ServantLocator : virtual public ::PortableServer::ServantManager
{
    ServantLocator(const ServantLocator&);
    void operator=(const ServantLocator&);

protected:

    static OB_IMPORT const char* ids_[];

public:

    ServantLocator() { }
    virtual ~ServantLocator() { }

    typedef ServantLocator_ptr _ptr_type;
    typedef ServantLocator_var _var_type;

    static inline ServantLocator_ptr
    _duplicate(ServantLocator_ptr p)
    {
        if(p)
            p -> _add_ref();
        return p;
    }

    static inline ServantLocator_ptr
    _nil()
    {
        return 0;
    }

    static ServantLocator_ptr _narrow(::CORBA::Object_ptr);

    static ServantLocator_ptr _narrow(::CORBA::AbstractBase_ptr);


    //
    // IDL:omg.org/PortableServer/ServantLocator/Cookie:1.0
    //
    typedef OBNative_PortableServer::ServantLocator::Cookie Cookie;

    //
    // IDL:omg.org/PortableServer/ServantLocator/preinvoke:1.0
    //
    virtual Servant preinvoke(const ObjectId& oid,
                              POA_ptr adapter,
                              const char* operation,
                              Cookie& the_cookie) = 0;

    //
    // IDL:omg.org/PortableServer/ServantLocator/postinvoke:1.0
    //
    virtual void postinvoke(const ObjectId& oid,
                            POA_ptr adapter,
                            const char* operation,
                            Cookie the_cookie,
                            Servant the_servant) = 0;
};

} // 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/ServantLocator:2.3
//
namespace CORBA
{

inline void
release(::PortableServer::ServantLocator_ptr p)
{
    if(p)
        p -> _remove_ref();
}

inline Boolean
is_nil(::PortableServer::ServantLocator_ptr p)
{
    return p == 0;
}

} // End of namespace CORBA

#endif
