本文整理汇总了C++中portableserver::ObjectId::get_buffer方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectId::get_buffer方法的具体用法?C++ ObjectId::get_buffer怎么用?C++ ObjectId::get_buffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableserver::ObjectId
的用法示例。
在下文中一共展示了ObjectId::get_buffer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
bool operator== (const PortableServer::ObjectId& lhs, const PortableServer::ObjectId& rhs)
{
if (lhs.length() != rhs.length()) {
return false;
}
return (memcmp(lhs.get_buffer(), rhs.get_buffer(), lhs.length()) == 0);
}
示例2:
int
TAO_Ignore_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key,
ACE_Active_Map_Manager_Key &active_key)
{
// Read off value of index and generation.
active_key.decode (modified_key.get_buffer ());
// Success.
return 0;
}
示例3:
int
TAO_No_Hint_Strategy::recover_key (const PortableServer::ObjectId &system_id,
PortableServer::ObjectId &user_id)
{
// Smartly copy all the data; <user_id does not own the data>.
user_id.replace (system_id.maximum (),
system_id.length (),
const_cast<CORBA::Octet *> (system_id.get_buffer ()),
0);
return 0;
}
示例4: activate
FTRT::AMI_UpdateableHandler_ptr UpdateableHandler::activate(
Update_Manager* mgr, int id,
PortableServer::ObjectId& object_id)
{
object_id.length(sizeof(mgr) + sizeof(id));
ACE_OS::memcpy(object_id.get_buffer(), &mgr, sizeof(mgr));
ACE_OS::memcpy(object_id.get_buffer() + sizeof(mgr), &id, sizeof(id));
strategy_->poa()->activate_object_with_id(object_id,
this);
CORBA::Object_var object = strategy_->poa()->id_to_reference(
object_id);
return FTRT::AMI_UpdateableHandler::_narrow(object.in());
}
示例5: hash_pjw
u_long
TAO_ObjectId_Hash::operator () (const PortableServer::ObjectId &id) const
{
return ACE::hash_pjw ((const char *) id.get_buffer (),
id.length ());
}