这篇教程C++ ACE_CString类代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ACE_CString类的典型用法代码示例。如果您正苦于以下问题:C++ ACE_CString类的具体用法?C++ ACE_CString怎么用?C++ ACE_CString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。 在下文中一共展示了ACE_CString类的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ACE_TMAINint ACE_TMAIN (int argc, ACE_TCHAR *argv[]){ try { // Initialize orb CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); if (parse_args (argc, argv) != 0) return 1; //Get reference to Root POA CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in()); // Activate POA Manager PortableServer::POAManager_var mgr = poa->the_POAManager(); mgr->activate(); // Find the Naming Service obj = orb->resolve_initial_references("NameService"); CosNaming::NamingContextExt_var root = CosNaming::NamingContextExt::_narrow(obj.in()); if (CORBA::is_nil(root.in())) { std::cerr << "Nil Naming Context reference" << std::endl; return 1; } // Bind a new context. CosNaming::Name name; name.length( 1 ); name[0].id = CORBA::string_dup( "root.esc-dot" ); name[0].kind = CORBA::string_dup( "kind1" ); try { obj = root->resolve(name); } catch(const CosNaming::NamingContext::NotFound&) { CosNaming::NamingContext_var dummy = root->bind_new_context(name); } name.length( 2 ); name[1].id = CORBA::string_dup( "leaf/esc-slash" ); name[1].kind = CORBA::string_dup( "kind2" ); // Create an object PortableServer::Servant_var<Messenger_i> servant = new Messenger_i; PortableServer::ObjectId_var oid = poa->activate_object(servant.in()); CORBA::Object_var messenger_obj = poa->id_to_reference(oid.in()); root->rebind(name, messenger_obj.in()); // Also try rebinding to a simple path. CosNaming::Name_var simp_name = root->to_name("Simple"); try { obj = root->resolve(simp_name.in()); } catch(const CosNaming::NamingContext::NotFound&) { CosNaming::NamingContext_var dummy = root->bind_new_context(simp_name.in()); } simp_name = root->to_name("Simple/Messenger"); root->rebind(simp_name.in(), messenger_obj.in()); // Convert Name to String Name. CORBA::String_var str_name = root->to_string(name); std::cout << "str_name: " << str_name.in() << std::endl; CORBA::String_var str_simple = root->to_string(simp_name.in()); std::cout << "simple: " << str_simple.in() << std::endl; // Convert String Name to Name. CosNaming::Name_var tname = root->to_name(str_name.in()); std::cout << "converted back to a CosNaming::Name: " << std::endl; std::cout << " name[0] = " << (* tname)[0].id.in() << " , " << (* tname)[0].kind.in() << std::endl; std::cout << " name[1] = " << (* tname)[1].id.in() << " , " << (* tname)[1].kind.in() << std::endl; // Find the application object by resolve_str. try { obj = root->resolve_str(str_name.in()); } catch(const CosNaming::NamingContext::NotFound&) { std::cerr<<"Couldn't resolve the string name: " << str_name << std::endl; return 1; } ACE_CString base_address (":"); base_address += ACE_TEXT_ALWAYS_CHAR (hostname); base_address += ":"; base_address += ACE_TEXT_ALWAYS_CHAR (port); ACE_CString addr (""); addr = base_address + "/key/str"; // Create an URL string for application object. CORBA::String_var address = CORBA::string_dup (addr.c_str()); std::cout << "call to_url(/"" << address.in() << "/"" << std::endl; std::cout << " ,/"" << str_simple.in() << "/")"<< std::endl; CORBA::String_var url_string = root->to_url(address.in(), str_simple.in());//.........这里部分代码省略.........
开发者ID:svn2github,项目名称:ACE-Middleware,代码行数:101,
示例2: DSUI_EVENT_LOGvoidEDF_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri){ int int_guid; DSUI_EVENT_LOG (EDF_SCHED_FAM, ENTER_RECEIVE_REPLY, 0, 0, 0); RTScheduling::Current::IdType guid; CORBA::String_var operation = ri->operation (); CORBA::Object_var target = ri->target (); ACE_CString opname = operation.in ();#ifdef KOKYU_DSRT_LOGGING ACE_DEBUG ((LM_DEBUG, "(%t|%T):receive_reply from " "/"%s/"/n", opname.c_str ()));#endif // Check that the reply service context was received as // expected. IOP::ServiceContext_var sc = ri->get_reply_service_context (Client_Interceptor::SchedulingInfo); CORBA::Long importance; TimeBase::TimeT deadline; if (sc.ptr () == 0) { ACE_DEBUG ((LM_DEBUG, "service context was not filled/n")); //24 hrs from now - infinity ACE_Time_Value deadline_tv = ACE_OS::gettimeofday () + ACE_Time_Value (24*60*60,0); deadline = deadline_tv.sec ()*1000000 + deadline_tv.usec ()*10; //100s of nanoseconds for TimeBase::TimeT importance = 0; } else { CORBA::OctetSeq oc_seq = CORBA::OctetSeq (sc->context_data.length (), sc->context_data.length (), sc->context_data.get_buffer (), 0); //Don't store in a _var, since >>= returns a pointer to an internal buffer //and we are not supposed to free it. Kokyu::Svc_Ctxt_DSRT_QoS* sc_qos_ptr; CORBA::Any sc_qos_as_any; CORBA::Any_var scqostmp = codec_->decode (oc_seq); sc_qos_as_any = scqostmp.in (); sc_qos_as_any >>= sc_qos_ptr; deadline = sc_qos_ptr->deadline; importance = sc_qos_ptr->importance; guid.length (sc_qos_ptr->guid.length ()); guid_copy (guid, sc_qos_ptr->guid); ACE_DEBUG ((LM_DEBUG, "(%t|%T):Importance = %d in recvd service context/n", importance)); } ACE_OS::memcpy (&int_guid, guid.get_buffer (), guid.length ()); EDF_Scheduler_Traits::QoSDescriptor_t qos; qos.deadline_ = qos.importance_ = importance; qos.deadline_ = deadline; this->kokyu_dispatcher_->schedule (guid, qos); DSUI_EVENT_LOG (EDF_SCHED_FAM, EXIT_RECEIVE_REPLY, int_guid, 0, 0);}
开发者ID:CCJY,项目名称:ATCD,代码行数:74,
示例3: nameUTL_ScopedName *be_visitor_xplicit_pre_proc::xplicit_iface_rel_name (AST_Decl *d){ AST_Decl *tmp = d; ACE_CString name (d->full_name ()); while (tmp != 0) { if (be_home::narrow_from_decl (tmp) != 0) { ACE_CString head (tmp->local_name ()->get_string ()); ACE_CString::size_type start = name.find (head) + 2; ACE_CString tail (name.substr (start + head.length ())); return FE_Utils::string_to_scoped_name (tail.c_str ()); } tmp = ScopeAsDecl (tmp->defined_in ()); } return 0;}
开发者ID:CCJY,项目名称:ATCD,代码行数:24,
示例4: whileboolImR_Locator_i::split_key (ACE_CString &full, ACE_CString &key, Server_Info_Ptr &si){ key = full; if (this->get_info_for_name (full.c_str(), si)) { return true; } ACE_CString::size_type pos = full.rfind ('/'); while (pos != ACE_CString::npos) { ACE_CString server = full.substring (0, pos); if (this->get_info_for_name (server.c_str (), si)) { return true; } pos = server.rfind ('/'); } return false;}
开发者ID:opensourcecodeformyself,项目名称:ATCD,代码行数:22,
示例5: ACE_TMAINintACE_TMAIN (int argc, ACE_TCHAR* argv[]){#if defined (TAO_HAS_MONITOR_FRAMEWORK) && (TAO_HAS_MONITOR_FRAMEWORK == 1) try { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); PortableServer::POAManager_var poa_manager = poa->the_POAManager (); poa_manager->activate (); TAO_Notify_Service* notify_service = TAO_Notify_Service::load_default (); if (notify_service == 0) { error ("Unable to load the Notify Service"); } notify_service->init_service (orb.in ()); ACE_OS::sleep (1); const ACE_CString ecf_name ("MonitoringEventChannelFactory"); CosNotifyChannelAdmin::EventChannelFactory_var ecf = notify_service->create (poa.in (), ecf_name.c_str ()); NotifyMonitoringExt::EventChannelFactory_var monitor_ec_factory = NotifyMonitoringExt::EventChannelFactory::_narrow (ecf.in ()); if (CORBA::is_nil (monitor_ec_factory.in ())) { error ("Unable to create the Monitoring Event Channel Factory"); } CosNotification::QoSProperties qos_prop; CosNotification::AdminProperties admin_prop; CosNotifyChannelAdmin::ChannelID id; const ACE_CString ec_name ("test1"); CosNotifyChannelAdmin::EventChannel_var ec = monitor_ec_factory->create_named_channel (qos_prop, admin_prop, id, ec_name.c_str ()); NotifyMonitoringExt::EventChannel_var mec = NotifyMonitoringExt::EventChannel::_narrow (ec.in ()); if (CORBA::is_nil (mec.in ())) { error ("Unable to narrow the event channel"); } try { CosNotifyChannelAdmin::ChannelID fake_id; CosNotifyChannelAdmin::EventChannel_var fake = monitor_ec_factory->create_named_channel (qos_prop, admin_prop, fake_id, "test1"); error ("Expected a NotifyMonitoringExt::" "NameAlreadyUsed exception"); } catch (const NotifyMonitoringExt::NameAlreadyUsed&) { // This is expected. } Monitor_Point_Registry* instance = Monitor_Point_Registry::instance (); ACE_CString stat_name = ecf_name + "/" + ACE_CString (NotifyMonitoringExt::InactiveEventChannelCount); Monitor_Base* stat = instance->get (stat_name); if (stat == 0) { error ("Could not find InactiveEventChannelCount statistic"); } stat->update (); double count = stat->last_sample (); if (!ACE::is_equal (count, 1.0)) { error ("Invalid inactive event channel count"); } stat_name = ecf_name + "/" + ACE_CString (NotifyMonitoringExt::ActiveEventChannelCount); stat = instance->get (stat_name);//.........这里部分代码省略.........
开发者ID:asdlei00,项目名称:ACE,代码行数:101,
示例6: DANCE_TRACE CORBA::Object_ptr Plan_Launcher_Base_Impl< Manager, AppManager, Application> ::prepare_plan (const ::Deployment::DeploymentPlan &plan) { DANCE_TRACE ("Plan_Launcher_Base_Impl::prepare_plan");#ifdef GEN_OSTREAM_OPS if (DAnCE_debug_level >= DANCE_LOG_DETAILED_TRACE) { std::ostringstream plan_stream; plan_stream << plan << std::endl; DANCE_TRACE_LOG (DANCE_LOG_DETAILED_TRACE, (LM_TRACE, DLINFO "Convert_Plan - Input plan: %C/n", plan_stream.str ().c_str ())); }#endif /* GEN_OSTREAM_OPS */ typename AppManager::_var_type app_manager; try { ::Deployment::ApplicationManager_var l_manager = this->manager_->preparePlan (plan, 0); app_manager = app_manager = AppManager::_narrow (l_manager.in ()); } catch (::Deployment::PlanError &ex) { ACE_CString error ("Caught PlanError exception while invoking preparePlan: "); error += ex.name.in (); error += ", "; error += ex.reason.in (); DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT("Plan_Launcher_Base_Impl::prepare_plan - %C/n"), error.c_str ())); throw Deployment_Failure (error); } catch (::Deployment::StartError &ex) { ACE_CString error ("Caught StartError exception while invoking preparePlan: "); error += ex.name.in (); error += ", " ; error += ex.reason.in (); DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT("Plan_Launcher_Base_Impl::prepare_plan - %C/n"), error.c_str ())); throw Deployment_Failure (error); } catch (::CORBA::Exception &ex) { ACE_CString error; error += "Caught CORBA exception while invoking preparePlan: "; error += ex._info (); DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT("Plan_Launcher_Base_Impl::prepare_plan - %C/n"), error.c_str ())); throw Deployment_Failure (error); } catch(...) { DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT("Plan_Launcher_Base_Impl::prepare_plan - ") ACE_TEXT("An exception was thrown during EM->preparePlan./n"))); throw Deployment_Failure ("An unexpected C++ exception was caught while invoking preparePlan"); } DANCE_DEBUG (DANCE_LOG_EVENT_TRACE, (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher_Base_Impl::launch_plan - ") ACE_TEXT ("after to call preparePlan/n"))); if (CORBA::is_nil (app_manager.in ())) { DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT("Plan_Launcher_Base_Impl::prepare_plan - ") ACE_TEXT("preparePlan call failed: ") ACE_TEXT("nil ApplicationManager reference/n"))); return 0; } else { DANCE_DEBUG (DANCE_LOG_MINOR_EVENT, (LM_DEBUG, DLINFO ACE_TEXT("Plan_Launcher_Base_Impl::prepare_plan - ") ACE_TEXT("ApplicationMAnager was received from preparePlan./n"))); } return app_manager._retn ();}
开发者ID:CCJY,项目名称:ATCD,代码行数:93,
示例7: returnintTAO::HTIOP::Protocol_Factory::match_prefix (const ACE_CString &prefix){ // Check for the proper prefix for this protocol. return (ACE_OS::strcasecmp (prefix.c_str (), ::the_prefix) == 0);}
开发者ID:binary42,项目名称:OCI,代码行数:6,
示例8: holderintbe_visitor_servant_svh::visit_consumes (be_consumes *node){ if(!be_global->gen_noeventccm ()) { const char *obj_name = node->consumes_type ()->full_name (); const char *port_name = node->local_name ()->get_string (); ACE_CString holder (obj_name); ACE_CString::size_type pos = holder.rfind (':'); const char *ev_lname = 0; if (pos == ACE_CString::npos) { ev_lname = obj_name; } else { holder = holder.substr (pos + 1); ev_lname = holder.c_str (); } os_ << be_uidt_nl << be_nl << "public:" << be_idt_nl; os_ << "// Servant class for the " << port_name << " consumer." << be_nl << "class " << export_macro_.c_str () << " " << ev_lname << "Consumer_" << port_name << "_Servant" << be_idt_nl << ": public virtual ::POA_" << obj_name << "Consumer" << be_uidt_nl << "{" << be_nl << "public:" << be_idt_nl; ACE_CString sname_str ( ScopeAsDecl (node_->defined_in ())->full_name ()); const char *sname = sname_str.c_str (); const char *lname = node_->local_name (); const char *global = (sname_str == "" ? "" : "::"); os_ << ev_lname << "Consumer_" << port_name << "_Servant (" << be_idt_nl << global << sname << "::CCM_" << lname << "_ptr executor," << be_nl << global << sname << "::CCM_" << lname << "_Context_ptr c);" << be_uidt_nl << be_nl; os_ << "virtual ~" << ev_lname << "Consumer_" << port_name << "_Servant (void);"; os_ << be_nl_2 << "virtual void" << be_nl << "push_" << ev_lname << " (" << be_idt_nl << "::" << obj_name << " * evt);" << be_uidt; os_ << be_nl_2 << "/// Inherited from ::Components::EventConsumerBase." << be_nl << "virtual void" << be_nl << "push_event ( ::Components::EventBase * ev);"; os_ << be_nl_2 << "/// Get component implementation." << be_nl << "virtual ::CORBA::Object_ptr" << be_nl << "_get_component (void);"; os_ << be_uidt_nl << be_nl << "protected:" << be_idt_nl; os_ << global << sname << "::CCM_" << lname << "_var" << be_nl << "executor_;"; os_ << be_nl_2 << global << sname << "::CCM_" << lname << "_Context_var" << be_nl << "ctx_;"; os_ << be_uidt_nl << "};"; if (!be_global->gen_lwccm ()) { os_ << be_nl_2 << "virtual ::" << obj_name << "Consumer_ptr" << be_nl << "get_consumer_" << port_name << " (void);"; } os_ << be_uidt_nl << be_nl << "private:" << be_idt_nl; os_ << "void" << be_nl << "setup_consumer_" << port_name << "_i (void);"; os_ << be_uidt_nl << be_nl << "private:" << be_idt_nl; os_ << "::" << obj_name << "Consumer_var" << be_nl << "consumes_" << port_name << "_;"; } return 0;}
开发者ID:CCJY,项目名称:ATCD,代码行数:100,
示例9: pathvoidObj_Module::add_source(const char *p, int imports_only){ ACE_Process nmproc; ACE_Process_Options nm_opts; ACE_CString path (p); ACE_CString::size_type pathsep = path.rfind('/'); ACE_CString src_name; ACE_CString workpath; if (pathsep == ACE_CString::npos) { src_name = path; workpath = "."; } else { src_name = path.substr(pathsep+1); workpath= path.substr(0,pathsep); } ACE_HANDLE pipe[2]; ACE_Pipe io(pipe); nm_opts.working_directory (workpath.c_str()); nm_opts.set_handles (ACE_STDIN,pipe[1]); // Options for the command line shown here are for the GNU nm 2.9.5 int result = nm_opts.command_line ("nm -C %s",src_name.c_str()); // Prevent compiler warning about "unused variable" if ACE_ASSERT is // an empty macro. ACE_UNUSED_ARG (result); ACE_ASSERT (result == 0); nmproc.spawn (nm_opts); if (ACE_OS::close(pipe[1]) == -1) ACE_DEBUG ((LM_DEBUG, "%p/n", "close")); nm_opts.release_handles(); int import_lines = 0; int export_lines = 0; ACE_Message_Block im_buffer (102400); ACE_Message_Block ex_buffer (102400); ACE_Message_Block *im_buf_cur = &im_buffer; ACE_Message_Block *ex_buf_cur = &ex_buffer; char dummy; int eoln = 1; // ACE_Time_Value timeout (1,0); int is_import = 1; int is_export = 1; while (eoln == 1) { for (int i = 0; i < 10; i++) { if (ACE_OS::read(pipe[0],&dummy,1) != 1) { eoln = 2; break; } } if (eoln == 2) break; is_import = dummy == 'U'; is_export = !imports_only && (ACE_OS::strchr("BCDRTVW",dummy) != 0); // if (ACE::recv(pipe[0],&dummy,1,&timeout) != 1) if (ACE_OS::read(pipe[0],&dummy,1) != 1) break; eoln = this->read_line (pipe[0], is_import ? &im_buf_cur : (is_export ? &ex_buf_cur : 0)); import_lines += is_import; export_lines += is_export; } // ACE_DEBUG ((LM_DEBUG, "read %d import lines and %d export lines/n", // import_lines, export_lines)); nmproc.wait (); ACE_OS::close (pipe[0]); this->populate_sig_list (imports_,import_lines,&im_buffer); if (!imports_only) this->populate_sig_list (exports_,export_lines,&ex_buffer);}
开发者ID:binghuo365,项目名称:BaseLab,代码行数:82,
示例10: comp_sname_strintbe_visitor_servant_svs::visit_consumes (be_consumes *node){ AST_Type *obj = node->consumes_type (); const char *port_name = node->local_name ()->get_string (); const char *comp_lname = node_->local_name (); ACE_CString comp_sname_str ( ScopeAsDecl (node_->defined_in ())->full_name ()); const char *comp_sname = comp_sname_str.c_str (); const char *global = (comp_sname_str == "" ? "" : "::"); const char *lname = obj->local_name ()->get_string (); const char *fname = obj->full_name (); os_ << be_nl_2 << comp_lname << "_Servant::" << lname << "Consumer_" << port_name << "_Servant::" << lname << "Consumer_" << port_name << "_Servant (" << be_idt << be_idt_nl << global << comp_sname << "::CCM_" << comp_lname << "_ptr executor," << be_nl << global << comp_sname << "::CCM_" << comp_lname << "_Context_ptr c)" << be_uidt_nl << ": executor_ ( " << global << comp_sname << "::CCM_" << comp_lname << "::_duplicate (executor))," << be_idt_nl << "ctx_ ( " << global << comp_sname << "::CCM_" << comp_lname << "_Context::_duplicate (c))" << be_uidt << be_uidt_nl << "{" << be_nl << "}"; os_ << be_nl_2 << comp_lname << "_Servant::" << lname << "Consumer_" << port_name << "_Servant::~" << lname << "Consumer_" << port_name << "_Servant (void)" << be_nl << "{" << be_nl << "}"; os_ << be_nl_2 << "::CORBA::Object_ptr" << be_nl << comp_lname << "_Servant::" << lname << "Consumer_" << port_name << "_Servant::_get_component (void)" << be_nl << "{" << be_idt_nl; if (ACE_OS::strcmp (be_global->ciao_container_type (), "Session") == 0) { os_ << "return this->ctx_->get_CCM_object ();"; } else { os_ << "return ::CORBA::Object::_nil ();"; } os_ << be_uidt_nl << "}"; os_ << be_nl_2 << "void" << be_nl << comp_lname << "_Servant::" << lname << "Consumer_" << port_name << "_Servant::push_" << lname << " (" << be_idt_nl << "::" << fname << " * evt)" << be_uidt_nl << "{" << be_idt_nl << "this->executor_->push_" << port_name << " (evt);" << be_uidt_nl << "}"; os_ << be_nl_2 << "/// Inherited from ::Components::EventConsumerBase." << be_nl << "void" << be_nl << comp_lname << "_Servant::" << lname << "Consumer_" << port_name << "_Servant::push_event (" << be_idt_nl << "::Components::EventBase * ev)" << be_uidt_nl << "{" << be_idt_nl << "::" << fname << " * ev_type =" << be_idt_nl << "::" << fname << "::_downcast (ev);" << be_uidt_nl << be_nl << "if (ev_type != 0)" << be_idt_nl << "{" << be_idt_nl << "this->push_" << lname << " (ev_type);" << be_nl << "return;" << be_uidt_nl << "}" << be_uidt_nl << be_nl << "throw ::Components::BadEventType ();" << be_uidt_nl << "}"; if (!be_global->gen_lwccm ()) { os_ << be_nl_2 << "::" << fname << "Consumer_ptr" << be_nl << node_->local_name () << "_Servant::get_consumer_" << port_name << " (void)" << be_nl << "{" << be_idt_nl << "return" << be_idt_nl << "::" << fname << "Consumer::_duplicate (" << be_idt_nl << "this->consumes_" << port_name << "_.in ());" << be_uidt << be_uidt << be_uidt_nl << "}"; } os_ << be_nl_2//.........这里部分代码省略.........
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:101,
示例11: prefixintbe_visitor_servant_svs::visit_uses (be_uses *node){ if (node->uses_type ()->is_local () || be_global->gen_lwccm ()) { return 0; } ACE_CString prefix (this->ctx_->port_prefix ()); prefix += node->local_name ()->get_string (); const char *port_name = prefix.c_str (); const char *obj_name = node->uses_type ()->full_name (); bool const is_multiple = node->is_multiple (); os_ << be_nl_2 << (is_multiple ? "::Components::Cookie *" : "void") << be_nl << node_->local_name () << "_Servant::connect_" << port_name << " (" << be_idt_nl << "::" << obj_name << "_ptr c)" << be_uidt_nl << "{" << be_idt_nl; if (is_multiple) { os_ << "return "; } os_ << "this->context_->connect_" << port_name << " (c);" << be_uidt_nl << "}"; os_ << be_nl_2 << "::" << obj_name << "_ptr" << be_nl << node_->local_name () << "_Servant::disconnect_" << port_name << " ("; if (is_multiple) { os_ << be_idt_nl << "::Components::Cookie * ck" << be_uidt; } else { os_ << "void"; } os_ << ")" << be_nl << "{" << be_idt_nl << "return this->context_->disconnect_" << port_name << " (" << (is_multiple ? "ck" : "") << ");" << be_uidt_nl << "}"; os_ << be_nl_2 << "::"; if (is_multiple) { os_ << node_->full_name () << "::" << port_name << "Connections *"; } else { os_ << obj_name << "_ptr"; } os_ << be_nl << node_->local_name () << "_Servant::get_connection" << (is_multiple ? "s" : "") << "_" << port_name << " (void)" << be_nl << "{" << be_idt_nl << "return this->context_->get_connection" << (is_multiple ? "s" : "") << "_" << port_name << " ();" << be_uidt_nl << "}"; return 0;}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:79,
示例12: ACE_TMAINintACE_TMAIN(int argc, ACE_TCHAR* argv[]){ u_long priority_mask = ACE_LOG_MSG->priority_mask (ACE_Log_Msg::PROCESS); ACE_CLR_BITS (priority_mask, LM_DEBUG|LM_TRACE); ACE_LOG_MSG->priority_mask (priority_mask, ACE_Log_Msg::PROCESS); ACE_CString* e = new ACE_CString("1000100000000000"); bn* _pq = new bn(0x10);/**/ _pq->addat(0, 0x3021802f); _pq->addat(1, 0x4c5faba9); _pq->addat(2, 0x18f820dc); _pq->addat(3, 0xc8a28aab); _pq->addat(4, 0x02de8542); _pq->addat(5, 0x8e301566); _pq->addat(6, 0xce281be5); _pq->addat(7, 0x346b2199); _pq->addat(8, 0xd8335836); _pq->addat(9, 0x59cebc36); _pq->addat(10, 0x4b768f8d); _pq->addat(11, 0xda316c22); _pq->addat(12, 0xd6c0f9f4); _pq->addat(13, 0xc46b3a0e); _pq->addat(14, 0x045015c0); _pq->addat(15, 0xbf78c2f6); // _pq->subat(0,0x1); bn* _e = from_hex(e); bn* _d = new bn(0x10); _d->addat(0, 0xf4e5789b); _d->addat(1, 0x27c688d4); _d->addat(2, 0x40cb88fd); _d->addat(3, 0xe8c4c59d); _d->addat(4, 0x6b611a0e); _d->addat(5, 0x4493cfe9); _d->addat(6, 0x6a4d2e51); _d->addat(7, 0x58e231d1); _d->addat(8, 0xafefffe3); _d->addat(9, 0xae1d348b); _d->addat(10, 0x8d147a03); _d->addat(11, 0xddd6a6c5); _d->addat(12, 0x95749cf1); _d->addat(13, 0x5790ba88); _d->addat(14, 0x327997a7); _d->addat(15, 0x8f07aed1); bn* _jg = new bn(0xa); _jg->addat(0, 0xa3e6f7bb); _jg->addat(1, 0xb4594256); _jg->addat(2, 0x059555cf); _jg->addat(3, 0x503806c8); _jg->addat(4, 0x1d775b9f); _jg->addat(5, 0x0667d89e); _jg->addat(6, 0x52ff1ca5); _jg->addat(7, 0x37cd8aa6); _jg->addat(8, 0xf92ec894); _jg->addat(9, 0x674e57d3); _jg->addat(10, 0x1e8516); bn* tmp = new bn(1); tmp->addat(0,0x12345678); bn* _ed = mul(_e, _d); bn* _fv = mul(_ed, _jg); // bn* v = (tmp, _fv, _pq); ACE_CString* str = v->to_hex(); ACE_DEBUG((LM_INFO, "%s/n", str->c_str())); delete str; delete v; delete _ed; delete _pq; delete _e; delete _d; delete tmp; // delete pq; delete e; // delete d; delete _jg; delete _fv;}
开发者ID:jungu,项目名称:brokenseal,代码行数:89,
示例13: ACE_TMAINintACE_TMAIN(int argc, ACE_TCHAR *argv[]){ int status = 0; bool set_cert_file = true; try { // This has to be done before calling CORBA::ORB_init() and // parse_args() has to be called after CORBA::ORB_init(), so we // will look at argv manually. for(int i = 0; i < argc; i++) { if (ACE_OS::strcmp(argv[i], ACE_TEXT("-n")) == 0) { set_cert_file = false; break; } } ACE_CString env ("SSL_CERT_FILE="); env += cert_file; if (set_cert_file) { ACE_OS::putenv (env.c_str ()); } CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var object = orb->string_to_object (ior); if (set_cert_file) { // This test sets creates a Security::QOPPolicy with the // Quality-of-Protection set to "no protection." It then // invokes a method on the server (insecurely), which should // then result in a CORBA::NO_PERMISSION exception. // // The server is not shutdown by this test. status = insecure_invocation_test (orb.in (), object.in ()); ACE_DEBUG ((LM_DEBUG, "insecure_invocation_test returned <%d>/n", status)); } // This test uses the default secure SSLIOP settings to securely // invoke a method on the server. No exception should occur. // // The server *is* shutdown by this test. try { status = secure_invocation_test (object.in ()); ACE_DEBUG ((LM_DEBUG, "secure_invocation_test returned <%d>/n", status)); } catch (const CORBA::Exception &ex) { if (set_cert_file) { ex._tao_print_exception ("Caught unexpected exception " "(probable failure):"); status = 1; } else { ACE_DEBUG ((LM_DEBUG, "Caught an exception as expected due " "to the SSL_CERT_FILE environment " "variable not being set./n")); } } orb->destroy (); } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("Exception in main:"); return 1; } if (status == 0) { ACE_DEBUG ((LM_DEBUG, "/n" "Bug_1107_Regression test passed./n")); } return status;}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:94,
示例14: launch_planintlaunch_plan (const Options &opts, DAnCE::Plan_Launcher_Base *pl_base, const ::Deployment::DeploymentPlan *plan, CORBA::ORB_ptr orb){ DANCE_TRACE ("launch_plan"); try { CORBA::Object_var app_mgr, app; CORBA::String_var uuid_safe (pl_base->launch_plan (*plan, app_mgr.out () , app.out ())); ACE_CString uuid = uuid_safe.in (); DANCE_DEBUG (DANCE_LOG_MAJOR_EVENT, (LM_NOTICE, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ") ACE_TEXT ("Successfully deployed plan ") ACE_TEXT ("with UUID: <%C>/n"), uuid.c_str ())); if (!opts.output_) return 0; ACE_TString am_output, app_output; if (opts.output_prefix_) am_output = app_output = opts.output_prefix_; else am_output = app_output = ACE_TEXT_CHAR_TO_TCHAR (uuid.c_str ()); am_output += ACE_TEXT ("_AM.ior"); app_output += ACE_TEXT ("_APP.ior"); DANCE_DEBUG (DANCE_LOG_MINOR_EVENT, (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ") ACE_TEXT ("Writing Application Manager IOR to <%s>/n"), am_output.c_str ())); CORBA::String_var tmp = orb->object_to_string (app_mgr.in ()); write_IOR (am_output.c_str (), tmp.in ()); DANCE_DEBUG (DANCE_LOG_MINOR_EVENT, (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ") ACE_TEXT ("Writing Application IOR to <%s>/n"), am_output.c_str ())); tmp = orb->object_to_string (app.in ()); write_IOR (app_output.c_str (), tmp.in ()); } catch (const DAnCE::Deployment_Failure &ex) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ") ACE_TEXT ("Deployment failed, exception: %C/n"), ex.ex_.c_str ())); } return 1; } catch (const Deployment::PlanError &ex) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ") ACE_TEXT ("Caught PlanError exception: %C, %C/n"), ex.name.in (), ex.reason.in () )); } return 1; } catch (const Deployment::StartError &ex) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ") ACE_TEXT ("Caught PlanError exception: %C, %C/n"), ex.name.in (), ex.reason.in () )); } return 1; } catch (const Deployment::StopError &ex) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::launch_plan - ")//.........这里部分代码省略.........
开发者ID:asdlei00,项目名称:ACE,代码行数:101,
示例15: teardown_planintteardown_plan (const Options &opts, DAnCE::Plan_Launcher_Base *pl_base, const ::Deployment::DeploymentPlan *plan, CORBA::ORB_ptr orb){ DANCE_TRACE ("teardown_plan"); int rc = 0; try { CORBA::Object_var am; CORBA::Object_var app; if (opts.am_ior_ && opts.app_ior_) { DANCE_DEBUG (DANCE_LOG_MAJOR_EVENT, (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Tearing down plan with explicitly ") ACE_TEXT ("nominated App and AM IORs./n"))); am = orb->string_to_object (opts.am_ior_); app = orb->string_to_object (opts.app_ior_); } else { // Need to perform lookup by uuid, // either explicitly provided or in plan. ACE_CString uuid; if (plan) uuid = plan->UUID.in (); else uuid = ACE_TEXT_ALWAYS_CHAR (opts.uuid_); DAnCE::EM_Launcher *em_launcher = dynamic_cast <DAnCE::EM_Launcher *> (pl_base); if (!em_launcher) { DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Error: Attempting UUID lookup on non") ACE_TEXT ("-EM managed plan not supported/n"))); return 1; } if (em_launcher->lookup_by_uuid (uuid.c_str (), am.out (), app.out ())) { DANCE_DEBUG (DANCE_LOG_MAJOR_EVENT, (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Tearing down plan with UUID %C/n"), uuid.c_str ())); } else { DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Error: Lookup by UUID failed/n"))); return 1; } } try { pl_base->teardown_application (am, app); } catch (const DAnCE::Deployment_Failure &ex) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Application Teardown failed, exception: %C/n"), ex.ex_.c_str ())); } rc = 1; } catch (const CORBA::Exception &ex) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Application Teardown failed, ") ACE_TEXT ("caught CORBA exception %C/n"), ex._info ().c_str ())); } rc = 1; } catch (...) { if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher::teardown_plan - ") ACE_TEXT ("Application Teardown failed, ")//.........这里部分代码省略.........
开发者ID:asdlei00,项目名称:ACE,代码行数:101,
示例16: generate//// generate//int CUTS_Dmac_File_Vertical_Generator::generate (ACE_CString & db_file, int round){ ifstream data_file (db_file.c_str ()); this->row_count_ = 0; if (data_file.is_open()) { CUTS_DMAC_UTILS::sequence_details word_index; vertical_list_t vertical_list; std::set <std::string> word_list; std::set <std::string>::iterator it1; std::string delim (this->delims_.c_str ()); int count = 1; // Read line by line and tokenize while (data_file.good ()) { std::string row; getline (data_file, row); CUTS_Dmac_Vertical_Format * format = new CUTS_Dmac_Vertical_Format (); this->tokenize (row, word_list, delim, format); format->tid (count); vertical_list.push_back (format); count++; } this->row_count_ = count - 1; int number = 1; // print the vertical list to the file for (it1 = word_list.begin (); it1 != word_list.end (); it1++) { word_index.insert (std::pair <std::string, int> (*it1, number)); number++; } std::stringstream output_file; std::ofstream output; output_file << round << ".data"; output.open (output_file.str ().c_str ()); v_iter it2; for (it2 = vertical_list.begin (); it2 != vertical_list.end (); it2++) { ((CUTS_Dmac_Vertical_Format *)(*it2))->populate (word_index); ((CUTS_Dmac_Vertical_Format *)(*it2))->print_row_words (output); } output.close (); data_file.close (); return 1; } else { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%T (%t) - %M - failed to open %s/n"), db_file.c_str ()), -1); }}
开发者ID:SEDS,项目名称:CUTS,代码行数:70,
示例17: lnameintbe_visitor_ami_pre_proc::visit_interface (be_interface *node){ // We check for an imported node after generating the reply handler. if (node->is_local () || node->is_abstract ()) { return 0; } // The following 3 IF blocks are checks for CCM-related nodes, which // we want to skip until we get AMI integrated with CIAO. // Skip the *EventConsumer added for each eventtype. if (node->is_event_consumer ()) { return 0; } // Check for home equivalent interface. The lookup will find the // home itself, which was declared first. Identifier *node_lname = node->AST_Decl::local_name (); AST_Decl *first_stored = node->defined_in ()->lookup_by_name_local (node_lname, false); if (0 != first_stored && first_stored->node_type () == AST_Decl::NT_home) { return 0; } ACE_CString lname (node_lname->get_string ()); // Skip the *Explict and *Implicit interfaces added for a home. if (lname.substr (lname.length () - 6) == "plicit") { UTL_Scope *s = node->defined_in (); Identifier local_id (lname.substr (0, lname.length () - 8).c_str ()); AST_Decl *d = s->lookup_by_name_local (&local_id, false); local_id.destroy (); if (0 != d) { return 0; } } AST_Module *module = AST_Module::narrow_from_scope (node->defined_in ()); if (!module) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_ami_pre_proc::" "visit_interface - " "module is null/n"), -1); } be_interface *reply_handler = this->create_reply_handler (node); if (reply_handler) { reply_handler->set_defined_in (node->defined_in ()); // Insert the ami handler after the node, the // exception holder will be placed between these two later. module->be_add_interface (reply_handler, node); // Remember from whom we were cloned reply_handler->original_interface (node); // If this was created for an imported node, it will be wrong // unless we set it. reply_handler->set_imported (node->imported ()); } else { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_ami_pre_proc::" "visit_interface - " "creating the reply handler failed/n"), -1); } if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_ami_pre_proc::" "visit_interface - " "visit scope failed/n"), -1); } return 0;}
开发者ID:asdlei00,项目名称:ACE,代码行数:94,
示例18: ACE_TMAINintACE_TMAIN (int argc, ACE_TCHAR *argv[]){ try { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); int result = parse_args (argc, argv); if (result != 0) return result; // Obtain the RootPOA. CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()); // Get the POAManager of the RootPOA. PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); // Policies for the firstPOA to be created. CORBA::PolicyList policies (3); policies.length (3); // Id Assignment Policy policies[0] = root_poa->create_id_assignment_policy (PortableServer::USER_ID); // Lifespan policy policies[1] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT); // Threading policy policies[2] = root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL); // Create the firstPOA under the RootPOA. ACE_CString name = "firstPOA"; PortableServer::POA_var first_poa = root_poa->create_POA (name.c_str (), poa_manager.in (), policies); policies[2]->destroy (); // Threading policy policies[2] = root_poa->create_thread_policy (PortableServer::SINGLE_THREAD_MODEL); // Create the secondPOA under the firstPOA. name = "secondPOA"; PortableServer::POA_var second_poa = first_poa->create_POA (name.c_str (), poa_manager.in (), policies); // Creation of POAs is over. Destroy the Policy objects. for (CORBA::ULong i = 0; i < policies.length (); ++i) { policies[i]->destroy (); } // Create two Objects of Class test_i (defined in // ./../GenericServant/test_i.h) Create one object at RootPOA // and the other at firstPOA. test_i first_servant (orb.in (), root_poa.in ()); test_i second_servant (orb.in (), first_poa.in ()); // Do "activate_object" to activate the first_servant object. It // returns ObjectId for that object. Operation Used : // ObjectId activate_object(in Servant p_servant) // raises (ServantAlreadyActive, WrongPolicy); PortableServer::ObjectId_var first_oid = root_poa->activate_object (&first_servant); // Get Object Reference for the first_servant object. test_var first_test = first_servant._this (); // Get ObjectId for object secondtest and use that ObjectId to // activate the second_servant object. // Operation Used : // void activate_object_with_id(in ObjectId oid, in Servant p_servant) // raises (ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy); PortableServer::ObjectId_var second_oid = PortableServer::string_to_ObjectId ("second test"); first_poa->activate_object_with_id (second_oid.in (), &second_servant); // Get Object reference for second_servant object.//.........这里部分代码省略.........
开发者ID:asdlei00,项目名称:ACE,代码行数:101,
示例19: name_serviceintACE_TMAIN(int argc, ACE_TCHAR *argv[]){ if (parse_args (argc, argv) == -1) return -1; try { // Start the Naming Service tasks NamingTask name_service ("NamingORBA", argc, argv); name_service.activate(); // Wait for the Naming Service initialized. name_service.waitInit(); ACE_Argv_Type_Converter satc (argc, argv); CORBA::ORB_var sorb = CORBA::ORB_init (satc.get_argc (), satc.get_TCHAR_argv (), server_orb.c_str ()); ACE_Manual_Event me; Server_Task server_task (name_service.root (), sorb.in (), me, ACE_Thread_Manager::instance ()); if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 1, 1) == -1) { ACE_ERROR ((LM_ERROR, "Error activating server task/n")); } // Wait for the server thread to do some processing me.wait (); ACE_Argv_Type_Converter catc (argc, argv); CORBA::ORB_var corb = CORBA::ORB_init (catc.get_argc (), catc.get_TCHAR_argv (), client_orb.c_str ()); Client_Task client_task (name_service.root (), corb.in (), ACE_Thread_Manager::instance (), result); if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 1, 1) == -1) { ACE_ERROR ((LM_ERROR, "Error activating client task/n")); } // Wait for the client and server to finish ACE_Thread_Manager::instance ()->wait (); // Now that all threads have completed we can destroy the ORB sorb->destroy (); if (server_orb != client_orb) { corb->destroy (); } } catch (const CORBA::Exception&) { // Ignore exceptions.. } return 0;}
开发者ID:esohns,项目名称:ATCD,代码行数:71,
示例20: alarm_cleared void alarm_cleared ( ACS::pattern value, const ACSErr::Completion & c, const ACS::CBDescOut & desc ) { ACE_DEBUG ((LM_DEBUG, "(%s::AlarmCBStates::cleared) Value: %s (%Q). Completion (type=%d, code=%d)", prop.c_str(),description[value].in(), value, c.type, c.code)); }
开发者ID:ACS-Community,项目名称:ACS,代码行数:7,
示例21: ACE_TMAINint ACE_TMAIN (int argc, ACE_TCHAR** argv){ Kokyu::ConfigInfoSet config_info(3); int hi_prio, me_prio, lo_prio; int sched_policy=ACE_SCHED_FIFO; Kokyu::Dispatcher_Attributes attrs; if (parse_args (argc, argv) == -1) return 0; if (ACE_OS::strcasecmp(sched_policy_str.c_str(), "fifo") == 0) { sched_policy = ACE_SCHED_FIFO; } else if (ACE_OS::strcasecmp(sched_policy_str.c_str(), "other") == 0) { sched_policy = ACE_SCHED_OTHER; } else if (ACE_OS::strcasecmp(sched_policy_str.c_str(), "rr") == 0) { sched_policy = ACE_SCHED_RR; } attrs.sched_policy (sched_policy); hi_prio = ACE_Sched_Params::priority_max (sched_policy); me_prio = ACE_Sched_Params::previous_priority (sched_policy, hi_prio); lo_prio = ACE_Sched_Params::previous_priority (sched_policy, me_prio); config_info[0].preemption_priority_ = 1; config_info[0].thread_priority_ = hi_prio ; config_info[0].dispatching_type_ = Kokyu::FIFO_DISPATCHING; config_info[1].preemption_priority_ = 2; config_info[1].thread_priority_ = me_prio; config_info[1].dispatching_type_ = Kokyu::FIFO_DISPATCHING; config_info[2].preemption_priority_ = 3; config_info[2].thread_priority_ = lo_prio; config_info[2].dispatching_type_ = Kokyu::FIFO_DISPATCHING; attrs.config_info_set_ = config_info; ACE_DEBUG ((LM_DEBUG, "before create_dispatcher/n" )); auto_ptr<Kokyu::Dispatcher> disp (Kokyu::Dispatcher_Factory::create_dispatcher (attrs)); ACE_ASSERT (disp.get() != 0); MyCommand cmd1(1), cmd2(2), cmd3(3); Kokyu::QoSDescriptor qos1, qos2, qos3; qos1.preemption_priority_ = 2; ACE_DEBUG ((LM_DEBUG, "Priority of command1 is %d/n", qos1.preemption_priority_)); qos2.preemption_priority_ = 3; ACE_DEBUG ((LM_DEBUG, "Priority of command2 is %d/n", qos2.preemption_priority_)); qos3.preemption_priority_ = 1; ACE_DEBUG ((LM_DEBUG, "Priority of command3 is %d/n", qos3.preemption_priority_)); if (disp->dispatch (&cmd1, qos1) == -1 || disp->dispatch (&cmd2, qos2) == -1 || disp->dispatch (&cmd3, qos3) == -1) ACE_ERROR_RETURN ((LM_ERROR, "Error in dispatching command object/n"), -1); if (disp->activate () == -1) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Error activating dispatcher. ") ACE_TEXT ("You might not have superuser privileges ") ACE_TEXT ("to run FIFO class. Try /"-p other/"/n")), -1); } disp->shutdown (); ACE_DEBUG ((LM_DEBUG, "after shutdown/n")); return 0;}
开发者ID:esohns,项目名称:ATCD,代码行数:87,
注:本文中的ACE_CString类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ACE_Get_Opt类代码示例 C++ ACE_Addr类代码示例 |