Class Hierarchy   Class Index   Method Index  

IGCminimumInclude.h

00001 #ifndef __IGC_MINIMUM_INCLUDE_H__
00002 #define __IGC_MINIMUM_INCLUDE_H__
00003 //---------------------------------------------------------------------------
00004 // Copyright (C) 1997-2009 iNTERFACEWARE Inc. All Rights Reserved
00005 //
00006 // Module: IGCminimumInclude 
00007 //
00008 // Description:
00009 //
00010 // DLL Interface.
00011 //
00012 // Revision: $Revision: 1.10 $
00013 // Source: $Source: /home/cvs/cvsroot/IGC/IGCminimumInclude.h,v $
00014 // Author: Code Generator
00015 // Last Edit Date: $Date: 2009-08-18 20:57:17 $
00016 //---------------------------------------------------------------------------
00017 
00018 #ifdef CHM_NO_BOOLEAN_TYPE
00019    #define IGCboolean int
00020    #define true 1
00021    #define false 0
00022 #elif defined(__cplusplus)
00023    #define IGCboolean bool
00024 #else
00025    #define IGCboolean int
00026 #endif
00027 
00028 #define IGCint int
00029 #define IGCuint unsigned int
00030 #define IGCint32 int
00031 #define IGCuint32 unsigned IGCint32
00032 
00033 typedef void* IGCresult;
00034 #define IGC_OK 0
00035 #define IGC_UNKNOWN_EXCEPTION -1
00036 
00037 #define IGClogMessageType IGCuint
00038 #define IGC_LOG_MESSAGE_NIL     0  // Default value - not a valid log message type
00039 #define IGC_LOG_MESSAGE_ERROR   1  // Error-level log message
00040 #define IGC_LOG_MESSAGE_INFO    2  // Info-level log message
00041 #define IGC_LOG_MESSAGE_DEBUG   3  // Debug-level log message
00042 #define IGC_LOG_MESSAGE_WARNING 4  // Warning-level log message
00043 
00044 // Disables buffering of the stdout and stderr output streams so that command-line
00045 // output is displayed immediately, rather than when the output buffer happens to be
00046 // filled.  Very useful for debugging, especially when using Iguana's Monitor Executable
00047 // Output feature.
00048 //
00049 // Must be invoked before any output is written to stdout or stderr in order to take effect.
00050 // Probably best to invoke at the beginning of the plugin's main() method.
00051 //
00052 // Requires #include <stdio.h>.
00053 #define IGC_DISABLE_OUTPUT_BUFFERING() \
00054 {\
00055    setvbuf(stdout, NULL, _IONBF, 0);\
00056    setvbuf(stderr, NULL, _IONBF, 0);\
00057 }
00058 
00059 #define IGC_TEXT(x) #x
00060 
00061 #ifdef __cplusplus
00062 #   define IGC_EXTERN_C extern "C"
00063 #else
00064 #   define IGC_EXTERN_C extern
00065 #endif
00066 
00067 #ifdef WIN32
00068 #   define IGC_STD_CALL __stdcall
00069 #else
00070 #   define IGC_STD_CALL
00071 #endif
00072 
00073 #ifdef IGC_DLL_EXPORTS
00074 #   ifdef WIN32
00075 #      ifdef __BORLANDC__
00076 #         define IGC_DLL_FUNC(Y) IGC_EXTERN_C IGCresult _export Y
00077 #         define IGC_DLL_CALL(Y) Y 
00078 #      else
00079 #         define IGC_DLL_FUNC(Y) IGC_EXTERN_C __declspec(dllexport) IGCresult __stdcall Y
00080 #         define IGC_DLL_CALL(Y) Y 
00081 #      endif
00082 #   else
00083 #      define IGC_DLL_FUNC(Y) IGC_EXTERN_C IGCresult Y
00084 #      define IGC_DLL_CALL(Y) Y
00085 #   endif
00086 #else 
00087 #   ifdef WIN32
00088 #      ifdef __BORLANDC__
00089 #         define IGC_DLL_FUNC(Y) IGC_EXTERN_C IGCresult _import __stdcall _##Y
00090 #         define IGC_DLL_CALL(Y) _##Y
00091 #      elif defined(CHM_64)
00092 #         define IGC_DLL_FUNC(Y) IGC_EXTERN_C __declspec(dllimport) IGCresult __stdcall Y
00093 #         define IGC_DLL_CALL(Y) Y 
00094 #      else
00095 #         define IGC_DLL_FUNC(Y) IGC_EXTERN_C __declspec(dllimport) IGCresult __stdcall _##Y
00096 #         define IGC_DLL_CALL(Y) _##Y 
00097 #      endif
00098 #   else
00099 #      define IGC_DLL_FUNC(Y) IGC_EXTERN_C IGCresult Y
00100 #      define IGC_DLL_CALL(Y) Y
00101 #   endif
00102 #endif
00103 
00104 #endif // end of defensive include