本文整理汇总了C++中tao_iop::TAO_IOR_Manipulation_var::is_in_ior方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_IOR_Manipulation_var::is_in_ior方法的具体用法?C++ TAO_IOR_Manipulation_var::is_in_ior怎么用?C++ TAO_IOR_Manipulation_var::is_in_ior使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tao_iop::TAO_IOR_Manipulation_var
的用法示例。
在下文中一共展示了TAO_IOR_Manipulation_var::is_in_ior方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iors
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
int Status = 0;
ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
ACE_DEBUG ((LM_DEBUG, "Running the IORManipulation Tests.\n"));
try
{
// Retrieve the ORB.
CORBA::ORB_var orb_ = CORBA::ORB_init (argc,
argv);
// **********************************************************************
// Get an object reference for the ORBs IORManipulation object!
CORBA::Object_var IORM =
orb_->resolve_initial_references ("IORManipulation");
TAO_IOP::TAO_IOR_Manipulation_var iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());
// **********************************************************************
// Create a few fictitious IORs
CORBA::Object_var name1 =
orb_->string_to_object ("corbaloc:iiop:macarena.cs.wustl.edu:6060/xyz");
CORBA::Object_var name2 =
orb_->string_to_object ("corbaloc:iiop:tango.cs.wustl.edu:7070/xyz");
// **********************************************************************
CORBA::String_var name1_ior =
orb_->object_to_string (name1.in ());
ACE_DEBUG ((LM_DEBUG, "\tFirst made up IOR = %C\n", name1_ior.in ()));
CORBA::String_var name2_ior =
orb_->object_to_string (name2.in ());
ACE_DEBUG ((LM_DEBUG, "\tSecond made up IOR = %C\n", name2_ior.in ()));
// **********************************************************************
// Create IOR list for use with merge_iors.
TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
iors.length (2);
iors [0] = name1;
iors [1] = name2;
CORBA::Object_var merged = iorm->merge_iors (iors);
CORBA::String_var merged_ior =
orb_->object_to_string (merged.in ());
CORBA::ULong count1 = iorm->get_profile_count (iors [0]);
CORBA::ULong count2 = iorm->get_profile_count (iors [1]);
CORBA::ULong count = iorm->get_profile_count (merged.in ());
if (count != (count1 + count2))
ACE_DEBUG ((LM_ERROR,
"**ERROR (merge_profiles): "
"Merged profile count incorrect!\n"));
ACE_DEBUG ((LM_DEBUG, "\tMerged IOR(%d) = %C\n",
count,
merged_ior.in ()));
// is_in_ior throws an exception if the intersection of the two
// IORs is NULL.
CORBA::ULong in_count = iorm->is_in_ior (merged.in (),
name1.in ());
if (count1 != in_count)
ACE_DEBUG ((LM_ERROR,
"**ERROR (merge_iors): name1 is_in_ior returned profile "
"count bad (%d)!\n",
in_count));
in_count = iorm->is_in_ior (merged.in (),
name2.in ());
if (count2 != in_count)
ACE_DEBUG ((LM_ERROR,
"**ERROR (merge_iors): name2 is_in_ior returned profile "
"count bad (%d)!\n",
in_count));
// **********************************************************************
// Verify ability to remove profiles from an IOR
// First remove the second IOR from the merged IOR
CORBA::Object_var just1 =
iorm->remove_profiles (merged.in (), name2.in ());
CORBA::String_var just1_ior =
orb_->object_to_string (just1.in ());
count = iorm->get_profile_count (just1.in ());
//.........这里部分代码省略.........