コード例 #1
0
ファイル: ValueBase.cpp プロジェクト: OspreyHub/ATCD
CORBA::Boolean
CORBA::ValueBase::_tao_read_repository_id_list (TAO_InputCDR& strm,
                                                Repository_Id_List& ids)
{
  CORBA::Long num_ids = 0;

  if (!strm.read_long (num_ids))
    {
      return 0;
    }

  if (num_ids == TAO_OBV_GIOP_Flags::Indirection_tag)
    {
      // Multiple repo id is not indirected.
      return 0;
    }
  else
    {
      for (CORBA::Long i = 0; i < num_ids; ++i)
        {
          ACE_CString id;
          if (!_tao_read_repository_id (strm, id))
            {
              return 0;
            }
          ids.push_back (id);
        }
    }

  return 1;
}
コード例 #2
0
ファイル: testC.cpp プロジェクト: esohns/ATCD
void
TestValuetype::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
{
    ids.push_back (this->_tao_obv_static_repository_id ());
}
コード例 #3
0
ファイル: ExtraC.cpp プロジェクト: esohns/ATCD
void
OBV_TruncatableTest::Extra1::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
{
  ids.push_back (this->_tao_obv_static_repository_id ());
  OBV_TruncatableTest::TValue1::_tao_obv_truncatable_repo_ids (ids);
}
コード例 #4
0
void
ORT_Test::ObjectReferenceFactory::_tao_obv_truncatable_repo_ids (Repository_Id_List& ids) const
{
  ids.push_back (this->_tao_obv_static_repository_id ());
}
コード例 #5
0
ファイル: ValueBase.cpp プロジェクト: OspreyHub/ATCD
CORBA::Boolean
CORBA::ValueBase::_tao_unmarshal_header (
  TAO_InputCDR &strm,
  const char *const fallback_repo_id,
  Repository_Id_List &ids,
  CORBA::Boolean &is_null_object,
  CORBA::Boolean &is_indirected,
  CORBA::Boolean &is_chunked)
{
  is_indirected = false;
  is_null_object = false;
  is_chunked = false;

  CORBA::Long valuetag;
  if (!strm.read_long (valuetag))
    {
      return false;
    }

  is_chunked = TAO_OBV_GIOP_Flags::is_chunked (valuetag);

  if (TAO_OBV_GIOP_Flags::is_null_ref (valuetag))
    {
      // null reference is unmarshalled.
      is_null_object = true;
      return true;
    }

  if (TAO_OBV_GIOP_Flags::is_indirection_tag (valuetag))
    {
      // value is redirected
      is_indirected = true;
      return true;
    }

  if (TAO_OBV_GIOP_Flags::has_codebase_url (valuetag))
    {
      // We don't do anything with this url, but it needs
      // to be read and ignored.
      ACE_CString codebase_url;
      if (!_tao_read_codebase_url (strm, codebase_url))
        {
          return false;
        }
    }

  // Obtain the repo_id(s) of the type we are reading

  if (TAO_OBV_GIOP_Flags::has_single_type_info (valuetag))
    {
      ACE_CString id;
      if (!_tao_read_repository_id(strm, id))
        {
          return false;
        }
      ids.push_back (id);
    }
  else if (TAO_OBV_GIOP_Flags::has_list_type_info (valuetag))
    {
      if (!_tao_read_repository_id_list(strm, ids))
        {
          return false;
        }
    }
  else if (TAO_OBV_GIOP_Flags::has_no_type_info (valuetag))
    {
      if (fallback_repo_id)
        {
          ids.push_back (fallback_repo_id);
        }
      else
        {
          TAOLIB_ERROR ((
            LM_ERROR,
            ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_unmarshal_pre, ")
            ACE_TEXT ("unknown repo_id\n") ));
          return false;
        }
    }
  else
    {
      if (TAO_debug_level)
        {
          TAOLIB_ERROR ((
            LM_ERROR,
            ACE_TEXT ("TAO (%P|%t) - %N:%l ValueBase::_tao_unmarshal_pre, ")
            ACE_TEXT ("unknown value tag: %x\n"),
            valuetag  ));
        }

      return false;
    }

  return true;
}