// **********************************************************************
//
// 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/OCI_IIOP.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:ooc.com/OCI/IIOP/TransportInfo:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OCI_IIOP_TransportInfo >;
template class OBObjForSeq< OCI_IIOP_TransportInfo >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OCI_IIOP_TransportInfo >)
#pragma define(OBObjForSeq< OCI_IIOP_TransportInfo >)
#endif
#endif

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

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

OCI_IIOP_TransportInfo_ptr
OCI_IIOP_TransportInfo::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OCI/IIOP/TransportInfo:1.0");

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

    return _nil();
}

void*
OCI_IIOP_TransportInfo::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OCI/IIOP/TransportInfo:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = OCI_TransportInfo::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OCI_IIOP_TransportInfo::_OB_typeId() const
{
    return "IDL:ooc.com/OCI/IIOP/TransportInfo:1.0";
}

//
// IDL:ooc.com/OCI/IIOP/ConnectorInfo:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OCI_IIOP_ConnectorInfo >;
template class OBObjForSeq< OCI_IIOP_ConnectorInfo >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OCI_IIOP_ConnectorInfo >)
#pragma define(OBObjForSeq< OCI_IIOP_ConnectorInfo >)
#endif
#endif

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

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

OCI_IIOP_ConnectorInfo_ptr
OCI_IIOP_ConnectorInfo::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OCI/IIOP/ConnectorInfo:1.0");

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

    return _nil();
}

void*
OCI_IIOP_ConnectorInfo::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OCI/IIOP/ConnectorInfo:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = OCI_ConnectorInfo::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OCI_IIOP_ConnectorInfo::_OB_typeId() const
{
    return "IDL:ooc.com/OCI/IIOP/ConnectorInfo:1.0";
}

//
// IDL:ooc.com/OCI/IIOP/AcceptorInfo:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OCI_IIOP_AcceptorInfo >;
template class OBObjForSeq< OCI_IIOP_AcceptorInfo >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OCI_IIOP_AcceptorInfo >)
#pragma define(OBObjForSeq< OCI_IIOP_AcceptorInfo >)
#endif
#endif

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

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

OCI_IIOP_AcceptorInfo_ptr
OCI_IIOP_AcceptorInfo::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OCI/IIOP/AcceptorInfo:1.0");

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

    return _nil();
}

void*
OCI_IIOP_AcceptorInfo::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OCI/IIOP/AcceptorInfo:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = OCI_AcceptorInfo::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OCI_IIOP_AcceptorInfo::_OB_typeId() const
{
    return "IDL:ooc.com/OCI/IIOP/AcceptorInfo:1.0";
}

//
// IDL:ooc.com/OCI/IIOP/ConFactoryInfo:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OCI_IIOP_ConFactoryInfo >;
template class OBObjForSeq< OCI_IIOP_ConFactoryInfo >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OCI_IIOP_ConFactoryInfo >)
#pragma define(OBObjForSeq< OCI_IIOP_ConFactoryInfo >)
#endif
#endif

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

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

OCI_IIOP_ConFactoryInfo_ptr
OCI_IIOP_ConFactoryInfo::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OCI/IIOP/ConFactoryInfo:1.0");

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

    return _nil();
}

void*
OCI_IIOP_ConFactoryInfo::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OCI/IIOP/ConFactoryInfo:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = OCI_ConFactoryInfo::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OCI_IIOP_ConFactoryInfo::_OB_typeId() const
{
    return "IDL:ooc.com/OCI/IIOP/ConFactoryInfo:1.0";
}

//
// OBUnsignedChar[4]
//
#ifdef OB_use_OBUnsignedChar_4_from_OCI_IIOP_h

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBFixArrayVar< OBSlice_OBUnsignedChar_4, OBUnsignedChar, 4 >;
template class OBFixArrayForAny< OBSlice_OBUnsignedChar_4, OBUnsignedChar, 4 >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBFixArrayVar< OBSlice_OBUnsignedChar_4, OBUnsignedChar, 4 >)
#pragma define(OBFixArrayForAny< OBSlice_OBUnsignedChar_4, OBUnsignedChar, 4 >)
#endif
#endif

OBSlice_OBUnsignedChar_4*
OBAlloc_OBUnsignedChar_4()
{
    return new OBUnsignedChar[4];
}

OBSlice_OBUnsignedChar_4*
OBDup_OBUnsignedChar_4(const OBSlice_OBUnsignedChar_4* s)
{
    OBSlice_OBUnsignedChar_4* to = new OBUnsignedChar[4];
    memcpy(to, s, 4 * sizeof(OBUnsignedChar));
    return to;
}

void
OBCopy_OBUnsignedChar_4(const OBSlice_OBUnsignedChar_4* s, OBSlice_OBUnsignedChar_4* to)
{
    memcpy(to, s, 4 * sizeof(OBUnsignedChar));
}

void
OBFree_OBUnsignedChar_4(OBSlice_OBUnsignedChar_4* s)
{
    delete [] s;
}

#endif
