sessigvec.h

来自「在LINUX环境下」· C头文件 代码 · 共 60 行

H
60
字号
/****************************************************************************
 *
 *         (c) Copyright 2006 by SCADA Enterprise Solutions Inc
 *         All rights reserved
 *
 * NAME:
 *
 *         sesSigvec.H -- This is the header include file for the
 *                       sesSigvec class. This object is specially
 *                       designed to encapsulate the sigvector() function.
 *
 * AUTHOR: Wai Tse
 *
 * DESCRIPTION:
 *
 *         This class allows other objects to handle the signal interruption.
 *
 * REVISION HISTORY:
 *
 *         03-Feb-2006    Wai Tse    Created the initial version.
 * 
 ***************************************************************************/

#ifndef SES_SIGVEC_H
#define SES_SIGVEC_H

#include "sesDbg.H"
#include "sesLogErr.H"
#include "sesConst.H"
#include "signal.h"
#include <stdio.h>

class sesSigvec
{
public:
        sesSigvec      ();
        sesSigvec      (const int,
		        const struct sigaction &,
		        struct sigaction &);
        sesSigvec      (const int,
		        void *);
        ~sesSigvec     ();
  void  sigSet         (const int,
		        const struct sigaction &,
		        struct sigaction &);
  void  sigSet         (const int,
		        void *);
  int   getUserDbgLevel();

private:

  struct sigaction _newAction;   // signal action structure
  struct sigaction _oldAction;   // original signal action structure
  static void setDebugOn();      // signal handler for turning the debug on
  static void setDebugOff();     // signal handler for turning the debug off
  static void alarmAction();     // signal handler for alarm signal
};

#endif // SES_SIGVEC_H

⌨️ 快捷键说明

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