test_i.h

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C头文件 代码 · 共 73 行

H
73
字号
//=============================================================================
/**
 *  @file   test_i.h
 *
 *  test_i.h,v 1.1 2003/07/12 20:59:57 irfan Exp
 *
 *  @author Irfan Pyarali
 */
// ===================================================================

#include "testS.h"
#include "tao/RTCORBA/RTCORBA.h"

class test_i :
  public POA_test,
  public PortableServer::RefCountServantBase
{
public:
  /// Constructor.
  test_i (CORBA::ORB_ptr orb,
          PortableServer::POA_ptr poa,
          RTCORBA::Priority low_priority,
          RTCORBA::Priority high_priority);

  /// Initialize the server.
  void initialize (CORBA::ULong total_iterations
                   ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// Test method.
  void method (CORBA::ULong work,
               const char *iteration
               ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((CORBA::SystemException));

  /// Our POA.
  PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);

  /// Work (burn CPU).
  void work (CORBA::ULong work);

  /// Estimates work iterations performed per second.
  int estimate_iterations (void);

private:
  /// ORB.
  CORBA::ORB_var orb_;

  /// Our POA.
  PortableServer::POA_var poa_;

  /// Value for low priority.
  RTCORBA::Priority low_priority_;

  /// Value for high priority.
  RTCORBA::Priority high_priority_;

  // RTCORBA Current.
  RTCORBA::Current_var rt_current_;

  /// Number of work iterations that can be performed in one second.
  int work_iterations_in_one_sec_;

  /// Prime number used for burning CPU.
  CORBA::ULong prime_number_;

  /// Current iteration.
  CORBA::ULong current_iteration_;

  /// Total iterations for this test.
  CORBA::ULong total_iterations_;
};

⌨️ 快捷键说明

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