// **********************************************************************
//
// 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/OBPolicies.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/SSL/CONNECT_POLICY:1.0
//
const CORBA_PolicyType SSL_CONNECT_POLICY = 1;

//
// IDL:ooc.com/SSL/ConnectPolicy:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< SSL_ConnectPolicy >;
template class OBObjForSeq< SSL_ConnectPolicy >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< SSL_ConnectPolicy >)
#pragma define(OBObjForSeq< SSL_ConnectPolicy >)
#endif
#endif

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

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

SSL_ConnectPolicy_ptr
SSL_ConnectPolicy::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/SSL/ConnectPolicy:1.0");

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

    return _nil();
}

void*
SSL_ConnectPolicy::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/SSL/ConnectPolicy:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = CORBA_Policy::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
SSL_ConnectPolicy::_OB_typeId() const
{
    return "IDL:ooc.com/SSL/ConnectPolicy:1.0";
}

//
// IDL:ooc.com/OB/PROTOCOL_POLICY:1.0
//
const CORBA_PolicyType OB_PROTOCOL_POLICY = 2;

//
// IDL:ooc.com/OB/ProtocolPolicy:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OB_ProtocolPolicy >;
template class OBObjForSeq< OB_ProtocolPolicy >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OB_ProtocolPolicy >)
#pragma define(OBObjForSeq< OB_ProtocolPolicy >)
#endif
#endif

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

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

OB_ProtocolPolicy_ptr
OB_ProtocolPolicy::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OB/ProtocolPolicy:1.0");

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

    return _nil();
}

void*
OB_ProtocolPolicy::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OB/ProtocolPolicy:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = CORBA_Policy::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OB_ProtocolPolicy::_OB_typeId() const
{
    return "IDL:ooc.com/OB/ProtocolPolicy:1.0";
}

//
// IDL:ooc.com/OB/CONNECTION_REUSE_POLICY:1.0
//
const CORBA_PolicyType OB_CONNECTION_REUSE_POLICY = 3;

//
// IDL:ooc.com/OB/ConnectionReusePolicy:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OB_ConnectionReusePolicy >;
template class OBObjForSeq< OB_ConnectionReusePolicy >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OB_ConnectionReusePolicy >)
#pragma define(OBObjForSeq< OB_ConnectionReusePolicy >)
#endif
#endif

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

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

OB_ConnectionReusePolicy_ptr
OB_ConnectionReusePolicy::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OB/ConnectionReusePolicy:1.0");

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

    return _nil();
}

void*
OB_ConnectionReusePolicy::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OB/ConnectionReusePolicy:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = CORBA_Policy::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OB_ConnectionReusePolicy::_OB_typeId() const
{
    return "IDL:ooc.com/OB/ConnectionReusePolicy:1.0";
}

//
// IDL:ooc.com/OB/RECONNECT_POLICY:1.0
//
const CORBA_PolicyType OB_RECONNECT_POLICY = 4;

//
// IDL:ooc.com/OB/ReconnectPolicy:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OB_ReconnectPolicy >;
template class OBObjForSeq< OB_ReconnectPolicy >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OB_ReconnectPolicy >)
#pragma define(OBObjForSeq< OB_ReconnectPolicy >)
#endif
#endif

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

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

OB_ReconnectPolicy_ptr
OB_ReconnectPolicy::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OB/ReconnectPolicy:1.0");

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

    return _nil();
}

void*
OB_ReconnectPolicy::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OB/ReconnectPolicy:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = CORBA_Policy::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OB_ReconnectPolicy::_OB_typeId() const
{
    return "IDL:ooc.com/OB/ReconnectPolicy:1.0";
}

//
// IDL:ooc.com/OB/TIMEOUT_POLICY:1.0
//
const CORBA_PolicyType OB_TIMEOUT_POLICY = 5;

//
// IDL:ooc.com/OB/TimeoutPolicy:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< OB_TimeoutPolicy >;
template class OBObjForSeq< OB_TimeoutPolicy >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< OB_TimeoutPolicy >)
#pragma define(OBObjForSeq< OB_TimeoutPolicy >)
#endif
#endif

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

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

OB_TimeoutPolicy_ptr
OB_TimeoutPolicy::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:ooc.com/OB/TimeoutPolicy:1.0");

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

    return _nil();
}

void*
OB_TimeoutPolicy::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:ooc.com/OB/TimeoutPolicy:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = CORBA_Policy::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

const char*
OB_TimeoutPolicy::_OB_typeId() const
{
    return "IDL:ooc.com/OB/TimeoutPolicy:1.0";
}
