当前位置: 首页>>代码示例>>C++>>正文


C++ tao_ior_manipulation::IORList类代码示例

本文整理汇总了C++中tao_iop::tao_ior_manipulation::IORList的典型用法代码示例。如果您正苦于以下问题:C++ IORList类的具体用法?C++ IORList怎么用?C++ IORList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了IORList类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: iors

int
Manager::make_merged_iors (void)
{
  // First  server
  this->object_primary_ =
    this->orb_->string_to_object (first_ior);

  //Second server
  this->object_secondary_ =
    this->orb_->string_to_object (second_ior);

  // Get an object reference for the ORBs IORManipultion object!
  CORBA::Object_var IORM =
    this->orb_->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
                                            0);

  iorm =
    TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in());


  // Create the list
  TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
  iors.length(2);
  iors [0] = CORBA::Object::_duplicate (this->object_primary_.in ());
  iors [1] = CORBA::Object::_duplicate (this->object_secondary_.in ());

  // Create a merged set 1;
  merged_set_ =
    iorm->merge_iors (iors);

  return 0;
}
开发者ID:CCJY,项目名称:ATCD,代码行数:32,代码来源:Manager.cpp

示例2: iors

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;

      // Primary server
      CORBA::Object_var object_primary =
        orb->string_to_object (ior);

      //Secondary server
      CORBA::Object_var object_secondary =
        orb->string_to_object (name);

      // Get an object reference for the ORBs IORManipultion object!
      CORBA::Object_ptr IORM =
        orb->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
                                         0);

      TAO_IOP::TAO_IOR_Manipulation_ptr iorm =
        TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM);

      TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
      iors.length(2);
      iors [0] = object_primary;
      iors [1] = object_secondary;

      CORBA::Object_var merged = iorm->merge_iors (iors);

      // Combined IOR stuff
      Simple_Server_var server =
        Simple_Server::_narrow (merged.in ());

      if (CORBA::is_nil (server.in ()))
        {
          ACE_ERROR_RETURN ((LM_ERROR,
                             "Object reference <%s> is nil.\n",
                             ior),
                            1);
        }

      run_test (server.in ());
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("Caught an exception\n");
      return -1;
    }
  return 0;
}
开发者ID:chenbk85,项目名称:ACE-Middleware,代码行数:56,代码来源:client.cpp

示例3: iogr_prop

CORBA::Object_ptr
make_iogr (const char* domain_id, CORBA::ULongLong group_id, CORBA::ULong group_version, Test::Hello_var *refs)
{
  FT::TagFTGroupTaggedComponent ft_tag_component;
  // Create the list
  TAO_IOP::TAO_IOR_Manipulation::IORList iors (number_of_servers);
  iors.length(number_of_servers);
  for (CORBA::ULong i = 0; i < number_of_servers; ++i)
    {
      iors [i] = CORBA::Object::_duplicate (refs[i].in ());
    }

  CORBA::Object_var new_ref =
    iorm->merge_iors (iors);

  // Property values

  // Major and Minor revision numbers
  ft_tag_component.component_version.major = (CORBA::Octet) 1;
  ft_tag_component.component_version.minor = (CORBA::Octet) 0;

  // Domain id
  //const char *id = "iogr_testing";
  ft_tag_component.group_domain_id = domain_id;

  // Object group id
  ft_tag_component.object_group_id = group_id;

  // Version
  ft_tag_component.object_group_ref_version = group_version;

  // Construct the IOGR Property class
  TAO_FT_IOGR_Property iogr_prop (ft_tag_component);

  // Set the property
  CORBA::Boolean retval = iorm->set_property (&iogr_prop,
                                              new_ref.in ());

  // Set the primary
  // See we are setting the second ior as the primary
  if (retval != 0)
    {
      retval = iorm->set_primary (&iogr_prop,
                                  refs[0].in (),
                                  new_ref.in ());
    }

  return new_ref._retn ();
}
开发者ID:asdlei00,项目名称:ACE,代码行数:49,代码来源:client2.cpp

示例4: iors

PortableGroup::ObjectGroup_ptr
TAO::PG_Object_Group::add_member_to_iogr (CORBA::Object_ptr member)
{
  // assume internals is locked

  PortableGroup::ObjectGroup_var result;

 ////////////////////////////
  // @@ HACK ALERT
  // The PortableGroup::ObjectGroupManager creates an object reference
  // containing a dummy entry so it will have a place to store the
  // tagged group component. If this is the first entry, we need to
  // remove that entry once we have a *real* member. This can be
  // avoided when we get support for TAG_MULTIPLE_COMPONENTS.   For
  // now, we already have a copy of the tagGroupTagged component and
  // we're going to use it below wen we increment the group version so
  // we can clean out the dummy entry.
  PortableGroup::ObjectGroup_var cleaned =
    PortableGroup::ObjectGroup::_duplicate (this->reference_.in ());
  if (this->empty_)
    {
      // remove the original profile.  It's a dummy entry supplied by
      // create_object.
      cleaned =
        this->manipulator_.remove_profiles (cleaned.in (),
                                            this->reference_.in ());
      this->empty_ = 0;
    }

  // create a list of references to be merged
  TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
  iors.length (2);
  iors [0] = CORBA::Object::_duplicate (cleaned.in());
  iors [1] = CORBA::Object::_duplicate (member);

  // Now merge the list into one new IOGR
  result =
    this->manipulator_.merge_iors (iors);
  return result._retn ();
}
开发者ID:akostrikov,项目名称:ATCD,代码行数:40,代码来源:PG_Object_Group.cpp

示例5: connection_closed

void TAO_FTEC_Group_Manager::connection_closed()
{
  TAO_FTRTEC::Log(1, ACE_TEXT("TAO_FTEC_Group_Manager::connection_closed\n"));
  ACE_ASSERT(impl_->my_position > 0);

  // do not use referere here, because the the value pointed by the pointer to
  // crashed_location will be repliaced by its successor.
  FTRT::Location crashed_location = impl_->info_list[impl_->my_position-1].the_location;


  if (impl_->my_position > 1) {
    // if I am not the new primary, tell the new primary
    try{
      TAO_IOP::TAO_IOR_Manipulation::IORList iors;
      iors.length(impl_->my_position-1);
      for (size_t i = 0; i < impl_->my_position-1; ++i)
        iors[i] = CORBA::Object::_duplicate(impl_->info_list[i].ior.in());

      CORBA::Object_var obj =
        IOGR_Maker::instance()->merge_iors(iors);

      FtRtecEventChannelAdmin::EventChannel_var primary =
        FtRtecEventChannelAdmin::EventChannel::_narrow(obj.in());
      primary->replica_crashed(crashed_location);

      return;
    }
    catch (const CORBA::Exception&){
    }
  }

  try{
    remove_member(crashed_location,
                  IOGR_Maker::instance()->increment_ref_version());
  }
  catch (const CORBA::Exception&){
  }

}
开发者ID:CCJY,项目名称:ATCD,代码行数:39,代码来源:FTEC_Group_Manager.cpp

示例6: policy_list

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;

      // Primary server
      CORBA::Object_var object_primary =
        orb->string_to_object (ior);

      //Secondary server
      CORBA::Object_var object_secondary =
        orb->string_to_object (name);

      // Get an object reference for the ORBs IORManipultion object!
      CORBA::Object_var IORM =
        orb->resolve_initial_references (TAO_OBJID_IORMANIPULATION, 0);

      TAO_IOP::TAO_IOR_Manipulation_var iorm =
        TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());

      TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
      iors.length(2);
      iors [0] = object_primary;
      iors [1] = object_secondary;

      CORBA::Object_var merged = iorm->merge_iors (iors);

      CORBA::Object_var object =
        orb->resolve_initial_references ("PolicyCurrent");

      CORBA::PolicyCurrent_var policy_current =
        CORBA::PolicyCurrent::_narrow (object.in ());

      CORBA::Any timeout_as_any;
      timeout_as_any <<= timeout_period;

      CORBA::PolicyList policy_list (1);
      policy_list.length (1);

      policy_list[0] =
        orb->create_policy (TAO::CONNECTION_TIMEOUT_POLICY_TYPE,
                            timeout_as_any);

      policy_current->set_policy_overrides (policy_list,
                                            CORBA::ADD_OVERRIDE);


      for (CORBA::ULong l = 0;
           l != policy_list.length ();
           ++l)
        {
          policy_list[l]->destroy ();
        }

      // Combined IOR stuff
      Simple_Server_var server =
        Simple_Server::_narrow (merged.in ());

      if (CORBA::is_nil (server.in ()))
        {
          ACE_ERROR_RETURN ((LM_ERROR,
                             "Object reference <%s> is nil.\n",
                             ior),
                            1);
        }

      CORBA::ULongLong freq =
        run_test (server.in ());

      if (freq != 919263)
        ACE_ERROR ((LM_ERROR,
                    ACE_TEXT ("(%P|%t) ERROR in the test\n")));

      ACE_DEBUG ((LM_DEBUG,
                  ACE_TEXT ("(%P|%t) Shutting server down\n")));

      server->shutdown ();
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("Caught an exception\n");
      return -1;
    }

  return 0;
}
开发者ID:asdlei00,项目名称:ACE,代码行数:93,代码来源:client.cpp

示例7: 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 ());
//.........这里部分代码省略.........
开发者ID:asdlei00,项目名称:ACE,代码行数:101,代码来源:IORTest.cpp

示例8: prop

int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{

  ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));
  ACE_DEBUG ((LM_DEBUG, "Running the IOGRManipulation 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 (TAO_OBJID_IORMANIPULATION, 0);

      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 ("iiop://acme.cs.wustl.edu:6060/xyz");
      CORBA::Object_var name2 =
        orb_->string_to_object ("iiop://tango.cs.wustl.edu:7070/xyz");

      // **********************************************************************
      // 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);

      // Check for set and get primaries
      // Make a dummy property set
      FT::TagFTGroupTaggedComponent ft_tag_component;
      TAO_FT_IOGR_Property prop (ft_tag_component);

      CORBA::Boolean retval =
        iorm->set_primary (&prop, name2.in (), merged.in ());

      if (retval != 0)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("\tThe primary has been set\n")));
        }
      else
        {
          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("\tError in setting primary\n")));
          return -1;
        }

      // Check whether a primary has been set
      retval = iorm->is_primary_set (&prop, merged.in ());

      if (retval)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("\tis_primary_set () returned true\n")));
        }
      else
        {
          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("\tis_primary_set () returned false\n")));

          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("\tSo Exiting\n")));
          return -1;
        }

      // Get the primary
      CORBA::Object_var prim = iorm->get_primary (&prop, merged.in ());

      // Check whether we got back the right primary
      if (prim->_is_equivalent (name2.in ()))
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("\tWe got the right primary back\n")));
        }
      else
        {
          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("\tWe have a problem in getting the right primary\n")));
          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("\tSo exiting\n")));
          return -1;
        }
      // **********************************************************************
      // Set properties
      // Property values

      // Major and Minor revision numbers
      ft_tag_component.component_version.major = (CORBA::Octet) 1;
      ft_tag_component.component_version.minor = (CORBA::Octet) 0;

//.........这里部分代码省略.........
开发者ID:CCJY,项目名称:ATCD,代码行数:101,代码来源:IOGRTest.cpp

示例9: ACE_TMAIN

int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
  try
    {
      // initialize the ORB
      _orb = CORBA::ORB_init (argc, argv);

      // Get the "RootPOA"
      CORBA::Object_var obj = _orb->resolve_initial_references("RootPOA");
      PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in ());

      // activate its managers so it can handle incoming requests
      poa->the_POAManager()->activate();

      // get a thread going to handle incoming requests
      ACE_Thread::spawn(RunFunc);

      // we could also use the c_orbaloc syntax to get a reference to the
      // object. This will cause the _orb to talk directly to the other
      // _orb with no name service or common file involved.
      obj = _orb->string_to_object("c_orbaloc::localhost:9999/Simple");

      if (CORBA::is_nil(obj.in ()))
        {
          ACE_ERROR ((LM_ERROR, "could not get reference\n"));
          return 1;
        }

      // narrow the reference to the particular type we wish to deal with
      Simple_var simple = Simple::_narrow(obj.in ());
      if (CORBA::is_nil(simple.in ()))
        {
          ACE_ERROR ((LM_ERROR, "could not get reference\n"));
          return 1;
        }

      // create an object reference that has a bogus value for the first
      // profile
      obj = _orb->resolve_initial_references("IORManipulation");
      TAO_IOP::TAO_IOR_Manipulation_var iorm =
        TAO_IOP::TAO_IOR_Manipulation::_narrow(obj.in());

      // Status: The following scenarios appear to work:
      // - first profile invalid host name, second profile valid.
      // - first profile invalid ip number, second profiel valid.
      // - first profiel invalid port number, second profile valid.
      //
      // The following causes a core dump of the server:
      // - first and second invalid
      //
      // Note that he iormanip is being used since it is not practical
      // to have a test case that depends on a VPN being present.
      //
      CORBA::Object_var name1 =
        _orb->string_to_object ("c_orbaloc:iiop:10.0.2.3:6060/xyz");
      CORBA::Object_var name2 =
        _orb->string_to_object ("c_orbaloc:iiop:daisnot:7070/xyz");
      CORBA::String_var name1_ior = _orb->object_to_string(name1.in());
      CORBA::String_var name2_ior = _orb->object_to_string(name2.in());

      // create a callback object
      Callee_i * callee_i = new Callee_i;
      // get the CORBA reference
      PortableServer::ObjectId_var id =
        poa->activate_object (callee_i);

      CORBA::Object_var object_act = poa->id_to_reference (id.in ());

      Callee_var callee = Callee::_narrow (object_act.in ());

      if (CORBA::is_nil(callee.in ()))
        {
          ACE_ERROR ((LM_ERROR, "could not get callback object\n"));
          return 1;
        }
      else
        {
          CORBA::String_var str = _orb->object_to_string(callee.in ());
          FILE *output_file= ACE_OS::fopen ("ior", "w");
          if (output_file == 0)
            ACE_ERROR_RETURN ((LM_ERROR,
                              "Cannot open output file for writing IOR: ior\n"),
                              1);
          ACE_OS::fprintf (output_file, "%s", str.in ());
          ACE_OS::fclose (output_file);
        }

      // create a reference with two profiles with the first on being
      // bogus. If things work as they should the callback should be
      // succesful with the ORB trying the second profile.
      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);
        Callee_var doubleCallee = Callee::_unchecked_narrow(merged.in());

      ACE_DEBUG ((LM_DEBUG, "Profile count is %d\n",
                  iorm->get_profile_count(merged.in())));
//.........这里部分代码省略.........
开发者ID:OspreyHub,项目名称:ATCD,代码行数:101,代码来源:SimpleClient.cpp

示例10: remote_server

CORBA::Object_ptr
Client_Task::make_iogr (const char* domain_id, CORBA::ULongLong group_id, CORBA::ULong group_version)
{
  CORBA::Object_var remote_server(
    corb_->string_to_object (ACE_TString(file_prefix + this->server_ior_file_).c_str()));

  if (CORBA::is_nil (remote_server.in ()))
    {
      ACE_ERROR ((LM_ERROR, "Error: Remote server is not started.\n"));
      throw CORBA::INTERNAL ();
    }

  CORBA::Object_var collocated_server(
    corb_->string_to_object (ACE_TString(file_prefix + this->collocated_ior_file_).c_str()));

  if (CORBA::is_nil (collocated_server.in ()))
    {
      ACE_ERROR ((LM_ERROR, "Error: Collocated server is not started.\n"));
      throw CORBA::INTERNAL ();
    }

  FT::TagFTGroupTaggedComponent ft_tag_component;

  // Create the list
  TAO_IOP::TAO_IOR_Manipulation::IORList iors (1);
  iors.length (2);
  iors [0] = CORBA::Object::_duplicate (remote_server.ptr());
  iors [1] = CORBA::Object::_duplicate (collocated_server.ptr());

  CORBA::Object_var new_ref =
    this->iorm_->merge_iors (iors);

  // Property values

  // Major and Minor revision numbers
  ft_tag_component.component_version.major = (CORBA::Octet) 1;
  ft_tag_component.component_version.minor = (CORBA::Octet) 0;

  // Domain id
  ft_tag_component.group_domain_id = domain_id;

  // Object group id
  ft_tag_component.object_group_id = group_id;

  // Version
  ft_tag_component.object_group_ref_version = group_version;

  // Construct the IOGR Property class
  TAO_FT_IOGR_Property iogr_prop (ft_tag_component);

  // Set the property
  CORBA::Boolean retval = this->iorm_->set_property (&iogr_prop,
                                              new_ref.in ());

  // Set the primary
  // See we are setting the second ior as the primary
  retval = this->iorm_->set_primary (&iogr_prop,
                              remote_server.in (),
                              new_ref.in ());

  ACE_UNUSED_ARG (retval);

  return new_ref._retn ();
}
开发者ID:CCJY,项目名称:ATCD,代码行数:64,代码来源:Client_Task.cpp

示例11: result

GroupInfoPublisherBase::Info*
GroupInfoPublisherBase::setup_info(const FTRT::ManagerInfoList & info_list,
                                   int my_position,
                                   CORBA::ULong object_group_ref_version)
{
  Info_ptr result(new Info);

  result->primary = (my_position == 0);

  /// create the object group
  size_t len = info_list.length();

  TAO_IOP::TAO_IOR_Manipulation::IORList iors;
  iors.length(len);

  size_t i;
  for (i = 0; i < len; ++i) {
    iors[i] = CORBA::Object::_duplicate(info_list[i].ior.in());
  }

  CORBA::Object_var obj =
    IOGR_Maker::instance()->make_iogr(iors,object_group_ref_version);

  result->iogr =
    ::FtRtecEventChannelAdmin::EventChannel::_narrow(obj.in());

  ORBSVCS_DEBUG((LM_DEBUG, "In setup_info\n"));
  //log_obj_endpoints(result->iogr.in());

  /// check if sucessor changed
  size_t successors_length = info_list.length() - my_position -1;

  if (successors_length /*!= info_->backups.length() */)  {
    // successor changed, update successor
    iors.length(successors_length);
    for (i = 0; i < successors_length; ++i) {
      iors[i] = CORBA::Object::_duplicate(info_list[i+ my_position+1].ior.in());
    }

    obj =  IOGR_Maker::instance()->merge_iors(iors);

    result->successor =
      FtRtecEventChannelAdmin::EventChannel::_narrow(obj.in());
  }
  /*
  else {
    result->successor = info_->successor;
  }

  if (!CORBA::is_nil(result->successor.in()))
  {
    CORBA::PolicyList_var pols;
    result->successor->_validate_connection (pols.out ());
  }
  */

  // update backups
  result->backups.length(successors_length);
  for (i = 0; i < successors_length; ++i)  {
    result->backups[i] =
      FtRtecEventChannelAdmin::EventChannel::_narrow(
      info_list[i+ my_position+1].ior.in());
    //CORBA::PolicyList_var pols;
    //result->backups[i]->_validate_connection (pols.out ());
  }
  return result.release();
}
开发者ID:binary42,项目名称:OCI,代码行数:67,代码来源:GroupInfoPublisher.cpp


注:本文中的tao_iop::tao_ior_manipulation::IORList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。