Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

macros.h

Go to the documentation of this file.
00001 // Copyright (C) 1999-2001 Open Source Telecom Corporation.
00002 //  
00003 // This program is free software; you can redistribute it and/or modify
00004 // it under the terms of the GNU General Public License as published by
00005 // the Free Software Foundation; either version 2 of the License, or
00006 // (at your option) any later version.
00007 // 
00008 // This program is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 // GNU General Public License for more details.
00012 // 
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software 
00015 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00016 // 
00017 // As a special exception to the GNU General Public License, permission is 
00018 // granted for additional uses of the text contained in its release 
00019 // of Common C++.
00020 // 
00021 // The exception is that, if you link the Common C++ library with other
00022 // files to produce an executable, this does not by itself cause the
00023 // resulting executable to be covered by the GNU General Public License.
00024 // Your use of that executable is in no way restricted on account of
00025 // linking the Common C++ library code into it.
00026 // 
00027 // This exception does not however invalidate any other reasons why
00028 // the executable file might be covered by the GNU General Public License.
00029 // 
00030 // This exception applies only to the code released under the 
00031 // name Common C++.  If you copy code from other releases into a copy of
00032 // Common C++, as the General Public License permits, the exception does
00033 // not apply to the code that you add in this way.  To avoid misleading
00034 // anyone as to the status of such modified files, you must delete
00035 // this exception notice from them.
00036 // 
00037 // If you write modifications of your own for Common C++, it is your choice
00038 // whether to permit this exception to apply to your modifications.
00039 // If you do not wish that, delete this exception notice.  
00040 
00041 #ifndef __CCXX_MACROS_H__
00042 #define __CCXX_MACROS_H__
00043 
00044 // macros for detecting changes made between minor releases.
00045 
00046 #define COMMON_TPPORT_TYPE_DEFINED
00047 #define COMMON_EXCEPTION_DEFINED
00048 
00049 // Commonly used Common C++ macros
00050 
00051 #define ENTER_CRITICAL  EnterMutex();
00052 #define LEAVE_CRITICAL  LeaveMutex();
00053 #define ENTER_DEFERRED  setCancel(THREAD_CANCEL_DEFERRED);
00054 #define LEAVE_DEFERRED  setCancel(THREAD_CANCEL_IMMEDIATE);
00055 
00056 // These macros override common functions with thread-safe versions. In
00057 // particular the common "libc" sleep() has problems since it normally
00058 // uses SIGARLM (as actually defined by "posix").  The pthread_delay and
00059 // usleep found in libpthread are gaurenteed not to use SIGALRM and offer
00060 // higher resolution. 
00061 
00062 #undef  sleep
00063 #define sleep(x)        ccxx_sleep((x) * 1000)
00064 #define delay(x)        ccxx_sleep(x)
00065 #define yield()         ccxx_yield()
00066 
00067 // Some tests for DLL relared macros.
00068 
00069 #ifndef __EXPORT
00070 #define __EXPORT
00071 #endif
00072 
00073 #ifndef __DLL
00074 #define __DLL
00075 #endif
00076 
00077 #endif
00078 
00079 // Hide class names so they do not collide with other C++ libraries.
00080 // Macros are used to provide a portable means of hiding rather than
00081 // relying on namespace support.
00082 
00083 #define RandomFile              cc_RandomFile
00084 #define File                    cc_File
00085 #define NewFile                 cc_NewFile
00086 #define NamedPipe               cc_NamedPipe
00087 #define MappedFile              cc_MappedFile
00088 #define ThreadFile              cc_ThreadFile
00089 #define SharedFile              cc_SharedFile
00090 #define Socket                  cc_Socket
00091 #define TCPSocket               cc_TCPSocket
00092 #define TCPStream               cc_TCPStream
00093 #define TCPSession              cc_TCPSession
00094 #define UDPSocket               cc_UDPSocket
00095 #define UDPBroadcast            cc_UDPBroadcast
00096 #define UDPTransmit             cc_UDPTransmit
00097 #define UDPReceive              cc_UDPReceive
00098 #define UDPDuplex               cc_UDPDuplex
00099 #define SocketPort              cc_SocketPort
00100 #define TimerPort               cc_TimerPort
00101 #define SocketService           cc_SocketService
00102 #define InetAddress             cc_InetAddress 
00103 #define InetMaskAddress         cc_InetMaskAddress
00104 #define InetHostAddress         cc_InetHostAddress
00105 #define InetMcastAddress        cc_InetMcastAddress
00106 #define BroadcastAddress        cc_BroadcastAddress
00107 #define Mutex                   cc_Mutex
00108 #define MutexCounter            cc_MutexCounter
00109 #define AtomicCounter           cc_AtomicCounter
00110 #define Semaphore               cc_Semaphore
00111 #define Event                   cc_Event
00112 #define Buffer                  cc_Buffer
00113 #define FixedBuffer             cc_FixedBuffer
00114 #define Pipe                    cc_Pipe
00115 #define Thread                  cc_Thread
00116 #define ThreadKey               cc_ThreadKey
00117 #define MemPager                cc_MemPager
00118 #define Keydata                 cc_Keydata
00119 #define PersistException        cc_PersistException
00120 #define TypeManager             cc_TypeManager
00121 #define BaseObject              cc_BaseObject
00122 #define Engine                  cc_Engine
00123 #define Vector2D                cc_Vector2D
00124 #define Serial                  cc_Serial
00125 #define Slog                    cc_Slog
00126 #define Dir                     cc_Dir
00127 #define FIFOSession             cc_FIFOSession
00128 #define SharedMemPager          cc_SharedMemPager
00129 #define ScriptCommand           cc_ScriptCommand
00130 #define ScriptSymbol            cc_ScriptSymbol
00131 #define ScriptInterp            cc_ScriptInterp
00132 #define ScriptImage             cc_ScriptImage
00133 

Generated at Thu Oct 4 15:32:58 2001 for CommonC++ by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001