⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple.cc

📁 MICO2.3.13 corba 环境平台
💻 CC
📖 第 1 页 / 共 2 页
字号:
  }  simple2_stub::flush();}#endif // MICO_CONF_NO_POAvector<CORBA::Narrow_proto> * simple2::_narrow_helpers;class _Marshaller_simple2 : public CORBA::StaticTypeInfo {    typedef simple2_ptr _MICO_T;  public:    StaticValueType create () const;    void assign (StaticValueType dst, const StaticValueType src) const;    void free (StaticValueType) const;    CORBA::Boolean demarshal (CORBA::DataDecoder&, StaticValueType) const;    void marshal (CORBA::DataEncoder &, StaticValueType) const;};CORBA::StaticValueType _Marshaller_simple2::create() const{  return (StaticValueType) new _MICO_T( 0 );}void _Marshaller_simple2::assign( StaticValueType d, const StaticValueType s ) const{  *(_MICO_T*) d = ::simple2::_duplicate( *(_MICO_T*) s );}void _Marshaller_simple2::free( StaticValueType v ) const{  CORBA::release( *(_MICO_T *) v );  delete (_MICO_T*) v;}CORBA::Boolean _Marshaller_simple2::demarshal( CORBA::DataDecoder &dc, StaticValueType v ) const{  CORBA::Object_ptr obj;  if (!CORBA::_stc_Object->demarshal(dc, &obj))    return FALSE;  *(_MICO_T *) v = ::simple2::_narrow( obj );  CORBA::Boolean ret = CORBA::is_nil (obj) || !CORBA::is_nil (*(_MICO_T *)v);  CORBA::release (obj);  return ret;}void _Marshaller_simple2::marshal( CORBA::DataEncoder &ec, StaticValueType v ) const{  CORBA::Object_ptr obj = *(_MICO_T *) v;  CORBA::_stc_Object->marshal( ec, &obj );}CORBA::StaticTypeInfo *_marshaller_simple2;struct __tc_init_SIMPLE {  __tc_init_SIMPLE()  {    _marshaller_simple1 = new _Marshaller_simple1;    _marshaller_simple2 = new _Marshaller_simple2;  }};static __tc_init_SIMPLE __init_SIMPLE;//--------------------------------------------------------//  Implementation of skeletons//--------------------------------------------------------simple1_skel::simple1_skel( const CORBA::BOA::ReferenceData &_id ){  CORBA::ImplementationDef_var _impl =    _find_impl( "IDL:simple1:1.0", "simple1" );  assert( !CORBA::is_nil( _impl ) );  _create_ref( _id,    0,    _impl,    "IDL:simple1:1.0" );  register_dispatcher( new StaticInterfaceDispatcherWrapper<simple1_skel>( this ) );}simple1_skel::simple1_skel( CORBA::Object_ptr _obj ){  CORBA::ImplementationDef_var _impl =    _find_impl( "IDL:simple1:1.0", "simple1" );  assert( !CORBA::is_nil( _impl ) );  _restore_ref( _obj,    CORBA::BOA::ReferenceData(),    0,    _impl );  register_dispatcher( new StaticInterfaceDispatcherWrapper<simple1_skel>( this ) );}simple1_skel::~simple1_skel(){}bool simple1_skel::dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment & /*_env*/ ){  #ifdef HAVE_EXCEPTIONS  try {  #endif    if( strcmp( _req->op_name(), "func" ) == 0 ) {      CORBA::Char id;      CORBA::StaticAny _id( CORBA::_stc_char, &id );      _req->add_in_arg( &_id );      if( !_req->read_args() )        return true;      func( id );      _req->write_results();      return true;    }    if( strcmp( _req->op_name(), "flush" ) == 0 ) {      if( !_req->read_args() )        return true;      flush();      _req->write_results();      return true;    }  #ifdef HAVE_EXCEPTIONS  } catch( CORBA::SystemException_catch &_ex ) {    _req->set_exception( _ex->_clone() );    _req->write_results();    return true;  } catch( ... ) {    assert( 0 );    return true;  }  #endif  return false;}simple1_ptr simple1_skel::_this(){  return simple1::_duplicate( this );}// PortableServer Skeleton Class for interface simple1POA_simple1::~POA_simple1(){}simple1_ptrPOA_simple1::_this (){  CORBA::Object_var obj = PortableServer::ServantBase::_this();  return simple1::_narrow (obj);}CORBA::BooleanPOA_simple1::_is_a (const char * repoid){  if (strcmp (repoid, "IDL:simple1:1.0") == 0) {    return TRUE;  }  return FALSE;}CORBA::InterfaceDef_ptrPOA_simple1::_get_interface (){  CORBA::InterfaceDef_ptr ifd = PortableServer::ServantBase::_get_interface ("IDL:simple1:1.0");  if (CORBA::is_nil (ifd)) {    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));  }  return ifd;}CORBA::RepositoryIdPOA_simple1::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr){  return CORBA::string_dup ("IDL:simple1:1.0");}CORBA::Object_ptrPOA_simple1::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj){  return new simple1_stub_clp (poa, obj);}boolPOA_simple1::dispatch (CORBA::StaticServerRequest_ptr _req){  #ifdef HAVE_EXCEPTIONS  try {  #endif    if( strcmp( _req->op_name(), "func" ) == 0 ) {      CORBA::Char id;      CORBA::StaticAny _id( CORBA::_stc_char, &id );      _req->add_in_arg( &_id );      if( !_req->read_args() )        return true;      func( id );      _req->write_results();      return true;    }    if( strcmp( _req->op_name(), "flush" ) == 0 ) {      if( !_req->read_args() )        return true;      flush();      _req->write_results();      return true;    }  #ifdef HAVE_EXCEPTIONS  } catch( CORBA::SystemException_catch &_ex ) {    _req->set_exception( _ex->_clone() );    _req->write_results();    return true;  } catch( ... ) {    assert( 0 );    return true;  }  #endif  return false;}voidPOA_simple1::invoke (CORBA::StaticServerRequest_ptr _req){  if (dispatch (_req)) {      return;  }  CORBA::Exception * ex =     new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);  _req->set_exception (ex);  _req->write_results();}simple2_skel::simple2_skel( const CORBA::BOA::ReferenceData &_id ){  CORBA::ImplementationDef_var _impl =    _find_impl( "IDL:simple2:1.0", "simple2" );  assert( !CORBA::is_nil( _impl ) );  _create_ref( _id,    0,    _impl,    "IDL:simple2:1.0" );  register_dispatcher( new StaticInterfaceDispatcherWrapper<simple2_skel>( this ) );}simple2_skel::simple2_skel( CORBA::Object_ptr _obj ){  CORBA::ImplementationDef_var _impl =    _find_impl( "IDL:simple2:1.0", "simple2" );  assert( !CORBA::is_nil( _impl ) );  _restore_ref( _obj,    CORBA::BOA::ReferenceData(),    0,    _impl );  register_dispatcher( new StaticInterfaceDispatcherWrapper<simple2_skel>( this ) );}simple2_skel::~simple2_skel(){}bool simple2_skel::dispatch( CORBA::StaticServerRequest_ptr _req, CORBA::Environment & /*_env*/ ){  #ifdef HAVE_EXCEPTIONS  try {  #endif    if( strcmp( _req->op_name(), "func" ) == 0 ) {      CORBA::Char id;      CORBA::StaticAny _id( CORBA::_stc_char, &id );      _req->add_in_arg( &_id );      if( !_req->read_args() )        return true;      func( id );      _req->write_results();      return true;    }    if( strcmp( _req->op_name(), "flush" ) == 0 ) {      if( !_req->read_args() )        return true;      flush();      _req->write_results();      return true;    }  #ifdef HAVE_EXCEPTIONS  } catch( CORBA::SystemException_catch &_ex ) {    _req->set_exception( _ex->_clone() );    _req->write_results();    return true;  } catch( ... ) {    assert( 0 );    return true;  }  #endif  return false;}simple2_ptr simple2_skel::_this(){  return simple2::_duplicate( this );}// PortableServer Skeleton Class for interface simple2POA_simple2::~POA_simple2(){}simple2_ptrPOA_simple2::_this (){  CORBA::Object_var obj = PortableServer::ServantBase::_this();  return simple2::_narrow (obj);}CORBA::BooleanPOA_simple2::_is_a (const char * repoid){  if (strcmp (repoid, "IDL:simple2:1.0") == 0) {    return TRUE;  }  return FALSE;}CORBA::InterfaceDef_ptrPOA_simple2::_get_interface (){  CORBA::InterfaceDef_ptr ifd = PortableServer::ServantBase::_get_interface ("IDL:simple2:1.0");  if (CORBA::is_nil (ifd)) {    mico_throw (CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO));  }  return ifd;}CORBA::RepositoryIdPOA_simple2::_primary_interface (const PortableServer::ObjectId &, PortableServer::POA_ptr){  return CORBA::string_dup ("IDL:simple2:1.0");}CORBA::Object_ptrPOA_simple2::_make_stub (PortableServer::POA_ptr poa, CORBA::Object_ptr obj){  return new simple2_stub_clp (poa, obj);}boolPOA_simple2::dispatch (CORBA::StaticServerRequest_ptr _req){  #ifdef HAVE_EXCEPTIONS  try {  #endif    if( strcmp( _req->op_name(), "func" ) == 0 ) {      CORBA::Char id;      CORBA::StaticAny _id( CORBA::_stc_char, &id );      _req->add_in_arg( &_id );      if( !_req->read_args() )        return true;      func( id );      _req->write_results();      return true;    }    if( strcmp( _req->op_name(), "flush" ) == 0 ) {      if( !_req->read_args() )        return true;      flush();      _req->write_results();      return true;    }  #ifdef HAVE_EXCEPTIONS  } catch( CORBA::SystemException_catch &_ex ) {    _req->set_exception( _ex->_clone() );    _req->write_results();    return true;  } catch( ... ) {    assert( 0 );    return true;  }  #endif  return false;}voidPOA_simple2::invoke (CORBA::StaticServerRequest_ptr _req){  if (dispatch (_req)) {      return;  }  CORBA::Exception * ex =     new CORBA::BAD_OPERATION (0, CORBA::COMPLETED_NO);  _req->set_exception (ex);  _req->write_results();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -