implrepos.cpp

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 1,994 行 · 第 1/5 页

CPP
1,994
字号
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:ImplementationRepository/ServerObject:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

void* POA_ImplementationRepository::ServerObject::_downcast (
    const char* logical_type_id
  )
{
  if (ACE_OS::strcmp (logical_type_id,
                      "IDL:ImplementationRepository/ServerObject:1.0") == 0)
    {
      return ACE_static_cast (POA_ImplementationRepository::ServerObject_ptr, this);
    }
  
  if (ACE_OS::strcmp (logical_type_id,
                      "IDL:omg.org/CORBA/Object:1.0") == 0)
    {
      return ACE_static_cast (PortableServer::Servant, this);
    }
  
  return 0;
}

const char* POA_ImplementationRepository::ServerObject::_interface_repository_id (void) const
{
  return "IDL:ImplementationRepository/ServerObject:1.0";
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_interface/interface_ss.cpp:545

void POA_ImplementationRepository::ServerObject::_dispatch (
    TAO_ServerRequest &req,
    void *servant_upcall
    ACE_ENV_ARG_DECL
  )
{
  this->synchronous_upcall_dispatch (req,
                                     servant_upcall,
                                     this
                                     ACE_ENV_ARG_PARAMETER);
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_interface/interface_ss.cpp:493

ImplementationRepository::ServerObject *
POA_ImplementationRepository::ServerObject::_this (ACE_ENV_SINGLE_ARG_DECL)
{
  TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);
  
  TAO_Stub_Auto_Ptr safe_stub (stub);
  CORBA::Object_ptr tmp = CORBA::Object::_nil ();
  
  if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())
    {
      ACE_NEW_RETURN (
          tmp,
          CORBA::Object (stub, 1, this),
          0
        );
    }
  else
    {
      ACE_NEW_RETURN (
          tmp,
          CORBA::Object (stub, 0, this),
          0
        );
    }
  
  CORBA::Object_var obj = tmp;
  (void) safe_stub.release ();
  
  typedef ::ImplementationRepository::ServerObject STUB_SCOPED_NAME;
  return
    TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_function_pointer
      );
}

// TAO_IDL - Generated from
// .\be\be_interface.cpp:1463

class TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable
  : public TAO_Perfect_Hash_OpTable
{
private:
  unsigned int hash (const char *str, unsigned int len);

public:
  const TAO_operation_db_entry * lookup (const char *str, unsigned int len);
};

/* C++ code produced by gperf version 2.8 (ACE version) */
/* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0,0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable -N lookup  */
unsigned int
TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable::hash (const char *str, unsigned int len)
{
  static const unsigned char asso_values[] =
    {
#if defined (ACE_MVS)
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34,  0,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34,  4,
     34, 34,  0,  0,  0,  0, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34,  5, 34,  5,
     34,  0, 34,  0, 34, 34, 34, 34, 34, 34,
     34, 34,  5, 15, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34,
#else
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
     34, 34, 34, 34, 34,  0, 34,  4, 34, 34,
      0,  0,  0,  0, 34, 34, 34, 34,  5, 34,
      5, 34,  0, 34,  0,  5, 15, 34, 34, 34,
     34, 34, 34, 34, 34, 34, 34, 34,
#endif /* ACE_MVS */
    };
  return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]];
}

const class TAO_operation_db_entry *
TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len)
{
  enum
    {
      TOTAL_KEYWORDS = 15,
      MIN_WORD_LENGTH = 4,
      MAX_WORD_LENGTH = 28,
      MIN_HASH_VALUE = 4,
      MAX_HASH_VALUE = 33,
      HASH_VALUE_RANGE = 30,
      DUPLICATES = 0,
      WORDLIST_SIZE = 19
    };

  static const class TAO_operation_db_entry  wordlist[] =
    {
      {"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},
      {"find", &POA_ImplementationRepository::Administration::find_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::find, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::find},
      {"",0,0,0},{"",0,0,0},{"",0,0,0},
      {"find_ior", &POA_ImplementationRepository::Administration::find_ior_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::find_ior, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::find_ior},
      {"_is_a", &POA_ImplementationRepository::Administration::_is_a_skel, 0, 0},
      {"_interface", &POA_ImplementationRepository::Administration::_interface_skel, 0, 0},
      {"",0,0,0},{"",0,0,0},
      {"remove_server", &POA_ImplementationRepository::Administration::remove_server_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::remove_server, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::remove_server},
      {"",0,0,0},
      {"register_server", &POA_ImplementationRepository::Administration::register_server_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::register_server, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::register_server},
      {"",0,0,0},
      {"reregister_server", &POA_ImplementationRepository::Administration::reregister_server_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::reregister_server, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::reregister_server},
      {"",0,0,0},
      {"activate_server", &POA_ImplementationRepository::Administration::activate_server_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::activate_server, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::activate_server},
      {"shutdown_server", &POA_ImplementationRepository::Administration::shutdown_server_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::shutdown_server, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::shutdown_server},
      {"",0,0,0},
      {"server_is_running", &POA_ImplementationRepository::Administration::server_is_running_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::server_is_running, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::server_is_running},
      {"",0,0,0},
      {"list", &POA_ImplementationRepository::Administration::list_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::list, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::list},
      {"_component", &POA_ImplementationRepository::Administration::_component_skel, 0, 0},
      {"",0,0,0},{"",0,0,0},
      {"_non_existent", &POA_ImplementationRepository::Administration::_non_existent_skel, 0, 0},
      {"",0,0,0},{"",0,0,0},{"",0,0,0},
      {"activate_server_with_startup", &POA_ImplementationRepository::Administration::activate_server_with_startup_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::activate_server_with_startup, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::activate_server_with_startup},
      {"server_is_shutting_down", &POA_ImplementationRepository::Administration::server_is_shutting_down_skel, &POA_ImplementationRepository::_TAO_Administration_ThruPOA_Proxy_Impl::server_is_shutting_down, &POA_ImplementationRepository::_TAO_Administration_Direct_Proxy_Impl::server_is_shutting_down},
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      unsigned int key = hash (str, len);

      if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
        {
          const char *s = wordlist[key].opname_;

          if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
            return &wordlist[key];
        }
    }
  return 0;
}

static TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable tao_ImplementationRepository_Administration_optable;

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_interface/interceptors_ss.cpp:53

#if (TAO_HAS_INTERCEPTORS == 1)

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_operation/interceptors_ss.cpp:74

class TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server : public TAO_ServerRequestInfo
{
public:
  TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server (
      TAO_ServerRequest &_tao_server_request,
      TAO_Object_Adapter::Servant_Upcall *tao_servant_upcall,
      POA_ImplementationRepository::Administration *tao_impl,
      const char * server
      ACE_ENV_ARG_DECL_WITH_DEFAULTS
    );
  
  virtual Dynamic::ParameterList * arguments (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
    )
    ACE_THROW_SPEC ((CORBA::SystemException));
  
  virtual Dynamic::ExceptionList * exceptions (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
    )
    ACE_THROW_SPEC ((CORBA::SystemException));
  
  virtual CORBA::Any * result (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
    )
    ACE_THROW_SPEC ((CORBA::SystemException));
  
  virtual char * target_most_derived_interface (
      ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
    )
    ACE_THROW_SPEC ((CORBA::SystemException));
  
  virtual CORBA::Boolean target_is_a (
      const char * id
      ACE_ENV_ARG_DECL_WITH_DEFAULTS
    )
    ACE_THROW_SPEC ((CORBA::SystemException));
  
private:
  TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server (
      const TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server &
    );
  
  void operator= (
      const TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server &
    );
  
private:
  POA_ImplementationRepository::Administration *_tao_impl;
  
  const char * server_;
};

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_operation/interceptors_ss.cpp:438

TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server::TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server (
    TAO_ServerRequest &_tao_server_request,
    TAO_Object_Adapter::Servant_Upcall *_tao_servant_upcall,
    POA_ImplementationRepository::Administration *tao_impl,
    const char * server
    ACE_ENV_ARG_DECL_NOT_USED
  )
  : TAO_ServerRequestInfo (_tao_server_request, _tao_servant_upcall),
    _tao_impl (tao_impl),
    server_ (server)
{}

Dynamic::ParameterList *
TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server::arguments (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // Generate the argument list on demand.
  Dynamic::ParameterList *parameter_list =
    TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);
  
  Dynamic::ParameterList_var safe_parameter_list = parameter_list;
  parameter_list->length (1);
  CORBA::ULong len = 0;
  
  (*parameter_list)[len].argument <<= server_;
  (*parameter_list)[len].mode = CORBA::PARAM_IN;
  len++;
  
  return safe_parameter_list._retn ();
}

Dynamic::ExceptionList *
TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server::exceptions (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // Generate the exception list on demand.
  Dynamic::ExceptionList *exception_list =
    TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);
  
  Dynamic::ExceptionList_var safe_exception_list = exception_list;
    
  static CORBA::TypeCode_ptr _tao_ImplementationRepository_Administration_activate_server_exceptiondata[] = 
  {
    ImplementationRepository::_tc_NotFound,
    ImplementationRepository::_tc_CannotActivate
  };
  
  exception_list->length (2);
  for (CORBA::ULong i = 0; i < 2; ++i)
    {
      CORBA::TypeCode_ptr tcp = _tao_ImplementationRepository_Administration_activate_server_exceptiondata[i];
      TAO_Pseudo_Object_Manager<CORBA::TypeCode> tcp_object (&tcp, 1);
      (*exception_list)[i] = tcp_object;
    }

  return safe_exception_list._retn ();
}

CORBA::Any * 
TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server::result (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  // Generate the result on demand.
  CORBA::Boolean tk_void_any = 1;
  CORBA::Any *result_any =
    TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER);
  ACE_CHECK_RETURN (0);
  
  return result_any;
}

char *
TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server::target_most_derived_interface (
    ACE_ENV_SINGLE_ARG_DECL_NOT_USED
  )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return
    CORBA::string_dup (this->_tao_impl->_interface_repository_id ());
}

CORBA::Boolean
TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server::target_is_a (
    const char * id
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return this->_tao_impl->_is_a (id ACE_ENV_ARG_PARAMETER);
}

// TAO_IDL - Generated from
// c:\cvsdoc\ace_wrappers\build\vc71\tao\tao_idl\be\be_visitor_operation/interceptors_ss.cpp:74

class TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server_with_startup : public TAO_ServerRequestInfo
{
public:
  TAO_ServerRequestInfo_ImplementationRepository_Administration_activate_server_with_startup (
      TAO_ServerRequest &_tao_server_request,
      TAO_Object_Adapter::Servant_Upcall *tao_servant_upcall,
      POA_ImplementationRepository::Administration *tao_impl,

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?