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

📄 sbtrdevent.hpp

📁 sloedgy open sip stack source code
💻 HPP
字号:
/* SBtrdEvent, utility class for managing events */

 /****************License************************************************
  *
  * Copyright 2000-2003.  ScanSoft, Inc.    
  *
  * Use of this software is subject to notices and obligations set forth 
  * in the SpeechWorks Public License - Software Version 1.2 which is 
  * included with this software. 
  *
  * ScanSoft is a registered trademark of ScanSoft, Inc., and OpenSpeech, 
  * SpeechWorks and the SpeechWorks logo are registered trademarks or 
  * trademarks of SpeechWorks International, Inc. in the United States 
  * and other countries.
  *
  ***********************************************************************/
 

 /* $Id: SBtrdEvent.hpp,v 1.1 2007/06/04 16:11:29 joegenbaclor Exp $ */
 
 // -----1=0-------2=0-------3=0-------4=0-------5=0-------6=0-------7=0-------8
 
 #ifndef _SBTRD_EVENT_H__
 #define _SBTRD_EVENT_H__
 
#include <vxibuildopts.h>
#if P_VXI

 #include "vxi/VXIheaderPrefix.h"          // For SYMBOL_EXPORT_CPP_DECL
 #include "vxi/VXItrd.h"                   // For VXItrdTimer, VXItrdMutex
 
 #ifdef SBTRDUTIL_EXPORTS
 #define SBTRDUTIL_API_CLASS SYMBOL_EXPORT_CPP_CLASS_DECL
 #else
 #define SBTRDUTIL_API_CLASS SYMBOL_IMPORT_CPP_CLASS_DECL
 #endif
 
 extern "C" struct VXIlogInterface;
 
 class SBTRDUTIL_API_CLASS SBtrdEvent {
  public:
   // Constructor and destructor
   SBtrdEvent (VXIlogInterface *log = NULL, VXIunsigned diagTagBase = 0) :
     _diagTagBase(diagTagBase), _log(log), _timer(NULL), _sleepMutex(NULL),
     _alerted(FALSE) { }
   virtual ~SBtrdEvent( );
 
   // Creation method
   VXItrdResult Create( );
 
   // Reset the event
   VXItrdResult Reset( );
 
   // Set the event
   VXItrdResult Set( );
 
   // Wait on the event
   VXItrdResult Wait( );
 
  private:
   // Error logging
   void Error (VXIunsigned errorID, const VXIchar *format, ...) const;
 
   // Diagnostic logging
   void Diag (VXIunsigned tag, const VXIchar *subtag, 
 	     const VXIchar *format, ...) const;
 
   // Disable the copy constructor and equality operator to catch making
   // copies at compile or link time, neither is really implemented
   SBtrdEvent (const SBtrdEvent &);
   SBtrdEvent & operator= (const SBtrdEvent &);
 
  private:
   VXIunsigned       _diagTagBase;
   VXIlogInterface  *_log;
   VXItrdTimer      *_timer;
   VXItrdMutex      *_sleepMutex;
   volatile VXIbool  _alerted;
 };
 
 #include "vxi/VXIheaderSuffix.h"
 
#endif

 #endif  // _SBTRD_EVENT_H__

⌨️ 快捷键说明

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