// **********************************************************************
//
// 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_POAManager_h__
#define __OB_POAManager_h__

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


#include <OB/POAManager_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/POAManager:2.3
//
class POAManager : virtual public ::CORBA::Object
{
    POAManager(const POAManager&);
    void operator=(const POAManager&);

protected:

    static OB_IMPORT const char* ids_[];

public:

    POAManager() { }
    virtual ~POAManager() { }

    typedef POAManager_ptr _ptr_type;
    typedef POAManager_var _var_type;

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

    static inline POAManager_ptr
    _nil()
    {
        return 0;
    }

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

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


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

        static AdapterInactive* _downcast(::CORBA::Exception*);
        static const AdapterInactive* _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(AdapterInactive&, OB::InputStreamImpl*);
    };

    //
    // IDL:omg.org/PortableServer/POAManager/State:1.0
    //
    enum State
    {
        HOLDING,
        ACTIVE,
        DISCARDING,
        INACTIVE
    };

    typedef State& State_out;

    //
    // IDL:omg.org/PortableServer/POAManager/activate:1.0
    //
    virtual void activate() = 0;

    //
    // IDL:omg.org/PortableServer/POAManager/hold_requests:1.0
    //
    virtual void hold_requests(::CORBA::Boolean wait_for_completion) = 0;

    //
    // IDL:omg.org/PortableServer/POAManager/discard_requests:1.0
    //
    virtual void discard_requests(::CORBA::Boolean wait_for_completion) = 0;

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

    //
    // IDL:omg.org/PortableServer/POAManager/get_state:1.0
    //
    virtual State get_state() = 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/POAManager:2.3
//
namespace CORBA
{

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

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

} // End of namespace CORBA

#endif
