本文整理汇总了C++中ACE_OutputCDR::write_long方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_OutputCDR::write_long方法的具体用法?C++ ACE_OutputCDR::write_long怎么用?C++ ACE_OutputCDR::write_long使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_OutputCDR
的用法示例。
在下文中一共展示了ACE_OutputCDR::write_long方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
int
CDR_Test_Types::test_put (ACE_OutputCDR &cdr)
{
for (int i = 0; i < n; ++i)
{
if (cdr.write_octet (this->o) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_octet[%d] failed\n"),
i),
1);
if (cdr.write_short (this->s) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_short[%d] failed\n"),
i),
1);
if (cdr.write_octet (this->o) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_octet-2[%d] failed\n"),
i),
1);
if (cdr.write_long (this->l) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_long[%d] failed\n"),
i),
1);
if (cdr.write_long (this->l) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_long-2[%d] failed\n"),
i),
1);
if (cdr.write_string (this->str) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_string[%d] failed\n"),
i),
1);
if (cdr.write_wstring (this->wstr) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("write_wstring[%d] failed\n"),
i),
1);
}
return 0;
}