// **********************************************************************
//
// 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_POAInterface_h__
#define __OB_POAInterface_h__

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


#include <OB/POAPolicies.h>
#include <OB/POAManager.h>
#include <OB/POAAdapterActivator.h>
#include <OB/POAServantManager.h>
#include <OB/POACommon.h>
#include <OB/Dispatch.h>
#include <OB/Types.h>
#include <OB/POAInterface_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/POAList:1.0
//
class OBUnique_POAList { };

typedef OB::ObjSeq< POA, OBUnique_POAList > POAList;
typedef OB::SeqVar< OB::ObjSeq< POA, OBUnique_POAList > > POAList_var;
typedef OB::SeqOut< OB::ObjSeq< POA, OBUnique_POAList > > POAList_out;

//
// IDL:omg.org/PortableServer/POA:2.3
//
class POA : virtual public ::CORBA::Object
{
    POA(const POA&);
    void operator=(const POA&);

protected:

    static OB_IMPORT const char* ids_[];

public:

    POA() { }
    virtual ~POA() { }

    typedef POA_ptr _ptr_type;
    typedef POA_var _var_type;

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

    static inline POA_ptr
    _nil()
    {
        return 0;
    }

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

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


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

        static AdapterAlreadyExists* _downcast(::CORBA::Exception*);
        static const AdapterAlreadyExists* _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&);

        static void _OB_unmarshal(AdapterAlreadyExists&, OB::InputStreamImpl*);
    };

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

        static AdapterNonExistent* _downcast(::CORBA::Exception*);
        static const AdapterNonExistent* _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&);

        static void _OB_unmarshal(AdapterNonExistent&, OB::InputStreamImpl*);
    };

    //
    // IDL:omg.org/PortableServer/POA/InvalidPolicy:1.0
    //
    struct InvalidPolicy : public ::CORBA::UserException
    {
#ifdef OB_CLEAR_MEM
        InvalidPolicy();
#else
        InvalidPolicy() { }
#endif
        InvalidPolicy(const InvalidPolicy&);
        InvalidPolicy& operator=(const InvalidPolicy&);

        static InvalidPolicy* _downcast(::CORBA::Exception*);
        static const InvalidPolicy* _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::UShort index;

        InvalidPolicy(::CORBA::UShort);

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

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

        static NoServant* _downcast(::CORBA::Exception*);
        static const NoServant* _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&);

        static void _OB_unmarshal(NoServant&, OB::InputStreamImpl*);
    };

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

        static ObjectAlreadyActive* _downcast(::CORBA::Exception*);
        static const ObjectAlreadyActive* _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&);

        static void _OB_unmarshal(ObjectAlreadyActive&, OB::InputStreamImpl*);
    };

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

        static ObjectNotActive* _downcast(::CORBA::Exception*);
        static const ObjectNotActive* _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&);

        static void _OB_unmarshal(ObjectNotActive&, OB::InputStreamImpl*);
    };

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

        static ServantAlreadyActive* _downcast(::CORBA::Exception*);
        static const ServantAlreadyActive* _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&);

        static void _OB_unmarshal(ServantAlreadyActive&, OB::InputStreamImpl*);
    };

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

        static ServantNotActive* _downcast(::CORBA::Exception*);
        static const ServantNotActive* _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&);

        static void _OB_unmarshal(ServantNotActive&, OB::InputStreamImpl*);
    };

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

        static WrongAdapter* _downcast(::CORBA::Exception*);
        static const WrongAdapter* _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&);

        static void _OB_unmarshal(WrongAdapter&, OB::InputStreamImpl*);
    };

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

        static WrongPolicy* _downcast(::CORBA::Exception*);
        static const WrongPolicy* _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&);

        static void _OB_unmarshal(WrongPolicy&, OB::InputStreamImpl*);
    };

    //
    // IDL:omg.org/PortableServer/POA/create_POA:1.0
    //
    virtual POA_ptr create_POA(const char* adapter_name,
                               POAManager_ptr a_POAManager,
                               const ::CORBA::PolicyList& policies) = 0;

    //
    // IDL:omg.org/PortableServer/POA/find_POA:1.0
    //
    virtual POA_ptr find_POA(const char* adapter_name,
                             ::CORBA::Boolean activate_it) = 0;

    //
    // IDL:omg.org/PortableServer/POA/destroy:1.0
    //
    virtual void destroy(::CORBA::Boolean etherealize_objects,
                         ::CORBA::Boolean wait_for_completion) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_thread_policy:1.0
    //
    virtual ThreadPolicy_ptr create_thread_policy(ThreadPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_lifespan_policy:1.0
    //
    virtual LifespanPolicy_ptr create_lifespan_policy(LifespanPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_id_uniqueness_policy:1.0
    //
    virtual IdUniquenessPolicy_ptr create_id_uniqueness_policy(IdUniquenessPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_id_assignment_policy:1.0
    //
    virtual IdAssignmentPolicy_ptr create_id_assignment_policy(IdAssignmentPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_implicit_activation_policy:1.0
    //
    virtual ImplicitActivationPolicy_ptr create_implicit_activation_policy(ImplicitActivationPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_servant_retention_policy:1.0
    //
    virtual ServantRetentionPolicy_ptr create_servant_retention_policy(ServantRetentionPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_request_processing_policy:1.0
    //
    virtual RequestProcessingPolicy_ptr create_request_processing_policy(RequestProcessingPolicyValue value) = 0;

    //
    // IDL:omg.org/PortableServer/POA/the_name:1.0
    //
    virtual char* the_name() = 0;

    //
    // IDL:omg.org/PortableServer/POA/the_parent:1.0
    //
    virtual POA_ptr the_parent() = 0;

    //
    // IDL:omg.org/PortableServer/POA/the_children:1.0
    //
    virtual POAList* the_children() = 0;

    //
    // IDL:omg.org/PortableServer/POA/the_POAManager:1.0
    //
    virtual POAManager_ptr the_POAManager() = 0;

    //
    // IDL:omg.org/PortableServer/POA/id:1.0
    //
    virtual ::CORBA::OctetSeq* id() = 0;

    //
    // IDL:omg.org/PortableServer/POA/the_activator:1.0
    //
    virtual AdapterActivator_ptr the_activator() = 0;
    virtual void the_activator(AdapterActivator_ptr) = 0;

    //
    // IDL:omg.org/PortableServer/POA/get_servant_manager:1.0
    //
    virtual ServantManager_ptr get_servant_manager() = 0;

    //
    // IDL:omg.org/PortableServer/POA/set_servant_manager:1.0
    //
    virtual void set_servant_manager(ServantManager_ptr imgr) = 0;

    //
    // IDL:omg.org/PortableServer/POA/get_servant:1.0
    //
    virtual Servant get_servant() = 0;

    //
    // IDL:omg.org/PortableServer/POA/set_servant:1.0
    //
    virtual void set_servant(Servant p_servant) = 0;

    //
    // IDL:omg.org/PortableServer/POA/activate_object:1.0
    //
    virtual ObjectId* activate_object(Servant p_servant) = 0;

    //
    // IDL:omg.org/PortableServer/POA/activate_object_with_id:1.0
    //
    virtual void activate_object_with_id(const ObjectId& id,
                                         Servant p_servant) = 0;

    //
    // IDL:omg.org/PortableServer/POA/deactivate_object:1.0
    //
    virtual void deactivate_object(const ObjectId& oid) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_reference:1.0
    //
    virtual ::CORBA::Object_ptr create_reference(const char* intf) = 0;

    //
    // IDL:omg.org/PortableServer/POA/create_reference_with_id:1.0
    //
    virtual ::CORBA::Object_ptr create_reference_with_id(const ObjectId& oid,
                                                         const char* intf) = 0;

    //
    // IDL:omg.org/PortableServer/POA/servant_to_id:1.0
    //
    virtual ObjectId* servant_to_id(Servant p_servant) = 0;

    //
    // IDL:omg.org/PortableServer/POA/servant_to_reference:1.0
    //
    virtual ::CORBA::Object_ptr servant_to_reference(Servant p_servant) = 0;

    //
    // IDL:omg.org/PortableServer/POA/reference_to_servant:1.0
    //
    virtual Servant reference_to_servant(::CORBA::Object_ptr reference) = 0;

    //
    // IDL:omg.org/PortableServer/POA/reference_to_id:1.0
    //
    virtual ObjectId* reference_to_id(::CORBA::Object_ptr reference) = 0;

    //
    // IDL:omg.org/PortableServer/POA/id_to_servant:1.0
    //
    virtual Servant id_to_servant(const ObjectId& oid) = 0;

    //
    // IDL:omg.org/PortableServer/POA/id_to_reference:1.0
    //
    virtual ::CORBA::Object_ptr id_to_reference(const ObjectId& oid) = 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/POA:2.3
//
namespace CORBA
{

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

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

} // End of namespace CORBA

#endif
