本文整理汇总了C++中TAO_InputCDR::orb_core方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_InputCDR::orb_core方法的具体用法?C++ TAO_InputCDR::orb_core怎么用?C++ TAO_InputCDR::orb_core使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAO_InputCDR
的用法示例。
在下文中一共展示了TAO_InputCDR::orb_core方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
CORBA::ValueBase::_tao_unmarshal_find_factory (
TAO_InputCDR &strm,
void *const start_of_valuetype,
CORBA::ValueBase *&valuetype,
Repository_Id_List &ids,
CORBA::Boolean &is_chunked)
{
valuetype = 0;
TAO_ORB_Core *orb_core = strm.orb_core ();
if (!orb_core)
{
orb_core = TAO_ORB_Core_instance ();
if (TAO_debug_level)
{
TAOLIB_DEBUG ((
LM_WARNING,
ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_unmarshal_find_factory, ")
ACE_TEXT ("WARNING: extracting valuetype using default ORB_Core\n") ));
}
}
// Find the registered factory for this unmarshalling valuetype. If any
// factory for the valuetype in its truncatable derivation hierarchy
// is registered, the factory is used to create value for unmarshalling.
// Value factories are reference counted. When we get a new value factory
// from the ORB, its reference count is increased.
CORBA::ValueFactory_var factory;
CORBA::Boolean requires_truncation = false;
const size_t num_ids = ids.size ();
const char *id = (num_ids) ? ids[0].c_str () : "{Null}";
for (size_t i = 0u; i < num_ids; ++i)
{
factory = orb_core->orb ()->lookup_value_factory (ids[i].c_str ());
if (factory.in() != 0)
{
id = ids[i].c_str ();
requires_truncation = (i != 0u);
break;
}
}
// Obtain the actual ValueType from the factory
if (factory.in() == 0 || !(valuetype = factory->create_for_unmarshal ()))
{
if (TAO_debug_level)
{
TAOLIB_ERROR ((LM_ERROR,
ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_unmarshal_find_factory, ")
ACE_TEXT ("OBV factory is null, id=%C\n"),
id));
}
throw ::CORBA::MARSHAL (CORBA::OMGVMCID | 1, CORBA::COMPLETED_MAYBE);
}
if (requires_truncation)
{
valuetype->truncation_hook ();
}
valuetype->chunking_ = is_chunked;
// Cache the start of this ValueType for later possiable indirection
VERIFY_MAP (TAO_InputCDR, value_map, Value_Map);
if (strm.get_value_map ()->get()->bind (start_of_valuetype, valuetype) != 0)
{
TAOLIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_unmarshal_find_factory, ")
ACE_TEXT ("Failed to bound value %x=%x, id=%C\n"),
start_of_valuetype, valuetype, id ));
}
else if (TAO_debug_level)
{
TAOLIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_unmarshal_find_factory, ")
ACE_TEXT ("bound value %x=%x, id=%C\n"),
start_of_valuetype, valuetype, id ));
}
}