// **********************************************************************
//
// Generated by the ORBacus IDL-to-C++ Translator
//
// Copyright (c) 1999
// Object Oriented Concepts, Inc.
// Billerica, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

// Version: 3.2
// License: non-commercial

#include <OB/CORBA.h>
#include <OB/TemplateI.h>
#include <OB/Current.h>

#ifndef OB_INTEGER_VERSION
#   error No ORBacus version defined!
#endif

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

//
// IDL:omg.org/CORBA/Current:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< CORBA_Current >;
template class OBObjForSeq< CORBA_Current >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< CORBA_Current >)
#pragma define(OBObjForSeq< CORBA_Current >)
#endif
#endif

void
OBDuplicate(CORBA_Current_ptr p)
{
    if(p)
        p -> _OB_incRef();
}

void
OBRelease(CORBA_Current_ptr p)
{
    if(p)
        p -> _OB_decRef();
}

CORBA_Current_ptr
CORBA_Current::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:omg.org/CORBA/Current:1.0");

        if(v)
            return _duplicate((CORBA_Current_ptr)v);
    }

    return _nil();
}

void*
CORBA_Current::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:omg.org/CORBA/Current:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_Object::_OB_narrowHelp(_ob_id);
}

const char*
CORBA_Current::_OB_typeId() const
{
    return "IDL:omg.org/CORBA/Current:1.0";
}
