本文整理汇总了C++中TAO_InputCDR::align_read_ptr方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_InputCDR::align_read_ptr方法的具体用法?C++ TAO_InputCDR::align_read_ptr怎么用?C++ TAO_InputCDR::align_read_ptr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TAO_InputCDR
的用法示例。
在下文中一共展示了TAO_InputCDR::align_read_ptr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tao_unmarshal_value_indirection
CORBA::Boolean
CORBA::ValueBase::_tao_unmarshal_pre (
TAO_InputCDR &strm,
CORBA::ValueBase *&valuetype,
const char *const fallback_repo_id,
CORBA::Boolean &is_null_object,
CORBA::Boolean &is_indirected)
{
// %! yet much to do ... look for +++ !
// 1. Get the <value-tag> (else it may be <indirection-tag> or <null-ref>).
// Is object yet unmarshalled (<indirection-tag> is set) ? (->1a)
// Is <null-ref> given ? Set 0 and return ok.
// 1a. Lookup the real address in memory, which should be aligned +++
// to CORBA::ValueBase. Its possible at this point that worse
// type mismatch gets by undetected, if the CDR stream fakes.
// So the type should be checked ... +++
// 2. Now at this point it must be a <value-tag> (error else).
// if (chunking) check that any last chunk ends with matching
// size. If not raise marshal exception.
// Increase the nesting level of valuetypes.
// 3. if (chunking) read and record the blocksize-tag.
// 4. Unmarshal type information and lookup factory.
// If no type information is given in the CDR encoding, as told
// from the <value-tag>, then use the repository id parameter
// (it _must_ be right).
CORBA::Boolean is_chunked = false;
// Save the position of the start of the ValueType
// to allow caching for later indirection.
if (strm.align_read_ptr (ACE_CDR::LONG_SIZE))
{
return false;
}
void *const start_of_valuetype = strm.rd_ptr();
Repository_Id_List ids;
CORBA::Boolean result =
CORBA::ValueBase::_tao_unmarshal_header (
strm, fallback_repo_id, ids,
is_null_object, is_indirected, is_chunked);
if (!result || is_null_object)
{
valuetype = 0;
return result;
}
if (is_indirected)
{
return _tao_unmarshal_value_indirection (strm, valuetype);
}
CORBA::ValueBase::_tao_unmarshal_find_factory (
strm, start_of_valuetype, valuetype, ids, is_chunked);
return true;
}