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

📄 timer_helper.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
// -*- C++ -*-

//=============================================================================
/**
 * @file Timer_Helper.h
 *
 * Timer_Helper.h,v 1.10 2003/07/21 23:51:33 dhinton Exp
 *
 * This class is registered with the Reactor and extends from the
 * event handler.It is a friend of the TAO_Time_Service_Clerk and
 * helps to update the clerk's notion of globally synchronized
 * time. This class obviates the need for multiple inheritance in
 * the clerk.
 *
 * @author Vishal Kachroo  <vishal@cs.wustl.edu>
 */
//=============================================================================


#ifndef TIMER_HELPER_H
#define	TIMER_HELPER_H

#include /**/ "ace/pre.h"


#include "ace/Event_Handler.h"
#include "ace/Containers.h"
#include "time_export.h"

#include "orbsvcs/TimeServiceS.h"

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

class TAO_Time_Service_Clerk;

/**
 * @class Timer_Helper
 *
 * @brief Timer Helper for the clerk.
 *
 * The handle timeout method of this class is called periodically
 * by the reactor. This method updates the clerk's notion of
 * globally synchronized time by contacting the various Time
 * Servers.
 */
class TAO_Time_Export Timer_Helper : public ACE_Event_Handler
{
public:
  // = Initialization and termination methods.
  /// Constructor.
  Timer_Helper (void);

  /// Destructor.
  ~Timer_Helper (void);

  /// Constructor that sets the clerk.
  Timer_Helper (TAO_Time_Service_Clerk *clerk);

  /// This method is called periodically by the Reactor to update the
  /// clerk's time.
  int handle_timeout (const ACE_Time_Value &time,
		      const void *arg);

protected:
  /// Clerk's instance that this class helps to update time.
  TAO_Time_Service_Clerk *clerk_;

  /// The set of server IORs.
  typedef ACE_Array_Base<CosTime::TimeService_var> IORS;
};

#include /**/ "ace/post.h"

#endif /* TIMER_HELPER_H */

⌨️ 快捷键说明

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