MAK RTIspy API Documentation for HLA 1.3
vlCondVar__rti__.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2005 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: vlCondVar__rti__.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00010 
00011 #ifndef VXWORKS
00012 
00013 #ifndef vlCondVar__rti___H_
00014 #define vlCondVar__rti___H_
00015 
00016 #include "rtiMsConfig.h"
00017 #include <vlutil/vlMachineTypes.h>
00018 #include "vlMutex__rti__.h"
00019 #include <vlutil/vlTime.h>
00020 
00021 #if WIN32
00022 #include <winsock2.h>
00023 #include <process.h>
00024 #else
00025 #include <pthread.h>
00026 #endif
00027 
00028 #ifdef DtUSE_UTILITIES_NAMESPACE
00029 namespace DtUSE_UTILITIES_NAMESPACE
00030 {
00031 #endif
00032 
00038 class DT_DLL_RTIUTIL DtCondVar__rti__
00039 {
00040 public:
00041 
00043    DtCondVar__rti__(MAKRti::DtMutex__rti__ * condMutex);
00044 
00045 protected:
00046 
00048    DtCondVar__rti__(const DtCondVar__rti__ & orig);
00049 
00051    const DtCondVar__rti__ & operator=(const DtCondVar__rti__ & orig);
00052 
00053 public:
00055    virtual ~DtCondVar__rti__();
00056 
00058    virtual void init();
00059 
00062    virtual void destroy();
00063 
00065    virtual void signal();
00066 
00068    virtual void broadcast();
00069 
00072    virtual int wait(DtTime waitTime = 0.0);
00073 
00074 protected:
00075 
00076    DtClock          myClock;     
00077 #ifdef WIN32
00078    HANDLE           myCond;      
00079    MAKRti::DtMutex__rti__        * myCondMutex; 
00080 #else //! WIN32
00081    pthread_cond_t   myPtCond;
00082    pthread_cond_t * myCond;
00083    MAKRti::DtMutex__rti__        * myCondMutex;
00084 #endif //! WIN32
00085 
00086 };
00087 
00088 #ifdef DtUSE_UTILITIES_NAMESPACE
00089 } 
00090 #endif
00091 
00092 #endif //! vlCondVar__rti___H_
00093 
00094 #endif //! VXWORKS

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)