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


C++ TAO_IOR_Manipulation_var::set_property方法代码示例

本文整理汇总了C++中tao_iop::TAO_IOR_Manipulation_var::set_property方法的典型用法代码示例。如果您正苦于以下问题:C++ TAO_IOR_Manipulation_var::set_property方法的具体用法?C++ TAO_IOR_Manipulation_var::set_property怎么用?C++ TAO_IOR_Manipulation_var::set_property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tao_iop::TAO_IOR_Manipulation_var的用法示例。


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

示例1: iogr_prop

CORBA::Object_ptr
make_iogr (const char* domain_id, CORBA::ULongLong group_id, CORBA::ULong group_version, CORBA::Object_ptr ref )
{
  FT::TagFTGroupTaggedComponent ft_tag_component;
  // Create the list
  TAO_IOP::TAO_IOR_Manipulation::IORList iors (1);
  iors.length(1);
  iors [0] = CORBA::Object::_duplicate (ref);

  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,
                                  new_ref.in (),
                                  new_ref.in ()
                                  );
    }

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

示例2: iogr_prop

int
Manager::set_properties (void)
{
  FT::TagFTGroupTaggedComponent ft_tag_component;

  // 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 = id;

  // Object group id
  ft_tag_component.object_group_id =
    (CORBA::ULongLong) 10;

  // Version
  ft_tag_component.object_group_ref_version =
    (CORBA::ULong) 5;

  // 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,
                                              this->merged_set_.in ());

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

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

示例3: iogr_prop

void
add_ft_prop (CORBA::ORB_ptr o,
             CORBA::Object_ptr obj1,
             CORBA::Object_ptr obj2)
{
  // Get an object reference for the ORBs IORManipultion object!
  CORBA::Object_var IORM =
    o->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
                                   0);

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

  FT::TagFTGroupTaggedComponent ft_tag_component;

  // 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 = "version_testing";
  ft_tag_component.group_domain_id = id;

  // Object group id
  ft_tag_component.object_group_id =
    (CORBA::ULongLong) 10;

  // Version
  ft_tag_component.object_group_ref_version =
    (CORBA::ULong) 1;

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

  // Set the property for object 1
  CORBA::Boolean retval = iorm->set_property (&iogr_prop,
                                              obj1);

  if (retval != 0)
    {
      retval = iorm->set_primary (&iogr_prop,
                                  obj1,
                                  obj1);
    }


  // Set the property for object 2
  // Change the version. That is the point of this test
  // Version
  ft_tag_component.object_group_ref_version = (CORBA::ULong) 5;

  retval = iorm->set_property (&iogr_prop,
                                              obj2);

  if (retval != 0)
    {
      retval = iorm->set_primary (&iogr_prop,
                                  obj2,
                                  obj2);
    }

  return;
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:64,代码来源:server.cpp

示例4: prop


//.........这里部分代码省略.........
        {
          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;

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

      // Object group id
      ft_tag_component.object_group_id = (CORBA::ULongLong) 10;

      // Version
      ft_tag_component.object_group_ref_version = (CORBA::ULong) 5;

      // Set the property
      retval = iorm->set_property (&prop, merged.in ());

      /// Extract the property
      FT::TagFTGroupTaggedComponent ftc;
      TAO_FT_IOGR_Property tmp_prop;

      retval = tmp_prop.get_tagged_component (merged.in (), ftc);


      ACE_DEBUG ((LM_DEBUG,
                  "(%P|%t) Testing for tagged component\n"));

      if ((ftc.object_group_ref_version != 5) &&
          (ftc.object_group_id != 10))
        ACE_ERROR ((LM_ERROR,
                    "%P|%t) Not working right\n"));

      if (retval)
        ACE_DEBUG ((LM_DEBUG,
                    ACE_TEXT ("\tWe have set the property\n")));

      orb_->destroy ();
    }
  catch (const TAO_IOP::NotFound& userex)
    {
      userex._tao_print_exception (
        ACE_TEXT ("Unexpected NotFound Exception!\n"));
      return -1;
    }
  catch (const TAO_IOP::Duplicate& userex)
    {
      userex._tao_print_exception ("Unexpected Duplicate Exception!\n");
      return -1;
    }
  catch (const TAO_IOP::Invalid_IOR& userex)
    {
      userex._tao_print_exception ("Unexpected Invalid_IOR Exception!\n");
      return -1;
    }
  catch (const CORBA::SystemException& sysex)
    {
      sysex._tao_print_exception ("Unexpected system Exception!!\n");
      return -1;
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("Unexpected CORBA Exception!\n");
      return -1;
    }

  ACE_DEBUG ((LM_DEBUG, "IORManipulation Tests Successfully Completed!\n"));
  ACE_DEBUG ((LM_DEBUG, "---------------------------------------------\n"));

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


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