#include <STAR/CORBAServer.h>
#include <Dinner_skel.h>

void
POA_Dinner::Fork::_STAR_op_obtain_fork(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Components::Cookie_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Fork * objImpl=dynamic_cast< POA_Dinner::Fork*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->obtain_fork();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Fork::_STAR_op_release_fork(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Components::Cookie_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.out(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Fork * objImpl=dynamic_cast< POA_Dinner::Fork*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->release_fork(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

CORBA::Boolean
POA_Dinner::Fork::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Fork::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Fork::_primary_interface(const PortableServer::ObjectId&,
                                     PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Fork::_STAR_staticIds()[0]);
}

Dinner::Fork_ptr
POA_Dinner::Fork::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Fork_var result = Dinner::Fork::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Fork::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Fork_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Fork_Optable_unfixed[] =
    {
        {"obtain_fork",POA_Dinner::Fork::_STAR_op_obtain_fork},
        {"release_fork",POA_Dinner::Fork::_STAR_op_release_fork}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Fork_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Fork_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

void
POA_Dinner::Named::_STAR_get_name(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::String_var _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Named * objImpl=dynamic_cast< POA_Dinner::Named*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->name();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_string(_star_r.in());
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Named::_STAR_set_name(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    STAR::StrForStruct _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_string();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Named * objImpl=dynamic_cast< POA_Dinner::Named*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->name(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

CORBA::Boolean
POA_Dinner::Named::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Named::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Named::_primary_interface(const PortableServer::ObjectId&,
                                      PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Named::_STAR_staticIds()[0]);
}

Dinner::Named_ptr
POA_Dinner::Named::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Named_var result = Dinner::Named::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Named::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Named_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Named_Optable_unfixed[] =
    {
        {"_get_name",POA_Dinner::Named::_STAR_get_name},
        {"_set_name",POA_Dinner::Named::_STAR_set_name}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Named_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Named_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

void
POA_Dinner::Philosopher::_STAR_get_thinking_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->thinking_seconds();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_ulong(_star_r);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_set_thinking_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_ulong();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->thinking_seconds(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_get_eating_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->eating_seconds();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_ulong(_star_r);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_set_eating_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_ulong();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->eating_seconds(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_get_sleeping_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->sleeping_seconds();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_ulong(_star_r);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_set_sleeping_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_ulong();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->sleeping_seconds(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_connect_left_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.inout(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->connect_left_hand(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_disconnect_left_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->disconnect_left_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_get_connection_left_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->get_connection_left_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_connect_right_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.inout(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->connect_right_hand(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_disconnect_right_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->disconnect_right_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_get_connection_right_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->get_connection_right_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_connect_observer(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Observing_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.inout(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->connect_observer(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_disconnect_observer(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Observing_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->disconnect_observer();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_op_get_connection_observer(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Observing_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->get_connection_observer();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

CORBA::Boolean
POA_Dinner::Philosopher::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Philosopher::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Philosopher::_primary_interface(const PortableServer::ObjectId&,
                                            PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Philosopher::_STAR_staticIds()[0]);
}

Dinner::Philosopher_ptr
POA_Dinner::Philosopher::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Philosopher_var result = Dinner::Philosopher::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Philosopher::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Philosopher_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Philosopher_Optable_unfixed[] =
    {
        {"_get_eating_seconds",POA_Dinner::Philosopher::_STAR_get_eating_seconds},
        {"_get_name",POA_Dinner::Philosopher::_STAR_get_name},
        {"_get_sleeping_seconds",POA_Dinner::Philosopher::_STAR_get_sleeping_seconds},
        {"_get_thinking_seconds",POA_Dinner::Philosopher::_STAR_get_thinking_seconds},
        {"_set_eating_seconds",POA_Dinner::Philosopher::_STAR_set_eating_seconds},
        {"_set_name",POA_Dinner::Philosopher::_STAR_set_name},
        {"_set_sleeping_seconds",POA_Dinner::Philosopher::_STAR_set_sleeping_seconds},
        {"_set_thinking_seconds",POA_Dinner::Philosopher::_STAR_set_thinking_seconds},
        {"configuration_complete",POA_Dinner::Philosopher::_STAR_op_configuration_complete},
        {"connect",POA_Dinner::Philosopher::_STAR_op_connect},
        {"connect_consumer",POA_Dinner::Philosopher::_STAR_op_connect_consumer},
        {"connect_left_hand",POA_Dinner::Philosopher::_STAR_op_connect_left_hand},
        {"connect_observer",POA_Dinner::Philosopher::_STAR_op_connect_observer},
        {"connect_right_hand",POA_Dinner::Philosopher::_STAR_op_connect_right_hand},
        {"disconnect",POA_Dinner::Philosopher::_STAR_op_disconnect},
        {"disconnect_consumer",POA_Dinner::Philosopher::_STAR_op_disconnect_consumer},
        {"disconnect_left_hand",POA_Dinner::Philosopher::_STAR_op_disconnect_left_hand},
        {"disconnect_observer",POA_Dinner::Philosopher::_STAR_op_disconnect_observer},
        {"disconnect_right_hand",POA_Dinner::Philosopher::_STAR_op_disconnect_right_hand},
        {"get_all_consumers",POA_Dinner::Philosopher::_STAR_op_get_all_consumers},
        {"get_all_emitters",POA_Dinner::Philosopher::_STAR_op_get_all_emitters},
        {"get_all_facets",POA_Dinner::Philosopher::_STAR_op_get_all_facets},
        {"get_all_ports",POA_Dinner::Philosopher::_STAR_op_get_all_ports},
        {"get_all_publishers",POA_Dinner::Philosopher::_STAR_op_get_all_publishers},
        {"get_all_receptacles",POA_Dinner::Philosopher::_STAR_op_get_all_receptacles},
        {"get_ccm_home",POA_Dinner::Philosopher::_STAR_op_get_ccm_home},
        {"get_component_def",POA_Dinner::Philosopher::_STAR_op_get_component_def},
        {"get_connection_left_hand",POA_Dinner::Philosopher::_STAR_op_get_connection_left_hand},
        {"get_connection_observer",POA_Dinner::Philosopher::_STAR_op_get_connection_observer},
        {"get_connection_right_hand",POA_Dinner::Philosopher::_STAR_op_get_connection_right_hand},
        {"get_connections",POA_Dinner::Philosopher::_STAR_op_get_connections},
        {"get_consumer",POA_Dinner::Philosopher::_STAR_op_get_consumer},
        {"get_named_consumers",POA_Dinner::Philosopher::_STAR_op_get_named_consumers},
        {"get_named_emitters",POA_Dinner::Philosopher::_STAR_op_get_named_emitters},
        {"get_named_facets",POA_Dinner::Philosopher::_STAR_op_get_named_facets},
        {"get_named_publishers",POA_Dinner::Philosopher::_STAR_op_get_named_publishers},
        {"get_named_receptacles",POA_Dinner::Philosopher::_STAR_op_get_named_receptacles},
        {"get_primary_key",POA_Dinner::Philosopher::_STAR_op_get_primary_key},
        {"provide_facet",POA_Dinner::Philosopher::_STAR_op_provide_facet},
        {"remove",POA_Dinner::Philosopher::_STAR_op_remove},
        {"same_component",POA_Dinner::Philosopher::_STAR_op_same_component},
        {"subscribe",POA_Dinner::Philosopher::_STAR_op_subscribe},
        {"unsubscribe",POA_Dinner::Philosopher::_STAR_op_unsubscribe}
    };
    static const CORBA::ULong _star_methodCount = 43;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Philosopher_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Philosopher_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

void
POA_Dinner::Cutlery::_STAR_op_provide_the_fork(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Cutlery * objImpl=dynamic_cast< POA_Dinner::Cutlery*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->provide_the_fork();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

CORBA::Boolean
POA_Dinner::Cutlery::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Cutlery::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Cutlery::_primary_interface(const PortableServer::ObjectId&,
                                        PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Cutlery::_STAR_staticIds()[0]);
}

Dinner::Cutlery_ptr
POA_Dinner::Cutlery::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Cutlery_var result = Dinner::Cutlery::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Cutlery::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Cutlery_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Cutlery_Optable_unfixed[] =
    {
        {"configuration_complete",POA_Dinner::Cutlery::_STAR_op_configuration_complete},
        {"connect",POA_Dinner::Cutlery::_STAR_op_connect},
        {"connect_consumer",POA_Dinner::Cutlery::_STAR_op_connect_consumer},
        {"disconnect",POA_Dinner::Cutlery::_STAR_op_disconnect},
        {"disconnect_consumer",POA_Dinner::Cutlery::_STAR_op_disconnect_consumer},
        {"get_all_consumers",POA_Dinner::Cutlery::_STAR_op_get_all_consumers},
        {"get_all_emitters",POA_Dinner::Cutlery::_STAR_op_get_all_emitters},
        {"get_all_facets",POA_Dinner::Cutlery::_STAR_op_get_all_facets},
        {"get_all_ports",POA_Dinner::Cutlery::_STAR_op_get_all_ports},
        {"get_all_publishers",POA_Dinner::Cutlery::_STAR_op_get_all_publishers},
        {"get_all_receptacles",POA_Dinner::Cutlery::_STAR_op_get_all_receptacles},
        {"get_ccm_home",POA_Dinner::Cutlery::_STAR_op_get_ccm_home},
        {"get_component_def",POA_Dinner::Cutlery::_STAR_op_get_component_def},
        {"get_connections",POA_Dinner::Cutlery::_STAR_op_get_connections},
        {"get_consumer",POA_Dinner::Cutlery::_STAR_op_get_consumer},
        {"get_named_consumers",POA_Dinner::Cutlery::_STAR_op_get_named_consumers},
        {"get_named_emitters",POA_Dinner::Cutlery::_STAR_op_get_named_emitters},
        {"get_named_facets",POA_Dinner::Cutlery::_STAR_op_get_named_facets},
        {"get_named_publishers",POA_Dinner::Cutlery::_STAR_op_get_named_publishers},
        {"get_named_receptacles",POA_Dinner::Cutlery::_STAR_op_get_named_receptacles},
        {"get_primary_key",POA_Dinner::Cutlery::_STAR_op_get_primary_key},
        {"provide_facet",POA_Dinner::Cutlery::_STAR_op_provide_facet},
        {"provide_the_fork",POA_Dinner::Cutlery::_STAR_op_provide_the_fork},
        {"remove",POA_Dinner::Cutlery::_STAR_op_remove},
        {"same_component",POA_Dinner::Cutlery::_STAR_op_same_component},
        {"subscribe",POA_Dinner::Cutlery::_STAR_op_subscribe},
        {"unsubscribe",POA_Dinner::Cutlery::_STAR_op_unsubscribe}
    };
    static const CORBA::ULong _star_methodCount = 27;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Cutlery_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Cutlery_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

CORBA::Boolean
POA_Dinner::PhilosopherHomeExplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::PhilosopherHomeExplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::PhilosopherHomeExplicit::_primary_interface(const PortableServer::ObjectId&,
                                                        PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::PhilosopherHomeExplicit::_STAR_staticIds()[0]);
}

Dinner::PhilosopherHomeExplicit_ptr
POA_Dinner::PhilosopherHomeExplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::PhilosopherHomeExplicit_var result = Dinner::PhilosopherHomeExplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::PhilosopherHomeExplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry PhilosopherHomeExplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry PhilosopherHomeExplicit_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_complete_component_configuration},
        {"disable_home_configuration",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 7;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,PhilosopherHomeExplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,PhilosopherHomeExplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

void
POA_Dinner::PhilosopherHomeImplicit::_STAR_op_create(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Philosopher_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::PhilosopherHomeImplicit * objImpl=dynamic_cast< POA_Dinner::PhilosopherHomeImplicit*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->create();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

CORBA::Boolean
POA_Dinner::PhilosopherHomeImplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::PhilosopherHomeImplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::PhilosopherHomeImplicit::_primary_interface(const PortableServer::ObjectId&,
                                                        PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::PhilosopherHomeImplicit::_STAR_staticIds()[0]);
}

Dinner::PhilosopherHomeImplicit_ptr
POA_Dinner::PhilosopherHomeImplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::PhilosopherHomeImplicit_var result = Dinner::PhilosopherHomeImplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::PhilosopherHomeImplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry PhilosopherHomeImplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry PhilosopherHomeImplicit_Optable_unfixed[] =
    {
        {"create",POA_Dinner::PhilosopherHomeImplicit::_STAR_op_create},
        {"create_component",POA_Dinner::PhilosopherHomeImplicit::_STAR_op_create_component}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,PhilosopherHomeImplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,PhilosopherHomeImplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

CORBA::Boolean
POA_Dinner::PhilosopherHome::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::PhilosopherHome::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::PhilosopherHome::_primary_interface(const PortableServer::ObjectId&,
                                                PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::PhilosopherHome::_STAR_staticIds()[0]);
}

Dinner::PhilosopherHome_ptr
POA_Dinner::PhilosopherHome::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::PhilosopherHome_var result = Dinner::PhilosopherHome::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::PhilosopherHome::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry PhilosopherHome_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry PhilosopherHome_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::PhilosopherHome::_STAR_op_complete_component_configuration},
        {"create",POA_Dinner::PhilosopherHome::_STAR_op_create},
        {"create_component",POA_Dinner::PhilosopherHome::_STAR_op_create_component},
        {"disable_home_configuration",POA_Dinner::PhilosopherHome::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::PhilosopherHome::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::PhilosopherHome::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::PhilosopherHome::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::PhilosopherHome::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::PhilosopherHome::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 9;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,PhilosopherHome_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,PhilosopherHome_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

CORBA::Boolean
POA_Dinner::CutleryHomeExplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::CutleryHomeExplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::CutleryHomeExplicit::_primary_interface(const PortableServer::ObjectId&,
                                                    PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::CutleryHomeExplicit::_STAR_staticIds()[0]);
}

Dinner::CutleryHomeExplicit_ptr
POA_Dinner::CutleryHomeExplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::CutleryHomeExplicit_var result = Dinner::CutleryHomeExplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::CutleryHomeExplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry CutleryHomeExplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry CutleryHomeExplicit_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::CutleryHomeExplicit::_STAR_op_complete_component_configuration},
        {"disable_home_configuration",POA_Dinner::CutleryHomeExplicit::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::CutleryHomeExplicit::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::CutleryHomeExplicit::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::CutleryHomeExplicit::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::CutleryHomeExplicit::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::CutleryHomeExplicit::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 7;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,CutleryHomeExplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,CutleryHomeExplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

void
POA_Dinner::CutleryHomeImplicit::_STAR_op_create(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Cutlery_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::CutleryHomeImplicit * objImpl=dynamic_cast< POA_Dinner::CutleryHomeImplicit*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->create();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

CORBA::Boolean
POA_Dinner::CutleryHomeImplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::CutleryHomeImplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::CutleryHomeImplicit::_primary_interface(const PortableServer::ObjectId&,
                                                    PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::CutleryHomeImplicit::_STAR_staticIds()[0]);
}

Dinner::CutleryHomeImplicit_ptr
POA_Dinner::CutleryHomeImplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::CutleryHomeImplicit_var result = Dinner::CutleryHomeImplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::CutleryHomeImplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry CutleryHomeImplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry CutleryHomeImplicit_Optable_unfixed[] =
    {
        {"create",POA_Dinner::CutleryHomeImplicit::_STAR_op_create},
        {"create_component",POA_Dinner::CutleryHomeImplicit::_STAR_op_create_component}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,CutleryHomeImplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,CutleryHomeImplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

CORBA::Boolean
POA_Dinner::CutleryHome::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::CutleryHome::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::CutleryHome::_primary_interface(const PortableServer::ObjectId&,
                                            PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::CutleryHome::_STAR_staticIds()[0]);
}

Dinner::CutleryHome_ptr
POA_Dinner::CutleryHome::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::CutleryHome_var result = Dinner::CutleryHome::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::CutleryHome::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry CutleryHome_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry CutleryHome_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::CutleryHome::_STAR_op_complete_component_configuration},
        {"create",POA_Dinner::CutleryHome::_STAR_op_create},
        {"create_component",POA_Dinner::CutleryHome::_STAR_op_create_component},
        {"disable_home_configuration",POA_Dinner::CutleryHome::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::CutleryHome::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::CutleryHome::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::CutleryHome::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::CutleryHome::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::CutleryHome::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 9;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,CutleryHome_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,CutleryHome_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}
// *************************************************************************
//
// This File Is Automatically Generated by the StarBusIDL-to-C++ Compiler !
//
// Copyright (c) 2003
// Network Information Security Institute,Computer College,NUDT.
// ChangSha,Hunan,PRC
//
// All Rights Reserved
//
// *************************************************************************

// Version: 5.0.0

#include <STAR/CORBAServer.h>
#include <Dinner_skel.h>

//
// Module declare ::Dinner
//

//
// ProtectedOperation declare obtain_fork
//
void
POA_Dinner::Fork::_STAR_op_obtain_fork(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Components::Cookie_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Fork * objImpl=dynamic_cast< POA_Dinner::Fork*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->obtain_fork();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare release_fork
//
void
POA_Dinner::Fork::_STAR_op_release_fork(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Components::Cookie_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.out(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Fork * objImpl=dynamic_cast< POA_Dinner::Fork*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->release_fork(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// Interface declare ::Dinner::Fork
//
CORBA::Boolean
POA_Dinner::Fork::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Fork::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Fork::_primary_interface(const PortableServer::ObjectId&,
                                     PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Fork::_STAR_staticIds()[0]);
}

Dinner::Fork_ptr
POA_Dinner::Fork::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Fork_var result = Dinner::Fork::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Fork::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Fork_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Fork_Optable_unfixed[] =
    {
        {"obtain_fork",POA_Dinner::Fork::_STAR_op_obtain_fork},
        {"release_fork",POA_Dinner::Fork::_STAR_op_release_fork}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Fork_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Fork_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// ProtectedAttribute declare name
//
void
POA_Dinner::Named::_STAR_get_name(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::String_var _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Named * objImpl=dynamic_cast< POA_Dinner::Named*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->name();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_string(_star_r.in());
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Named::_STAR_set_name(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    STAR::StrForStruct _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_string();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Named * objImpl=dynamic_cast< POA_Dinner::Named*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->name(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// Interface declare ::Dinner::Named
//
CORBA::Boolean
POA_Dinner::Named::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Named::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Named::_primary_interface(const PortableServer::ObjectId&,
                                      PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Named::_STAR_staticIds()[0]);
}

Dinner::Named_ptr
POA_Dinner::Named::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Named_var result = Dinner::Named::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Named::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Named_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Named_Optable_unfixed[] =
    {
        {"_get_name",POA_Dinner::Named::_STAR_get_name},
        {"_set_name",POA_Dinner::Named::_STAR_set_name}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Named_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Named_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// ProtectedAttribute declare thinking_seconds
//
void
POA_Dinner::Philosopher::_STAR_get_thinking_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->thinking_seconds();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_ulong(_star_r);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_set_thinking_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_ulong();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->thinking_seconds(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedAttribute declare eating_seconds
//
void
POA_Dinner::Philosopher::_STAR_get_eating_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->eating_seconds();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_ulong(_star_r);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_set_eating_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_ulong();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->eating_seconds(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedAttribute declare sleeping_seconds
//
void
POA_Dinner::Philosopher::_STAR_get_sleeping_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_r ;

    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        _star_r = objImpl ->sleeping_seconds();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    _star_out -> write_ulong(_star_r);
    _STAR_postPrepareHeader(_star_up);
}

void
POA_Dinner::Philosopher::_STAR_set_sleeping_seconds(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    CORBA::ULong _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    _star_a0 = _star_in -> read_ulong();
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
        objImpl ->sleeping_seconds(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare connect_left_hand
//
void
POA_Dinner::Philosopher::_STAR_op_connect_left_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.inout(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->connect_left_hand(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare disconnect_left_hand
//
void
POA_Dinner::Philosopher::_STAR_op_disconnect_left_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->disconnect_left_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare get_connection_left_hand
//
void
POA_Dinner::Philosopher::_STAR_op_get_connection_left_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->get_connection_left_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare connect_right_hand
//
void
POA_Dinner::Philosopher::_STAR_op_connect_right_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.inout(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->connect_right_hand(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare disconnect_right_hand
//
void
POA_Dinner::Philosopher::_STAR_op_disconnect_right_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->disconnect_right_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare get_connection_right_hand
//
void
POA_Dinner::Philosopher::_STAR_op_get_connection_right_hand(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->get_connection_right_hand();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare connect_observer
//
void
POA_Dinner::Philosopher::_STAR_op_connect_observer(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Observing_var _star_a0;
    STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
    STARUnmarshal(_star_a0.inout(), _star_in);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         objImpl ->connect_observer(_star_a0);
    }
    _STAR_prePrepareHeader(_star_up);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare disconnect_observer
//
void
POA_Dinner::Philosopher::_STAR_op_disconnect_observer(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Observing_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->disconnect_observer();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// ProtectedOperation declare get_connection_observer
//
void
POA_Dinner::Philosopher::_STAR_op_get_connection_observer(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Observing_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Philosopher * objImpl=dynamic_cast< POA_Dinner::Philosopher*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->get_connection_observer();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// Interface declare ::Dinner::Philosopher
//
CORBA::Boolean
POA_Dinner::Philosopher::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Philosopher::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Philosopher::_primary_interface(const PortableServer::ObjectId&,
                                            PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Philosopher::_STAR_staticIds()[0]);
}

Dinner::Philosopher_ptr
POA_Dinner::Philosopher::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Philosopher_var result = Dinner::Philosopher::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Philosopher::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Philosopher_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Philosopher_Optable_unfixed[] =
    {
        {"_get_eating_seconds",POA_Dinner::Philosopher::_STAR_get_eating_seconds},
        {"_get_name",POA_Dinner::Philosopher::_STAR_get_name},
        {"_get_sleeping_seconds",POA_Dinner::Philosopher::_STAR_get_sleeping_seconds},
        {"_get_thinking_seconds",POA_Dinner::Philosopher::_STAR_get_thinking_seconds},
        {"_set_eating_seconds",POA_Dinner::Philosopher::_STAR_set_eating_seconds},
        {"_set_name",POA_Dinner::Philosopher::_STAR_set_name},
        {"_set_sleeping_seconds",POA_Dinner::Philosopher::_STAR_set_sleeping_seconds},
        {"_set_thinking_seconds",POA_Dinner::Philosopher::_STAR_set_thinking_seconds},
        {"configuration_complete",POA_Dinner::Philosopher::_STAR_op_configuration_complete},
        {"connect",POA_Dinner::Philosopher::_STAR_op_connect},
        {"connect_consumer",POA_Dinner::Philosopher::_STAR_op_connect_consumer},
        {"connect_left_hand",POA_Dinner::Philosopher::_STAR_op_connect_left_hand},
        {"connect_observer",POA_Dinner::Philosopher::_STAR_op_connect_observer},
        {"connect_right_hand",POA_Dinner::Philosopher::_STAR_op_connect_right_hand},
        {"disconnect",POA_Dinner::Philosopher::_STAR_op_disconnect},
        {"disconnect_consumer",POA_Dinner::Philosopher::_STAR_op_disconnect_consumer},
        {"disconnect_left_hand",POA_Dinner::Philosopher::_STAR_op_disconnect_left_hand},
        {"disconnect_observer",POA_Dinner::Philosopher::_STAR_op_disconnect_observer},
        {"disconnect_right_hand",POA_Dinner::Philosopher::_STAR_op_disconnect_right_hand},
        {"get_all_consumers",POA_Dinner::Philosopher::_STAR_op_get_all_consumers},
        {"get_all_emitters",POA_Dinner::Philosopher::_STAR_op_get_all_emitters},
        {"get_all_facets",POA_Dinner::Philosopher::_STAR_op_get_all_facets},
        {"get_all_ports",POA_Dinner::Philosopher::_STAR_op_get_all_ports},
        {"get_all_publishers",POA_Dinner::Philosopher::_STAR_op_get_all_publishers},
        {"get_all_receptacles",POA_Dinner::Philosopher::_STAR_op_get_all_receptacles},
        {"get_ccm_home",POA_Dinner::Philosopher::_STAR_op_get_ccm_home},
        {"get_component_def",POA_Dinner::Philosopher::_STAR_op_get_component_def},
        {"get_connection_left_hand",POA_Dinner::Philosopher::_STAR_op_get_connection_left_hand},
        {"get_connection_observer",POA_Dinner::Philosopher::_STAR_op_get_connection_observer},
        {"get_connection_right_hand",POA_Dinner::Philosopher::_STAR_op_get_connection_right_hand},
        {"get_connections",POA_Dinner::Philosopher::_STAR_op_get_connections},
        {"get_consumer",POA_Dinner::Philosopher::_STAR_op_get_consumer},
        {"get_named_consumers",POA_Dinner::Philosopher::_STAR_op_get_named_consumers},
        {"get_named_emitters",POA_Dinner::Philosopher::_STAR_op_get_named_emitters},
        {"get_named_facets",POA_Dinner::Philosopher::_STAR_op_get_named_facets},
        {"get_named_publishers",POA_Dinner::Philosopher::_STAR_op_get_named_publishers},
        {"get_named_receptacles",POA_Dinner::Philosopher::_STAR_op_get_named_receptacles},
        {"get_primary_key",POA_Dinner::Philosopher::_STAR_op_get_primary_key},
        {"provide_facet",POA_Dinner::Philosopher::_STAR_op_provide_facet},
        {"remove",POA_Dinner::Philosopher::_STAR_op_remove},
        {"same_component",POA_Dinner::Philosopher::_STAR_op_same_component},
        {"subscribe",POA_Dinner::Philosopher::_STAR_op_subscribe},
        {"unsubscribe",POA_Dinner::Philosopher::_STAR_op_unsubscribe}
    };
    static const CORBA::ULong _star_methodCount = 43;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Philosopher_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Philosopher_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// ProtectedOperation declare provide_the_fork
//
void
POA_Dinner::Cutlery::_STAR_op_provide_the_fork(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Fork_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::Cutlery * objImpl=dynamic_cast< POA_Dinner::Cutlery*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->provide_the_fork();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// Interface declare ::Dinner::Cutlery
//
CORBA::Boolean
POA_Dinner::Cutlery::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::Cutlery::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::Cutlery::_primary_interface(const PortableServer::ObjectId&,
                                        PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::Cutlery::_STAR_staticIds()[0]);
}

Dinner::Cutlery_ptr
POA_Dinner::Cutlery::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::Cutlery_var result = Dinner::Cutlery::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::Cutlery::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry Cutlery_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry Cutlery_Optable_unfixed[] =
    {
        {"configuration_complete",POA_Dinner::Cutlery::_STAR_op_configuration_complete},
        {"connect",POA_Dinner::Cutlery::_STAR_op_connect},
        {"connect_consumer",POA_Dinner::Cutlery::_STAR_op_connect_consumer},
        {"disconnect",POA_Dinner::Cutlery::_STAR_op_disconnect},
        {"disconnect_consumer",POA_Dinner::Cutlery::_STAR_op_disconnect_consumer},
        {"get_all_consumers",POA_Dinner::Cutlery::_STAR_op_get_all_consumers},
        {"get_all_emitters",POA_Dinner::Cutlery::_STAR_op_get_all_emitters},
        {"get_all_facets",POA_Dinner::Cutlery::_STAR_op_get_all_facets},
        {"get_all_ports",POA_Dinner::Cutlery::_STAR_op_get_all_ports},
        {"get_all_publishers",POA_Dinner::Cutlery::_STAR_op_get_all_publishers},
        {"get_all_receptacles",POA_Dinner::Cutlery::_STAR_op_get_all_receptacles},
        {"get_ccm_home",POA_Dinner::Cutlery::_STAR_op_get_ccm_home},
        {"get_component_def",POA_Dinner::Cutlery::_STAR_op_get_component_def},
        {"get_connections",POA_Dinner::Cutlery::_STAR_op_get_connections},
        {"get_consumer",POA_Dinner::Cutlery::_STAR_op_get_consumer},
        {"get_named_consumers",POA_Dinner::Cutlery::_STAR_op_get_named_consumers},
        {"get_named_emitters",POA_Dinner::Cutlery::_STAR_op_get_named_emitters},
        {"get_named_facets",POA_Dinner::Cutlery::_STAR_op_get_named_facets},
        {"get_named_publishers",POA_Dinner::Cutlery::_STAR_op_get_named_publishers},
        {"get_named_receptacles",POA_Dinner::Cutlery::_STAR_op_get_named_receptacles},
        {"get_primary_key",POA_Dinner::Cutlery::_STAR_op_get_primary_key},
        {"provide_facet",POA_Dinner::Cutlery::_STAR_op_provide_facet},
        {"provide_the_fork",POA_Dinner::Cutlery::_STAR_op_provide_the_fork},
        {"remove",POA_Dinner::Cutlery::_STAR_op_remove},
        {"same_component",POA_Dinner::Cutlery::_STAR_op_same_component},
        {"subscribe",POA_Dinner::Cutlery::_STAR_op_subscribe},
        {"unsubscribe",POA_Dinner::Cutlery::_STAR_op_unsubscribe}
    };
    static const CORBA::ULong _star_methodCount = 27;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,Cutlery_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,Cutlery_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// Interface declare ::Dinner::PhilosopherHomeExplicit
//
CORBA::Boolean
POA_Dinner::PhilosopherHomeExplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::PhilosopherHomeExplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::PhilosopherHomeExplicit::_primary_interface(const PortableServer::ObjectId&,
                                                        PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::PhilosopherHomeExplicit::_STAR_staticIds()[0]);
}

Dinner::PhilosopherHomeExplicit_ptr
POA_Dinner::PhilosopherHomeExplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::PhilosopherHomeExplicit_var result = Dinner::PhilosopherHomeExplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::PhilosopherHomeExplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry PhilosopherHomeExplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry PhilosopherHomeExplicit_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_complete_component_configuration},
        {"disable_home_configuration",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::PhilosopherHomeExplicit::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 7;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,PhilosopherHomeExplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,PhilosopherHomeExplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// ProtectedOperation declare create
//
void
POA_Dinner::PhilosopherHomeImplicit::_STAR_op_create(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Philosopher_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::PhilosopherHomeImplicit * objImpl=dynamic_cast< POA_Dinner::PhilosopherHomeImplicit*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->create();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// Interface declare ::Dinner::PhilosopherHomeImplicit
//
CORBA::Boolean
POA_Dinner::PhilosopherHomeImplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::PhilosopherHomeImplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::PhilosopherHomeImplicit::_primary_interface(const PortableServer::ObjectId&,
                                                        PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::PhilosopherHomeImplicit::_STAR_staticIds()[0]);
}

Dinner::PhilosopherHomeImplicit_ptr
POA_Dinner::PhilosopherHomeImplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::PhilosopherHomeImplicit_var result = Dinner::PhilosopherHomeImplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::PhilosopherHomeImplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry PhilosopherHomeImplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry PhilosopherHomeImplicit_Optable_unfixed[] =
    {
        {"create",POA_Dinner::PhilosopherHomeImplicit::_STAR_op_create},
        {"create_component",POA_Dinner::PhilosopherHomeImplicit::_STAR_op_create_component}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,PhilosopherHomeImplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,PhilosopherHomeImplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// Interface declare ::Dinner::PhilosopherHome
//
CORBA::Boolean
POA_Dinner::PhilosopherHome::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::PhilosopherHome::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::PhilosopherHome::_primary_interface(const PortableServer::ObjectId&,
                                                PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::PhilosopherHome::_STAR_staticIds()[0]);
}

Dinner::PhilosopherHome_ptr
POA_Dinner::PhilosopherHome::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::PhilosopherHome_var result = Dinner::PhilosopherHome::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::PhilosopherHome::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry PhilosopherHome_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry PhilosopherHome_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::PhilosopherHome::_STAR_op_complete_component_configuration},
        {"create",POA_Dinner::PhilosopherHome::_STAR_op_create},
        {"create_component",POA_Dinner::PhilosopherHome::_STAR_op_create_component},
        {"disable_home_configuration",POA_Dinner::PhilosopherHome::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::PhilosopherHome::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::PhilosopherHome::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::PhilosopherHome::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::PhilosopherHome::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::PhilosopherHome::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 9;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,PhilosopherHome_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,PhilosopherHome_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// Interface declare ::Dinner::CutleryHomeExplicit
//
CORBA::Boolean
POA_Dinner::CutleryHomeExplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::CutleryHomeExplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::CutleryHomeExplicit::_primary_interface(const PortableServer::ObjectId&,
                                                    PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::CutleryHomeExplicit::_STAR_staticIds()[0]);
}

Dinner::CutleryHomeExplicit_ptr
POA_Dinner::CutleryHomeExplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::CutleryHomeExplicit_var result = Dinner::CutleryHomeExplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::CutleryHomeExplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry CutleryHomeExplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry CutleryHomeExplicit_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::CutleryHomeExplicit::_STAR_op_complete_component_configuration},
        {"disable_home_configuration",POA_Dinner::CutleryHomeExplicit::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::CutleryHomeExplicit::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::CutleryHomeExplicit::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::CutleryHomeExplicit::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::CutleryHomeExplicit::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::CutleryHomeExplicit::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 7;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,CutleryHomeExplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,CutleryHomeExplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// ProtectedOperation declare create
//
void
POA_Dinner::CutleryHomeImplicit::_STAR_op_create(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
    Dinner::Cutlery_var _star_r;
    _STAR_preRemoveHeader(_star_up);
    _STAR_postRemoveHeader(_star_up);
    POA_Dinner::CutleryHomeImplicit * objImpl=dynamic_cast< POA_Dinner::CutleryHomeImplicit*>( serv );
    if(objImpl!=NULL) 
    {
         _star_r =  objImpl ->create();
    }
    STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
    STARMarshal(_star_r.in(), _star_out);
    _STAR_postPrepareHeader(_star_up);
}

//
// Interface declare ::Dinner::CutleryHomeImplicit
//
CORBA::Boolean
POA_Dinner::CutleryHomeImplicit::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::CutleryHomeImplicit::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::CutleryHomeImplicit::_primary_interface(const PortableServer::ObjectId&,
                                                    PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::CutleryHomeImplicit::_STAR_staticIds()[0]);
}

Dinner::CutleryHomeImplicit_ptr
POA_Dinner::CutleryHomeImplicit::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::CutleryHomeImplicit_var result = Dinner::CutleryHomeImplicit::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::CutleryHomeImplicit::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry CutleryHomeImplicit_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry CutleryHomeImplicit_Optable_unfixed[] =
    {
        {"create",POA_Dinner::CutleryHomeImplicit::_STAR_op_create},
        {"create_component",POA_Dinner::CutleryHomeImplicit::_STAR_op_create_component}
    };
    static const CORBA::ULong _star_methodCount = 2;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,CutleryHomeImplicit_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,CutleryHomeImplicit_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}

//
// Interface declare ::Dinner::CutleryHome
//
CORBA::Boolean
POA_Dinner::CutleryHome::_is_a(const char* type)
    throw(CORBA::SystemException)
{
    const char** _star_ids = Dinner::CutleryHome::_STAR_staticIds();
    for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
        if(strcmp(type, _star_ids[_star_i]) == 0)
            return true;

    return false;
}

CORBA::RepositoryId
POA_Dinner::CutleryHome::_primary_interface(const PortableServer::ObjectId&,
                                            PortableServer::POA_ptr)
{
    return CORBA::string_dup(Dinner::CutleryHome::_STAR_staticIds()[0]);
}

Dinner::CutleryHome_ptr
POA_Dinner::CutleryHome::_this()
{
    CORBA::Object_var obj = _STAR_buildReference();
    Dinner::CutleryHome_var result = Dinner::CutleryHome::_narrow(obj);
    return result._retn();
}

void
POA_Dinner::CutleryHome::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
    static const PortableServer::OperationTableEntry CutleryHome_Optable_fixed[] =
    {
        {"_component",PortableServer::ServantBase::_STAR_op_get_component},
        {"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
        {"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
        {"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
    };
    static const PortableServer::OperationTableEntry CutleryHome_Optable_unfixed[] =
    {
        {"complete_component_configuration",POA_Dinner::CutleryHome::_STAR_op_complete_component_configuration},
        {"create",POA_Dinner::CutleryHome::_STAR_op_create},
        {"create_component",POA_Dinner::CutleryHome::_STAR_op_create_component},
        {"disable_home_configuration",POA_Dinner::CutleryHome::_STAR_op_disable_home_configuration},
        {"get_component_def",POA_Dinner::CutleryHome::_STAR_op_get_component_def},
        {"get_home_def",POA_Dinner::CutleryHome::_STAR_op_get_home_def},
        {"remove_component",POA_Dinner::CutleryHome::_STAR_op_remove_component},
        {"set_configuration_values",POA_Dinner::CutleryHome::_STAR_op_set_configuration_values},
        {"set_configurator",POA_Dinner::CutleryHome::_STAR_op_set_configurator}
    };
    static const CORBA::ULong _star_methodCount = 9;

    PortableServer::operationSkel operation;
    if(_STAR_locateOperation(_star_up,CutleryHome_Optable_unfixed,_star_methodCount, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    else
    if(_STAR_locateOperation(_star_up,CutleryHome_Optable_fixed,4, operation))
    {
        (*operation)(this,_star_up);
        return;
    }
    throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);

}
