Synchronization.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_SYNCHRONIZATION_H
00024 #define _DWFCORE_SYNCHRONIZATION_H
00025 
00026 
00031 
00047 
00062 
00063 #include "dwfcore/String.h"
00064 #include "dwfcore/Exception.h"
00065 
00066 
00067 
00068 namespace DWFCore
00069 {
00070 
00071 
00077 class DWFSynchronization
00078 {
00079 
00080 public:
00081 
00087     _DWFCORE_API 
00088     virtual ~DWFSynchronization()
00089         throw()
00090     {;}
00091 
00098     _DWFCORE_API 
00099     virtual void init()
00100         throw( DWFException ) = 0;
00101 
00106     _DWFCORE_API 
00107     virtual void destroy()
00108         throw( DWFException ) = 0;
00109 
00115     _DWFCORE_API 
00116     virtual void lock()
00117         throw( DWFException ) = 0;
00118 
00127     _DWFCORE_API 
00128     virtual bool trylock()
00129         throw( DWFException ) = 0;
00130 
00136     _DWFCORE_API 
00137     virtual void unlock()
00138         throw( DWFException ) = 0;
00139 
00140 protected:
00141 
00147     _DWFCORE_API 
00148     DWFSynchronization()
00149         throw()
00150     {;}
00151 
00152 private:
00153 
00154     //
00155     // Not Implemented
00156     //
00157     DWFSynchronization( const DWFSynchronization& );
00158     DWFSynchronization& operator=( const DWFSynchronization& );
00159 };
00160 
00161 }
00162 
00163 
00164 //
00165 // include platform-specified headers
00166 //
00167 
00168 #ifdef  _DWFCORE_WIN32_SYSTEM
00169 #include "dwfcore/win32/Mutex.h"
00170 #include "dwfcore/win32/Signal.h"
00171 #include "dwfcore/win32/Semaphore.h"
00172 #include "dwfcore/win32/Thread.h"
00173 
00174 #else
00175 #include "dwfcore/ansi/Mutex.h"
00176 #include "dwfcore/ansi/Signal.h"
00177 #include "dwfcore/ansi/Semaphore.h"
00178 #include "dwfcore/ansi/Thread.h"
00179 
00180 #endif
00181 
00182 #endif
00183 
00184 

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