本文整理汇总了C++中Test_var::_non_existent方法的典型用法代码示例。如果您正苦于以下问题:C++ Test_var::_non_existent方法的具体用法?C++ Test_var::_non_existent怎么用?C++ Test_var::_non_existent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test_var
的用法示例。
在下文中一共展示了Test_var::_non_existent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ACE_TMAIN
int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
{
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var obj = orb->string_to_object (ior);
// force a scope to see the destruction of the server object
{
Test_Smart_Factory *test_factory = 0;
ACE_NEW_RETURN (test_factory,
Test_Smart_Factory,
-1);
ACE_UNUSED_ARG (test_factory);
Test_var server =
Test::_narrow(obj.in());
if (CORBA::is_nil (server.in())) {
ACE_ERROR_RETURN ((LM_ERROR,
"Object reference <%s> is nil.\n",
ior),
1);
}
server->hello(3);
#if (TAO_HAS_MINIMUM_CORBA == 0)
// Testing the _non_existent function
ACE_DEBUG ((LM_DEBUG, "Testing _non_existent()\n"));
CORBA::Boolean ne =
server->_non_existent();
if (ne)
ACE_ERROR_RETURN ((LM_ERROR,
"Not a Messenger object reference\n"),
1);
else
ACE_DEBUG ((LM_DEBUG,"Successfully called _non_existent()\n"));
#endif /* TAO_HAS_MINIMUM_CORBA */
server->shutdown();
// The following sleep is a hack to make sure the above oneway
// request gets sent before we exit. Otherwise, at least on
// Windows XP, the server may not even get the request.
ACE_Time_Value tv (0, 100000);
ACE_OS::sleep(tv);
}
// here we should get the smart proxy destructor printout
if (!dtor_called) {
ACE_ERROR_RETURN((LM_ERROR,
"The Smart proxy is not deleted\n"),1);
}
orb->destroy();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Client-side exception:");
return 1;
}
return 0;
}