本文整理汇总了C++中TAO_OutputCDR::get_value_map方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_OutputCDR::get_value_map方法的具体用法?C++ TAO_OutputCDR::get_value_map怎么用?C++ TAO_OutputCDR::get_value_map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAO_OutputCDR
的用法示例。
在下文中一共展示了TAO_OutputCDR::get_value_map方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INTERNAL
CORBA::Boolean
CORBA::ValueBase::_tao_write_special_value (TAO_OutputCDR &strm,
const CORBA::ValueBase *value)
{
// If the 'value' is null then write the null value to the stream.
if (value == 0)
{
return strm.write_long (TAO_OBV_GIOP_Flags::Null_tag);
}
else
{
#ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION
// value indirection
VERIFY_MAP (TAO_OutputCDR, value_map, Value_Map);
char* pos = 0;
if (strm.get_value_map ()->get()->find (
reinterpret_cast<void*>(const_cast <CORBA::ValueBase *> (value)), pos) == 0)
{
if (TAO_debug_level)
{
TAOLIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t)ValueBase::_tao_write_special_value, found value %x=%x\n"),
value, pos));
}
if (!strm.write_long (TAO_OBV_GIOP_Flags::Indirection_tag))
{
return false;
}
CORBA::Long const offset= -strm.offset (pos);
if (TAO_debug_level)
{
TAOLIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_write_special_value, indirection %d=%x\n"),
offset, (void *)(strm.current()->wr_ptr () + offset) ));
}
return strm.write_long (offset);
}
else {
if (strm.align_write_ptr (ACE_CDR::LONG_SIZE) != 0)
{
throw CORBA::INTERNAL ();
}
if (strm.get_value_map ()->get()->bind (
reinterpret_cast<void*>(const_cast <CORBA::ValueBase *> (value)),
strm.current()->wr_ptr() ) != 0)
{
throw CORBA::INTERNAL ();
}
else if (TAO_debug_level)
{
TAOLIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_marshal, bound value %x=%x\n"),
value, strm.current()->wr_ptr()));
}
return false;
}
#endif
return false;
}
}