// **********************************************************************
//
// 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/IntRepMember.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/RepositoryId:1.0
//
OBTypeCodeConst CORBA__tc_RepositoryId(
"010000001500000048000000010000002300000049444c3a6f6d672e6f72672f434f5242412f5"
"265706f7369746f727949643a312e3000000d0000005265706f7369746f727949640000000012"
"00000000000000"
);

//
// IDL:omg.org/CORBA/ScopedName:1.0
//
OBTypeCodeConst CORBA__tc_ScopedName(
"010000001500000044000000010000002100000049444c3a6f6d672e6f72672f434f5242412f5"
"3636f7065644e616d653a312e30000000000b00000053636f7065644e616d6500001200000000"
"000000"
);

//
// IDL:omg.org/CORBA/Identifier:1.0
//
OBTypeCodeConst CORBA__tc_Identifier(
"010000001500000044000000010000002100000049444c3a6f6d672e6f72672f434f5242412f4"
"964656e7469666965723a312e30000000000b0000004964656e74696669657200001200000000"
"000000"
);

//
// IDL:omg.org/CORBA/DefinitionKind:1.0
//
OBTypeCodeConst CORBA__tc_DefinitionKind(
"010000001100000072010000010000002500000049444c3a6f6d672e6f72672f434f5242412f4"
"46566696e6974696f6e4b696e643a312e30000000000f000000446566696e6974696f6e4b696e"
"6400001200000008000000646b5f6e6f6e650007000000646b5f616c6c00000d000000646b5f4"
"17474726962757465000000000c000000646b5f436f6e7374616e74000d000000646b5f457863"
"657074696f6e000000000d000000646b5f496e74657266616365000000000a000000646b5f4d6"
"f64756c650000000d000000646b5f4f7065726174696f6e000000000b000000646b5f54797065"
"646566000009000000646b5f416c696173000000000a000000646b5f537472756374000000090"
"00000646b5f556e696f6e0000000008000000646b5f456e756d000d000000646b5f5072696d69"
"74697665000000000a000000646b5f537472696e670000000c000000646b5f53657175656e636"
"50009000000646b5f4172726179000000000e000000646b5f5265706f7369746f727900"
);

void
operator<<=(CORBA_Any& any, CORBA_DefinitionKind val)
{
    any.replace(CORBA__tc_DefinitionKind, new CORBA_ULong((CORBA_ULong)val), true);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, CORBA_DefinitionKind& val)
{
    if(any.check_type(CORBA__tc_DefinitionKind))
    {
        val = (CORBA_DefinitionKind)(*(CORBA_ULong*)any.value());
        return true;
    }
    else
        return false;
}

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

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

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

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

        if(v)
            return _duplicate((CORBA_IRObject_ptr)v);

        if(p -> _OB_remoteIsA("IDL:omg.org/CORBA/IRObject:1.0"))
        {
            CORBA_IRObject_ptr val = new CORBA_IRObject;
            val -> _OB_copyFrom(p);
            return val;
        }
    }

    return _nil();
}

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

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

void
OBUnmarshal(CORBA_IRObject_ptr& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_IRObject_var old = val;
    CORBA_Object_var p;
    OBUnmarshal(p.inout(), coct, swap);

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

        if(v)
            val = CORBA_IRObject::_duplicate((CORBA_IRObject_ptr)v);
        else
        {
            assert_nca(!(p -> _is_local() && p -> _is_dynamic()), OBNCADynamicAsStatic);
            assert(!p -> _is_local());
            val = new CORBA_IRObject;
            val -> _OB_copyFrom(p);
        }
    }
    else
        val = CORBA_IRObject::_nil();
}

OBTypeCodeConst CORBA__tc_IRObject(
"010000000e00000035000000010000001f00000049444c3a6f6d672e6f72672f434f5242412f4"
"9524f626a6563743a312e3000000900000049524f626a65637400"
);

void
operator<<=(CORBA_Any& any, CORBA_IRObject_ptr val)
{
    OBObjAny* o = new OBObjAny;
    o -> b = CORBA_Object::_duplicate(val);
    o -> d = CORBA_Object::_duplicate(val);
    any.replace(CORBA__tc_IRObject, o, true);
}

void
operator<<=(CORBA_Any& any, CORBA_IRObject_ptr* val)
{
    OBObjAny* o = new OBObjAny;
    o -> b = *val;
    o -> d = CORBA_Object::_duplicate(*val);
    any.replace(CORBA__tc_IRObject, o, true);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, CORBA_IRObject_ptr& val)
{
    if(any.check_type(CORBA__tc_IRObject))
    {
        OBObjAny* o = (OBObjAny*)any.value();
        assert(o);

        if(!CORBA_is_nil(o -> d))
        {
            void* v = o -> d -> _OB_narrowHelp("IDL:omg.org/CORBA/IRObject:1.0");

            if(v)
                val = (CORBA_IRObject_ptr)v;
            else
            {
                assert_nca(!(o -> d -> _is_local() && o -> d -> _is_dynamic()), OBNCADynamicAsStatic);
                assert(!o -> d -> _is_local());
                val = new CORBA_IRObject;
                val -> _OB_copyFrom(o -> d);
                OBObjAny* no = new OBObjAny;
                no -> b = CORBA_Object::_duplicate(o -> b);
                no -> d = val;
                ((CORBA_Any&)any).replace(CORBA__tc_IRObject, no, true);
            }
        }
        else
            val = CORBA_IRObject::_nil();

        return true;
    }
    else
        return false;
}

//
// IDL:omg.org/CORBA/IRObject/def_kind:1.0
//
CORBA_DefinitionKind
CORBA_IRObject::def_kind()
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "_get_def_kind");

    OBBuffer _ob_buf(_ob_off);

    bool _ob_sw, _ob_ex, _ob_fo;
    _ob_off = _ob_clt_ -> request(this, "_get_def_kind", _ob_buf, _ob_sw, _ob_ex, _ob_fo, _ob_tout_, _ob_retry_);

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        return def_kind();
    }

    if(_ob_ex)
        throw CORBA_UNKNOWN();

    CORBA_DefinitionKind _ob_r;
    OBUnmarshal(_ob_r, _ob_co, _ob_sw);
    return _ob_r;
}

//
// IDL:omg.org/CORBA/IRObject/destroy:1.0
//
void
CORBA_IRObject::destroy()
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "destroy");
    CORBA_ULong _ob_cnt = _ob_off;

    OBBuffer _ob_buf(_ob_cnt);

    bool _ob_sw, _ob_ex, _ob_fo;
    _ob_off = _ob_clt_ -> request(this, "destroy", _ob_buf, _ob_sw, _ob_ex, _ob_fo, _ob_tout_, _ob_retry_);

    if(_ob_fo)
    {
        const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;
        _OB_forward(_ob_co, _ob_sw);
        destroy();
        return;
    }

    if(_ob_ex)
        throw CORBA_UNKNOWN();
}

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

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

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

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

        if(v)
            return _duplicate((CORBA_IDLType_ptr)v);

        if(p -> _OB_remoteIsA("IDL:omg.org/CORBA/IDLType:1.0"))
        {
            CORBA_IDLType_ptr val = new CORBA_IDLType;
            val -> _OB_copyFrom(p);
            return val;
        }
    }

    return _nil();
}

void*
CORBA_IDLType::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:omg.org/CORBA/IDLType:1.0", _ob_id) == 0)
        return (void*)this;
    else
    {
        void* v;
        if((v = CORBA_IRObject::_OB_narrowHelp(_ob_id)) != 0)
            return v;
        return 0;
    }
}

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

void
OBUnmarshal(CORBA_IDLType_ptr& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_IDLType_var old = val;
    CORBA_Object_var p;
    OBUnmarshal(p.inout(), coct, swap);

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

        if(v)
            val = CORBA_IDLType::_duplicate((CORBA_IDLType_ptr)v);
        else
        {
            assert_nca(!(p -> _is_local() && p -> _is_dynamic()), OBNCADynamicAsStatic);
            assert(!p -> _is_local());
            val = new CORBA_IDLType;
            val -> _OB_copyFrom(p);
        }
    }
    else
        val = CORBA_IDLType::_nil();
}

OBTypeCodeConst CORBA__tc_IDLType(
"010000000e00000034000000010000001e00000049444c3a6f6d672e6f72672f434f5242412f4"
"9444c547970653a312e300000000800000049444c5479706500"
);

void
operator<<=(CORBA_Any& any, CORBA_IDLType_ptr val)
{
    OBObjAny* o = new OBObjAny;
    o -> b = CORBA_Object::_duplicate(val);
    o -> d = CORBA_Object::_duplicate(val);
    any.replace(CORBA__tc_IDLType, o, true);
}

void
operator<<=(CORBA_Any& any, CORBA_IDLType_ptr* val)
{
    OBObjAny* o = new OBObjAny;
    o -> b = *val;
    o -> d = CORBA_Object::_duplicate(*val);
    any.replace(CORBA__tc_IDLType, o, true);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, CORBA_IDLType_ptr& val)
{
    if(any.check_type(CORBA__tc_IDLType))
    {
        OBObjAny* o = (OBObjAny*)any.value();
        assert(o);

        if(!CORBA_is_nil(o -> d))
        {
            void* v = o -> d -> _OB_narrowHelp("IDL:omg.org/CORBA/IDLType:1.0");

            if(v)
                val = (CORBA_IDLType_ptr)v;
            else
            {
                assert_nca(!(o -> d -> _is_local() && o -> d -> _is_dynamic()), OBNCADynamicAsStatic);
                assert(!o -> d -> _is_local());
                val = new CORBA_IDLType;
                val -> _OB_copyFrom(o -> d);
                OBObjAny* no = new OBObjAny;
                no -> b = CORBA_Object::_duplicate(o -> b);
                no -> d = val;
                ((CORBA_Any&)any).replace(CORBA__tc_IDLType, no, true);
            }
        }
        else
            val = CORBA_IDLType::_nil();

        return true;
    }
    else
        return false;
}

//
// IDL:omg.org/CORBA/IDLType/type:1.0
//
CORBA_TypeCode_ptr
CORBA_IDLType::type()
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "_get_type");

    OBBuffer _ob_buf(_ob_off);

    bool _ob_sw, _ob_ex, _ob_fo;
    _ob_off = _ob_clt_ -> request(this, "_get_type", _ob_buf, _ob_sw, _ob_ex, _ob_fo, _ob_tout_, _ob_retry_);

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        return type();
    }

    if(_ob_ex)
        throw CORBA_UNKNOWN();

    CORBA_TypeCode_ptr _ob_r = CORBA_TypeCode::_nil();
    OBUnmarshal(_ob_r, _ob_co, _ob_sw);
    return _ob_r;
}

//
// IDL:omg.org/CORBA/StructMember:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBVarVar< CORBA_StructMember >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBVarVar< CORBA_StructMember >)
#endif
#endif

CORBA_StructMember::CORBA_StructMember(const CORBA_StructMember& _ob_a)
    : name(_ob_a.name),
      type(_ob_a.type),
      type_def(_ob_a.type_def)
{
}

CORBA_StructMember&
CORBA_StructMember::operator=(const CORBA_StructMember& _ob_a)
{
    if(this != &_ob_a)
    {
        name = _ob_a.name;
        type = _ob_a.type;
        type_def = _ob_a.type_def;
    }
    return *this;
}

void
OBMarshal(const CORBA_StructMember& val, CORBA_Octet*& oct)
{
    OBMarshal(val.name.in(), oct);
    OBMarshal(val.type.in(), oct);
    OBMarshal(val.type_def.in(), oct);
}

void
OBMarshalCount(const CORBA_StructMember& val, CORBA_ULong& count)
{
    OBMarshalCount(val.name.in(), count);
    OBMarshalCount(val.type.in(), count);
    OBMarshalCount(val.type_def.in(), count);
}

void
OBUnmarshal(CORBA_StructMember& val, const CORBA_Octet*& coct, bool swap)
{
    OBUnmarshal(val.name.inout(), coct, swap);
    OBUnmarshal(val.type.inout(), coct, swap);
    OBUnmarshal(val.type_def.inout(), coct, swap);
}

OBTypeCodeConst CORBA__tc_StructMember(
"010000000f000000f8000000010000002300000049444c3a6f6d672e6f72672f434f5242412f5"
"374727563744d656d6265723a312e3000000d0000005374727563744d656d6265720000000003"
"000000050000006e616d65000000001500000044000000010000002100000049444c3a6f6d672"
"e6f72672f434f5242412f4964656e7469666965723a312e30000000000b0000004964656e7469"
"66696572000012000000000000000500000074797065000000000c00000009000000747970655"
"f646566000000000e00000034000000010000001e00000049444c3a6f6d672e6f72672f434f52"
"42412f49444c547970653a312e300000000800000049444c5479706500"
);

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBInfo< CORBA_StructMember >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBInfo< CORBA_StructMember >)
#endif
#endif

void
operator<<=(CORBA_Any& any, CORBA_StructMember* p)
{
    static const OBInfo< CORBA_StructMember > info;
    any.replace(CORBA__tc_StructMember, p, true, &info);
}

void
operator<<=(CORBA_Any& any, const CORBA_StructMember& val)
{
    CORBA_StructMember* p = new CORBA_StructMember(val);
    static const OBInfo< CORBA_StructMember > info;
    any.replace(CORBA__tc_StructMember, p, true, &info);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, CORBA_StructMember*& p)
{
    if(any.check_type(CORBA__tc_StructMember))
    {
        if(!any.info())
        {
            const OBBuffer* cbufp = (const OBBuffer*)any.value();
            const CORBA_Octet* coct = cbufp -> data;
            CORBA_StructMember* v = new CORBA_StructMember;
            OBUnmarshal(*v, coct, false);
            (CORBA_Any&)any <<= v;
        }

        p = (CORBA_StructMember*)any.value();
        return true;
    }
    else
        return false;
}

//
// IDL:omg.org/CORBA/StructMemberSeq:1.0
//
OBTypeCodeConst CORBA__tc_StructMemberSeq(
"010000001500000054010000010000002600000049444c3a6f6d672e6f72672f434f5242412f5"
"374727563744d656d6265725365713a312e30000000100000005374727563744d656d62657253"
"6571001300000008010000010000000f000000f8000000010000002300000049444c3a6f6d672"
"e6f72672f434f5242412f5374727563744d656d6265723a312e3000000d000000537472756374"
"4d656d6265720000000003000000050000006e616d65000000001500000044000000010000002"
"100000049444c3a6f6d672e6f72672f434f5242412f4964656e7469666965723a312e30000000"
"000b0000004964656e746966696572000012000000000000000500000074797065000000000c0"
"0000009000000747970655f646566000000000e00000034000000010000001e00000049444c3a"
"6f6d672e6f72672f434f5242412f49444c547970653a312e300000000800000049444c5479706"
"50000000000"
);

//
// IDL:omg.org/CORBA/UnionMember:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBVarVar< CORBA_UnionMember >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBVarVar< CORBA_UnionMember >)
#endif
#endif

CORBA_UnionMember::CORBA_UnionMember(const CORBA_UnionMember& _ob_a)
    : name(_ob_a.name),
      label(_ob_a.label),
      type(_ob_a.type),
      type_def(_ob_a.type_def)
{
}

CORBA_UnionMember&
CORBA_UnionMember::operator=(const CORBA_UnionMember& _ob_a)
{
    if(this != &_ob_a)
    {
        name = _ob_a.name;
        label = _ob_a.label;
        type = _ob_a.type;
        type_def = _ob_a.type_def;
    }
    return *this;
}

void
OBMarshal(const CORBA_UnionMember& val, CORBA_Octet*& oct)
{
    OBMarshal(val.name.in(), oct);
    OBMarshal(val.label, oct);
    OBMarshal(val.type.in(), oct);
    OBMarshal(val.type_def.in(), oct);
}

void
OBMarshalCount(const CORBA_UnionMember& val, CORBA_ULong& count)
{
    OBMarshalCount(val.name.in(), count);
    OBMarshalCount(val.label, count);
    OBMarshalCount(val.type.in(), count);
    OBMarshalCount(val.type_def.in(), count);
}

void
OBUnmarshal(CORBA_UnionMember& val, const CORBA_Octet*& coct, bool swap)
{
    OBUnmarshal(val.name.inout(), coct, swap);
    OBUnmarshal(val.label, coct, swap);
    OBUnmarshal(val.type.inout(), coct, swap);
    OBUnmarshal(val.type_def.inout(), coct, swap);
}

OBTypeCodeConst CORBA__tc_UnionMember(
"010000000f00000004010000010000002200000049444c3a6f6d672e6f72672f434f5242412f5"
"56e696f6e4d656d6265723a312e300000000c000000556e696f6e4d656d626572000400000005"
"0000006e616d65000000001500000044000000010000002100000049444c3a6f6d672e6f72672"
"f434f5242412f4964656e7469666965723a312e30000000000b0000004964656e746966696572"
"00001200000000000000060000006c6162656c0000000b0000000500000074797065000000000"
"c00000009000000747970655f646566000000000e00000034000000010000001e00000049444c"
"3a6f6d672e6f72672f434f5242412f49444c547970653a312e300000000800000049444c54797"
"06500"
);

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBInfo< CORBA_UnionMember >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBInfo< CORBA_UnionMember >)
#endif
#endif

void
operator<<=(CORBA_Any& any, CORBA_UnionMember* p)
{
    static const OBInfo< CORBA_UnionMember > info;
    any.replace(CORBA__tc_UnionMember, p, true, &info);
}

void
operator<<=(CORBA_Any& any, const CORBA_UnionMember& val)
{
    CORBA_UnionMember* p = new CORBA_UnionMember(val);
    static const OBInfo< CORBA_UnionMember > info;
    any.replace(CORBA__tc_UnionMember, p, true, &info);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, CORBA_UnionMember*& p)
{
    if(any.check_type(CORBA__tc_UnionMember))
    {
        if(!any.info())
        {
            const OBBuffer* cbufp = (const OBBuffer*)any.value();
            const CORBA_Octet* coct = cbufp -> data;
            CORBA_UnionMember* v = new CORBA_UnionMember;
            OBUnmarshal(*v, coct, false);
            (CORBA_Any&)any <<= v;
        }

        p = (CORBA_UnionMember*)any.value();
        return true;
    }
    else
        return false;
}

//
// IDL:omg.org/CORBA/UnionMemberSeq:1.0
//
OBTypeCodeConst CORBA__tc_UnionMemberSeq(
"010000001500000060010000010000002500000049444c3a6f6d672e6f72672f434f5242412f5"
"56e696f6e4d656d6265725365713a312e30000000000f000000556e696f6e4d656d6265725365"
"7100001300000014010000010000000f00000004010000010000002200000049444c3a6f6d672"
"e6f72672f434f5242412f556e696f6e4d656d6265723a312e300000000c000000556e696f6e4d"
"656d6265720004000000050000006e616d6500000000150000004400000001000000210000004"
"9444c3a6f6d672e6f72672f434f5242412f4964656e7469666965723a312e30000000000b0000"
"004964656e74696669657200001200000000000000060000006c6162656c0000000b000000050"
"0000074797065000000000c00000009000000747970655f646566000000000e00000034000000"
"010000001e00000049444c3a6f6d672e6f72672f434f5242412f49444c547970653a312e30000"
"0000800000049444c547970650000000000"
);

//
// IDL:omg.org/CORBA/EnumMemberSeq:1.0
//
OBTypeCodeConst CORBA__tc_EnumMemberSeq(
"01000000150000009c000000010000002400000049444c3a6f6d672e6f72672f434f5242412f4"
"56e756d4d656d6265725365713a312e30000e000000456e756d4d656d62657253657100000013"
"00000054000000010000001500000044000000010000002100000049444c3a6f6d672e6f72672"
"f434f5242412f4964656e7469666965723a312e30000000000b0000004964656e746966696572"
"0000120000000000000000000000"
);

//
// OBVarSeq< CORBA_StructMember >
//
#ifdef OB_use_OBVarSeq_CORBA__StructMember_from_IntRepMember_h

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBVarSeq< CORBA_StructMember >;
template class OBSeqVar< OBVarSeq< CORBA_StructMember > >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBVarSeq< CORBA_StructMember >)
#pragma define(OBSeqVar< OBVarSeq< CORBA_StructMember > >)
#endif
#endif

void
OBMarshal(const OBVarSeq< CORBA_StructMember >& seq, CORBA_Octet*& oct)
{
    OBMarshal(seq.length(), oct);
    for(CORBA_ULong i = 0 ; i < seq.length() ; i++)
        OBMarshal(seq[i], oct);
}

void
OBMarshalCount(const OBVarSeq< CORBA_StructMember >& seq, CORBA_ULong& count)
{
    OBMarshalCount(seq.length(), count);
    for(CORBA_ULong i = 0 ; i < seq.length() ; i++)
        OBMarshalCount(seq[i], count);
}

void
OBUnmarshal(OBVarSeq< CORBA_StructMember >& seq, const CORBA_Octet*& coct, bool swap)
{
    CORBA_ULong len;
    OBUnmarshal(len, coct, swap);
    seq.length(len);
    for(CORBA_ULong i = 0 ; i < len ; i++)
        OBUnmarshal(seq[i], coct, swap);
}

static OBTypeCodeConst _tc_OBVarSeq_CORBA__StructMember(
"010000001300000008010000010000000f000000f8000000010000002300000049444c3a6f6d6"
"72e6f72672f434f5242412f5374727563744d656d6265723a312e3000000d0000005374727563"
"744d656d6265720000000003000000050000006e616d650000000015000000440000000100000"
"02100000049444c3a6f6d672e6f72672f434f5242412f4964656e7469666965723a312e300000"
"00000b0000004964656e746966696572000012000000000000000500000074797065000000000"
"c00000009000000747970655f646566000000000e00000034000000010000001e00000049444c"
"3a6f6d672e6f72672f434f5242412f49444c547970653a312e300000000800000049444c54797"
"0650000000000"
);

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBInfo< OBVarSeq< CORBA_StructMember > >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBInfo< OBVarSeq< CORBA_StructMember > >)
#endif
#endif

void
operator<<=(CORBA_Any& any, OBVarSeq< CORBA_StructMember >* p)
{
    static const OBInfo< OBVarSeq< CORBA_StructMember > > info;
    any.replace(_tc_OBVarSeq_CORBA__StructMember, p, true, &info);
}

void
operator<<=(CORBA_Any& any, const OBVarSeq< CORBA_StructMember >& seq)
{
    static const OBInfo< OBVarSeq< CORBA_StructMember > > info;
    OBVarSeq< CORBA_StructMember >* p = new OBVarSeq< CORBA_StructMember >(seq);
    any.replace(_tc_OBVarSeq_CORBA__StructMember, p, true, &info);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, OBVarSeq< CORBA_StructMember >*& p)
{
    if(any.check_type(_tc_OBVarSeq_CORBA__StructMember))
    {
        if(!any.info())
        {
            const OBBuffer* cbufp = (const OBBuffer*)any.value();
            const CORBA_Octet* coct = cbufp -> data;
            OBVarSeq< CORBA_StructMember >* v = new OBVarSeq< CORBA_StructMember >;
            OBUnmarshal(*v, coct, false);
            (CORBA_Any&)any <<= v;
        }

        p = (OBVarSeq< CORBA_StructMember >*)any.value();
        return true;
    }
    else
        return false;
}

#endif

//
// OBVarSeq< CORBA_UnionMember >
//
#ifdef OB_use_OBVarSeq_CORBA__UnionMember_from_IntRepMember_h

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBVarSeq< CORBA_UnionMember >;
template class OBSeqVar< OBVarSeq< CORBA_UnionMember > >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBVarSeq< CORBA_UnionMember >)
#pragma define(OBSeqVar< OBVarSeq< CORBA_UnionMember > >)
#endif
#endif

void
OBMarshal(const OBVarSeq< CORBA_UnionMember >& seq, CORBA_Octet*& oct)
{
    OBMarshal(seq.length(), oct);
    for(CORBA_ULong i = 0 ; i < seq.length() ; i++)
        OBMarshal(seq[i], oct);
}

void
OBMarshalCount(const OBVarSeq< CORBA_UnionMember >& seq, CORBA_ULong& count)
{
    OBMarshalCount(seq.length(), count);
    for(CORBA_ULong i = 0 ; i < seq.length() ; i++)
        OBMarshalCount(seq[i], count);
}

void
OBUnmarshal(OBVarSeq< CORBA_UnionMember >& seq, const CORBA_Octet*& coct, bool swap)
{
    CORBA_ULong len;
    OBUnmarshal(len, coct, swap);
    seq.length(len);
    for(CORBA_ULong i = 0 ; i < len ; i++)
        OBUnmarshal(seq[i], coct, swap);
}

static OBTypeCodeConst _tc_OBVarSeq_CORBA__UnionMember(
"010000001300000014010000010000000f00000004010000010000002200000049444c3a6f6d6"
"72e6f72672f434f5242412f556e696f6e4d656d6265723a312e300000000c000000556e696f6e"
"4d656d6265720004000000050000006e616d65000000001500000044000000010000002100000"
"049444c3a6f6d672e6f72672f434f5242412f4964656e7469666965723a312e30000000000b00"
"00004964656e74696669657200001200000000000000060000006c6162656c0000000b0000000"
"500000074797065000000000c00000009000000747970655f646566000000000e000000340000"
"00010000001e00000049444c3a6f6d672e6f72672f434f5242412f49444c547970653a312e300"
"000000800000049444c547970650000000000"
);

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBInfo< OBVarSeq< CORBA_UnionMember > >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBInfo< OBVarSeq< CORBA_UnionMember > >)
#endif
#endif

void
operator<<=(CORBA_Any& any, OBVarSeq< CORBA_UnionMember >* p)
{
    static const OBInfo< OBVarSeq< CORBA_UnionMember > > info;
    any.replace(_tc_OBVarSeq_CORBA__UnionMember, p, true, &info);
}

void
operator<<=(CORBA_Any& any, const OBVarSeq< CORBA_UnionMember >& seq)
{
    static const OBInfo< OBVarSeq< CORBA_UnionMember > > info;
    OBVarSeq< CORBA_UnionMember >* p = new OBVarSeq< CORBA_UnionMember >(seq);
    any.replace(_tc_OBVarSeq_CORBA__UnionMember, p, true, &info);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, OBVarSeq< CORBA_UnionMember >*& p)
{
    if(any.check_type(_tc_OBVarSeq_CORBA__UnionMember))
    {
        if(!any.info())
        {
            const OBBuffer* cbufp = (const OBBuffer*)any.value();
            const CORBA_Octet* coct = cbufp -> data;
            OBVarSeq< CORBA_UnionMember >* v = new OBVarSeq< CORBA_UnionMember >;
            OBUnmarshal(*v, coct, false);
            (CORBA_Any&)any <<= v;
        }

        p = (OBVarSeq< CORBA_UnionMember >*)any.value();
        return true;
    }
    else
        return false;
}

#endif

//
// OBStrSeq
//
#ifdef OB_use_OBStrSeq_from_IntRepMember_h

static OBTypeCodeConst _tc_OBStrSeq(
"010000001300000054000000010000001500000044000000010000002100000049444c3a6f6d6"
"72e6f72672f434f5242412f4964656e7469666965723a312e30000000000b0000004964656e74"
"69666965720000120000000000000000000000"
);

#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBInfo< OBStrSeq >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBInfo< OBStrSeq >)
#endif
#endif

void
operator<<=(CORBA_Any& any, OBStrSeq* p)
{
    static const OBInfo< OBStrSeq > info;
    any.replace(_tc_OBStrSeq, p, true, &info);
}

void
operator<<=(CORBA_Any& any, const OBStrSeq& seq)
{
    static const OBInfo< OBStrSeq > info;
    OBStrSeq* p = new OBStrSeq(seq);
    any.replace(_tc_OBStrSeq, p, true, &info);
}

CORBA_Boolean
operator>>=(const CORBA_Any& any, OBStrSeq*& p)
{
    if(any.check_type(_tc_OBStrSeq))
    {
        if(!any.info())
        {
            const OBBuffer* cbufp = (const OBBuffer*)any.value();
            const CORBA_Octet* coct = cbufp -> data;
            OBStrSeq* v = new OBStrSeq;
            OBUnmarshal(*v, coct, false);
            (CORBA_Any&)any <<= v;
        }

        p = (OBStrSeq*)any.value();
        return true;
    }
    else
        return false;
}

#endif
