ansi/Signal.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
00008 //  AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
00009 //  WORKS WHICH INCORPORATE IT.
00010 //
00011 //  AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
00012 //  AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
00013 //  CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00014 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00015 //
00016 //  Use, duplication, or disclosure by the U.S. Government is subject to
00017 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00018 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00019 //  Data and Computer Software), as applicable.
00020 //
00021 
00022 
00023 #ifndef _DWFCORE_SIGNAL_ANSI_H
00024 #define _DWFCORE_SIGNAL_ANSI_H
00025 
00026 
00043 
00044 #include "dwfcore/Core.h"
00045 
00046 #ifdef  _DWFCORE_FOR_ANSI_SYSTEM_ONLY
00047 
00048 #include "dwfcore/Exception.h"
00049 
00050 //
00051 // POSIX threads 
00052 //
00053 #include <pthread.h>
00054 
00055 //
00056 // Platform independent core library
00057 //
00058 namespace DWFCore
00059 {
00060 
00066 class DWFSignal
00067 {
00068 
00069 public:
00070 
00076     _DWFCORE_API DWFSignal()
00077         throw();
00078 
00084     _DWFCORE_API virtual ~DWFSignal()
00085         throw();
00086 
00093     _DWFCORE_API void init()
00094         throw( DWFException );
00095 
00102     _DWFCORE_API void destroy()
00103         throw( DWFException );
00104 
00114     _DWFCORE_API bool wait( unsigned long nMilliseconds = 0 )
00115         throw( DWFException );
00116 
00122     _DWFCORE_API void raise()
00123         throw( DWFException );
00124 
00125 private:
00126 
00127     bool               _bInit;
00128     pthread_cond_t     _tCondition;
00129     pthread_mutex_t    _tMutex;
00130 
00131 private:
00132 
00133     //
00134     // Not Implemented
00135     //
00136     DWFSignal( const DWFSignal& );
00137     DWFSignal& operator=( const DWFSignal& );
00138 };
00139 
00140 
00141 }
00142 
00143 
00144 #else
00145 #error  This header file is incompatible with your current system configuration
00146 #endif
00147 
00148 #endif
00149 
00150 

Generated on Tue Jan 6 22:39:29 2009 for Autodesk DWF Core Library by  doxygen 1.4.5