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

// Version: 3.0.1
// License: non-commercial

#include <OB/CORBA.h>
#include <OB/TemplateI.h>
#include "toveswitch.h"

//
// IDL:toveSwitch/Parameter:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBVarVar< toveSwitch_Parameter >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBVarVar< toveSwitch_Parameter >)
#endif
#endif

toveSwitch_Parameter::toveSwitch_Parameter(const toveSwitch_Parameter& _ob_a)
    : id(_ob_a.id),
      value(_ob_a.value),
      type(_ob_a.type)
{
}

toveSwitch_Parameter&
toveSwitch_Parameter::operator=(const toveSwitch_Parameter& _ob_a)
{
    if(this != &_ob_a)
    {
        id = _ob_a.id;
        value = _ob_a.value;
        type = _ob_a.type;
    }
    return *this;
}

void
OBMarshal(const toveSwitch_Parameter& val, CORBA_Octet*& oct)
{
    OBMarshal(val.id.in(), oct);
    OBMarshal(val.value.in(), oct);
    OBMarshal(val.type.in(), oct);
}

void
OBMarshalCount(const toveSwitch_Parameter& val, CORBA_ULong& count)
{
    OBMarshalCount(val.id.in(), count);
    OBMarshalCount(val.value.in(), count);
    OBMarshalCount(val.type.in(), count);
}

void
OBUnmarshal(toveSwitch_Parameter& val, const CORBA_Octet*& coct, bool swap)
{
    OBUnmarshal(val.id.inout(), coct, swap);
    OBUnmarshal(val.value.inout(), coct, swap);
    OBUnmarshal(val.type.inout(), coct, swap);
}

OBTypeCodeConst toveSwitch__tc_Parameter(
"010000000f00000074000000010000001d00000049444c3a746f76655377697463682f5061726"
"16d657465723a312e30000000000a000000506172616d65746572000000030000000300000069"
"64000012000000000000000600000076616c75650000001200000000000000050000007479706"
"5000000001200000000000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/ParameterList:1.0
//
OBTypeCodeConst toveSwitch__tc_ParameterList(
"0100000015000000cc000000010000002100000049444c3a746f76655377697463682f5061726"
"16d657465724c6973743a312e30000000000e000000506172616d657465724c69737400000013"
"00000084000000010000000f00000074000000010000001d00000049444c3a746f76655377697"
"463682f506172616d657465723a312e30000000000a000000506172616d657465720000000300"
"0000030000006964000012000000000000000600000076616c756500000012000000000000000"
"50000007479706500000000120000000000000000000000"
);

//
// IDL:toveSwitch/InvalidPort:1.0
//
#ifdef OB_CLEAR_MEM
toveSwitch_InvalidPort::toveSwitch_InvalidPort()
{
    memset(&port, 0, sizeof(port));
}
#endif

toveSwitch_InvalidPort::toveSwitch_InvalidPort(const toveSwitch_InvalidPort& _ob_a)
    : CORBA_UserException(_ob_a),
      port(_ob_a.port)
{
}

toveSwitch_InvalidPort::toveSwitch_InvalidPort(CORBA_Long _ob_a0)
    : port(_ob_a0)
{
}

toveSwitch_InvalidPort&
toveSwitch_InvalidPort::operator=(const toveSwitch_InvalidPort& _ob_a)
{
    if(this != &_ob_a)
    {
        port = _ob_a.port;
    }
    return *this;
}

toveSwitch_InvalidPort*
toveSwitch_InvalidPort::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_InvalidPort*)(p -> _OB_narrowHelp("IDL:toveSwitch/InvalidPort:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_InvalidPort*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_InvalidPort::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/InvalidPort:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_InvalidPort::_OB_typeId() const
{
    return "IDL:toveSwitch/InvalidPort:1.0";
}

CORBA_Exception*
toveSwitch_InvalidPort::_OB_clone() const
{
    return new toveSwitch_InvalidPort(*this);
}

void
OBMarshal(const toveSwitch_InvalidPort& val, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/InvalidPort:1.0", oct);
    OBMarshal(val.port, oct);
}

void
OBMarshalCount(const toveSwitch_InvalidPort& val, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/InvalidPort:1.0", count);
    OBMarshalCount(val.port, count);
}

void
OBUnmarshal(toveSwitch_InvalidPort& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/InvalidPort:1.0") == 0);
    OBUnmarshal(val.port, coct, swap);
}

OBTypeCodeConst toveSwitch__tc_InvalidPort(
"01000000160000004c000000010000001f00000049444c3a746f76655377697463682f496e766"
"16c6964506f72743a312e3000000c000000496e76616c6964506f727400010000000500000070"
"6f72740000000003000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/InvalidLed:1.0
//
#ifdef OB_CLEAR_MEM
toveSwitch_InvalidLed::toveSwitch_InvalidLed()
{
    memset(&led, 0, sizeof(led));
}
#endif

toveSwitch_InvalidLed::toveSwitch_InvalidLed(const toveSwitch_InvalidLed& _ob_a)
    : CORBA_UserException(_ob_a),
      led(_ob_a.led)
{
}

toveSwitch_InvalidLed::toveSwitch_InvalidLed(CORBA_Long _ob_a0)
    : led(_ob_a0)
{
}

toveSwitch_InvalidLed&
toveSwitch_InvalidLed::operator=(const toveSwitch_InvalidLed& _ob_a)
{
    if(this != &_ob_a)
    {
        led = _ob_a.led;
    }
    return *this;
}

toveSwitch_InvalidLed*
toveSwitch_InvalidLed::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_InvalidLed*)(p -> _OB_narrowHelp("IDL:toveSwitch/InvalidLed:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_InvalidLed*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_InvalidLed::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/InvalidLed:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_InvalidLed::_OB_typeId() const
{
    return "IDL:toveSwitch/InvalidLed:1.0";
}

CORBA_Exception*
toveSwitch_InvalidLed::_OB_clone() const
{
    return new toveSwitch_InvalidLed(*this);
}

void
OBMarshal(const toveSwitch_InvalidLed& val, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/InvalidLed:1.0", oct);
    OBMarshal(val.led, oct);
}

void
OBMarshalCount(const toveSwitch_InvalidLed& val, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/InvalidLed:1.0", count);
    OBMarshalCount(val.led, count);
}

void
OBUnmarshal(toveSwitch_InvalidLed& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/InvalidLed:1.0") == 0);
    OBUnmarshal(val.led, coct, swap);
}

OBTypeCodeConst toveSwitch__tc_InvalidLed(
"010000001600000048000000010000001e00000049444c3a746f76655377697463682f496e766"
"16c69644c65643a312e300000000b000000496e76616c69644c6564000001000000040000006c"
"65640003000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/InvalidCommand:1.0
//
toveSwitch_InvalidCommand::toveSwitch_InvalidCommand(const toveSwitch_InvalidCommand& _ob_a)
    : CORBA_UserException(_ob_a),
      command(_ob_a.command)
{
}

toveSwitch_InvalidCommand::toveSwitch_InvalidCommand(const char* _ob_a0)
    : command(_ob_a0)
{
}

toveSwitch_InvalidCommand&
toveSwitch_InvalidCommand::operator=(const toveSwitch_InvalidCommand& _ob_a)
{
    if(this != &_ob_a)
    {
        command = _ob_a.command;
    }
    return *this;
}

toveSwitch_InvalidCommand*
toveSwitch_InvalidCommand::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_InvalidCommand*)(p -> _OB_narrowHelp("IDL:toveSwitch/InvalidCommand:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_InvalidCommand*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_InvalidCommand::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/InvalidCommand:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_InvalidCommand::_OB_typeId() const
{
    return "IDL:toveSwitch/InvalidCommand:1.0";
}

CORBA_Exception*
toveSwitch_InvalidCommand::_OB_clone() const
{
    return new toveSwitch_InvalidCommand(*this);
}

void
OBMarshal(const toveSwitch_InvalidCommand& val, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/InvalidCommand:1.0", oct);
    OBMarshal(val.command.in(), oct);
}

void
OBMarshalCount(const toveSwitch_InvalidCommand& val, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/InvalidCommand:1.0", count);
    OBMarshalCount(val.command.in(), count);
}

void
OBUnmarshal(toveSwitch_InvalidCommand& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/InvalidCommand:1.0") == 0);
    OBUnmarshal(val.command.inout(), coct, swap);
}

OBTypeCodeConst toveSwitch__tc_InvalidCommand(
"010000001600000058000000010000002200000049444c3a746f76655377697463682f496e766"
"16c6964436f6d6d616e643a312e300000000f000000496e76616c6964436f6d6d616e64000001"
"00000008000000636f6d6d616e64001200000000000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/InvalidEvent:1.0
//
toveSwitch_InvalidEvent::toveSwitch_InvalidEvent(const toveSwitch_InvalidEvent& _ob_a)
    : CORBA_UserException(_ob_a),
      event(_ob_a.event)
{
}

toveSwitch_InvalidEvent::toveSwitch_InvalidEvent(const char* _ob_a0)
    : event(_ob_a0)
{
}

toveSwitch_InvalidEvent&
toveSwitch_InvalidEvent::operator=(const toveSwitch_InvalidEvent& _ob_a)
{
    if(this != &_ob_a)
    {
        event = _ob_a.event;
    }
    return *this;
}

toveSwitch_InvalidEvent*
toveSwitch_InvalidEvent::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_InvalidEvent*)(p -> _OB_narrowHelp("IDL:toveSwitch/InvalidEvent:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_InvalidEvent*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_InvalidEvent::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/InvalidEvent:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_InvalidEvent::_OB_typeId() const
{
    return "IDL:toveSwitch/InvalidEvent:1.0";
}

CORBA_Exception*
toveSwitch_InvalidEvent::_OB_clone() const
{
    return new toveSwitch_InvalidEvent(*this);
}

void
OBMarshal(const toveSwitch_InvalidEvent& val, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/InvalidEvent:1.0", oct);
    OBMarshal(val.event.in(), oct);
}

void
OBMarshalCount(const toveSwitch_InvalidEvent& val, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/InvalidEvent:1.0", count);
    OBMarshalCount(val.event.in(), count);
}

void
OBUnmarshal(toveSwitch_InvalidEvent& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/InvalidEvent:1.0") == 0);
    OBUnmarshal(val.event.inout(), coct, swap);
}

OBTypeCodeConst toveSwitch__tc_InvalidEvent(
"010000001600000054000000010000002000000049444c3a746f76655377697463682f496e766"
"16c69644576656e743a312e30000d000000496e76616c69644576656e74000000000100000006"
"0000006576656e740000001200000000000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/InvalidVariable:1.0
//
toveSwitch_InvalidVariable::toveSwitch_InvalidVariable(const toveSwitch_InvalidVariable& _ob_a)
    : CORBA_UserException(_ob_a),
      variable(_ob_a.variable)
{
}

toveSwitch_InvalidVariable::toveSwitch_InvalidVariable(const char* _ob_a0)
    : variable(_ob_a0)
{
}

toveSwitch_InvalidVariable&
toveSwitch_InvalidVariable::operator=(const toveSwitch_InvalidVariable& _ob_a)
{
    if(this != &_ob_a)
    {
        variable = _ob_a.variable;
    }
    return *this;
}

toveSwitch_InvalidVariable*
toveSwitch_InvalidVariable::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_InvalidVariable*)(p -> _OB_narrowHelp("IDL:toveSwitch/InvalidVariable:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_InvalidVariable*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_InvalidVariable::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/InvalidVariable:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_InvalidVariable::_OB_typeId() const
{
    return "IDL:toveSwitch/InvalidVariable:1.0";
}

CORBA_Exception*
toveSwitch_InvalidVariable::_OB_clone() const
{
    return new toveSwitch_InvalidVariable(*this);
}

void
OBMarshal(const toveSwitch_InvalidVariable& val, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/InvalidVariable:1.0", oct);
    OBMarshal(val.variable.in(), oct);
}

void
OBMarshalCount(const toveSwitch_InvalidVariable& val, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/InvalidVariable:1.0", count);
    OBMarshalCount(val.variable.in(), count);
}

void
OBUnmarshal(toveSwitch_InvalidVariable& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/InvalidVariable:1.0") == 0);
    OBUnmarshal(val.variable.inout(), coct, swap);
}

OBTypeCodeConst toveSwitch__tc_InvalidVariable(
"01000000160000005c000000010000002300000049444c3a746f76655377697463682f496e766"
"16c69645661726961626c653a312e30000010000000496e76616c69645661726961626c650001"
"000000090000007661726961626c65000000001200000000000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/InvalidValue:1.0
//
toveSwitch_InvalidValue::toveSwitch_InvalidValue(const toveSwitch_InvalidValue& _ob_a)
    : CORBA_UserException(_ob_a),
      value(_ob_a.value)
{
}

toveSwitch_InvalidValue::toveSwitch_InvalidValue(const char* _ob_a0)
    : value(_ob_a0)
{
}

toveSwitch_InvalidValue&
toveSwitch_InvalidValue::operator=(const toveSwitch_InvalidValue& _ob_a)
{
    if(this != &_ob_a)
    {
        value = _ob_a.value;
    }
    return *this;
}

toveSwitch_InvalidValue*
toveSwitch_InvalidValue::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_InvalidValue*)(p -> _OB_narrowHelp("IDL:toveSwitch/InvalidValue:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_InvalidValue*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_InvalidValue::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/InvalidValue:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_InvalidValue::_OB_typeId() const
{
    return "IDL:toveSwitch/InvalidValue:1.0";
}

CORBA_Exception*
toveSwitch_InvalidValue::_OB_clone() const
{
    return new toveSwitch_InvalidValue(*this);
}

void
OBMarshal(const toveSwitch_InvalidValue& val, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/InvalidValue:1.0", oct);
    OBMarshal(val.value.in(), oct);
}

void
OBMarshalCount(const toveSwitch_InvalidValue& val, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/InvalidValue:1.0", count);
    OBMarshalCount(val.value.in(), count);
}

void
OBUnmarshal(toveSwitch_InvalidValue& val, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/InvalidValue:1.0") == 0);
    OBUnmarshal(val.value.inout(), coct, swap);
}

OBTypeCodeConst toveSwitch__tc_InvalidValue(
"010000001600000054000000010000002000000049444c3a746f76655377697463682f496e766"
"16c696456616c75653a312e30000d000000496e76616c696456616c7565000000000100000006"
"00000076616c75650000001200000000000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/RegisteringError:1.0
//
toveSwitch_RegisteringError::toveSwitch_RegisteringError(const toveSwitch_RegisteringError& _ob_a)
    : CORBA_UserException(_ob_a)
{
}

toveSwitch_RegisteringError&
toveSwitch_RegisteringError::operator=(const toveSwitch_RegisteringError&)
{
    return *this;
}

toveSwitch_RegisteringError*
toveSwitch_RegisteringError::_narrow(CORBA_Exception* p)
{
#ifdef HAVE_NO_RTTI
    if(p)
        return (toveSwitch_RegisteringError*)(p -> _OB_narrowHelp("IDL:toveSwitch/RegisteringError:1.0"));
    else
        return 0;
#else
    return dynamic_cast<toveSwitch_RegisteringError*>(p);
#endif
}

#ifdef HAVE_NO_RTTI
void*
toveSwitch_RegisteringError::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/RegisteringError:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_UserException::_OB_narrowHelp(_ob_id);
}
#endif

const char*
toveSwitch_RegisteringError::_OB_typeId() const
{
    return "IDL:toveSwitch/RegisteringError:1.0";
}

CORBA_Exception*
toveSwitch_RegisteringError::_OB_clone() const
{
    return new toveSwitch_RegisteringError(*this);
}

void
OBMarshal(const toveSwitch_RegisteringError&, CORBA_Octet*& oct)
{
    OBMarshal("IDL:toveSwitch/RegisteringError:1.0", oct);
}

void
OBMarshalCount(const toveSwitch_RegisteringError&, CORBA_ULong& count)
{
    OBMarshalCount("IDL:toveSwitch/RegisteringError:1.0", count);
}

void
OBUnmarshal(toveSwitch_RegisteringError&, const CORBA_Octet*& coct, bool swap)
{
    CORBA_String_var id;
    OBUnmarshal(id.inout(), coct, swap);
    assert(strcmp(id, "IDL:toveSwitch/RegisteringError:1.0") == 0);
}

OBTypeCodeConst toveSwitch__tc_RegisteringError(
"010000001600000048000000010000002400000049444c3a746f76655377697463682f5265676"
"973746572696e674572726f723a312e3000110000005265676973746572696e674572726f7200"
"00000000000000"
);

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

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

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

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

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

//
// IDL:toveSwitch/userInterface:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< toveSwitch_userInterface >;
template class OBObjForSeq< toveSwitch_userInterface >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< toveSwitch_userInterface >)
#pragma define(OBObjForSeq< toveSwitch_userInterface >)
#endif
#endif

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

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

toveSwitch_userInterface_ptr
toveSwitch_userInterface::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:toveSwitch/userInterface:1.0");

        if(v)
            return _duplicate((toveSwitch_userInterface_ptr)v);

        if(p -> _OB_remoteIsA("IDL:toveSwitch/userInterface:1.0"))
        {
            toveSwitch_userInterface_ptr val = new toveSwitch_userInterface;
            val -> _OB_copyFrom(p);
            return val;
        }
    }

    return _nil();
}

void*
toveSwitch_userInterface::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/userInterface:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_Object::_OB_narrowHelp(_ob_id);
}

const char*
toveSwitch_userInterface::_OB_typeId() const
{
    return "IDL:toveSwitch/userInterface:1.0";
}

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

    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:toveSwitch/userInterface:1.0");

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

OBTypeCodeConst toveSwitch__tc_userInterface(
"010000000e0000003e000000010000002100000049444c3a746f76655377697463682f7573657"
"2496e746572666163653a312e30000000000e00000075736572496e7465726661636500"
);

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

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

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

        if(!CORBA_is_nil(o -> d))
        {
            void* v = o -> d -> _OB_narrowHelp("IDL:toveSwitch/userInterface:1.0");

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

        return true;
    }
    else
        return false;
}

//
// IDL:toveSwitch/userInterface/ledOn:1.0
//
void
toveSwitch_userInterface::ledOn(CORBA_Long _ob_a0,
                                CORBA_Long _ob_a1)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "ledOn");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);
    OBMarshalCount(_ob_a1, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);
    OBMarshal(_ob_a1, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        ledOn(_ob_a0, _ob_a1);
        return;
    }

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidPort:1.0") == 0)
        {
            toveSwitch_InvalidPort _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else if(strcmp(_ob_id, "IDL:toveSwitch/InvalidLed:1.0") == 0)
        {
            toveSwitch_InvalidLed _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/userInterface/ledOff:1.0
//
void
toveSwitch_userInterface::ledOff(CORBA_Long _ob_a0,
                                 CORBA_Long _ob_a1)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "ledOff");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);
    OBMarshalCount(_ob_a1, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);
    OBMarshal(_ob_a1, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        ledOff(_ob_a0, _ob_a1);
        return;
    }

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidPort:1.0") == 0)
        {
            toveSwitch_InvalidPort _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else if(strcmp(_ob_id, "IDL:toveSwitch/InvalidLed:1.0") == 0)
        {
            toveSwitch_InvalidLed _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/userInterface/ledBlink:1.0
//
void
toveSwitch_userInterface::ledBlink(CORBA_Long _ob_a0,
                                   CORBA_Long _ob_a1,
                                   CORBA_Long _ob_a2)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "ledBlink");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);
    OBMarshalCount(_ob_a1, _ob_cnt);
    OBMarshalCount(_ob_a2, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);
    OBMarshal(_ob_a1, _ob_o);
    OBMarshal(_ob_a2, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        ledBlink(_ob_a0, _ob_a1, _ob_a2);
        return;
    }

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidPort:1.0") == 0)
        {
            toveSwitch_InvalidPort _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else if(strcmp(_ob_id, "IDL:toveSwitch/InvalidLed:1.0") == 0)
        {
            toveSwitch_InvalidLed _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/userInterface/printInfo:1.0
//
void
toveSwitch_userInterface::printInfo(const char* _ob_a0)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "printInfo");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);

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

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

    if(_ob_ex)
        throw CORBA_UNKNOWN();
}

//
// IDL:toveSwitch/userInterface/event:1.0
//
void
toveSwitch_userInterface::event(const char* _ob_a0)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "event");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

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

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidEvent:1.0") == 0)
        {
            toveSwitch_InvalidEvent _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/switchInterface:1.0
//
#ifndef HAVE_NO_EXPLICIT_TEMPLATES
template class OBObjVar< toveSwitch_switchInterface >;
template class OBObjForSeq< toveSwitch_switchInterface >;
#else
#ifdef HAVE_PRAGMA_DEFINE
#pragma define(OBObjVar< toveSwitch_switchInterface >)
#pragma define(OBObjForSeq< toveSwitch_switchInterface >)
#endif
#endif

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

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

toveSwitch_switchInterface_ptr
toveSwitch_switchInterface::_narrow(CORBA_Object_ptr p)
{
    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:toveSwitch/switchInterface:1.0");

        if(v)
            return _duplicate((toveSwitch_switchInterface_ptr)v);

        if(p -> _OB_remoteIsA("IDL:toveSwitch/switchInterface:1.0"))
        {
            toveSwitch_switchInterface_ptr val = new toveSwitch_switchInterface;
            val -> _OB_copyFrom(p);
            return val;
        }
    }

    return _nil();
}

void*
toveSwitch_switchInterface::_OB_narrowHelp(const char* _ob_id) const
{
    if(strcmp("IDL:toveSwitch/switchInterface:1.0", _ob_id) == 0)
        return (void*)this;
    else
        return CORBA_Object::_OB_narrowHelp(_ob_id);
}

const char*
toveSwitch_switchInterface::_OB_typeId() const
{
    return "IDL:toveSwitch/switchInterface:1.0";
}

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

    if(!CORBA_is_nil(p))
    {
        void* v = p -> _OB_narrowHelp("IDL:toveSwitch/switchInterface:1.0");

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

OBTypeCodeConst toveSwitch__tc_switchInterface(
"010000000e00000040000000010000002300000049444c3a746f76655377697463682f7377697"
"46368496e746572666163653a312e30000010000000737769746368496e7465726661636500"
);

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

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

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

        if(!CORBA_is_nil(o -> d))
        {
            void* v = o -> d -> _OB_narrowHelp("IDL:toveSwitch/switchInterface:1.0");

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

        return true;
    }
    else
        return false;
}

//
// IDL:toveSwitch/switchInterface/registerUserInterface:1.0
//
void
toveSwitch_switchInterface::registerUserInterface(CORBA_Object_ptr _ob_a0)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "registerUserInterface");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

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

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/RegisteringError:1.0") == 0)
        {
            toveSwitch_RegisteringError _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/switchInterface/unregisterUserInterface:1.0
//
void
toveSwitch_switchInterface::unregisterUserInterface(CORBA_Object_ptr _ob_a0)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "unregisterUserInterface");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

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

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/RegisteringError:1.0") == 0)
        {
            toveSwitch_RegisteringError _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/switchInterface/getValue:1.0
//
char*
toveSwitch_switchInterface::getValue(const char* _ob_a0)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "getValue");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

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

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidVariable:1.0") == 0)
        {
            toveSwitch_InvalidVariable _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }

    char* _ob_r = 0;
    OBUnmarshal(_ob_r, _ob_co, _ob_sw);
    return _ob_r;
}

//
// IDL:toveSwitch/switchInterface/setValue:1.0
//
void
toveSwitch_switchInterface::setValue(const char* _ob_a0,
                                     const char* _ob_a1)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "setValue");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);
    OBMarshalCount(_ob_a1, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);
    OBMarshal(_ob_a1, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        setValue(_ob_a0, _ob_a1);
        return;
    }

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidValue:1.0") == 0)
        {
            toveSwitch_InvalidValue _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else if(strcmp(_ob_id, "IDL:toveSwitch/InvalidVariable:1.0") == 0)
        {
            toveSwitch_InvalidVariable _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }
}

//
// IDL:toveSwitch/switchInterface/execute:1.0
//
void
toveSwitch_switchInterface::execute(const char* _ob_a0,
                                    toveSwitch_ParameterList& _ob_a1)
{
    if(CORBA_is_nil(_ob_clt_))
        throw CORBA_NO_IMPLEMENT();

    CORBA_ULong _ob_off = _ob_clt_ -> offset(this, "execute");
    CORBA_ULong _ob_cnt = _ob_off;
    OBMarshalCount(_ob_a0, _ob_cnt);
    OBMarshalCount(_ob_a1, _ob_cnt);

    OBBuffer _ob_buf(_ob_cnt);
    CORBA_Octet* _ob_o = _ob_buf.data + _ob_off;
    OBMarshal(_ob_a0, _ob_o);
    OBMarshal(_ob_a1, _ob_o);

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

    const CORBA_Octet* _ob_co = _ob_buf.data + _ob_off;

    if(_ob_fo)
    {
        _OB_forward(_ob_co, _ob_sw);
        execute(_ob_a0, _ob_a1);
        return;
    }

    if(_ob_ex)
    {
        CORBA_String_var _ob_id;
        const CORBA_Octet* _ob_coid = _ob_co;
        OBUnmarshal(_ob_id.inout(), _ob_coid, _ob_sw);

        if(strcmp(_ob_id, "IDL:toveSwitch/InvalidCommand:1.0") == 0)
        {
            toveSwitch_InvalidCommand _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else if(strcmp(_ob_id, "IDL:toveSwitch/InvalidVariable:1.0") == 0)
        {
            toveSwitch_InvalidVariable _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else if(strcmp(_ob_id, "IDL:toveSwitch/InvalidValue:1.0") == 0)
        {
            toveSwitch_InvalidValue _ob_except;
            OBUnmarshal(_ob_except, _ob_co, _ob_sw);

            throw _ob_except;
        }
        else
            throw CORBA_UNKNOWN();
    }

    OBUnmarshal(_ob_a1, _ob_co, _ob_sw);
}

//
// OBVarSeq< toveSwitch_Parameter >
//
#ifdef OB_use_OBVarSeq_toveSwitch__Parameter_from_toveswitch_h

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

void
OBMarshal(const OBVarSeq< toveSwitch_Parameter >& 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< toveSwitch_Parameter >& seq, CORBA_ULong& count)
{
    OBMarshalCount(seq.length(), count);
    for(CORBA_ULong i = 0 ; i < seq.length() ; i++)
        OBMarshalCount(seq[i], count);
}

void
OBUnmarshal(OBVarSeq< toveSwitch_Parameter >& 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_toveSwitch__Parameter(
"010000001300000084000000010000000f00000074000000010000001d00000049444c3a746f7"
"6655377697463682f506172616d657465723a312e30000000000a000000506172616d65746572"
"00000003000000030000006964000012000000000000000600000076616c75650000001200000"
"000000000050000007479706500000000120000000000000000000000"
);

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

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

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

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

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

#endif
