job_i.h

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

H
79
字号
/* -*- C++ -*- */
//=============================================================================
/**
 *  @file Job_i.h
 *
 *  Job_i.h,v 1.3 2003/08/06 20:47:00 dhinton Exp
 *
 *  This file defines the servant for the Job.idl interface
 *
 *  @author Pradeep Gore <pradeep@cs.wustl.edu>
 */
//=============================================================================
#ifndef JOB_I_H
#define JOB_I_H

#include "JobS.h"
#include "Task_Stats.h"
#include "ace/SString.h"

class ACE_Arg_Shifter;
class DT_Creator;

/**
 * @class Job_i
 *
 * @brief Implements a Job that performs some cpu bound work.
 *
 */
class Job_i : public POA_Job, public virtual PortableServer::RefCountServantBase
{
 public:
  /// Constructor
  Job_i (DT_Creator* dt_creator);

  ~Job_i (void);

  /// Init the state of this object.
  int init (ACE_Arg_Shifter& arg_shifter);

  /// = Accessors
  const ACE_CString& name (void);
  const ACE_CString& poa (void);

  /// = inteface Job method implementation.
  virtual void work (CORBA::ULong work,
		     CORBA::Short importance
		     ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((
                     CORBA::SystemException
                     ));

  virtual void post_work (int guid,
			  int importance);

  void dump_stats (void);

  virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL)
    ACE_THROW_SPEC ((
                     CORBA::SystemException
                     ));

  int guid (void);

 protected:
  /// The name of this Job
  ACE_CString job_name_;

  /// The name of the POA that we live in.
  ACE_CString POA_name_;

  DT_Creator* dt_creator_;

  Task_Stats *task_stats_;

  int guid_;
};

#endif /* JOB_I_H */

⌨️ 快捷键说明

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