⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tao_object_group_creator.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
/* -*- C++ -*- */
//=============================================================================
/**
 *  @file    TAO_Object_Group_Creator.h
 *
 *  TAO_Object_Group_Creator.h,v 1.2 2003/12/22 01:44:38 wilson_d Exp
 *
 *  This file is part of Fault Tolerant CORBA.
 *  Utility to Create Object Group
 *
 *  @author Dale Wilson <wilson_d@ociweb.com>
 */
//=============================================================================

#ifndef TAO_OBJECT_GROUP_CREATOR_H
#define TAO_OBJECT_GROUP_CREATOR_H
#include <ace/ACE.h>

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include <orbsvcs/FT_ReplicationManagerC.h>
#include <orbsvcs/PortableGroupC.h>
#include <ace/SString.h>
#include <ace/Vector_T.h>

namespace TAO
{
  class Object_Group_Creator
  {
    typedef ACE_Vector<ACE_CString> StringVec;
   public:
    ///////////////////////////
    // construction/destruction
    Object_Group_Creator ();

    ~Object_Group_Creator ();

    /////////////////
    // pre-init methods
    int set_factory_registry (PortableGroup::FactoryRegistry_ptr factory);

    /////////////////
    // initialization
    int init (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL);

    /////////////////
    // functionality
    CORBA::Object_ptr create_group(
        const char * role,
        int write_iors
        ACE_ENV_ARG_DECL)
      ACE_THROW_SPEC ((CORBA::SystemException));

    /////////////////
    // functionality
    CORBA::Object_ptr create_infrastructure_managed_group(
        const char * type_id
        ACE_ENV_ARG_DECL)
      ACE_THROW_SPEC ((CORBA::SystemException));

    int unregister_role(const char * role ACE_ENV_ARG_DECL);

    ////////////
    // shut down
    int fini ();

    /////////////////
    // implementation
  private:
    int write_ior_file(const char * outputFile, const char * ior);

  int create_detector_for_replica (
    CORBA::Object_ptr replica,
    const char * role,
    const char * type_id,
    PortableGroup::ObjectGroupId group_id,
    const PortableGroup::Location & location
    ACE_ENV_ARG_DECL);

    ////////////////////
    // forbidden methods
   private:
      Object_Group_Creator (const Object_Group_Creator & rhs);
      Object_Group_Creator & operator = (const Object_Group_Creator & rhs);

    ////////////////
    // Data members
   private:
    CORBA::ORB_var orb_;
    PortableGroup::FactoryRegistry_var registry_;

    ::FT::ReplicationManager_var replication_manager_;

    ::PortableGroup::FactoryInfos_var detector_infos_;
    CORBA::String_var detector_type_id_;


    /**
     * bool: true if we have a real replication manager
     */
    int have_replication_manager_;
  };

} // namespace TAO

#endif // TAO_OBJECT_GROUP_CREATOR_H

⌨️ 快捷键说明

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