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

📄 junk_server.cc

📁 支持组件模型CCM的开源中间件-mico
💻 CC
字号:
#include "Junk_impl.h"#include <iostream>#include <fstream>using std::cout;using std::cerr;using std::endl;#include <signal.h>                                                                                void sighandler (int sig){  CORBA::ORB_var orb = ORB_holder::instance()->orb();  if (!CORBA::is_nil (orb)) {    orb->shutdown (TRUE);  }}                                                                                intmain ( int argc, char* argv[] ){    CORBA::ORB_var orb = CORBA::ORB::_nil ();    signal (SIGINT, sighandler);    signal (SIGTERM, sighandler);                                                                                    cout << "junk_server- startup" << endl;    orb = CORBA::ORB_init(argc, argv, "mico-local-orb");    ORB_holder::instance()->orb(orb);    cout << "junk_server- got the orb" << endl;    CORBA::Object_var poaobj = orb->resolve_initial_references("RootPOA");    PortableServer::POA_var root_poa = PortableServer::POA::_narrow(poaobj);    assert( !CORBA::is_nil(root_poa) );    PortableServer::POAManager_var root_mgr = root_poa->the_POAManager();    cout << "junk_server- got the root_poa" << endl;    JunkFactory_impl* junk_factory = new JunkFactory_impl( root_poa );    root_mgr->activate();    junk_factory->poa_mgr()->activate();    cout << "junk_server- activated junk_factory poa_mgr" << endl;    orb->run();    root_poa->destroy(TRUE, TRUE);    return 0;}

⌨️ 快捷键说明

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