// **********************************************************************
//
// 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_POACurrent_h__
#define __OB_POACurrent_h__

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


#include <OB/Current.h>
#include <OB/POACommon.h>
#include <OB/POACurrent_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/Current:2.3
//
class Current : virtual public ::CORBA::Current
{
    Current(const Current&);
    void operator=(const Current&);

protected:

    static OB_IMPORT const char* ids_[];

public:

    Current() { }
    virtual ~Current() { }

    typedef Current_ptr _ptr_type;
    typedef Current_var _var_type;

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

    static inline Current_ptr
    _nil()
    {
        return 0;
    }

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

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


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

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

    //
    // IDL:omg.org/PortableServer/Current/get_POA:1.0
    //
    virtual POA_ptr get_POA() = 0;

    //
    // IDL:omg.org/PortableServer/Current/get_object_id:1.0
    //
    virtual ObjectId* get_object_id() = 0;

    //
    // IDL:omg.org/PortableServer/Current/get_reference:1.0
    //
    virtual ::CORBA::Object_ptr get_reference() = 0;

    //
    // IDL:omg.org/PortableServer/Current/get_servant:1.0
    //
    virtual Servant get_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/Current:2.3
//
namespace CORBA
{

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

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

} // End of namespace CORBA

#endif
