这篇教程C++ ACE_NS_WString类代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ACE_NS_WString类的典型用法代码示例。如果您正苦于以下问题:C++ ACE_NS_WString类的具体用法?C++ ACE_NS_WString怎么用?C++ ACE_NS_WString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。 在下文中一共展示了ACE_NS_WString类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: sizeofACE_NS_String::ACE_NS_String (const ACE_NS_WString &s) : len_ ((s.length () + 1) * sizeof (ACE_WCHAR_T)), rep_ (s.rep ()), delete_rep_ (true){ ACE_TRACE ("ACE_NS_String::ACE_NS_String");}
开发者ID:Adeer,项目名称:OregonCore,代码行数:7,
示例2: objectintACE_Registry_Name_Space::rebind (const ACE_NS_WString &name, const ACE_NS_WString &value, const char *type){ ACE_UNUSED_ARG(type); // Pointer to data const ACE_WSTRING_TYPE *data = value.fast_rep (); // Size size_t size = value.length () * sizeof (ACE_WSTRING_TYPE); // Represent value as an ACE_Registry::Object ACE_Registry::Object object ((void *) data, static_cast<u_long> (size), REG_SZ); // Add new <key>/<value> pair#if defined (ACE_USES_WCHAR) return this->context_.rebind (name.fast_rep (), object);#else return this->context_.rebind (name.char_rep (), object);#endif /* ACE_USES_WCHAR */}
开发者ID:jonathlela,项目名称:vast,代码行数:26,
示例3: ACE_TRACEintACE_Remote_Name_Space::resolve (const ACE_NS_WString &name, ACE_NS_WString &value, char *&type){ ACE_TRACE ("ACE_Remote_Name_Space::resolve"); ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> name_urep (name.rep ()); ACE_UINT32 name_len = static_cast<ACE_UINT32> (name.length () * sizeof (ACE_WCHAR_T)); ACE_Name_Request request (ACE_Name_Request::RESOLVE, name_urep.get (), name_len, 0, 0, 0, 0); if (this->ns_proxy_.send_request (request) == -1) return -1; ACE_Name_Request reply; if (this->ns_proxy_.recv_reply (reply) == -1) return -1; ACE_NS_WString temp (reply.value (), reply.value_len () / sizeof (ACE_WCHAR_T)); value = temp; ACE_NEW_RETURN (type, char[reply.type_len () + 1], -1); ACE_OS::strcpy (type, reply.type ()); return 0;}
开发者ID:Blumfield,项目名称:ptc2,代码行数:30,
示例4: ACE_TRACEintACE_Name_Handler::resolve (void){ ACE_TRACE (ACE_TEXT ("ACE_Name_Handler::resolve"));#if 0 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("request for RESOLVE/n")));#endif /* 0 */ ACE_NS_WString a_name (this->name_request_.name (), this->name_request_.name_len () / sizeof (ACE_WCHAR_T)); // The following will deliver our reply back to client we // pre-suppose success (indicated by type RESOLVE). ACE_NS_WString avalue; char *atype; if (this->naming_context ()->resolve (a_name, avalue, atype) == 0) { ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> avalue_urep (avalue.rep ()); ACE_Name_Request nrq (ACE_Name_Request::RESOLVE, 0, 0, avalue_urep.get (), avalue.length () * sizeof (ACE_WCHAR_T), atype, ACE_OS::strlen (atype)); delete[] atype; return this->send_request (nrq); } ACE_Name_Request nrq (ACE_Name_Request::BIND, 0, 0, 0, 0, 0, 0); this->send_request (nrq); return 0;}
开发者ID:binghuo365,项目名称:BaseLab,代码行数:32,
示例5: definedintACE_Registry_Name_Space::unbind (const ACE_NS_WString &name){#if defined (ACE_USES_WCHAR) return this->context_.unbind (name.fast_rep ());#else return this->context_.unbind (name.char_rep ());#endif /* ACE_USES_WCHAR */}
开发者ID:jonathlela,项目名称:vast,代码行数:9,
示例6: requestintACE_Remote_Name_Space::unbind (const ACE_NS_WString &name){ ACE_TRACE ("ACE_Remote_Name_Space::unbind"); ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> name_urep (name.rep ()); ACE_UINT32 name_len = static_cast<ACE_UINT32> (name.length () * sizeof (ACE_WCHAR_T)); ACE_Name_Request request (ACE_Name_Request::UNBIND, name_urep.get (), name_len, 0, 0, 0, 0); return this->ns_proxy_.request_reply (request);}
开发者ID:Blumfield,项目名称:ptc2,代码行数:13,
示例7: ACE_TRACEintACE_Remote_Name_Space::list_name_entries (ACE_BINDING_SET &set, const ACE_NS_WString &pattern){ ACE_TRACE ("ACE_Remote_Name_Space::list_name_entries"); ACE_Auto_Basic_Array_Ptr<ACE_WCHAR_T> pattern_urep (pattern.rep ()); ACE_UINT32 pattern_len = static_cast<ACE_UINT32> (pattern.length () * sizeof (ACE_WCHAR_T)); ACE_Name_Request request (ACE_Name_Request::LIST_NAME_ENTRIES, pattern_urep.get (), pattern_len, 0, 0, 0, 0); if (this->ns_proxy_.send_request (request) == -1) return -1; ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0); while (reply.msg_type () != ACE_Name_Request::MAX_ENUM) { if (this->ns_proxy_.recv_reply (reply) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p/n"), ACE_LIB_TEXT ("ACE_Remote_Name_Space::list_names")), -1); if (reply.msg_type () != ACE_Name_Request::MAX_ENUM) { ACE_NS_WString name (reply.name (), reply.name_len () / sizeof (ACE_WCHAR_T)); ACE_NS_WString value (reply.value (), reply.value_len () / sizeof (ACE_WCHAR_T)); ACE_Name_Binding entry (name, value, reply.type ()); if (set.insert (entry) == -1) return -1; } } return 0;}
开发者ID:jonathlela,项目名称:vast,代码行数:40,
示例8: ACE_ERROR_RETURNintClient_Test::list_types (const char *pattern){ ACE_PWSTRING_SET set; if (NAMING_CONTEXT ()->list_types (set, pattern) != 0) ACE_ERROR_RETURN ((LM_ERROR, "%p Pattern matching failed!/n", "Client_Test::list_types"), 0); else { ACE_PWSTRING_ITERATOR set_iterator (set); for (ACE_NS_WString *type = 0; set_iterator.next (type) !=0; set_iterator.advance()) ACE_DEBUG ((LM_DEBUG, "%s/n", type->char_rep ())); } return 0;}
开发者ID:azraelly,项目名称:knetwork,代码行数:23,
注:本文中的ACE_NS_WString类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ACE_Name_Request类代码示例 C++ ACE_Message_Block类代码示例 |